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