featurebase-node 0.0.2

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 (795) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/LICENSE +201 -0
  3. package/README.md +356 -0
  4. package/api-promise.d.mts +2 -0
  5. package/api-promise.d.mts.map +1 -0
  6. package/api-promise.d.ts +2 -0
  7. package/api-promise.d.ts.map +1 -0
  8. package/api-promise.js +6 -0
  9. package/api-promise.js.map +1 -0
  10. package/api-promise.mjs +2 -0
  11. package/api-promise.mjs.map +1 -0
  12. package/client.d.mts +274 -0
  13. package/client.d.mts.map +1 -0
  14. package/client.d.ts +274 -0
  15. package/client.d.ts.map +1 -0
  16. package/client.js +569 -0
  17. package/client.js.map +1 -0
  18. package/client.mjs +565 -0
  19. package/client.mjs.map +1 -0
  20. package/core/api-promise.d.mts +46 -0
  21. package/core/api-promise.d.mts.map +1 -0
  22. package/core/api-promise.d.ts +46 -0
  23. package/core/api-promise.d.ts.map +1 -0
  24. package/core/api-promise.js +74 -0
  25. package/core/api-promise.js.map +1 -0
  26. package/core/api-promise.mjs +70 -0
  27. package/core/api-promise.mjs.map +1 -0
  28. package/core/error.d.mts +46 -0
  29. package/core/error.d.mts.map +1 -0
  30. package/core/error.d.ts +46 -0
  31. package/core/error.d.ts.map +1 -0
  32. package/core/error.js +113 -0
  33. package/core/error.js.map +1 -0
  34. package/core/error.mjs +97 -0
  35. package/core/error.mjs.map +1 -0
  36. package/core/resource.d.mts +6 -0
  37. package/core/resource.d.mts.map +1 -0
  38. package/core/resource.d.ts +6 -0
  39. package/core/resource.d.ts.map +1 -0
  40. package/core/resource.js +11 -0
  41. package/core/resource.js.map +1 -0
  42. package/core/resource.mjs +7 -0
  43. package/core/resource.mjs.map +1 -0
  44. package/core/uploads.d.mts +3 -0
  45. package/core/uploads.d.mts.map +1 -0
  46. package/core/uploads.d.ts +3 -0
  47. package/core/uploads.d.ts.map +1 -0
  48. package/core/uploads.js +6 -0
  49. package/core/uploads.js.map +1 -0
  50. package/core/uploads.mjs +2 -0
  51. package/core/uploads.mjs.map +1 -0
  52. package/error.d.mts +2 -0
  53. package/error.d.mts.map +1 -0
  54. package/error.d.ts +2 -0
  55. package/error.d.ts.map +1 -0
  56. package/error.js +6 -0
  57. package/error.js.map +1 -0
  58. package/error.mjs +2 -0
  59. package/error.mjs.map +1 -0
  60. package/index.d.mts +6 -0
  61. package/index.d.mts.map +1 -0
  62. package/index.d.ts +6 -0
  63. package/index.d.ts.map +1 -0
  64. package/index.js +30 -0
  65. package/index.js.map +1 -0
  66. package/index.mjs +7 -0
  67. package/index.mjs.map +1 -0
  68. package/internal/builtin-types.d.mts +73 -0
  69. package/internal/builtin-types.d.mts.map +1 -0
  70. package/internal/builtin-types.d.ts +73 -0
  71. package/internal/builtin-types.d.ts.map +1 -0
  72. package/internal/builtin-types.js +4 -0
  73. package/internal/builtin-types.js.map +1 -0
  74. package/internal/builtin-types.mjs +3 -0
  75. package/internal/builtin-types.mjs.map +1 -0
  76. package/internal/detect-platform.d.mts +15 -0
  77. package/internal/detect-platform.d.mts.map +1 -0
  78. package/internal/detect-platform.d.ts +15 -0
  79. package/internal/detect-platform.d.ts.map +1 -0
  80. package/internal/detect-platform.js +162 -0
  81. package/internal/detect-platform.js.map +1 -0
  82. package/internal/detect-platform.mjs +157 -0
  83. package/internal/detect-platform.mjs.map +1 -0
  84. package/internal/errors.d.mts +3 -0
  85. package/internal/errors.d.mts.map +1 -0
  86. package/internal/errors.d.ts +3 -0
  87. package/internal/errors.d.ts.map +1 -0
  88. package/internal/errors.js +41 -0
  89. package/internal/errors.js.map +1 -0
  90. package/internal/errors.mjs +36 -0
  91. package/internal/errors.mjs.map +1 -0
  92. package/internal/headers.d.mts +20 -0
  93. package/internal/headers.d.mts.map +1 -0
  94. package/internal/headers.d.ts +20 -0
  95. package/internal/headers.d.ts.map +1 -0
  96. package/internal/headers.js +79 -0
  97. package/internal/headers.js.map +1 -0
  98. package/internal/headers.mjs +74 -0
  99. package/internal/headers.mjs.map +1 -0
  100. package/internal/parse.d.mts +12 -0
  101. package/internal/parse.d.mts.map +1 -0
  102. package/internal/parse.d.ts +12 -0
  103. package/internal/parse.d.ts.map +1 -0
  104. package/internal/parse.js +40 -0
  105. package/internal/parse.js.map +1 -0
  106. package/internal/parse.mjs +37 -0
  107. package/internal/parse.mjs.map +1 -0
  108. package/internal/qs/formats.d.mts +7 -0
  109. package/internal/qs/formats.d.mts.map +1 -0
  110. package/internal/qs/formats.d.ts +7 -0
  111. package/internal/qs/formats.d.ts.map +1 -0
  112. package/internal/qs/formats.js +13 -0
  113. package/internal/qs/formats.js.map +1 -0
  114. package/internal/qs/formats.mjs +9 -0
  115. package/internal/qs/formats.mjs.map +1 -0
  116. package/internal/qs/index.d.mts +10 -0
  117. package/internal/qs/index.d.mts.map +1 -0
  118. package/internal/qs/index.d.ts +10 -0
  119. package/internal/qs/index.d.ts.map +1 -0
  120. package/internal/qs/index.js +14 -0
  121. package/internal/qs/index.js.map +1 -0
  122. package/internal/qs/index.mjs +10 -0
  123. package/internal/qs/index.mjs.map +1 -0
  124. package/internal/qs/stringify.d.mts +3 -0
  125. package/internal/qs/stringify.d.mts.map +1 -0
  126. package/internal/qs/stringify.d.ts +3 -0
  127. package/internal/qs/stringify.d.ts.map +1 -0
  128. package/internal/qs/stringify.js +277 -0
  129. package/internal/qs/stringify.js.map +1 -0
  130. package/internal/qs/stringify.mjs +274 -0
  131. package/internal/qs/stringify.mjs.map +1 -0
  132. package/internal/qs/types.d.mts +57 -0
  133. package/internal/qs/types.d.mts.map +1 -0
  134. package/internal/qs/types.d.ts +57 -0
  135. package/internal/qs/types.d.ts.map +1 -0
  136. package/internal/qs/types.js +3 -0
  137. package/internal/qs/types.js.map +1 -0
  138. package/internal/qs/types.mjs +2 -0
  139. package/internal/qs/types.mjs.map +1 -0
  140. package/internal/qs/utils.d.mts +15 -0
  141. package/internal/qs/utils.d.mts.map +1 -0
  142. package/internal/qs/utils.d.ts +15 -0
  143. package/internal/qs/utils.d.ts.map +1 -0
  144. package/internal/qs/utils.js +230 -0
  145. package/internal/qs/utils.js.map +1 -0
  146. package/internal/qs/utils.mjs +217 -0
  147. package/internal/qs/utils.mjs.map +1 -0
  148. package/internal/request-options.d.mts +75 -0
  149. package/internal/request-options.d.mts.map +1 -0
  150. package/internal/request-options.d.ts +75 -0
  151. package/internal/request-options.d.ts.map +1 -0
  152. package/internal/request-options.js +14 -0
  153. package/internal/request-options.js.map +1 -0
  154. package/internal/request-options.mjs +10 -0
  155. package/internal/request-options.mjs.map +1 -0
  156. package/internal/shim-types.d.mts +17 -0
  157. package/internal/shim-types.d.mts.map +1 -0
  158. package/internal/shim-types.d.ts +17 -0
  159. package/internal/shim-types.d.ts.map +1 -0
  160. package/internal/shim-types.js +4 -0
  161. package/internal/shim-types.js.map +1 -0
  162. package/internal/shim-types.mjs +3 -0
  163. package/internal/shim-types.mjs.map +1 -0
  164. package/internal/shims.d.mts +20 -0
  165. package/internal/shims.d.mts.map +1 -0
  166. package/internal/shims.d.ts +20 -0
  167. package/internal/shims.d.ts.map +1 -0
  168. package/internal/shims.js +92 -0
  169. package/internal/shims.js.map +1 -0
  170. package/internal/shims.mjs +85 -0
  171. package/internal/shims.mjs.map +1 -0
  172. package/internal/to-file.d.mts +45 -0
  173. package/internal/to-file.d.mts.map +1 -0
  174. package/internal/to-file.d.ts +45 -0
  175. package/internal/to-file.d.ts.map +1 -0
  176. package/internal/to-file.js +91 -0
  177. package/internal/to-file.js.map +1 -0
  178. package/internal/to-file.mjs +88 -0
  179. package/internal/to-file.mjs.map +1 -0
  180. package/internal/tslib.js +81 -0
  181. package/internal/tslib.mjs +17 -0
  182. package/internal/types.d.mts +69 -0
  183. package/internal/types.d.mts.map +1 -0
  184. package/internal/types.d.ts +69 -0
  185. package/internal/types.d.ts.map +1 -0
  186. package/internal/types.js +4 -0
  187. package/internal/types.js.map +1 -0
  188. package/internal/types.mjs +3 -0
  189. package/internal/types.mjs.map +1 -0
  190. package/internal/uploads.d.mts +42 -0
  191. package/internal/uploads.d.mts.map +1 -0
  192. package/internal/uploads.d.ts +42 -0
  193. package/internal/uploads.d.ts.map +1 -0
  194. package/internal/uploads.js +141 -0
  195. package/internal/uploads.js.map +1 -0
  196. package/internal/uploads.mjs +131 -0
  197. package/internal/uploads.mjs.map +1 -0
  198. package/internal/utils/base64.d.mts +3 -0
  199. package/internal/utils/base64.d.mts.map +1 -0
  200. package/internal/utils/base64.d.ts +3 -0
  201. package/internal/utils/base64.d.ts.map +1 -0
  202. package/internal/utils/base64.js +38 -0
  203. package/internal/utils/base64.js.map +1 -0
  204. package/internal/utils/base64.mjs +33 -0
  205. package/internal/utils/base64.mjs.map +1 -0
  206. package/internal/utils/bytes.d.mts +4 -0
  207. package/internal/utils/bytes.d.mts.map +1 -0
  208. package/internal/utils/bytes.d.ts +4 -0
  209. package/internal/utils/bytes.d.ts.map +1 -0
  210. package/internal/utils/bytes.js +31 -0
  211. package/internal/utils/bytes.js.map +1 -0
  212. package/internal/utils/bytes.mjs +26 -0
  213. package/internal/utils/bytes.mjs.map +1 -0
  214. package/internal/utils/env.d.mts +9 -0
  215. package/internal/utils/env.d.mts.map +1 -0
  216. package/internal/utils/env.d.ts +9 -0
  217. package/internal/utils/env.d.ts.map +1 -0
  218. package/internal/utils/env.js +22 -0
  219. package/internal/utils/env.js.map +1 -0
  220. package/internal/utils/env.mjs +18 -0
  221. package/internal/utils/env.mjs.map +1 -0
  222. package/internal/utils/log.d.mts +37 -0
  223. package/internal/utils/log.d.mts.map +1 -0
  224. package/internal/utils/log.d.ts +37 -0
  225. package/internal/utils/log.d.ts.map +1 -0
  226. package/internal/utils/log.js +85 -0
  227. package/internal/utils/log.js.map +1 -0
  228. package/internal/utils/log.mjs +79 -0
  229. package/internal/utils/log.mjs.map +1 -0
  230. package/internal/utils/path.d.mts +15 -0
  231. package/internal/utils/path.d.mts.map +1 -0
  232. package/internal/utils/path.d.ts +15 -0
  233. package/internal/utils/path.d.ts.map +1 -0
  234. package/internal/utils/path.js +79 -0
  235. package/internal/utils/path.js.map +1 -0
  236. package/internal/utils/path.mjs +74 -0
  237. package/internal/utils/path.mjs.map +1 -0
  238. package/internal/utils/query.d.mts +2 -0
  239. package/internal/utils/query.d.mts.map +1 -0
  240. package/internal/utils/query.d.ts +2 -0
  241. package/internal/utils/query.d.ts.map +1 -0
  242. package/internal/utils/query.js +10 -0
  243. package/internal/utils/query.js.map +1 -0
  244. package/internal/utils/query.mjs +6 -0
  245. package/internal/utils/query.mjs.map +1 -0
  246. package/internal/utils/sleep.d.mts +2 -0
  247. package/internal/utils/sleep.d.mts.map +1 -0
  248. package/internal/utils/sleep.d.ts +2 -0
  249. package/internal/utils/sleep.d.ts.map +1 -0
  250. package/internal/utils/sleep.js +7 -0
  251. package/internal/utils/sleep.js.map +1 -0
  252. package/internal/utils/sleep.mjs +3 -0
  253. package/internal/utils/sleep.mjs.map +1 -0
  254. package/internal/utils/uuid.d.mts +5 -0
  255. package/internal/utils/uuid.d.mts.map +1 -0
  256. package/internal/utils/uuid.d.ts +5 -0
  257. package/internal/utils/uuid.d.ts.map +1 -0
  258. package/internal/utils/uuid.js +19 -0
  259. package/internal/utils/uuid.js.map +1 -0
  260. package/internal/utils/uuid.mjs +15 -0
  261. package/internal/utils/uuid.mjs.map +1 -0
  262. package/internal/utils/values.d.mts +18 -0
  263. package/internal/utils/values.d.mts.map +1 -0
  264. package/internal/utils/values.d.ts +18 -0
  265. package/internal/utils/values.d.ts.map +1 -0
  266. package/internal/utils/values.js +112 -0
  267. package/internal/utils/values.js.map +1 -0
  268. package/internal/utils/values.mjs +94 -0
  269. package/internal/utils/values.mjs.map +1 -0
  270. package/internal/utils.d.mts +8 -0
  271. package/internal/utils.d.mts.map +1 -0
  272. package/internal/utils.d.ts +8 -0
  273. package/internal/utils.d.ts.map +1 -0
  274. package/internal/utils.js +12 -0
  275. package/internal/utils.js.map +1 -0
  276. package/internal/utils.mjs +9 -0
  277. package/internal/utils.mjs.map +1 -0
  278. package/package.json +143 -0
  279. package/resource.d.mts +2 -0
  280. package/resource.d.mts.map +1 -0
  281. package/resource.d.ts +2 -0
  282. package/resource.d.ts.map +1 -0
  283. package/resource.js +6 -0
  284. package/resource.js.map +1 -0
  285. package/resource.mjs +2 -0
  286. package/resource.mjs.map +1 -0
  287. package/resources/admins.d.mts +437 -0
  288. package/resources/admins.d.mts.map +1 -0
  289. package/resources/admins.d.ts +437 -0
  290. package/resources/admins.d.ts.map +1 -0
  291. package/resources/admins.js +157 -0
  292. package/resources/admins.js.map +1 -0
  293. package/resources/admins.mjs +153 -0
  294. package/resources/admins.mjs.map +1 -0
  295. package/resources/boards.d.mts +202 -0
  296. package/resources/boards.d.mts.map +1 -0
  297. package/resources/boards.d.ts +202 -0
  298. package/resources/boards.d.ts.map +1 -0
  299. package/resources/boards.js +52 -0
  300. package/resources/boards.js.map +1 -0
  301. package/resources/boards.mjs +48 -0
  302. package/resources/boards.mjs.map +1 -0
  303. package/resources/brands.d.mts +180 -0
  304. package/resources/brands.d.mts.map +1 -0
  305. package/resources/brands.d.ts +180 -0
  306. package/resources/brands.d.ts.map +1 -0
  307. package/resources/brands.js +130 -0
  308. package/resources/brands.js.map +1 -0
  309. package/resources/brands.mjs +126 -0
  310. package/resources/brands.mjs.map +1 -0
  311. package/resources/changelogs/changelogs.d.mts +723 -0
  312. package/resources/changelogs/changelogs.d.mts.map +1 -0
  313. package/resources/changelogs/changelogs.d.ts +723 -0
  314. package/resources/changelogs/changelogs.d.ts.map +1 -0
  315. package/resources/changelogs/changelogs.js +406 -0
  316. package/resources/changelogs/changelogs.js.map +1 -0
  317. package/resources/changelogs/changelogs.mjs +401 -0
  318. package/resources/changelogs/changelogs.mjs.map +1 -0
  319. package/resources/changelogs/index.d.mts +3 -0
  320. package/resources/changelogs/index.d.mts.map +1 -0
  321. package/resources/changelogs/index.d.ts +3 -0
  322. package/resources/changelogs/index.d.ts.map +1 -0
  323. package/resources/changelogs/index.js +9 -0
  324. package/resources/changelogs/index.js.map +1 -0
  325. package/resources/changelogs/index.mjs +4 -0
  326. package/resources/changelogs/index.mjs.map +1 -0
  327. package/resources/changelogs/subscribers.d.mts +145 -0
  328. package/resources/changelogs/subscribers.d.mts.map +1 -0
  329. package/resources/changelogs/subscribers.d.ts +145 -0
  330. package/resources/changelogs/subscribers.d.ts.map +1 -0
  331. package/resources/changelogs/subscribers.js +119 -0
  332. package/resources/changelogs/subscribers.js.map +1 -0
  333. package/resources/changelogs/subscribers.mjs +115 -0
  334. package/resources/changelogs/subscribers.mjs.map +1 -0
  335. package/resources/changelogs.d.mts +2 -0
  336. package/resources/changelogs.d.mts.map +1 -0
  337. package/resources/changelogs.d.ts +2 -0
  338. package/resources/changelogs.d.ts.map +1 -0
  339. package/resources/changelogs.js +6 -0
  340. package/resources/changelogs.js.map +1 -0
  341. package/resources/changelogs.mjs +3 -0
  342. package/resources/changelogs.mjs.map +1 -0
  343. package/resources/comments.d.mts +632 -0
  344. package/resources/comments.d.mts.map +1 -0
  345. package/resources/comments.d.ts +632 -0
  346. package/resources/comments.d.ts.map +1 -0
  347. package/resources/comments.js +397 -0
  348. package/resources/comments.js.map +1 -0
  349. package/resources/comments.mjs +393 -0
  350. package/resources/comments.mjs.map +1 -0
  351. package/resources/companies/companies.d.mts +497 -0
  352. package/resources/companies/companies.d.mts.map +1 -0
  353. package/resources/companies/companies.d.ts +497 -0
  354. package/resources/companies/companies.d.ts.map +1 -0
  355. package/resources/companies/companies.js +368 -0
  356. package/resources/companies/companies.js.map +1 -0
  357. package/resources/companies/companies.mjs +363 -0
  358. package/resources/companies/companies.mjs.map +1 -0
  359. package/resources/companies/contacts.d.mts +236 -0
  360. package/resources/companies/contacts.d.mts.map +1 -0
  361. package/resources/companies/contacts.d.ts +236 -0
  362. package/resources/companies/contacts.d.ts.map +1 -0
  363. package/resources/companies/contacts.js +218 -0
  364. package/resources/companies/contacts.js.map +1 -0
  365. package/resources/companies/contacts.mjs +214 -0
  366. package/resources/companies/contacts.mjs.map +1 -0
  367. package/resources/companies/index.d.mts +3 -0
  368. package/resources/companies/index.d.mts.map +1 -0
  369. package/resources/companies/index.d.ts +3 -0
  370. package/resources/companies/index.d.ts.map +1 -0
  371. package/resources/companies/index.js +9 -0
  372. package/resources/companies/index.js.map +1 -0
  373. package/resources/companies/index.mjs +4 -0
  374. package/resources/companies/index.mjs.map +1 -0
  375. package/resources/companies.d.mts +2 -0
  376. package/resources/companies.d.mts.map +1 -0
  377. package/resources/companies.d.ts +2 -0
  378. package/resources/companies.d.ts.map +1 -0
  379. package/resources/companies.js +6 -0
  380. package/resources/companies.js.map +1 -0
  381. package/resources/companies.mjs +3 -0
  382. package/resources/companies.mjs.map +1 -0
  383. package/resources/contacts/by-user-id/by-user-id.d.mts +147 -0
  384. package/resources/contacts/by-user-id/by-user-id.d.mts.map +1 -0
  385. package/resources/contacts/by-user-id/by-user-id.d.ts +147 -0
  386. package/resources/contacts/by-user-id/by-user-id.d.ts.map +1 -0
  387. package/resources/contacts/by-user-id/by-user-id.js +152 -0
  388. package/resources/contacts/by-user-id/by-user-id.js.map +1 -0
  389. package/resources/contacts/by-user-id/by-user-id.mjs +147 -0
  390. package/resources/contacts/by-user-id/by-user-id.mjs.map +1 -0
  391. package/resources/contacts/by-user-id/email-preferences.d.mts +199 -0
  392. package/resources/contacts/by-user-id/email-preferences.d.mts.map +1 -0
  393. package/resources/contacts/by-user-id/email-preferences.d.ts +199 -0
  394. package/resources/contacts/by-user-id/email-preferences.d.ts.map +1 -0
  395. package/resources/contacts/by-user-id/email-preferences.js +176 -0
  396. package/resources/contacts/by-user-id/email-preferences.js.map +1 -0
  397. package/resources/contacts/by-user-id/email-preferences.mjs +172 -0
  398. package/resources/contacts/by-user-id/email-preferences.mjs.map +1 -0
  399. package/resources/contacts/by-user-id/index.d.mts +3 -0
  400. package/resources/contacts/by-user-id/index.d.mts.map +1 -0
  401. package/resources/contacts/by-user-id/index.d.ts +3 -0
  402. package/resources/contacts/by-user-id/index.d.ts.map +1 -0
  403. package/resources/contacts/by-user-id/index.js +9 -0
  404. package/resources/contacts/by-user-id/index.js.map +1 -0
  405. package/resources/contacts/by-user-id/index.mjs +4 -0
  406. package/resources/contacts/by-user-id/index.mjs.map +1 -0
  407. package/resources/contacts/by-user-id.d.mts +2 -0
  408. package/resources/contacts/by-user-id.d.mts.map +1 -0
  409. package/resources/contacts/by-user-id.d.ts +2 -0
  410. package/resources/contacts/by-user-id.d.ts.map +1 -0
  411. package/resources/contacts/by-user-id.js +6 -0
  412. package/resources/contacts/by-user-id.js.map +1 -0
  413. package/resources/contacts/by-user-id.mjs +3 -0
  414. package/resources/contacts/by-user-id.mjs.map +1 -0
  415. package/resources/contacts/contacts.d.mts +708 -0
  416. package/resources/contacts/contacts.d.mts.map +1 -0
  417. package/resources/contacts/contacts.d.ts +708 -0
  418. package/resources/contacts/contacts.d.ts.map +1 -0
  419. package/resources/contacts/contacts.js +444 -0
  420. package/resources/contacts/contacts.js.map +1 -0
  421. package/resources/contacts/contacts.mjs +439 -0
  422. package/resources/contacts/contacts.mjs.map +1 -0
  423. package/resources/contacts/email-preferences.d.mts +334 -0
  424. package/resources/contacts/email-preferences.d.mts.map +1 -0
  425. package/resources/contacts/email-preferences.d.ts +334 -0
  426. package/resources/contacts/email-preferences.d.ts.map +1 -0
  427. package/resources/contacts/email-preferences.js +219 -0
  428. package/resources/contacts/email-preferences.js.map +1 -0
  429. package/resources/contacts/email-preferences.mjs +215 -0
  430. package/resources/contacts/email-preferences.mjs.map +1 -0
  431. package/resources/contacts/index.d.mts +4 -0
  432. package/resources/contacts/index.d.mts.map +1 -0
  433. package/resources/contacts/index.d.ts +4 -0
  434. package/resources/contacts/index.d.ts.map +1 -0
  435. package/resources/contacts/index.js +11 -0
  436. package/resources/contacts/index.js.map +1 -0
  437. package/resources/contacts/index.mjs +5 -0
  438. package/resources/contacts/index.mjs.map +1 -0
  439. package/resources/contacts.d.mts +2 -0
  440. package/resources/contacts.d.mts.map +1 -0
  441. package/resources/contacts.d.ts +2 -0
  442. package/resources/contacts.d.ts.map +1 -0
  443. package/resources/contacts.js +6 -0
  444. package/resources/contacts.js.map +1 -0
  445. package/resources/contacts.mjs +3 -0
  446. package/resources/contacts.mjs.map +1 -0
  447. package/resources/conversations/conversations.d.mts +2235 -0
  448. package/resources/conversations/conversations.d.mts.map +1 -0
  449. package/resources/conversations/conversations.d.ts +2235 -0
  450. package/resources/conversations/conversations.d.ts.map +1 -0
  451. package/resources/conversations/conversations.js +753 -0
  452. package/resources/conversations/conversations.js.map +1 -0
  453. package/resources/conversations/conversations.mjs +748 -0
  454. package/resources/conversations/conversations.mjs.map +1 -0
  455. package/resources/conversations/index.d.mts +4 -0
  456. package/resources/conversations/index.d.mts.map +1 -0
  457. package/resources/conversations/index.d.ts +4 -0
  458. package/resources/conversations/index.d.ts.map +1 -0
  459. package/resources/conversations/index.js +11 -0
  460. package/resources/conversations/index.js.map +1 -0
  461. package/resources/conversations/index.mjs +5 -0
  462. package/resources/conversations/index.mjs.map +1 -0
  463. package/resources/conversations/participants.d.mts +217 -0
  464. package/resources/conversations/participants.d.mts.map +1 -0
  465. package/resources/conversations/participants.d.ts +217 -0
  466. package/resources/conversations/participants.d.ts.map +1 -0
  467. package/resources/conversations/participants.js +185 -0
  468. package/resources/conversations/participants.js.map +1 -0
  469. package/resources/conversations/participants.mjs +181 -0
  470. package/resources/conversations/participants.mjs.map +1 -0
  471. package/resources/conversations/tags.d.mts +200 -0
  472. package/resources/conversations/tags.d.mts.map +1 -0
  473. package/resources/conversations/tags.d.ts +200 -0
  474. package/resources/conversations/tags.d.ts.map +1 -0
  475. package/resources/conversations/tags.js +138 -0
  476. package/resources/conversations/tags.js.map +1 -0
  477. package/resources/conversations/tags.mjs +134 -0
  478. package/resources/conversations/tags.mjs.map +1 -0
  479. package/resources/conversations.d.mts +2 -0
  480. package/resources/conversations.d.mts.map +1 -0
  481. package/resources/conversations.d.ts +2 -0
  482. package/resources/conversations.d.ts.map +1 -0
  483. package/resources/conversations.js +6 -0
  484. package/resources/conversations.js.map +1 -0
  485. package/resources/conversations.mjs +3 -0
  486. package/resources/conversations.mjs.map +1 -0
  487. package/resources/custom-fields.d.mts +189 -0
  488. package/resources/custom-fields.d.mts.map +1 -0
  489. package/resources/custom-fields.d.ts +189 -0
  490. package/resources/custom-fields.d.ts.map +1 -0
  491. package/resources/custom-fields.js +92 -0
  492. package/resources/custom-fields.js.map +1 -0
  493. package/resources/custom-fields.mjs +88 -0
  494. package/resources/custom-fields.mjs.map +1 -0
  495. package/resources/help-center/articles.d.mts +770 -0
  496. package/resources/help-center/articles.d.mts.map +1 -0
  497. package/resources/help-center/articles.d.ts +770 -0
  498. package/resources/help-center/articles.d.ts.map +1 -0
  499. package/resources/help-center/articles.js +296 -0
  500. package/resources/help-center/articles.js.map +1 -0
  501. package/resources/help-center/articles.mjs +292 -0
  502. package/resources/help-center/articles.mjs.map +1 -0
  503. package/resources/help-center/collections.d.mts +669 -0
  504. package/resources/help-center/collections.d.mts.map +1 -0
  505. package/resources/help-center/collections.d.ts +669 -0
  506. package/resources/help-center/collections.d.ts.map +1 -0
  507. package/resources/help-center/collections.js +278 -0
  508. package/resources/help-center/collections.js.map +1 -0
  509. package/resources/help-center/collections.mjs +274 -0
  510. package/resources/help-center/collections.mjs.map +1 -0
  511. package/resources/help-center/help-center.d.mts +22 -0
  512. package/resources/help-center/help-center.d.mts.map +1 -0
  513. package/resources/help-center/help-center.d.ts +22 -0
  514. package/resources/help-center/help-center.d.ts.map +1 -0
  515. package/resources/help-center/help-center.js +29 -0
  516. package/resources/help-center/help-center.js.map +1 -0
  517. package/resources/help-center/help-center.mjs +24 -0
  518. package/resources/help-center/help-center.mjs.map +1 -0
  519. package/resources/help-center/help-centers.d.mts +312 -0
  520. package/resources/help-center/help-centers.d.mts.map +1 -0
  521. package/resources/help-center/help-centers.d.ts +312 -0
  522. package/resources/help-center/help-centers.d.ts.map +1 -0
  523. package/resources/help-center/help-centers.js +111 -0
  524. package/resources/help-center/help-centers.js.map +1 -0
  525. package/resources/help-center/help-centers.mjs +107 -0
  526. package/resources/help-center/help-centers.mjs.map +1 -0
  527. package/resources/help-center/index.d.mts +6 -0
  528. package/resources/help-center/index.d.mts.map +1 -0
  529. package/resources/help-center/index.d.ts +6 -0
  530. package/resources/help-center/index.d.ts.map +1 -0
  531. package/resources/help-center/index.js +15 -0
  532. package/resources/help-center/index.js.map +1 -0
  533. package/resources/help-center/index.mjs +7 -0
  534. package/resources/help-center/index.mjs.map +1 -0
  535. package/resources/help-center/redirect-rules.d.mts +417 -0
  536. package/resources/help-center/redirect-rules.d.mts.map +1 -0
  537. package/resources/help-center/redirect-rules.d.ts +417 -0
  538. package/resources/help-center/redirect-rules.d.ts.map +1 -0
  539. package/resources/help-center/redirect-rules.js +297 -0
  540. package/resources/help-center/redirect-rules.js.map +1 -0
  541. package/resources/help-center/redirect-rules.mjs +293 -0
  542. package/resources/help-center/redirect-rules.mjs.map +1 -0
  543. package/resources/help-center.d.mts +2 -0
  544. package/resources/help-center.d.mts.map +1 -0
  545. package/resources/help-center.d.ts +2 -0
  546. package/resources/help-center.d.ts.map +1 -0
  547. package/resources/help-center.js +6 -0
  548. package/resources/help-center.js.map +1 -0
  549. package/resources/help-center.mjs +3 -0
  550. package/resources/help-center.mjs.map +1 -0
  551. package/resources/index.d.mts +18 -0
  552. package/resources/index.d.mts.map +1 -0
  553. package/resources/index.d.ts +18 -0
  554. package/resources/index.d.ts.map +1 -0
  555. package/resources/index.js +39 -0
  556. package/resources/index.js.map +1 -0
  557. package/resources/index.mjs +19 -0
  558. package/resources/index.mjs.map +1 -0
  559. package/resources/post-statuses.d.mts +74 -0
  560. package/resources/post-statuses.d.mts.map +1 -0
  561. package/resources/post-statuses.d.ts +74 -0
  562. package/resources/post-statuses.d.ts.map +1 -0
  563. package/resources/post-statuses.js +53 -0
  564. package/resources/post-statuses.js.map +1 -0
  565. package/resources/post-statuses.mjs +49 -0
  566. package/resources/post-statuses.mjs.map +1 -0
  567. package/resources/posts/index.d.mts +3 -0
  568. package/resources/posts/index.d.mts.map +1 -0
  569. package/resources/posts/index.d.ts +3 -0
  570. package/resources/posts/index.d.ts.map +1 -0
  571. package/resources/posts/index.js +9 -0
  572. package/resources/posts/index.js.map +1 -0
  573. package/resources/posts/index.mjs +4 -0
  574. package/resources/posts/index.mjs.map +1 -0
  575. package/resources/posts/posts.d.mts +799 -0
  576. package/resources/posts/posts.d.mts.map +1 -0
  577. package/resources/posts/posts.d.ts +799 -0
  578. package/resources/posts/posts.d.ts.map +1 -0
  579. package/resources/posts/posts.js +271 -0
  580. package/resources/posts/posts.js.map +1 -0
  581. package/resources/posts/posts.mjs +266 -0
  582. package/resources/posts/posts.mjs.map +1 -0
  583. package/resources/posts/voters.d.mts +359 -0
  584. package/resources/posts/voters.d.mts.map +1 -0
  585. package/resources/posts/voters.d.ts +359 -0
  586. package/resources/posts/voters.d.ts.map +1 -0
  587. package/resources/posts/voters.js +171 -0
  588. package/resources/posts/voters.js.map +1 -0
  589. package/resources/posts/voters.mjs +167 -0
  590. package/resources/posts/voters.mjs.map +1 -0
  591. package/resources/posts.d.mts +2 -0
  592. package/resources/posts.d.mts.map +1 -0
  593. package/resources/posts.d.ts +2 -0
  594. package/resources/posts.d.ts.map +1 -0
  595. package/resources/posts.js +6 -0
  596. package/resources/posts.js.map +1 -0
  597. package/resources/posts.mjs +3 -0
  598. package/resources/posts.mjs.map +1 -0
  599. package/resources/surveys.d.mts +451 -0
  600. package/resources/surveys.d.mts.map +1 -0
  601. package/resources/surveys.d.ts +451 -0
  602. package/resources/surveys.d.ts.map +1 -0
  603. package/resources/surveys.js +149 -0
  604. package/resources/surveys.js.map +1 -0
  605. package/resources/surveys.mjs +145 -0
  606. package/resources/surveys.mjs.map +1 -0
  607. package/resources/tags.d.mts +147 -0
  608. package/resources/tags.d.mts.map +1 -0
  609. package/resources/tags.d.ts +147 -0
  610. package/resources/tags.d.ts.map +1 -0
  611. package/resources/tags.js +100 -0
  612. package/resources/tags.js.map +1 -0
  613. package/resources/tags.mjs +96 -0
  614. package/resources/tags.mjs.map +1 -0
  615. package/resources/teams.d.mts +165 -0
  616. package/resources/teams.d.mts.map +1 -0
  617. package/resources/teams.d.ts +165 -0
  618. package/resources/teams.d.ts.map +1 -0
  619. package/resources/teams.js +120 -0
  620. package/resources/teams.js.map +1 -0
  621. package/resources/teams.mjs +116 -0
  622. package/resources/teams.mjs.map +1 -0
  623. package/resources/tickets/categories.d.mts +63 -0
  624. package/resources/tickets/categories.d.mts.map +1 -0
  625. package/resources/tickets/categories.d.ts +63 -0
  626. package/resources/tickets/categories.d.ts.map +1 -0
  627. package/resources/tickets/categories.js +67 -0
  628. package/resources/tickets/categories.js.map +1 -0
  629. package/resources/tickets/categories.mjs +63 -0
  630. package/resources/tickets/categories.mjs.map +1 -0
  631. package/resources/tickets/custom-fields.d.mts +80 -0
  632. package/resources/tickets/custom-fields.d.mts.map +1 -0
  633. package/resources/tickets/custom-fields.d.ts +80 -0
  634. package/resources/tickets/custom-fields.d.ts.map +1 -0
  635. package/resources/tickets/custom-fields.js +85 -0
  636. package/resources/tickets/custom-fields.js.map +1 -0
  637. package/resources/tickets/custom-fields.mjs +81 -0
  638. package/resources/tickets/custom-fields.mjs.map +1 -0
  639. package/resources/tickets/index.d.mts +5 -0
  640. package/resources/tickets/index.d.mts.map +1 -0
  641. package/resources/tickets/index.d.ts +5 -0
  642. package/resources/tickets/index.d.ts.map +1 -0
  643. package/resources/tickets/index.js +13 -0
  644. package/resources/tickets/index.js.map +1 -0
  645. package/resources/tickets/index.mjs +6 -0
  646. package/resources/tickets/index.mjs.map +1 -0
  647. package/resources/tickets/statuses.d.mts +59 -0
  648. package/resources/tickets/statuses.d.mts.map +1 -0
  649. package/resources/tickets/statuses.d.ts +59 -0
  650. package/resources/tickets/statuses.d.ts.map +1 -0
  651. package/resources/tickets/statuses.js +63 -0
  652. package/resources/tickets/statuses.js.map +1 -0
  653. package/resources/tickets/statuses.mjs +59 -0
  654. package/resources/tickets/statuses.mjs.map +1 -0
  655. package/resources/tickets/tickets.d.mts +794 -0
  656. package/resources/tickets/tickets.d.mts.map +1 -0
  657. package/resources/tickets/tickets.d.ts +794 -0
  658. package/resources/tickets/tickets.d.ts.map +1 -0
  659. package/resources/tickets/tickets.js +327 -0
  660. package/resources/tickets/tickets.js.map +1 -0
  661. package/resources/tickets/tickets.mjs +322 -0
  662. package/resources/tickets/tickets.mjs.map +1 -0
  663. package/resources/tickets.d.mts +2 -0
  664. package/resources/tickets.d.mts.map +1 -0
  665. package/resources/tickets.d.ts +2 -0
  666. package/resources/tickets.d.ts.map +1 -0
  667. package/resources/tickets.js +6 -0
  668. package/resources/tickets.js.map +1 -0
  669. package/resources/tickets.mjs +3 -0
  670. package/resources/tickets.mjs.map +1 -0
  671. package/resources/webhooks.d.mts +626 -0
  672. package/resources/webhooks.d.mts.map +1 -0
  673. package/resources/webhooks.d.ts +626 -0
  674. package/resources/webhooks.d.ts.map +1 -0
  675. package/resources/webhooks.js +442 -0
  676. package/resources/webhooks.js.map +1 -0
  677. package/resources/webhooks.mjs +438 -0
  678. package/resources/webhooks.mjs.map +1 -0
  679. package/resources.d.mts +2 -0
  680. package/resources.d.mts.map +1 -0
  681. package/resources.d.ts +2 -0
  682. package/resources.d.ts.map +1 -0
  683. package/resources.js +5 -0
  684. package/resources.js.map +1 -0
  685. package/resources.mjs +2 -0
  686. package/resources.mjs.map +1 -0
  687. package/src/api-promise.ts +2 -0
  688. package/src/client.ts +1169 -0
  689. package/src/core/README.md +3 -0
  690. package/src/core/api-promise.ts +92 -0
  691. package/src/core/error.ts +130 -0
  692. package/src/core/resource.ts +11 -0
  693. package/src/core/uploads.ts +2 -0
  694. package/src/error.ts +2 -0
  695. package/src/index.ts +22 -0
  696. package/src/internal/README.md +3 -0
  697. package/src/internal/builtin-types.ts +93 -0
  698. package/src/internal/detect-platform.ts +196 -0
  699. package/src/internal/errors.ts +33 -0
  700. package/src/internal/headers.ts +97 -0
  701. package/src/internal/parse.ts +56 -0
  702. package/src/internal/qs/LICENSE.md +13 -0
  703. package/src/internal/qs/README.md +3 -0
  704. package/src/internal/qs/formats.ts +10 -0
  705. package/src/internal/qs/index.ts +13 -0
  706. package/src/internal/qs/stringify.ts +385 -0
  707. package/src/internal/qs/types.ts +71 -0
  708. package/src/internal/qs/utils.ts +265 -0
  709. package/src/internal/request-options.ts +91 -0
  710. package/src/internal/shim-types.ts +26 -0
  711. package/src/internal/shims.ts +107 -0
  712. package/src/internal/to-file.ts +154 -0
  713. package/src/internal/types.ts +95 -0
  714. package/src/internal/uploads.ts +187 -0
  715. package/src/internal/utils/base64.ts +40 -0
  716. package/src/internal/utils/bytes.ts +32 -0
  717. package/src/internal/utils/env.ts +18 -0
  718. package/src/internal/utils/log.ts +126 -0
  719. package/src/internal/utils/path.ts +88 -0
  720. package/src/internal/utils/query.ts +7 -0
  721. package/src/internal/utils/sleep.ts +3 -0
  722. package/src/internal/utils/uuid.ts +17 -0
  723. package/src/internal/utils/values.ts +105 -0
  724. package/src/internal/utils.ts +9 -0
  725. package/src/lib/.keep +4 -0
  726. package/src/resource.ts +2 -0
  727. package/src/resources/admins.ts +557 -0
  728. package/src/resources/boards.ts +259 -0
  729. package/src/resources/brands.ts +232 -0
  730. package/src/resources/changelogs/changelogs.ts +1139 -0
  731. package/src/resources/changelogs/index.ts +23 -0
  732. package/src/resources/changelogs/subscribers.ts +226 -0
  733. package/src/resources/changelogs.ts +3 -0
  734. package/src/resources/comments.ts +786 -0
  735. package/src/resources/companies/companies.ts +632 -0
  736. package/src/resources/companies/contacts.ts +299 -0
  737. package/src/resources/companies/index.ts +21 -0
  738. package/src/resources/companies.ts +3 -0
  739. package/src/resources/contacts/by-user-id/by-user-id.ts +200 -0
  740. package/src/resources/contacts/by-user-id/email-preferences.ts +243 -0
  741. package/src/resources/contacts/by-user-id/index.ts +13 -0
  742. package/src/resources/contacts/by-user-id.ts +3 -0
  743. package/src/resources/contacts/contacts.ts +908 -0
  744. package/src/resources/contacts/email-preferences.ts +399 -0
  745. package/src/resources/contacts/index.ts +32 -0
  746. package/src/resources/contacts.ts +3 -0
  747. package/src/resources/conversations/conversations.ts +2721 -0
  748. package/src/resources/conversations/index.ts +31 -0
  749. package/src/resources/conversations/participants.ts +263 -0
  750. package/src/resources/conversations/tags.ts +252 -0
  751. package/src/resources/conversations.ts +3 -0
  752. package/src/resources/custom-fields.ts +249 -0
  753. package/src/resources/help-center/articles.ts +1231 -0
  754. package/src/resources/help-center/collections.ts +1065 -0
  755. package/src/resources/help-center/help-center.ts +125 -0
  756. package/src/resources/help-center/help-centers.ts +558 -0
  757. package/src/resources/help-center/index.ts +52 -0
  758. package/src/resources/help-center/redirect-rules.ts +711 -0
  759. package/src/resources/help-center.ts +3 -0
  760. package/src/resources/index.ts +179 -0
  761. package/src/resources/post-statuses.ts +119 -0
  762. package/src/resources/posts/index.ts +22 -0
  763. package/src/resources/posts/posts.ts +1019 -0
  764. package/src/resources/posts/voters.ts +453 -0
  765. package/src/resources/posts.ts +3 -0
  766. package/src/resources/surveys.ts +576 -0
  767. package/src/resources/tags.ts +226 -0
  768. package/src/resources/teams.ts +213 -0
  769. package/src/resources/tickets/categories.ts +101 -0
  770. package/src/resources/tickets/custom-fields.ts +116 -0
  771. package/src/resources/tickets/index.ts +28 -0
  772. package/src/resources/tickets/statuses.ts +97 -0
  773. package/src/resources/tickets/tickets.ts +1019 -0
  774. package/src/resources/tickets.ts +3 -0
  775. package/src/resources/webhooks.ts +850 -0
  776. package/src/resources.ts +1 -0
  777. package/src/tsconfig.json +11 -0
  778. package/src/uploads.ts +2 -0
  779. package/src/version.ts +1 -0
  780. package/uploads.d.mts +2 -0
  781. package/uploads.d.mts.map +1 -0
  782. package/uploads.d.ts +2 -0
  783. package/uploads.d.ts.map +1 -0
  784. package/uploads.js +6 -0
  785. package/uploads.js.map +1 -0
  786. package/uploads.mjs +2 -0
  787. package/uploads.mjs.map +1 -0
  788. package/version.d.mts +2 -0
  789. package/version.d.mts.map +1 -0
  790. package/version.d.ts +2 -0
  791. package/version.d.ts.map +1 -0
  792. package/version.js +5 -0
  793. package/version.js.map +1 -0
  794. package/version.mjs +2 -0
  795. package/version.mjs.map +1 -0
@@ -0,0 +1,2721 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../core/resource';
4
+ import * as ConversationsAPI from './conversations';
5
+ import * as TagsAPI from '../tags';
6
+ import * as ParticipantsAPI from './participants';
7
+ import { ParticipantAddParams, ParticipantRemoveParams, Participants } from './participants';
8
+ import * as ConversationsTagsAPI from './tags';
9
+ import {
10
+ AttachedConversationTag,
11
+ ConversationTagMutationActor,
12
+ TagAttachParams,
13
+ TagDetachParams,
14
+ Tags,
15
+ } from './tags';
16
+ import { APIPromise } from '../../core/api-promise';
17
+ import { buildHeaders } from '../../internal/headers';
18
+ import { RequestOptions } from '../../internal/request-options';
19
+ import { path } from '../../internal/utils/path';
20
+
21
+ /**
22
+ * Conversations are messenger/inbox conversations in your Featurebase organization. Use this endpoint to list and retrieve conversation information.
23
+ */
24
+ export class Conversations extends APIResource {
25
+ tags: ConversationsTagsAPI.Tags = new ConversationsTagsAPI.Tags(this._client);
26
+ participants: ParticipantsAPI.Participants = new ParticipantsAPI.Participants(this._client);
27
+
28
+ /**
29
+ * Creates a new conversation. Supports both contact-initiated (customer/lead) and
30
+ * admin-initiated (outreach) conversations.
31
+ *
32
+ * ## Contact-Initiated Conversation
33
+ *
34
+ * For conversations started by a customer or lead:
35
+ *
36
+ * | Field | Type | Required | Description |
37
+ * | -------------- | ------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
38
+ * | `from.type` | string | Yes | Must be "contact" |
39
+ * | `from.id` | string | Yes | The Featurebase contact ID (24-character ObjectId) |
40
+ * | `bodyMarkdown` | string | Yes | The initial message content in markdown format. Images referenced by URL or as base64 data URIs will be automatically uploaded and stored. |
41
+ * | `channel` | string | No | The channel: "desktop" (default) or "email" |
42
+ * | `createdAt` | string | No | ISO timestamp for migrations |
43
+ *
44
+ * ### Example Contact-Initiated Request
45
+ *
46
+ * ```json
47
+ * {
48
+ * "from": {
49
+ * "type": "contact",
50
+ * "id": "676f0f6765bdaa7d7d760f88"
51
+ * },
52
+ * "bodyMarkdown": "Hello, I have a question about your product.",
53
+ * "channel": "desktop"
54
+ * }
55
+ * ```
56
+ *
57
+ * ## Admin-Initiated Outreach
58
+ *
59
+ * For outreach conversations started by an admin:
60
+ *
61
+ * | Field | Type | Required | Description |
62
+ * | ---------------------- | -------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
63
+ * | `from.type` | string | Yes | Must be "admin" |
64
+ * | `from.id` | string | Yes | The Featurebase admin ID (24-character ObjectId) |
65
+ * | `bodyMarkdown` | string | Yes | The initial message content in markdown format. Images referenced by URL or as base64 data URIs will be automatically uploaded and stored. |
66
+ * | `channel` | string | No | The channel: "desktop" (default) or "email" |
67
+ * | `recipients` | object | Yes | Recipients for the outreach |
68
+ * | `recipients.to` | object | Yes | Primary recipients |
69
+ * | `recipients.to.emails` | string[] | No\* | Email addresses |
70
+ * | `recipients.to.ids` | string[] | No\* | Featurebase contact IDs |
71
+ * | `recipients.cc` | object | No | CC recipients (same structure as "to") |
72
+ * | `recipients.bcc` | object | No | BCC recipients (same structure as "to") |
73
+ * | `subject` | string | No\*\* | Email subject line |
74
+ * | `createdAt` | string | No | ISO timestamp for migrations |
75
+ *
76
+ * \*At least one email or ID is required in `recipients.to` \*\*Required when
77
+ * channel is "email"
78
+ *
79
+ * ### Example Admin Outreach (In-App)
80
+ *
81
+ * ```json
82
+ * {
83
+ * "from": {
84
+ * "type": "admin",
85
+ * "id": "507f1f77bcf86cd799439011"
86
+ * },
87
+ * "bodyMarkdown": "Hi! Just following up on your inquiry.",
88
+ * "channel": "desktop",
89
+ * "recipients": {
90
+ * "to": {
91
+ * "ids": ["676f0f6765bdaa7d7d760f88"]
92
+ * }
93
+ * }
94
+ * }
95
+ * ```
96
+ *
97
+ * ### Example Admin Outreach (Email)
98
+ *
99
+ * ```json
100
+ * {
101
+ * "from": {
102
+ * "type": "admin",
103
+ * "id": "507f1f77bcf86cd799439011"
104
+ * },
105
+ * "bodyMarkdown": "Hi! Just following up on your inquiry.",
106
+ * "channel": "email",
107
+ * "subject": "Following up on your inquiry",
108
+ * "recipients": {
109
+ * "to": {
110
+ * "emails": ["john@example.com"]
111
+ * },
112
+ * "cc": {
113
+ * "emails": ["manager@example.com"]
114
+ * }
115
+ * }
116
+ * }
117
+ * ```
118
+ *
119
+ * ### Response
120
+ *
121
+ * Returns the created conversation object with a **201 Created** status.
122
+ *
123
+ * ### Example Response
124
+ *
125
+ * ```json
126
+ * {
127
+ * "object": "conversation",
128
+ * "id": "12345",
129
+ * "state": "open",
130
+ * "priority": false,
131
+ * "adminAssigneeId": null,
132
+ * "participants": [{ "type": "customer", "id": "676f0f6765bdaa7d7d760f88" }],
133
+ * "source": {
134
+ * "channel": "desktop",
135
+ * "deliveredAs": "customer_initiated",
136
+ * "bodyHtml": "<p>Hello, I have a question about your product.</p>",
137
+ * "bodyMarkdown": "Hello, I have a question about your product.",
138
+ * "author": { "type": "customer", "id": "676f0f6765bdaa7d7d760f88" }
139
+ * },
140
+ * "createdAt": "2025-01-15T10:30:00.000Z",
141
+ * "updatedAt": "2025-01-15T10:30:00.000Z"
142
+ * }
143
+ * ```
144
+ *
145
+ * ### Version Availability
146
+ *
147
+ * This endpoint is only available in API version 2026-01-01.nova and newer.
148
+ *
149
+ * @example
150
+ * ```ts
151
+ * const conversation = await client.conversations.create({
152
+ * bodyMarkdown:
153
+ * 'Hello, I have a question about your product.\n\n![screenshot](https://example.com/image.png)',
154
+ * from: { id: '676f0f6765bdaa7d7d760f88', type: 'contact' },
155
+ * });
156
+ * ```
157
+ */
158
+ create(params: ConversationCreateParams, options?: RequestOptions): APIPromise<Conversation> {
159
+ const { 'Featurebase-Version': featurebaseVersion, ...body } = params;
160
+ return this._client.post('/v2/conversations', {
161
+ body,
162
+ ...options,
163
+ headers: buildHeaders([
164
+ { ...(featurebaseVersion != null ? { 'Featurebase-Version': featurebaseVersion } : undefined) },
165
+ options?.headers,
166
+ ]),
167
+ });
168
+ }
169
+
170
+ /**
171
+ * Retrieves a single conversation by its ID, including conversation parts
172
+ * (messages).
173
+ *
174
+ * ### Path Parameters
175
+ *
176
+ * - `id` - The conversation ID (short ID)
177
+ *
178
+ * ### Hard Limit of 500 Parts
179
+ *
180
+ * The maximum number of conversation parts that can be returned via the API is
181
+ * **500**. If a conversation has more than 500 parts, only the **500 most recent**
182
+ * conversation parts will be returned.
183
+ *
184
+ * ### Response Format
185
+ *
186
+ * Returns a single conversation object with:
187
+ *
188
+ * - `object` - Always "conversation"
189
+ * - `id` - Unique conversation identifier (short ID)
190
+ * - `title` - Conversation title
191
+ * - `state` - Current state ("open", "closed", or "snoozed")
192
+ * - `priority` - Whether the conversation is marked as priority
193
+ * - `adminAssigneeId` - ID of assigned admin (if any)
194
+ * - `teamAssigneeId` - ID of assigned team (if any)
195
+ * - `participants` - Array of participants
196
+ * - `source` - Information about the first message
197
+ * - `conversationParts` - Array of conversation parts (messages, max 500)
198
+ * - `createdAt` - Creation timestamp
199
+ * - `updatedAt` - Last update timestamp
200
+ *
201
+ * ### Conversation Parts
202
+ *
203
+ * Each conversation part includes:
204
+ *
205
+ * - `object` - Always "conversation_part"
206
+ * - `id` - Unique part identifier
207
+ * - `partType` - Type of part (e.g., "user_msg", "admin_msg", "bot_msg")
208
+ * - `body` - Message body (HTML content)
209
+ * - `author` - Author information with name, email, and profile picture
210
+ * - `channel` - Channel through which the message was sent
211
+ * - `createdAt` - Creation timestamp
212
+ * - `updatedAt` - Last update timestamp
213
+ *
214
+ * ### Example
215
+ *
216
+ * ```json
217
+ * {
218
+ * "object": "conversation",
219
+ * "id": "12345",
220
+ * "title": "Question about pricing",
221
+ * "state": "open",
222
+ * "priority": false,
223
+ * "adminAssigneeId": "507f1f77bcf86cd799439011",
224
+ * "participants": [{ "type": "customer", "id": "676f0f6765bdaa7d7d760f88" }],
225
+ * "conversationParts": [
226
+ * {
227
+ * "object": "conversation_part",
228
+ * "id": "1",
229
+ * "partType": "user_msg",
230
+ * "bodyHtml": "<p>Hello, I have a question about your pricing plans.</p>",
231
+ * "bodyMarkdown": "Hello, I have a question about your pricing plans.",
232
+ * "author": {
233
+ * "type": "customer",
234
+ * "id": "676f0f6765bdaa7d7d760f88",
235
+ * "name": "John Doe",
236
+ * "email": "john@example.com"
237
+ * },
238
+ * "channel": "desktop",
239
+ * "createdAt": "2025-01-15T10:30:00.000Z",
240
+ * "updatedAt": "2025-01-15T10:30:00.000Z"
241
+ * },
242
+ * {
243
+ * "object": "conversation_part",
244
+ * "id": "2",
245
+ * "partType": "admin_msg",
246
+ * "bodyHtml": "<p>Hi John! I'd be happy to help you with pricing information.</p>",
247
+ * "bodyMarkdown": "Hi John! I'd be happy to help you with pricing information.",
248
+ * "author": {
249
+ * "type": "admin",
250
+ * "id": "507f1f77bcf86cd799439011",
251
+ * "name": "Support Agent"
252
+ * },
253
+ * "channel": "desktop",
254
+ * "createdAt": "2025-01-15T10:35:00.000Z",
255
+ * "updatedAt": "2025-01-15T10:35:00.000Z"
256
+ * }
257
+ * ],
258
+ * "createdAt": "2025-01-15T10:30:00.000Z",
259
+ * "updatedAt": "2025-01-15T10:35:00.000Z"
260
+ * }
261
+ * ```
262
+ *
263
+ * ### Version Availability
264
+ *
265
+ * This endpoint is only available in API version 2026-01-01.nova and newer.
266
+ *
267
+ * @example
268
+ * ```ts
269
+ * const conversation = await client.conversations.retrieve(
270
+ * '12345',
271
+ * );
272
+ * ```
273
+ */
274
+ retrieve(
275
+ id: string,
276
+ params: ConversationRetrieveParams | null | undefined = {},
277
+ options?: RequestOptions,
278
+ ): APIPromise<Conversation> {
279
+ const { 'Featurebase-Version': featurebaseVersion } = params ?? {};
280
+ return this._client.get(path`/v2/conversations/${id}`, {
281
+ ...options,
282
+ headers: buildHeaders([
283
+ { ...(featurebaseVersion != null ? { 'Featurebase-Version': featurebaseVersion } : undefined) },
284
+ options?.headers,
285
+ ]),
286
+ });
287
+ }
288
+
289
+ /**
290
+ * Updates a conversation's properties. Supports partial updates - only provided
291
+ * fields will be updated.
292
+ *
293
+ * ### Path Parameters
294
+ *
295
+ * - `id` - The conversation ID (short ID)
296
+ *
297
+ * ### Request Body
298
+ *
299
+ * All fields are optional. Only provided fields will be updated.
300
+ *
301
+ * | Field | Type | Description |
302
+ * | ------------------ | ----------- | ------------------------------------------------------------------------------------------------------------------------------- |
303
+ * | `actingAdminId` | string | Admin ID performing the action (for attribution). If not provided, uses bot service user. Must be a member of the organization. |
304
+ * | `state` | string | Conversation state: "open", "closed", or "snoozed" |
305
+ * | `snoozedUntil` | string | ISO datetime when to unsnooze (required when state is "snoozed") |
306
+ * | `adminAssigneeId` | string/null | Admin ID to assign, or null to unassign |
307
+ * | `teamAssigneeId` | string/null | Team ID to assign, or null to unassign |
308
+ * | `title` | string | Conversation title |
309
+ * | `customAttributes` | object | Custom attributes to set on the conversation |
310
+ * | `markAsRead` | object | Mark conversation as read for specific users |
311
+ *
312
+ * ### markAsRead Object
313
+ *
314
+ * | Field | Type | Description |
315
+ * | ------------- | -------- | -------------------------------------------------------------- |
316
+ * | `allAdmins` | boolean | If true, marks all admins with existing readReceipts as read |
317
+ * | `adminIds` | string[] | Array of specific admin IDs to mark as read |
318
+ * | `allContacts` | boolean | If true, marks all contacts with existing readReceipts as read |
319
+ * | `contactIds` | string[] | Array of specific contact IDs to mark as read |
320
+ *
321
+ * Note: Only users with existing read receipts will be updated. Use
322
+ * `allAdmins`/`allContacts` OR `adminIds`/`contactIds` - the "all" flags take
323
+ * precedence.
324
+ *
325
+ * ### Response
326
+ *
327
+ * Returns the updated conversation object.
328
+ *
329
+ * ### Example: Close a Conversation (with attribution)
330
+ *
331
+ * ```json
332
+ * {
333
+ * "actingAdminId": "507f1f77bcf86cd799439011",
334
+ * "state": "closed"
335
+ * }
336
+ * ```
337
+ *
338
+ * ### Example: Close a Conversation (bot user)
339
+ *
340
+ * ```json
341
+ * {
342
+ * "state": "closed"
343
+ * }
344
+ * ```
345
+ *
346
+ * ### Example: Snooze a Conversation
347
+ *
348
+ * ```json
349
+ * {
350
+ * "state": "snoozed",
351
+ * "snoozedUntil": "2025-01-20T10:00:00.000Z"
352
+ * }
353
+ * ```
354
+ *
355
+ * ### Example: Assign to an Admin
356
+ *
357
+ * ```json
358
+ * {
359
+ * "adminAssigneeId": "507f1f77bcf86cd799439011"
360
+ * }
361
+ * ```
362
+ *
363
+ * ### Example: Update Title and Custom Attributes
364
+ *
365
+ * ```json
366
+ * {
367
+ * "title": "Billing Issue - Priority",
368
+ * "customAttributes": {
369
+ * "priority_level": "high",
370
+ * "category": "billing"
371
+ * }
372
+ * }
373
+ * ```
374
+ *
375
+ * ### Example: Mark as Read (All Admins)
376
+ *
377
+ * ```json
378
+ * {
379
+ * "markAsRead": {
380
+ * "allAdmins": true
381
+ * }
382
+ * }
383
+ * ```
384
+ *
385
+ * ### Example: Mark as Read (All Contacts)
386
+ *
387
+ * ```json
388
+ * {
389
+ * "markAsRead": {
390
+ * "allContacts": true
391
+ * }
392
+ * }
393
+ * ```
394
+ *
395
+ * ### Example: Mark as Read (Specific IDs)
396
+ *
397
+ * ```json
398
+ * {
399
+ * "markAsRead": {
400
+ * "adminIds": ["507f1f77bcf86cd799439011"],
401
+ * "contactIds": ["676f0f6765bdaa7d7d760f88"]
402
+ * }
403
+ * }
404
+ * ```
405
+ *
406
+ * ### Version Availability
407
+ *
408
+ * This endpoint is only available in API version 2026-01-01.nova and newer.
409
+ *
410
+ * @example
411
+ * ```ts
412
+ * const conversation = await client.conversations.update(
413
+ * '12345',
414
+ * );
415
+ * ```
416
+ */
417
+ update(id: string, params: ConversationUpdateParams, options?: RequestOptions): APIPromise<Conversation> {
418
+ const { 'Featurebase-Version': featurebaseVersion, ...body } = params;
419
+ return this._client.patch(path`/v2/conversations/${id}`, {
420
+ body,
421
+ ...options,
422
+ headers: buildHeaders([
423
+ { ...(featurebaseVersion != null ? { 'Featurebase-Version': featurebaseVersion } : undefined) },
424
+ options?.headers,
425
+ ]),
426
+ });
427
+ }
428
+
429
+ /**
430
+ * Returns a list of conversations in your organization using cursor-based
431
+ * pagination.
432
+ *
433
+ * ### Query Parameters
434
+ *
435
+ * - `limit` - Number of conversations to return (1-100, default 10)
436
+ * - `cursor` - Cursor from previous response for pagination
437
+ * - `tagIds` - Optional tag filter as a comma-separated list of tag IDs. Matches
438
+ * conversations that contain all of the provided tags.
439
+ *
440
+ * ### Response Format
441
+ *
442
+ * Returns a list object with:
443
+ *
444
+ * - `object` - Always "list"
445
+ * - `data` - Array of conversation objects
446
+ * - `nextCursor` - Cursor for the next page, or null if no more results
447
+ *
448
+ * ### Conversation Object
449
+ *
450
+ * Each conversation includes:
451
+ *
452
+ * - `id` - Unique conversation identifier (short ID)
453
+ * - `title` - Conversation title
454
+ * - `state` - Current state ("open", "closed", or "snoozed")
455
+ * - `priority` - Whether the conversation is marked as priority
456
+ * - `adminAssigneeId` - ID of assigned admin (if any)
457
+ * - `teamAssigneeId` - ID of assigned team (if any)
458
+ * - `tags` - Current tags applied anywhere in the conversation
459
+ * - `participants` - Array of participants
460
+ * - `source` - Information about the first message
461
+ * - `createdAt` - Creation timestamp
462
+ * - `updatedAt` - Last update timestamp
463
+ *
464
+ * ### Example
465
+ *
466
+ * ```json
467
+ * {
468
+ * "object": "list",
469
+ * "data": [
470
+ * {
471
+ * "object": "conversation",
472
+ * "id": "12345",
473
+ * "title": "Question about pricing",
474
+ * "state": "open",
475
+ * "priority": false,
476
+ * "adminAssigneeId": null,
477
+ * "participants": [
478
+ * { "type": "customer", "id": "676f0f6765bdaa7d7d760f88" }
479
+ * ],
480
+ * ...
481
+ * }
482
+ * ],
483
+ * "nextCursor": "eyJpZCI6IjEyMzQ1In0="
484
+ * }
485
+ * ```
486
+ *
487
+ * ### Version Availability
488
+ *
489
+ * This endpoint is only available in API version 2026-01-01.nova and newer.
490
+ *
491
+ * @example
492
+ * ```ts
493
+ * const conversations = await client.conversations.list();
494
+ * ```
495
+ */
496
+ list(
497
+ params: ConversationListParams | null | undefined = {},
498
+ options?: RequestOptions,
499
+ ): APIPromise<ConversationListResponse> {
500
+ const { 'Featurebase-Version': featurebaseVersion, ...query } = params ?? {};
501
+ return this._client.get('/v2/conversations', {
502
+ query,
503
+ ...options,
504
+ headers: buildHeaders([
505
+ { ...(featurebaseVersion != null ? { 'Featurebase-Version': featurebaseVersion } : undefined) },
506
+ options?.headers,
507
+ ]),
508
+ });
509
+ }
510
+
511
+ /**
512
+ * Permanently deletes a conversation by its short ID.
513
+ *
514
+ * ### Path Parameters
515
+ *
516
+ * - `id` - The conversation short ID (numeric)
517
+ *
518
+ * ### Response
519
+ *
520
+ * Returns a deletion confirmation object:
521
+ *
522
+ * ```json
523
+ * {
524
+ * "id": "12345",
525
+ * "object": "conversation",
526
+ * "deleted": true
527
+ * }
528
+ * ```
529
+ *
530
+ * ### Caution
531
+ *
532
+ * This operation is **irreversible**. The conversation and all its messages will
533
+ * be permanently deleted.
534
+ *
535
+ * ### Version Availability
536
+ *
537
+ * This endpoint is only available in API version 2026-01-01.nova and newer.
538
+ *
539
+ * @example
540
+ * ```ts
541
+ * const conversation = await client.conversations.delete(
542
+ * '12345',
543
+ * );
544
+ * ```
545
+ */
546
+ delete(
547
+ id: string,
548
+ params: ConversationDeleteParams | null | undefined = {},
549
+ options?: RequestOptions,
550
+ ): APIPromise<ConversationDeleteResponse> {
551
+ const { 'Featurebase-Version': featurebaseVersion } = params ?? {};
552
+ return this._client.delete(path`/v2/conversations/${id}`, {
553
+ ...options,
554
+ headers: buildHeaders([
555
+ { ...(featurebaseVersion != null ? { 'Featurebase-Version': featurebaseVersion } : undefined) },
556
+ options?.headers,
557
+ ]),
558
+ });
559
+ }
560
+
561
+ /**
562
+ * Redacts a conversation part (message) from a conversation. Redaction permanently
563
+ * removes the message content while preserving the conversation structure.
564
+ *
565
+ * Only human message types can be redacted:
566
+ *
567
+ * - `user_msg` - Messages from customers/leads
568
+ * - `admin_msg` - Messages from admins
569
+ * - `email_msg` - Email messages
570
+ * - `bot_msg` - Bot messages
571
+ *
572
+ * System-generated conversation parts (assignments, status changes, etc.) cannot
573
+ * be redacted.
574
+ *
575
+ * ### Request Body
576
+ *
577
+ * | Field | Type | Required | Description |
578
+ * | -------------------- | ------ | -------- | ------------------------------------------------------------------------------ |
579
+ * | `type` | string | Yes | The type of item to redact. Currently only `"conversation_part"` is supported. |
580
+ * | `conversationId` | string | Yes | The conversation short ID containing the part to redact |
581
+ * | `conversationPartId` | string | Yes | The conversation part short ID to redact |
582
+ * | `actingAdminId` | string | No | Admin ID performing the action (for attribution) |
583
+ *
584
+ * ### Response
585
+ *
586
+ * Returns the updated conversation object.
587
+ *
588
+ * ### Example Request
589
+ *
590
+ * ```json
591
+ * {
592
+ * "type": "conversation_part",
593
+ * "conversationId": "12345",
594
+ * "conversationPartId": "67890",
595
+ * "actingAdminId": "507f1f77bcf86cd799439011"
596
+ * }
597
+ * ```
598
+ *
599
+ * ### Example Response
600
+ *
601
+ * ```json
602
+ * {
603
+ * "object": "conversation",
604
+ * "id": "12345",
605
+ * "conversationParts": [
606
+ * {
607
+ * "object": "conversation_part",
608
+ * "id": "67890",
609
+ * "partType": "user_msg",
610
+ * "bodyHtml": "",
611
+ * "bodyMarkdown": "",
612
+ * "redacted": true,
613
+ * ...
614
+ * }
615
+ * ],
616
+ * ...
617
+ * }
618
+ * ```
619
+ *
620
+ * ### Error Cases
621
+ *
622
+ * - **400 Bad Request** - Only human messages can be redacted
623
+ * - **404 Not Found** - Conversation or conversation part not found
624
+ *
625
+ * ### Version Availability
626
+ *
627
+ * This endpoint is only available in API version 2026-01-01.nova and newer.
628
+ *
629
+ * @example
630
+ * ```ts
631
+ * const conversation = await client.conversations.redact({
632
+ * conversationId: '12345',
633
+ * conversationPartId: '67890',
634
+ * type: 'conversation_part',
635
+ * });
636
+ * ```
637
+ */
638
+ redact(params: ConversationRedactParams, options?: RequestOptions): APIPromise<Conversation> {
639
+ const { 'Featurebase-Version': featurebaseVersion, ...body } = params;
640
+ return this._client.post('/v2/conversations/redact', {
641
+ body,
642
+ ...options,
643
+ headers: buildHeaders([
644
+ { ...(featurebaseVersion != null ? { 'Featurebase-Version': featurebaseVersion } : undefined) },
645
+ options?.headers,
646
+ ]),
647
+ });
648
+ }
649
+
650
+ /**
651
+ * Adds a reply to an existing conversation. Supports both contact (customer/lead)
652
+ * and admin replies.
653
+ *
654
+ * ### Path Parameters
655
+ *
656
+ * - `id` - The conversation ID (short ID)
657
+ *
658
+ * ### Request Body
659
+ *
660
+ * The request body varies based on who is sending the reply:
661
+ *
662
+ * #### Contact Reply (customer/lead)
663
+ *
664
+ * | Field | Type | Required | Description |
665
+ * | ------------------- | ------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------- |
666
+ * | `type` | string | Yes | Must be "contact" |
667
+ * | `userId` | string | No\* | External user ID from your system |
668
+ * | `id` | string | No\* | Featurebase contact ID (24-character ObjectId) |
669
+ * | `bodyMarkdown` | string | Yes | The message content in markdown format. Images referenced by URL or as base64 data URIs will be automatically uploaded and stored. |
670
+ * | `messageType` | string | Yes | Must be "reply" |
671
+ * | `skipNotifications` | boolean | No | Skip sending notifications (default: false). Useful for bulk imports. |
672
+ *
673
+ * \*At least one of `userId` or `id` is required.
674
+ *
675
+ * #### Admin Reply
676
+ *
677
+ * | Field | Type | Required | Description |
678
+ * | ------------------- | ------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------- |
679
+ * | `type` | string | Yes | Must be "admin" |
680
+ * | `id` | string | Yes | Featurebase admin ID (24-character ObjectId) |
681
+ * | `bodyMarkdown` | string | Yes | The message content in markdown format. Images referenced by URL or as base64 data URIs will be automatically uploaded and stored. |
682
+ * | `messageType` | string | Yes | "reply" for customer-visible reply, "note" for internal note |
683
+ * | `skipNotifications` | boolean | No | Skip sending notifications (default: false). Useful for bulk imports. |
684
+ *
685
+ * ### Response
686
+ *
687
+ * Returns the created conversation part object with a **201 Created** status. The
688
+ * response includes both `bodyHtml` (with signed image URLs) and `bodyMarkdown`
689
+ * fields.
690
+ *
691
+ * ### Example Contact Reply
692
+ *
693
+ * ```json
694
+ * {
695
+ * "type": "contact",
696
+ * "userId": "user_123",
697
+ * "bodyMarkdown": "Thank you for your help!",
698
+ * "messageType": "reply"
699
+ * }
700
+ * ```
701
+ *
702
+ * ### Example Admin Reply
703
+ *
704
+ * ```json
705
+ * {
706
+ * "type": "admin",
707
+ * "id": "507f1f77bcf86cd799439011",
708
+ * "bodyMarkdown": "I'm happy to help! Here's what you need to do...",
709
+ * "messageType": "reply"
710
+ * }
711
+ * ```
712
+ *
713
+ * ### Example Admin Note (Internal)
714
+ *
715
+ * ```json
716
+ * {
717
+ * "type": "admin",
718
+ * "id": "507f1f77bcf86cd799439011",
719
+ * "bodyMarkdown": "Customer seems frustrated, escalating to tier 2.",
720
+ * "messageType": "note"
721
+ * }
722
+ * ```
723
+ *
724
+ * ### Example Response
725
+ *
726
+ * ```json
727
+ * {
728
+ * "object": "conversation_part",
729
+ * "id": "3",
730
+ * "partType": "user_msg",
731
+ * "bodyHtml": "<p>Thank you for your help!</p>",
732
+ * "bodyMarkdown": "Thank you for your help!",
733
+ * "author": {
734
+ * "type": "customer",
735
+ * "id": "676f0f6765bdaa7d7d760f88",
736
+ * "name": "John Doe",
737
+ * "email": "john@example.com"
738
+ * },
739
+ * "channel": "desktop",
740
+ * "createdAt": "2025-01-15T10:40:00.000Z",
741
+ * "updatedAt": "2025-01-15T10:40:00.000Z"
742
+ * }
743
+ * ```
744
+ *
745
+ * ### Version Availability
746
+ *
747
+ * This endpoint is only available in API version 2026-01-01.nova and newer.
748
+ *
749
+ * @example
750
+ * ```ts
751
+ * const conversationPart = await client.conversations.reply(
752
+ * '12345',
753
+ * {
754
+ * bodyMarkdown: 'Thank you for your help!',
755
+ * messageType: 'reply',
756
+ * type: 'contact',
757
+ * },
758
+ * );
759
+ * ```
760
+ */
761
+ reply(id: string, params: ConversationReplyParams, options?: RequestOptions): APIPromise<ConversationPart> {
762
+ const { 'Featurebase-Version': featurebaseVersion, ...body } = params;
763
+ return this._client.post(path`/v2/conversations/${id}/reply`, {
764
+ body,
765
+ ...options,
766
+ headers: buildHeaders([
767
+ { ...(featurebaseVersion != null ? { 'Featurebase-Version': featurebaseVersion } : undefined) },
768
+ options?.headers,
769
+ ]),
770
+ });
771
+ }
772
+ }
773
+
774
+ export interface Conversation {
775
+ /**
776
+ * Unique conversation identifier
777
+ */
778
+ id: string;
779
+
780
+ /**
781
+ * ID of the assigned admin
782
+ */
783
+ adminAssigneeId: string | null;
784
+
785
+ /**
786
+ * ISO timestamp when bot state last changed
787
+ */
788
+ botConversationStateLastUpdatedAt: string | null;
789
+
790
+ /**
791
+ * ID of the brand associated with this conversation
792
+ */
793
+ brandId: string | null;
794
+
795
+ /**
796
+ * ISO timestamp when conversation was created
797
+ */
798
+ createdAt: string;
799
+
800
+ /**
801
+ * Whether an admin has manually overridden the language for this conversation.
802
+ * When true, automatic language detection is disabled.
803
+ */
804
+ hasAdminOverriddenLanguage: boolean;
805
+
806
+ /**
807
+ * Whether the user is blocked
808
+ */
809
+ isBlocked: boolean;
810
+
811
+ /**
812
+ * ISO timestamp of last activity
813
+ */
814
+ lastActivityAt: string | null;
815
+
816
+ /**
817
+ * Object type identifier
818
+ */
819
+ object: 'conversation';
820
+
821
+ /**
822
+ * Participants in this conversation
823
+ */
824
+ participants: Array<ConversationParticipant>;
825
+
826
+ /**
827
+ * Whether this conversation is marked as priority
828
+ */
829
+ priority: boolean;
830
+
831
+ /**
832
+ * ISO timestamp when priority was set
833
+ */
834
+ prioritySetAt: string | null;
835
+
836
+ /**
837
+ * ISO timestamp until which conversation is snoozed
838
+ */
839
+ snoozedUntil: string | null;
840
+
841
+ /**
842
+ * Current state of the conversation
843
+ */
844
+ state: 'open' | 'closed' | 'snoozed';
845
+
846
+ /**
847
+ * Current tags applied anywhere in this conversation
848
+ */
849
+ tags: Array<TagsAPI.ConversationTag>;
850
+
851
+ /**
852
+ * ID of the assigned team
853
+ */
854
+ teamAssigneeId: string | null;
855
+
856
+ /**
857
+ * ISO timestamp when conversation was last updated
858
+ */
859
+ updatedAt: string;
860
+
861
+ /**
862
+ * User's preferred language
863
+ */
864
+ userPreferredLanguage: string;
865
+
866
+ /**
867
+ * ISO timestamp when conversation started waiting
868
+ */
869
+ waitingSince: string | null;
870
+
871
+ /**
872
+ * Whether we are awaiting a customer reply
873
+ */
874
+ awaitingCustomerReply?: boolean;
875
+
876
+ /**
877
+ * State of AI agent handling for this conversation
878
+ */
879
+ botConversationState?: 'active' | 'handed_off_to_human' | 'resolved';
880
+
881
+ /**
882
+ * Array of conversation parts (messages). Only included when fetching a single
883
+ * conversation by ID.
884
+ */
885
+ conversationParts?: Array<ConversationPart>;
886
+
887
+ /**
888
+ * Minimal CSAT diagnostics for the current effective request.
889
+ */
890
+ csatDebug?: Conversation.CsatDebug;
891
+
892
+ /**
893
+ * Historical CSAT requests for this conversation, ordered newest first.
894
+ */
895
+ csatHistory?: Array<Conversation.CsatHistory>;
896
+
897
+ /**
898
+ * Derived CSAT summary for this conversation when a rating request or rating
899
+ * exists.
900
+ */
901
+ csatSummary?: Conversation.CsatSummary;
902
+
903
+ /**
904
+ * Whether customer replies are disabled
905
+ */
906
+ disableCustomerReply?: boolean;
907
+
908
+ /**
909
+ * Read receipts indicating how far each participant has read in the conversation.
910
+ * Each receipt maps a user to their last-read conversation part. The tracked
911
+ * position reflects the system read state and may reference parts the user cannot
912
+ * directly view (e.g., a contact's read position may point to an internal admin
913
+ * note). Use these receipts to render read indicators and typing awareness, not to
914
+ * infer content access.
915
+ */
916
+ readReceipts?: Array<Conversation.ReadReceipt>;
917
+
918
+ source?: Conversation.Source;
919
+
920
+ /**
921
+ * Conversation title
922
+ */
923
+ title?: string;
924
+ }
925
+
926
+ export namespace Conversation {
927
+ /**
928
+ * Minimal CSAT diagnostics for the current effective request.
929
+ */
930
+ export interface CsatDebug {
931
+ /**
932
+ * Canonical CSAT request ID used for the latest debug snapshot
933
+ */
934
+ requestId: string;
935
+
936
+ /**
937
+ * Lifecycle status of the request represented in the debug snapshot
938
+ */
939
+ status: 'pending' | 'rated' | 'canceled' | 'expired';
940
+
941
+ /**
942
+ * ISO timestamp when rating edits stop being accepted
943
+ */
944
+ changeLockWindowEndsAt?: string;
945
+
946
+ emailDelivery?: ConversationsAPI.CsatEmailDelivery;
947
+
948
+ /**
949
+ * ISO timestamp when first-time submissions stop being accepted
950
+ */
951
+ lateSubmitWindowEndsAt?: string;
952
+ }
953
+
954
+ export interface CsatHistory {
955
+ /**
956
+ * Channel used for the CSAT request
957
+ */
958
+ channel: 'desktop' | 'email';
959
+
960
+ /**
961
+ * Whether this row represents the currently effective CSAT request for the
962
+ * conversation
963
+ */
964
+ isLatestEffective: boolean;
965
+
966
+ /**
967
+ * ISO timestamp when the request last changed
968
+ */
969
+ lastUpdatedAt: string;
970
+
971
+ /**
972
+ * ISO timestamp when the request was created
973
+ */
974
+ requestedAt: string;
975
+
976
+ /**
977
+ * Canonical CSAT request ID
978
+ */
979
+ requestId: string;
980
+
981
+ /**
982
+ * Source that created the CSAT request
983
+ */
984
+ requestSource: 'workflow';
985
+
986
+ /**
987
+ * Lifecycle status for this historical CSAT request
988
+ */
989
+ status: 'pending' | 'rated' | 'canceled' | 'expired';
990
+
991
+ /**
992
+ * ISO timestamp when the request was canceled
993
+ */
994
+ canceledAt?: string;
995
+
996
+ /**
997
+ * ISO timestamp when edits to an existing rating stop being accepted
998
+ */
999
+ changeLockWindowEndsAt?: string;
1000
+
1001
+ emailDelivery?: ConversationsAPI.CsatEmailDelivery;
1002
+
1003
+ /**
1004
+ * ISO timestamp when the request expired
1005
+ */
1006
+ expiredAt?: string;
1007
+
1008
+ /**
1009
+ * ISO timestamp when first-time submissions stop being accepted
1010
+ */
1011
+ lateSubmitWindowEndsAt?: string;
1012
+
1013
+ ratedAgent?: ConversationsAPI.CsatRatedAgent;
1014
+
1015
+ /**
1016
+ * ISO timestamp when the request was rated
1017
+ */
1018
+ ratedAt?: string;
1019
+
1020
+ /**
1021
+ * Submitted remark when present
1022
+ */
1023
+ remark?: string;
1024
+
1025
+ /**
1026
+ * Submitted score when this request was rated
1027
+ */
1028
+ score?: number;
1029
+
1030
+ workflow?: ConversationsAPI.CsatWorkflowLink;
1031
+ }
1032
+
1033
+ /**
1034
+ * Derived CSAT summary for this conversation when a rating request or rating
1035
+ * exists.
1036
+ */
1037
+ export interface CsatSummary {
1038
+ /**
1039
+ * ISO timestamp when the summary last changed
1040
+ */
1041
+ lastUpdatedAt: string;
1042
+
1043
+ /**
1044
+ * Current summary status for CSAT on this conversation
1045
+ */
1046
+ status: 'pending' | 'rated' | 'canceled' | 'expired';
1047
+
1048
+ /**
1049
+ * ISO timestamp when the request was canceled
1050
+ */
1051
+ canceledAt?: string;
1052
+
1053
+ /**
1054
+ * Channel used for the latest CSAT request when known
1055
+ */
1056
+ channel?: 'desktop' | 'email';
1057
+
1058
+ /**
1059
+ * ISO timestamp when the request expired
1060
+ */
1061
+ expiredAt?: string;
1062
+
1063
+ ratedAgent?: ConversationsAPI.CsatRatedAgent;
1064
+
1065
+ /**
1066
+ * ISO timestamp when the customer submitted a rating
1067
+ */
1068
+ ratedAt?: string;
1069
+
1070
+ /**
1071
+ * Optional remark left with the rating
1072
+ */
1073
+ remark?: string;
1074
+
1075
+ /**
1076
+ * ISO timestamp when the latest CSAT request was created
1077
+ */
1078
+ requestedAt?: string;
1079
+
1080
+ /**
1081
+ * Canonical CSAT request ID
1082
+ */
1083
+ requestId?: string;
1084
+
1085
+ /**
1086
+ * Source of the latest CSAT request when known
1087
+ */
1088
+ requestSource?: 'workflow';
1089
+
1090
+ /**
1091
+ * CSAT score from 1 to 5 when rated
1092
+ */
1093
+ score?: number;
1094
+
1095
+ workflow?: ConversationsAPI.CsatWorkflowLink;
1096
+ }
1097
+
1098
+ export interface ReadReceipt {
1099
+ /**
1100
+ * The internal ID of the user
1101
+ */
1102
+ id: string;
1103
+
1104
+ /**
1105
+ * The ID of the last conversation part this user has read. Note: This reflects the
1106
+ * system-tracked read position and may reference a part the user cannot directly
1107
+ * access (e.g., internal notes for contacts). The read state is advanced to the
1108
+ * latest part in the conversation regardless of part visibility.
1109
+ */
1110
+ lastReadPartId: string;
1111
+
1112
+ /**
1113
+ * Type of user who has read the conversation
1114
+ */
1115
+ userType: 'admin' | 'customer' | 'lead';
1116
+ }
1117
+
1118
+ export interface Source {
1119
+ /**
1120
+ * Body of the initial message as HTML with signed image URLs
1121
+ */
1122
+ bodyHtml: string;
1123
+
1124
+ /**
1125
+ * Body of the initial message as markdown
1126
+ */
1127
+ bodyMarkdown: string;
1128
+
1129
+ /**
1130
+ * Channel through which the conversation was initiated
1131
+ */
1132
+ channel: 'unknown' | 'desktop' | 'android' | 'ios' | 'email';
1133
+
1134
+ author?: ConversationsAPI.ConversationParticipant;
1135
+
1136
+ /**
1137
+ * How the conversation was initiated
1138
+ */
1139
+ deliveredAs?: 'customer_initiated' | 'admin_initiated';
1140
+
1141
+ /**
1142
+ * Subject line for email conversations
1143
+ */
1144
+ subject?: string;
1145
+
1146
+ /**
1147
+ * URL where the conversation was initiated
1148
+ */
1149
+ url?: string;
1150
+ }
1151
+ }
1152
+
1153
+ /**
1154
+ * Message from a customer or lead
1155
+ */
1156
+ export type ConversationPart =
1157
+ | ConversationPart.UserMessage
1158
+ | ConversationPart.AdminMessage
1159
+ | ConversationPart.AdminNote
1160
+ | ConversationPart.EmailMessage
1161
+ | ConversationPart.BotMessage
1162
+ | ConversationPart.QuickReplyOptions
1163
+ | ConversationPart.QuickReplyResponse
1164
+ | ConversationPart.RatingRequested
1165
+ | ConversationPart.RatingSubmitted
1166
+ | ConversationPart.AttributeCollectionPrompt
1167
+ | ConversationPart.AttributeCollectionComplete
1168
+ | ConversationPart.Assignment
1169
+ | ConversationPart.StatusChange
1170
+ | ConversationPart.TagUpdate
1171
+ | ConversationPart.WorkflowWaitEvent
1172
+ | ConversationPart.PriorityChange
1173
+ | ConversationPart.ParticipantAdded;
1174
+
1175
+ export namespace ConversationPart {
1176
+ /**
1177
+ * Message from a customer or lead
1178
+ */
1179
+ export interface UserMessage {
1180
+ /**
1181
+ * Unique part identifier
1182
+ */
1183
+ id: string;
1184
+
1185
+ /**
1186
+ * Message body content as HTML with signed image URLs
1187
+ */
1188
+ bodyHtml: string | null;
1189
+
1190
+ /**
1191
+ * Message body content as markdown
1192
+ */
1193
+ bodyMarkdown: string | null;
1194
+
1195
+ /**
1196
+ * Channel through which the message was sent
1197
+ */
1198
+ channel: 'unknown' | 'desktop' | 'android' | 'ios' | 'email';
1199
+
1200
+ /**
1201
+ * ISO timestamp when the part was created
1202
+ */
1203
+ createdAt: string;
1204
+
1205
+ /**
1206
+ * Object type identifier
1207
+ */
1208
+ object: 'conversation_part';
1209
+
1210
+ /**
1211
+ * User message type
1212
+ */
1213
+ partType: 'user_msg';
1214
+
1215
+ /**
1216
+ * ISO timestamp when the part was last updated
1217
+ */
1218
+ updatedAt: string;
1219
+
1220
+ author?: ConversationsAPI.ConversationPartAuthor | null;
1221
+
1222
+ /**
1223
+ * Whether this message has been redacted
1224
+ */
1225
+ redacted?: boolean;
1226
+
1227
+ /**
1228
+ * Reply-level tag applications and provenance for this conversation part
1229
+ */
1230
+ tagApplications?: Array<ConversationsAPI.ConversationTagApplication>;
1231
+ }
1232
+
1233
+ /**
1234
+ * Message from an admin or support agent
1235
+ */
1236
+ export interface AdminMessage {
1237
+ /**
1238
+ * Unique part identifier
1239
+ */
1240
+ id: string;
1241
+
1242
+ /**
1243
+ * Message body content as HTML with signed image URLs
1244
+ */
1245
+ bodyHtml: string | null;
1246
+
1247
+ /**
1248
+ * Message body content as markdown
1249
+ */
1250
+ bodyMarkdown: string | null;
1251
+
1252
+ /**
1253
+ * Channel through which the message was sent
1254
+ */
1255
+ channel: 'unknown' | 'desktop' | 'android' | 'ios' | 'email';
1256
+
1257
+ /**
1258
+ * ISO timestamp when the part was created
1259
+ */
1260
+ createdAt: string;
1261
+
1262
+ /**
1263
+ * Object type identifier
1264
+ */
1265
+ object: 'conversation_part';
1266
+
1267
+ /**
1268
+ * Admin message type
1269
+ */
1270
+ partType: 'admin_msg';
1271
+
1272
+ /**
1273
+ * ISO timestamp when the part was last updated
1274
+ */
1275
+ updatedAt: string;
1276
+
1277
+ author?: ConversationsAPI.ConversationPartAuthor | null;
1278
+
1279
+ /**
1280
+ * Whether this message has been redacted
1281
+ */
1282
+ redacted?: boolean;
1283
+
1284
+ /**
1285
+ * Reply-level tag applications and provenance for this conversation part
1286
+ */
1287
+ tagApplications?: Array<ConversationsAPI.ConversationTagApplication>;
1288
+ }
1289
+
1290
+ /**
1291
+ * Internal note visible only to admins
1292
+ */
1293
+ export interface AdminNote {
1294
+ /**
1295
+ * Unique part identifier
1296
+ */
1297
+ id: string;
1298
+
1299
+ /**
1300
+ * Note body content as HTML with signed image URLs
1301
+ */
1302
+ bodyHtml: string | null;
1303
+
1304
+ /**
1305
+ * Note body content as markdown
1306
+ */
1307
+ bodyMarkdown: string | null;
1308
+
1309
+ /**
1310
+ * ISO timestamp when the part was created
1311
+ */
1312
+ createdAt: string;
1313
+
1314
+ /**
1315
+ * Object type identifier
1316
+ */
1317
+ object: 'conversation_part';
1318
+
1319
+ /**
1320
+ * Admin internal note type
1321
+ */
1322
+ partType: 'admin_note';
1323
+
1324
+ /**
1325
+ * ISO timestamp when the part was last updated
1326
+ */
1327
+ updatedAt: string;
1328
+
1329
+ author?: ConversationsAPI.ConversationPartAuthor | null;
1330
+
1331
+ /**
1332
+ * Whether this message has been redacted
1333
+ */
1334
+ redacted?: boolean;
1335
+
1336
+ /**
1337
+ * Reply-level tag applications and provenance for this conversation part
1338
+ */
1339
+ tagApplications?: Array<ConversationsAPI.ConversationTagApplication>;
1340
+ }
1341
+
1342
+ /**
1343
+ * Message sent via email
1344
+ */
1345
+ export interface EmailMessage {
1346
+ /**
1347
+ * Unique part identifier
1348
+ */
1349
+ id: string;
1350
+
1351
+ /**
1352
+ * Email body content as HTML with signed image URLs
1353
+ */
1354
+ bodyHtml: string | null;
1355
+
1356
+ /**
1357
+ * Email body content as markdown
1358
+ */
1359
+ bodyMarkdown: string | null;
1360
+
1361
+ /**
1362
+ * Email channel
1363
+ */
1364
+ channel: 'email';
1365
+
1366
+ /**
1367
+ * ISO timestamp when the part was created
1368
+ */
1369
+ createdAt: string;
1370
+
1371
+ /**
1372
+ * Object type identifier
1373
+ */
1374
+ object: 'conversation_part';
1375
+
1376
+ /**
1377
+ * Email message type
1378
+ */
1379
+ partType: 'email_msg';
1380
+
1381
+ /**
1382
+ * ISO timestamp when the part was last updated
1383
+ */
1384
+ updatedAt: string;
1385
+
1386
+ author?: ConversationsAPI.ConversationPartAuthor | null;
1387
+
1388
+ /**
1389
+ * Whether this message has been redacted
1390
+ */
1391
+ redacted?: boolean;
1392
+
1393
+ /**
1394
+ * Reply-level tag applications and provenance for this conversation part
1395
+ */
1396
+ tagApplications?: Array<ConversationsAPI.ConversationTagApplication>;
1397
+ }
1398
+
1399
+ /**
1400
+ * Automated message from AI or bot
1401
+ */
1402
+ export interface BotMessage {
1403
+ /**
1404
+ * Unique part identifier
1405
+ */
1406
+ id: string;
1407
+
1408
+ /**
1409
+ * Bot message body content as HTML with signed image URLs
1410
+ */
1411
+ bodyHtml: string | null;
1412
+
1413
+ /**
1414
+ * Bot message body content as markdown
1415
+ */
1416
+ bodyMarkdown: string | null;
1417
+
1418
+ /**
1419
+ * ISO timestamp when the part was created
1420
+ */
1421
+ createdAt: string;
1422
+
1423
+ /**
1424
+ * Object type identifier
1425
+ */
1426
+ object: 'conversation_part';
1427
+
1428
+ /**
1429
+ * Bot message type
1430
+ */
1431
+ partType: 'bot_msg';
1432
+
1433
+ /**
1434
+ * ISO timestamp when the part was last updated
1435
+ */
1436
+ updatedAt: string;
1437
+
1438
+ author?: ConversationsAPI.ConversationPartAuthor | null;
1439
+
1440
+ /**
1441
+ * Channel through which the message was sent
1442
+ */
1443
+ channel?: 'unknown' | 'desktop' | 'android' | 'ios' | 'email';
1444
+
1445
+ /**
1446
+ * Whether this message has been redacted
1447
+ */
1448
+ redacted?: boolean;
1449
+
1450
+ /**
1451
+ * Reply-level tag applications and provenance for this conversation part
1452
+ */
1453
+ tagApplications?: Array<ConversationsAPI.ConversationTagApplication>;
1454
+ }
1455
+
1456
+ /**
1457
+ * Presents options for user to choose from
1458
+ */
1459
+ export interface QuickReplyOptions {
1460
+ /**
1461
+ * Unique part identifier
1462
+ */
1463
+ id: string;
1464
+
1465
+ /**
1466
+ * ISO timestamp when the part was created
1467
+ */
1468
+ createdAt: string;
1469
+
1470
+ /**
1471
+ * Object type identifier
1472
+ */
1473
+ object: 'conversation_part';
1474
+
1475
+ /**
1476
+ * Quick reply options type
1477
+ */
1478
+ partType: 'quick_reply_opts';
1479
+
1480
+ /**
1481
+ * Available reply options
1482
+ */
1483
+ replyOptions: Array<QuickReplyOptions.ReplyOption>;
1484
+
1485
+ /**
1486
+ * ISO timestamp when the part was last updated
1487
+ */
1488
+ updatedAt: string;
1489
+
1490
+ author?: ConversationsAPI.ConversationPartAuthor | null;
1491
+
1492
+ /**
1493
+ * Whether this message has been redacted
1494
+ */
1495
+ redacted?: boolean;
1496
+
1497
+ /**
1498
+ * Reply-level tag applications and provenance for this conversation part
1499
+ */
1500
+ tagApplications?: Array<ConversationsAPI.ConversationTagApplication>;
1501
+ }
1502
+
1503
+ export namespace QuickReplyOptions {
1504
+ export interface ReplyOption {
1505
+ /**
1506
+ * Option ID
1507
+ */
1508
+ id: string;
1509
+
1510
+ /**
1511
+ * Option text
1512
+ */
1513
+ text: string;
1514
+ }
1515
+ }
1516
+
1517
+ /**
1518
+ * User's selection from quick reply options
1519
+ */
1520
+ export interface QuickReplyResponse {
1521
+ /**
1522
+ * Unique part identifier
1523
+ */
1524
+ id: string;
1525
+
1526
+ /**
1527
+ * The selected option text as HTML
1528
+ */
1529
+ bodyHtml: string;
1530
+
1531
+ /**
1532
+ * The selected option text as markdown
1533
+ */
1534
+ bodyMarkdown: string;
1535
+
1536
+ /**
1537
+ * ISO timestamp when the part was created
1538
+ */
1539
+ createdAt: string;
1540
+
1541
+ /**
1542
+ * Object type identifier
1543
+ */
1544
+ object: 'conversation_part';
1545
+
1546
+ /**
1547
+ * Quick reply response type
1548
+ */
1549
+ partType: 'quick_reply_resp';
1550
+
1551
+ /**
1552
+ * ID of the selected option
1553
+ */
1554
+ selectedOptionId: string;
1555
+
1556
+ /**
1557
+ * ISO timestamp when the part was last updated
1558
+ */
1559
+ updatedAt: string;
1560
+
1561
+ author?: ConversationsAPI.ConversationPartAuthor | null;
1562
+
1563
+ /**
1564
+ * Whether this message has been redacted
1565
+ */
1566
+ redacted?: boolean;
1567
+
1568
+ /**
1569
+ * Reply-level tag applications and provenance for this conversation part
1570
+ */
1571
+ tagApplications?: Array<ConversationsAPI.ConversationTagApplication>;
1572
+ }
1573
+
1574
+ /**
1575
+ * Represents a persisted CSAT request in the conversation thread
1576
+ */
1577
+ export interface RatingRequested {
1578
+ /**
1579
+ * Unique part identifier
1580
+ */
1581
+ id: string;
1582
+
1583
+ /**
1584
+ * ISO timestamp when the part was created
1585
+ */
1586
+ createdAt: string;
1587
+
1588
+ /**
1589
+ * Canonical CSAT request payload for this thread event
1590
+ */
1591
+ csat: RatingRequested.Csat;
1592
+
1593
+ /**
1594
+ * Object type identifier
1595
+ */
1596
+ object: 'conversation_part';
1597
+
1598
+ /**
1599
+ * CSAT rating requested part type
1600
+ */
1601
+ partType: 'rating_requested';
1602
+
1603
+ /**
1604
+ * ISO timestamp when the part was last updated
1605
+ */
1606
+ updatedAt: string;
1607
+ }
1608
+
1609
+ export namespace RatingRequested {
1610
+ /**
1611
+ * Canonical CSAT request payload for this thread event
1612
+ */
1613
+ export interface Csat {
1614
+ /**
1615
+ * Channel used for the CSAT request
1616
+ */
1617
+ channel: 'desktop' | 'email';
1618
+
1619
+ /**
1620
+ * ISO timestamp when the request was created
1621
+ */
1622
+ requestedAt: string;
1623
+
1624
+ /**
1625
+ * Canonical CSAT request ID
1626
+ */
1627
+ requestId: string;
1628
+
1629
+ /**
1630
+ * Source that created the CSAT request
1631
+ */
1632
+ requestSource: 'workflow';
1633
+
1634
+ /**
1635
+ * Status of the CSAT request represented by this part
1636
+ */
1637
+ status: 'pending' | 'rated' | 'canceled' | 'expired';
1638
+
1639
+ /**
1640
+ * ISO timestamp after which changing the rating is no longer allowed
1641
+ */
1642
+ changeLockWindowEndsAt?: string;
1643
+
1644
+ /**
1645
+ * ISO timestamp when the request expired, when applicable
1646
+ */
1647
+ expiredAt?: string;
1648
+
1649
+ /**
1650
+ * ISO timestamp after which late submission is no longer allowed
1651
+ */
1652
+ lateSubmitWindowEndsAt?: string;
1653
+
1654
+ ratedAgent?: ConversationsAPI.CsatRatedAgent;
1655
+
1656
+ workflow?: ConversationsAPI.CsatWorkflowLink;
1657
+ }
1658
+ }
1659
+
1660
+ /**
1661
+ * Represents a persisted CSAT submission in the conversation thread
1662
+ */
1663
+ export interface RatingSubmitted {
1664
+ /**
1665
+ * Unique part identifier
1666
+ */
1667
+ id: string;
1668
+
1669
+ /**
1670
+ * ISO timestamp when the part was created
1671
+ */
1672
+ createdAt: string;
1673
+
1674
+ /**
1675
+ * Canonical CSAT submission payload for this thread event
1676
+ */
1677
+ csat: RatingSubmitted.Csat;
1678
+
1679
+ /**
1680
+ * Object type identifier
1681
+ */
1682
+ object: 'conversation_part';
1683
+
1684
+ /**
1685
+ * CSAT rating submitted part type
1686
+ */
1687
+ partType: 'rating_submitted';
1688
+
1689
+ /**
1690
+ * ISO timestamp when the part was last updated
1691
+ */
1692
+ updatedAt: string;
1693
+ }
1694
+
1695
+ export namespace RatingSubmitted {
1696
+ /**
1697
+ * Canonical CSAT submission payload for this thread event
1698
+ */
1699
+ export interface Csat {
1700
+ /**
1701
+ * Channel used for the CSAT request
1702
+ */
1703
+ channel: 'desktop' | 'email';
1704
+
1705
+ /**
1706
+ * ISO timestamp when the customer submitted the rating
1707
+ */
1708
+ ratedAt: string;
1709
+
1710
+ /**
1711
+ * Canonical CSAT request ID
1712
+ */
1713
+ requestId: string;
1714
+
1715
+ /**
1716
+ * Source that created the CSAT request
1717
+ */
1718
+ requestSource: 'workflow';
1719
+
1720
+ /**
1721
+ * CSAT score from 1 to 5
1722
+ */
1723
+ score: number;
1724
+
1725
+ /**
1726
+ * Submitted ratings are always in the rated state
1727
+ */
1728
+ status: 'rated';
1729
+
1730
+ ratedAgent?: ConversationsAPI.CsatRatedAgent;
1731
+
1732
+ /**
1733
+ * Optional remark left with the rating
1734
+ */
1735
+ remark?: string;
1736
+
1737
+ /**
1738
+ * ISO timestamp when the request was created
1739
+ */
1740
+ requestedAt?: string;
1741
+
1742
+ workflow?: ConversationsAPI.CsatWorkflowLink;
1743
+ }
1744
+ }
1745
+
1746
+ /**
1747
+ * Requests information from user via form
1748
+ */
1749
+ export interface AttributeCollectionPrompt {
1750
+ /**
1751
+ * Unique part identifier
1752
+ */
1753
+ id: string;
1754
+
1755
+ /**
1756
+ * ISO timestamp when the part was created
1757
+ */
1758
+ createdAt: string;
1759
+
1760
+ /**
1761
+ * Form configuration
1762
+ */
1763
+ form: AttributeCollectionPrompt.Form;
1764
+
1765
+ /**
1766
+ * Object type identifier
1767
+ */
1768
+ object: 'conversation_part';
1769
+
1770
+ /**
1771
+ * Attribute collection prompt type
1772
+ */
1773
+ partType: 'attr_prompt';
1774
+
1775
+ /**
1776
+ * ISO timestamp when the part was last updated
1777
+ */
1778
+ updatedAt: string;
1779
+
1780
+ author?: ConversationsAPI.ConversationPartAuthor | null;
1781
+
1782
+ /**
1783
+ * Whether this message has been redacted
1784
+ */
1785
+ redacted?: boolean;
1786
+
1787
+ /**
1788
+ * Reply-level tag applications and provenance for this conversation part
1789
+ */
1790
+ tagApplications?: Array<ConversationsAPI.ConversationTagApplication>;
1791
+ }
1792
+
1793
+ export namespace AttributeCollectionPrompt {
1794
+ /**
1795
+ * Form configuration
1796
+ */
1797
+ export interface Form {
1798
+ /**
1799
+ * Form ID
1800
+ */
1801
+ id: string;
1802
+
1803
+ /**
1804
+ * Form fields
1805
+ */
1806
+ attributes: Array<Form.Attribute>;
1807
+ }
1808
+
1809
+ export namespace Form {
1810
+ export interface Attribute {
1811
+ /**
1812
+ * Field identifier
1813
+ */
1814
+ identifier: string;
1815
+
1816
+ /**
1817
+ * Field display name
1818
+ */
1819
+ name: string;
1820
+
1821
+ /**
1822
+ * Field type
1823
+ */
1824
+ type: string;
1825
+ }
1826
+ }
1827
+ }
1828
+
1829
+ /**
1830
+ * Indicates form was completed
1831
+ */
1832
+ export interface AttributeCollectionComplete {
1833
+ /**
1834
+ * Unique part identifier
1835
+ */
1836
+ id: string;
1837
+
1838
+ /**
1839
+ * ISO timestamp when the part was created
1840
+ */
1841
+ createdAt: string;
1842
+
1843
+ /**
1844
+ * Object type identifier
1845
+ */
1846
+ object: 'conversation_part';
1847
+
1848
+ /**
1849
+ * Attribute collection complete type
1850
+ */
1851
+ partType: 'attr_complete';
1852
+
1853
+ /**
1854
+ * ISO timestamp when the part was last updated
1855
+ */
1856
+ updatedAt: string;
1857
+ }
1858
+
1859
+ /**
1860
+ * Conversation assigned to admin or team
1861
+ */
1862
+ export interface Assignment {
1863
+ /**
1864
+ * Unique part identifier
1865
+ */
1866
+ id: string;
1867
+
1868
+ /**
1869
+ * ISO timestamp when the part was created
1870
+ */
1871
+ createdAt: string;
1872
+
1873
+ /**
1874
+ * Object type identifier
1875
+ */
1876
+ object: 'conversation_part';
1877
+
1878
+ /**
1879
+ * Assignment type
1880
+ */
1881
+ partType: 'assign';
1882
+
1883
+ /**
1884
+ * ISO timestamp when the part was last updated
1885
+ */
1886
+ updatedAt: string;
1887
+
1888
+ /**
1889
+ * ID of the admin assigned to the conversation
1890
+ */
1891
+ adminAssigneeId?: string | null;
1892
+
1893
+ /**
1894
+ * ID of the admin who made the assignment
1895
+ */
1896
+ adminAssignerId?: string | null;
1897
+
1898
+ /**
1899
+ * ID of the team assigned to the conversation
1900
+ */
1901
+ teamAssigneeId?: string | null;
1902
+ }
1903
+
1904
+ /**
1905
+ * Conversation state changed (open/closed/snoozed)
1906
+ */
1907
+ export interface StatusChange {
1908
+ /**
1909
+ * Unique part identifier
1910
+ */
1911
+ id: string;
1912
+
1913
+ /**
1914
+ * ISO timestamp when the part was created
1915
+ */
1916
+ createdAt: string;
1917
+
1918
+ /**
1919
+ * Object type identifier
1920
+ */
1921
+ object: 'conversation_part';
1922
+
1923
+ /**
1924
+ * Status change type
1925
+ */
1926
+ partType: 'status';
1927
+
1928
+ /**
1929
+ * New conversation status
1930
+ */
1931
+ status: 'open' | 'closed' | 'snoozed';
1932
+
1933
+ /**
1934
+ * ISO timestamp when the part was last updated
1935
+ */
1936
+ updatedAt: string;
1937
+
1938
+ /**
1939
+ * ISO timestamp until conversation is snoozed (if snoozed)
1940
+ */
1941
+ snoozedUntil?: string | null;
1942
+ }
1943
+
1944
+ /**
1945
+ * A tag was added to or removed from a specific reply
1946
+ */
1947
+ export interface TagUpdate {
1948
+ /**
1949
+ * Unique part identifier
1950
+ */
1951
+ id: string;
1952
+
1953
+ /**
1954
+ * Whether the tag was added or removed
1955
+ */
1956
+ action: 'added' | 'removed';
1957
+
1958
+ /**
1959
+ * ISO timestamp when the part was created
1960
+ */
1961
+ createdAt: string;
1962
+
1963
+ /**
1964
+ * Object type identifier
1965
+ */
1966
+ object: 'conversation_part';
1967
+
1968
+ /**
1969
+ * ISO timestamp when the tag mutation occurred
1970
+ */
1971
+ occurredAt: string;
1972
+
1973
+ /**
1974
+ * Tag update type
1975
+ */
1976
+ partType: 'tags';
1977
+
1978
+ /**
1979
+ * Identifier of the affected tag
1980
+ */
1981
+ tagId: string;
1982
+
1983
+ /**
1984
+ * ISO timestamp when the part was last updated
1985
+ */
1986
+ updatedAt: string;
1987
+
1988
+ /**
1989
+ * Actor that applied the tag
1990
+ */
1991
+ actor?: ConversationsTagsAPI.ConversationTagMutationActor;
1992
+
1993
+ /**
1994
+ * Tag name at the time of the event or the best available current display name
1995
+ */
1996
+ tagName?: string | null;
1997
+
1998
+ /**
1999
+ * Conversation part that the tag mutation targeted
2000
+ */
2001
+ targetPartId?: string | null;
2002
+ }
2003
+
2004
+ /**
2005
+ * Represents a workflow wait start, finish, or interruption in the conversation
2006
+ * thread
2007
+ */
2008
+ export interface WorkflowWaitEvent {
2009
+ /**
2010
+ * Unique part identifier
2011
+ */
2012
+ id: string;
2013
+
2014
+ /**
2015
+ * ISO timestamp when the part was created
2016
+ */
2017
+ createdAt: string;
2018
+
2019
+ /**
2020
+ * Object type identifier
2021
+ */
2022
+ object: 'conversation_part';
2023
+
2024
+ /**
2025
+ * Workflow wait event part type
2026
+ */
2027
+ partType: 'workflow_wait';
2028
+
2029
+ /**
2030
+ * ISO timestamp when the part was last updated
2031
+ */
2032
+ updatedAt: string;
2033
+
2034
+ /**
2035
+ * Workflow wait event payload for this thread event
2036
+ */
2037
+ workflowWait: WorkflowWaitEvent.WorkflowWait;
2038
+ }
2039
+
2040
+ export namespace WorkflowWaitEvent {
2041
+ /**
2042
+ * Workflow wait event payload for this thread event
2043
+ */
2044
+ export interface WorkflowWait {
2045
+ /**
2046
+ * Lifecycle stage of the workflow wait event
2047
+ */
2048
+ eventType: 'started' | 'finished' | 'interrupted';
2049
+
2050
+ /**
2051
+ * ISO timestamp when the wait event occurred
2052
+ */
2053
+ occurredAt: string;
2054
+
2055
+ /**
2056
+ * User type that interrupted the wait when applicable
2057
+ */
2058
+ interruptedByUserType?: 'admin' | 'customer' | 'lead';
2059
+
2060
+ /**
2061
+ * Human-readable wait duration or preset label
2062
+ */
2063
+ waitLabel?: string;
2064
+
2065
+ /**
2066
+ * Workflow ID associated with the wait event
2067
+ */
2068
+ workflowId?: string;
2069
+
2070
+ /**
2071
+ * Workflow display name at the time of the wait event
2072
+ */
2073
+ workflowName?: string;
2074
+ }
2075
+ }
2076
+
2077
+ /**
2078
+ * Conversation priority was updated
2079
+ */
2080
+ export interface PriorityChange {
2081
+ /**
2082
+ * Unique part identifier
2083
+ */
2084
+ id: string;
2085
+
2086
+ /**
2087
+ * ISO timestamp when the part was created
2088
+ */
2089
+ createdAt: string;
2090
+
2091
+ /**
2092
+ * Whether the conversation is now marked as priority
2093
+ */
2094
+ isPriority: boolean;
2095
+
2096
+ /**
2097
+ * Object type identifier
2098
+ */
2099
+ object: 'conversation_part';
2100
+
2101
+ /**
2102
+ * Priority change type
2103
+ */
2104
+ partType: 'priority';
2105
+
2106
+ /**
2107
+ * ISO timestamp when the part was last updated
2108
+ */
2109
+ updatedAt: string;
2110
+ }
2111
+
2112
+ /**
2113
+ * New participant joined the conversation
2114
+ */
2115
+ export interface ParticipantAdded {
2116
+ /**
2117
+ * Unique part identifier
2118
+ */
2119
+ id: string;
2120
+
2121
+ /**
2122
+ * ISO timestamp when the part was created
2123
+ */
2124
+ createdAt: string;
2125
+
2126
+ /**
2127
+ * Object type identifier
2128
+ */
2129
+ object: 'conversation_part';
2130
+
2131
+ /**
2132
+ * The added participant
2133
+ */
2134
+ participant: ParticipantAdded.Participant;
2135
+
2136
+ /**
2137
+ * Participant added type
2138
+ */
2139
+ partType: 'part_add';
2140
+
2141
+ /**
2142
+ * ISO timestamp when the part was last updated
2143
+ */
2144
+ updatedAt: string;
2145
+ }
2146
+
2147
+ export namespace ParticipantAdded {
2148
+ /**
2149
+ * The added participant
2150
+ */
2151
+ export interface Participant {
2152
+ /**
2153
+ * Participant ID
2154
+ */
2155
+ id: string;
2156
+
2157
+ /**
2158
+ * Participant type
2159
+ */
2160
+ type: 'customer' | 'lead' | 'admin';
2161
+ }
2162
+ }
2163
+ }
2164
+
2165
+ export interface ConversationPartAuthor {
2166
+ /**
2167
+ * Author ID
2168
+ */
2169
+ id: string | null;
2170
+
2171
+ /**
2172
+ * Type of author
2173
+ */
2174
+ type: 'customer' | 'lead' | 'admin' | 'bot' | 'guest' | 'integration';
2175
+
2176
+ /**
2177
+ * Author email address
2178
+ */
2179
+ email?: string;
2180
+
2181
+ /**
2182
+ * Author display name
2183
+ */
2184
+ name?: string;
2185
+
2186
+ /**
2187
+ * Author profile picture URL
2188
+ */
2189
+ profilePicture?: string | null;
2190
+ }
2191
+
2192
+ export interface ConversationParticipant {
2193
+ /**
2194
+ * Participant ID
2195
+ */
2196
+ id: string;
2197
+
2198
+ /**
2199
+ * Type of participant
2200
+ */
2201
+ type: 'customer' | 'lead' | 'admin' | 'bot' | 'guest' | 'integration';
2202
+ }
2203
+
2204
+ export interface ConversationTagApplication {
2205
+ /**
2206
+ * ISO timestamp when the tag was applied to this reply
2207
+ */
2208
+ appliedAt: string;
2209
+
2210
+ /**
2211
+ * Identifier of the applied tag
2212
+ */
2213
+ tagId: string;
2214
+
2215
+ /**
2216
+ * Actor that applied the tag
2217
+ */
2218
+ appliedBy?: ConversationsTagsAPI.ConversationTagMutationActor;
2219
+
2220
+ /**
2221
+ * ISO timestamp when the tag was removed from this reply, if it was removed
2222
+ */
2223
+ removedAt?: string | null;
2224
+
2225
+ /**
2226
+ * Actor that applied the tag
2227
+ */
2228
+ removedBy?: ConversationsTagsAPI.ConversationTagMutationActor;
2229
+
2230
+ /**
2231
+ * Resolved tag object when the tag still exists in the shared workspace catalog
2232
+ */
2233
+ tag?: TagsAPI.ConversationTag;
2234
+ }
2235
+
2236
+ export interface CsatEmailDelivery {
2237
+ /**
2238
+ * Email delivery status for the CSAT request when applicable
2239
+ */
2240
+ status: 'pending' | 'sent' | 'failed';
2241
+
2242
+ /**
2243
+ * ISO timestamp when the CSAT email failed
2244
+ */
2245
+ failedAt?: string;
2246
+
2247
+ /**
2248
+ * Operational failure reason for the CSAT email delivery
2249
+ */
2250
+ failureReason?: string;
2251
+
2252
+ /**
2253
+ * Email message ID associated with delivery
2254
+ */
2255
+ messageId?: string;
2256
+
2257
+ /**
2258
+ * ISO timestamp when the CSAT email was sent
2259
+ */
2260
+ sentAt?: string;
2261
+ }
2262
+
2263
+ export interface CsatRatedAgent {
2264
+ /**
2265
+ * Type of agent the CSAT request is attributed to
2266
+ */
2267
+ type: 'teammate' | 'fibi' | 'chatbot';
2268
+
2269
+ /**
2270
+ * Identifier of the rated agent when applicable
2271
+ */
2272
+ id?: string;
2273
+ }
2274
+
2275
+ export interface CsatWorkflowLink {
2276
+ /**
2277
+ * Workflow action ID associated with the CSAT request
2278
+ */
2279
+ workflowActionId?: string;
2280
+
2281
+ /**
2282
+ * Workflow ID associated with the CSAT request
2283
+ */
2284
+ workflowId?: string;
2285
+
2286
+ /**
2287
+ * Workflow run ID associated with the CSAT request
2288
+ */
2289
+ workflowRunId?: string;
2290
+
2291
+ /**
2292
+ * Workflow step ID associated with the CSAT request
2293
+ */
2294
+ workflowStepId?: string;
2295
+ }
2296
+
2297
+ /**
2298
+ * Primary recipients (To field)
2299
+ */
2300
+ export interface EmailRecipients {
2301
+ /**
2302
+ * Array of email addresses
2303
+ */
2304
+ emails?: Array<string>;
2305
+
2306
+ /**
2307
+ * Array of Featurebase contact IDs
2308
+ */
2309
+ ids?: Array<string>;
2310
+ }
2311
+
2312
+ export interface ConversationListResponse {
2313
+ /**
2314
+ * Array of conversations
2315
+ */
2316
+ data: Array<Conversation>;
2317
+
2318
+ /**
2319
+ * Cursor for fetching the next page
2320
+ */
2321
+ nextCursor: string | null;
2322
+
2323
+ /**
2324
+ * Object type identifier
2325
+ */
2326
+ object: 'list';
2327
+ }
2328
+
2329
+ export interface ConversationDeleteResponse {
2330
+ /**
2331
+ * Unique identifier of the deleted conversation
2332
+ */
2333
+ id: string;
2334
+
2335
+ /**
2336
+ * Indicates the resource was deleted
2337
+ */
2338
+ deleted: true;
2339
+
2340
+ /**
2341
+ * Object type identifier
2342
+ */
2343
+ object: 'conversation';
2344
+ }
2345
+
2346
+ export interface ConversationCreateParams {
2347
+ /**
2348
+ * Body param: The content of the initial message in markdown format. Images
2349
+ * referenced by URL or as base64 data URIs will be automatically uploaded and
2350
+ * stored.
2351
+ */
2352
+ bodyMarkdown: string;
2353
+
2354
+ /**
2355
+ * Body param: The author initiating the conversation. Use type "contact" for
2356
+ * customer/lead or "admin" for outreach.
2357
+ */
2358
+ from: ConversationCreateParams.ContactFrom | ConversationCreateParams.AdminFrom;
2359
+
2360
+ /**
2361
+ * Body param: The channel for the conversation. Defaults to "desktop"
2362
+ * (SDK/widget).
2363
+ */
2364
+ channel?: 'desktop' | 'email';
2365
+
2366
+ /**
2367
+ * Body param: The time the conversation was created as an ISO timestamp. If not
2368
+ * provided, the current time will be used. This field is recommended for migrating
2369
+ * past conversations from another source.
2370
+ */
2371
+ createdAt?: string | null;
2372
+
2373
+ /**
2374
+ * Body param: Recipients for admin-initiated outreach. Required when from.type is
2375
+ * "admin". Specify at least one recipient in the "to" field.
2376
+ */
2377
+ recipients?: ConversationCreateParams.Recipients;
2378
+
2379
+ /**
2380
+ * Body param: Subject line for the email. Required when channel is "email" and
2381
+ * from.type is "admin".
2382
+ */
2383
+ subject?: string;
2384
+
2385
+ /**
2386
+ * Header param: API version for this request. Defaults to your organization's
2387
+ * configured API version if not specified.
2388
+ */
2389
+ 'Featurebase-Version'?: string;
2390
+ }
2391
+
2392
+ export namespace ConversationCreateParams {
2393
+ /**
2394
+ * Conversation initiated by a contact
2395
+ */
2396
+ export interface ContactFrom {
2397
+ /**
2398
+ * The Featurebase contact ID
2399
+ */
2400
+ id: string;
2401
+
2402
+ /**
2403
+ * The type of author. Use "contact" for customer/lead initiated conversations.
2404
+ */
2405
+ type: 'contact';
2406
+ }
2407
+
2408
+ /**
2409
+ * Conversation initiated by an admin (outreach)
2410
+ */
2411
+ export interface AdminFrom {
2412
+ /**
2413
+ * The Featurebase admin ID
2414
+ */
2415
+ id: string;
2416
+
2417
+ /**
2418
+ * The type of author. Use "admin" for admin initiated outreach conversations.
2419
+ */
2420
+ type: 'admin';
2421
+ }
2422
+
2423
+ /**
2424
+ * Recipients for admin-initiated outreach. Required when from.type is "admin".
2425
+ * Specify at least one recipient in the "to" field.
2426
+ */
2427
+ export interface Recipients {
2428
+ /**
2429
+ * Primary recipients (To field)
2430
+ */
2431
+ to: ConversationsAPI.EmailRecipients;
2432
+
2433
+ /**
2434
+ * Primary recipients (To field)
2435
+ */
2436
+ bcc?: ConversationsAPI.EmailRecipients;
2437
+
2438
+ /**
2439
+ * Primary recipients (To field)
2440
+ */
2441
+ cc?: ConversationsAPI.EmailRecipients;
2442
+ }
2443
+ }
2444
+
2445
+ export interface ConversationRetrieveParams {
2446
+ /**
2447
+ * API version for this request. Defaults to your organization's configured API
2448
+ * version if not specified.
2449
+ */
2450
+ 'Featurebase-Version'?: string;
2451
+ }
2452
+
2453
+ export interface ConversationUpdateParams {
2454
+ /**
2455
+ * Body param: The admin ID performing this action. Changes will be attributed to
2456
+ * this admin. If not provided, changes are attributed to the system bot user. The
2457
+ * admin must be a member of the organization.
2458
+ */
2459
+ actingAdminId?: string;
2460
+
2461
+ /**
2462
+ * Body param: The admin ID to assign the conversation to, or null to unassign.
2463
+ */
2464
+ adminAssigneeId?: string | null;
2465
+
2466
+ /**
2467
+ * Body param: Custom attributes to set on the conversation. Uses the same
2468
+ * validation as v1 API.
2469
+ */
2470
+ customAttributes?: { [key: string]: unknown };
2471
+
2472
+ /**
2473
+ * Body param: Mark the conversation as read for specific admins and/or contacts.
2474
+ */
2475
+ markAsRead?: ConversationUpdateParams.MarkAsRead;
2476
+
2477
+ /**
2478
+ * Body param: ISO datetime when the conversation should be unsnoozed. Required
2479
+ * when state is "snoozed". Must be a future date.
2480
+ */
2481
+ snoozedUntil?: string | null;
2482
+
2483
+ /**
2484
+ * Body param: The state of the conversation. Use "snoozed" with snoozedUntil to
2485
+ * snooze.
2486
+ */
2487
+ state?: 'open' | 'closed' | 'snoozed';
2488
+
2489
+ /**
2490
+ * Body param: The team ID to assign the conversation to, or null to unassign.
2491
+ */
2492
+ teamAssigneeId?: string | null;
2493
+
2494
+ /**
2495
+ * Body param: The title of the conversation.
2496
+ */
2497
+ title?: string;
2498
+
2499
+ /**
2500
+ * Header param: API version for this request. Defaults to your organization's
2501
+ * configured API version if not specified.
2502
+ */
2503
+ 'Featurebase-Version'?: string;
2504
+ }
2505
+
2506
+ export namespace ConversationUpdateParams {
2507
+ /**
2508
+ * Mark the conversation as read for specific admins and/or contacts.
2509
+ */
2510
+ export interface MarkAsRead {
2511
+ /**
2512
+ * Array of admin IDs to mark as read. Only admins with existing readReceipts will
2513
+ * be updated.
2514
+ */
2515
+ adminIds?: Array<string>;
2516
+
2517
+ /**
2518
+ * If true, marks all admins with existing readReceipts as read.
2519
+ */
2520
+ allAdmins?: boolean | null;
2521
+
2522
+ /**
2523
+ * If true, marks all contacts (customers and leads) with existing readReceipts as
2524
+ * read.
2525
+ */
2526
+ allContacts?: boolean | null;
2527
+
2528
+ /**
2529
+ * Array of contact IDs to mark as read. Only contacts with existing readReceipts
2530
+ * will be updated.
2531
+ */
2532
+ contactIds?: Array<string>;
2533
+ }
2534
+ }
2535
+
2536
+ export interface ConversationListParams {
2537
+ /**
2538
+ * Query param: An opaque cursor for pagination. Use the nextCursor value from a
2539
+ * previous response to fetch the next page of results.
2540
+ */
2541
+ cursor?: string;
2542
+
2543
+ /**
2544
+ * Query param: A limit on the number of objects to be returned, between 1 and 100.
2545
+ */
2546
+ limit?: number;
2547
+
2548
+ /**
2549
+ * Query param: Filter conversations by one or more tag IDs using a comma-separated
2550
+ * list. Conversations must contain all provided tags.
2551
+ */
2552
+ tagIds?: string | Array<string>;
2553
+
2554
+ /**
2555
+ * Header param: API version for this request. Defaults to your organization's
2556
+ * configured API version if not specified.
2557
+ */
2558
+ 'Featurebase-Version'?: string;
2559
+ }
2560
+
2561
+ export interface ConversationDeleteParams {
2562
+ /**
2563
+ * API version for this request. Defaults to your organization's configured API
2564
+ * version if not specified.
2565
+ */
2566
+ 'Featurebase-Version'?: string;
2567
+ }
2568
+
2569
+ export interface ConversationRedactParams {
2570
+ /**
2571
+ * Body param: The conversation short ID that contains the part to redact
2572
+ */
2573
+ conversationId: string;
2574
+
2575
+ /**
2576
+ * Body param: The conversation part short ID to redact
2577
+ */
2578
+ conversationPartId: string;
2579
+
2580
+ /**
2581
+ * Body param: The type of item to redact. Currently only "conversation_part" is
2582
+ * supported.
2583
+ */
2584
+ type: 'conversation_part';
2585
+
2586
+ /**
2587
+ * Body param: The admin ID performing this action. If not provided, changes are
2588
+ * attributed to the system bot user.
2589
+ */
2590
+ actingAdminId?: string;
2591
+
2592
+ /**
2593
+ * Header param: API version for this request. Defaults to your organization's
2594
+ * configured API version if not specified.
2595
+ */
2596
+ 'Featurebase-Version'?: string;
2597
+ }
2598
+
2599
+ export type ConversationReplyParams =
2600
+ | ConversationReplyParams.ContactReplyBody
2601
+ | ConversationReplyParams.AdminReplyBody;
2602
+
2603
+ export declare namespace ConversationReplyParams {
2604
+ export interface ContactReplyBody {
2605
+ /**
2606
+ * Body param: The content of the reply message in markdown format. Images
2607
+ * referenced by URL or as base64 data URIs will be automatically uploaded and
2608
+ * stored.
2609
+ */
2610
+ bodyMarkdown: string;
2611
+
2612
+ /**
2613
+ * Body param: The type of message. Always "reply" for contact replies.
2614
+ */
2615
+ messageType: 'reply';
2616
+
2617
+ /**
2618
+ * Body param: The type of author. Use "contact" for customer/lead replies.
2619
+ */
2620
+ type: 'contact';
2621
+
2622
+ /**
2623
+ * Body param: The Featurebase contact ID
2624
+ */
2625
+ id?: string;
2626
+
2627
+ /**
2628
+ * Body param: Skip sending notifications (default: false). Useful for bulk
2629
+ * imports.
2630
+ */
2631
+ skipNotifications?: boolean;
2632
+
2633
+ /**
2634
+ * Body param: The external user ID from your system
2635
+ */
2636
+ userId?: string;
2637
+
2638
+ /**
2639
+ * Header param: API version for this request. Defaults to your organization's
2640
+ * configured API version if not specified.
2641
+ */
2642
+ 'Featurebase-Version'?: string;
2643
+ }
2644
+
2645
+ export interface AdminReplyBody {
2646
+ /**
2647
+ * Body param: The Featurebase admin ID
2648
+ */
2649
+ id: string;
2650
+
2651
+ /**
2652
+ * Body param: The content of the reply message in markdown format. Images
2653
+ * referenced by URL or as base64 data URIs will be automatically uploaded and
2654
+ * stored.
2655
+ */
2656
+ bodyMarkdown: string;
2657
+
2658
+ /**
2659
+ * Body param: The type of message. "reply" is visible to the customer, "note" is
2660
+ * an internal note only visible to admins.
2661
+ */
2662
+ messageType: 'reply' | 'note';
2663
+
2664
+ /**
2665
+ * Body param: The type of author. Use "admin" for admin replies.
2666
+ */
2667
+ type: 'admin';
2668
+
2669
+ /**
2670
+ * Body param: Skip sending notifications (default: false). Useful for bulk
2671
+ * imports.
2672
+ */
2673
+ skipNotifications?: boolean;
2674
+
2675
+ /**
2676
+ * Header param: API version for this request. Defaults to your organization's
2677
+ * configured API version if not specified.
2678
+ */
2679
+ 'Featurebase-Version'?: string;
2680
+ }
2681
+ }
2682
+
2683
+ Conversations.Tags = Tags;
2684
+ Conversations.Participants = Participants;
2685
+
2686
+ export declare namespace Conversations {
2687
+ export {
2688
+ type Conversation as Conversation,
2689
+ type ConversationPart as ConversationPart,
2690
+ type ConversationPartAuthor as ConversationPartAuthor,
2691
+ type ConversationParticipant as ConversationParticipant,
2692
+ type ConversationTagApplication as ConversationTagApplication,
2693
+ type CsatEmailDelivery as CsatEmailDelivery,
2694
+ type CsatRatedAgent as CsatRatedAgent,
2695
+ type CsatWorkflowLink as CsatWorkflowLink,
2696
+ type EmailRecipients as EmailRecipients,
2697
+ type ConversationListResponse as ConversationListResponse,
2698
+ type ConversationDeleteResponse as ConversationDeleteResponse,
2699
+ type ConversationCreateParams as ConversationCreateParams,
2700
+ type ConversationRetrieveParams as ConversationRetrieveParams,
2701
+ type ConversationUpdateParams as ConversationUpdateParams,
2702
+ type ConversationListParams as ConversationListParams,
2703
+ type ConversationDeleteParams as ConversationDeleteParams,
2704
+ type ConversationRedactParams as ConversationRedactParams,
2705
+ type ConversationReplyParams as ConversationReplyParams,
2706
+ };
2707
+
2708
+ export {
2709
+ Tags as Tags,
2710
+ type AttachedConversationTag as AttachedConversationTag,
2711
+ type ConversationTagMutationActor as ConversationTagMutationActor,
2712
+ type TagAttachParams as TagAttachParams,
2713
+ type TagDetachParams as TagDetachParams,
2714
+ };
2715
+
2716
+ export {
2717
+ Participants as Participants,
2718
+ type ParticipantAddParams as ParticipantAddParams,
2719
+ type ParticipantRemoveParams as ParticipantRemoveParams,
2720
+ };
2721
+ }