@foru-ms/sdk 2.1.0 → 2.1.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 (294) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/Client.d.ts +4 -1
  3. package/dist/cjs/Client.js +16 -11
  4. package/dist/cjs/api/resources/auth/client/Client.d.ts +1 -1
  5. package/dist/cjs/api/resources/auth/client/Client.js +1 -1
  6. package/dist/cjs/api/resources/index.d.ts +3 -0
  7. package/dist/cjs/api/resources/index.js +4 -1
  8. package/dist/cjs/api/resources/integrations/client/Client.d.ts +2 -1
  9. package/dist/cjs/api/resources/integrations/client/Client.js +7 -9
  10. package/dist/cjs/api/resources/integrations/client/requests/CreateIntegrationsRequest.d.ts +8 -2
  11. package/dist/cjs/api/resources/integrations/client/requests/ListIntegrationsRequest.d.ts +2 -2
  12. package/dist/cjs/api/resources/integrations/client/requests/UpdateIntegrationsRequest.d.ts +2 -0
  13. package/dist/cjs/api/resources/integrations/types/UpdateIntegrationsResponse.d.ts +2 -0
  14. package/dist/cjs/api/resources/notifications/client/Client.d.ts +1 -1
  15. package/dist/cjs/api/resources/notifications/client/Client.js +7 -14
  16. package/dist/cjs/api/resources/notifications/client/requests/index.d.ts +2 -2
  17. package/dist/cjs/api/resources/notifications/client/requests/index.js +5 -0
  18. package/dist/cjs/api/resources/posts/client/Client.d.ts +1 -1
  19. package/dist/cjs/api/resources/posts/client/Client.js +22 -49
  20. package/dist/cjs/api/resources/posts/client/requests/index.d.ts +1 -1
  21. package/dist/cjs/api/resources/posts/client/requests/index.js +3 -0
  22. package/dist/cjs/api/resources/privateMessages/client/Client.d.ts +21 -1
  23. package/dist/cjs/api/resources/privateMessages/client/Client.js +79 -18
  24. package/dist/cjs/api/resources/privateMessages/client/requests/UpdatePrivateMessagesRequest.d.ts +16 -0
  25. package/dist/cjs/api/resources/privateMessages/client/requests/UpdatePrivateMessagesRequest.js +3 -0
  26. package/dist/cjs/api/resources/privateMessages/client/requests/index.d.ts +1 -0
  27. package/dist/cjs/api/resources/privateMessages/types/UpdatePrivateMessagesResponse.d.ts +26 -0
  28. package/dist/cjs/api/resources/privateMessages/types/UpdatePrivateMessagesResponse.js +3 -0
  29. package/dist/cjs/api/resources/privateMessages/types/index.d.ts +1 -0
  30. package/dist/cjs/api/resources/privateMessages/types/index.js +1 -0
  31. package/dist/cjs/api/resources/reports/client/Client.d.ts +21 -1
  32. package/dist/cjs/api/resources/reports/client/Client.js +88 -17
  33. package/dist/cjs/api/resources/reports/client/requests/CreateReportsRequest.d.ts +4 -0
  34. package/dist/cjs/api/resources/reports/client/requests/UpdateReportsRequest.d.ts +16 -0
  35. package/dist/cjs/api/resources/reports/client/requests/UpdateReportsRequest.js +3 -0
  36. package/dist/cjs/api/resources/reports/client/requests/index.d.ts +1 -0
  37. package/dist/cjs/api/resources/reports/index.d.ts +1 -0
  38. package/dist/cjs/api/resources/reports/index.js +1 -0
  39. package/dist/cjs/api/resources/reports/types/UpdateReportsResponse.d.ts +30 -0
  40. package/dist/cjs/api/resources/reports/types/UpdateReportsResponse.js +3 -0
  41. package/dist/cjs/api/resources/reports/types/index.d.ts +1 -0
  42. package/dist/cjs/api/resources/reports/types/index.js +17 -0
  43. package/dist/cjs/api/resources/roles/client/Client.d.ts +1 -1
  44. package/dist/cjs/api/resources/roles/client/Client.js +8 -9
  45. package/dist/cjs/api/resources/roles/client/requests/ListRolesRequest.d.ts +7 -2
  46. package/dist/cjs/api/resources/roles/types/ListRolesRequestSort.d.ts +6 -0
  47. package/dist/cjs/api/resources/roles/types/ListRolesRequestSort.js +9 -0
  48. package/dist/cjs/api/resources/roles/types/index.d.ts +1 -0
  49. package/dist/cjs/api/resources/roles/types/index.js +1 -0
  50. package/dist/cjs/api/resources/search/client/Client.d.ts +29 -0
  51. package/dist/cjs/api/resources/search/client/Client.js +115 -0
  52. package/dist/cjs/api/resources/search/client/index.d.ts +1 -0
  53. package/dist/cjs/api/resources/search/client/index.js +2 -0
  54. package/dist/cjs/api/resources/search/index.d.ts +2 -0
  55. package/dist/cjs/api/resources/search/index.js +18 -0
  56. package/dist/cjs/api/resources/search/types/SearchSearchResponse.d.ts +33 -0
  57. package/dist/cjs/api/resources/search/types/SearchSearchResponse.js +22 -0
  58. package/dist/cjs/api/resources/search/types/index.d.ts +1 -0
  59. package/dist/cjs/api/resources/search/types/index.js +17 -0
  60. package/dist/cjs/api/resources/ssOs/client/Client.d.ts +6 -8
  61. package/dist/cjs/api/resources/ssOs/client/Client.js +11 -16
  62. package/dist/cjs/api/resources/ssOs/client/requests/CreateSsOsRequest.d.ts +24 -15
  63. package/dist/cjs/api/resources/ssOs/client/requests/CreateSsOsRequest.js +10 -0
  64. package/dist/cjs/api/resources/ssOs/client/requests/ListSsOsRequest.d.ts +2 -2
  65. package/dist/cjs/api/resources/ssOs/client/requests/UpdateSsOsRequest.d.ts +15 -8
  66. package/dist/cjs/api/resources/ssOs/client/requests/UpdateSsOsRequest.js +10 -0
  67. package/dist/cjs/api/resources/ssOs/client/requests/index.d.ts +2 -2
  68. package/dist/cjs/api/resources/ssOs/client/requests/index.js +5 -0
  69. package/dist/cjs/api/resources/ssOs/types/UpdateSsOsResponse.d.ts +2 -0
  70. package/dist/cjs/api/resources/tags/client/Client.d.ts +1 -1
  71. package/dist/cjs/api/resources/tags/client/Client.js +10 -18
  72. package/dist/cjs/api/resources/threads/client/Client.d.ts +1 -1
  73. package/dist/cjs/api/resources/threads/client/Client.js +26 -56
  74. package/dist/cjs/api/resources/threads/client/requests/CreateThreadsRequest.d.ts +6 -0
  75. package/dist/cjs/api/resources/threads/client/requests/index.d.ts +1 -1
  76. package/dist/cjs/api/resources/threads/client/requests/index.js +3 -0
  77. package/dist/cjs/api/resources/threads/types/UpdateThreadsResponse.d.ts +5 -5
  78. package/dist/cjs/api/resources/users/client/Client.d.ts +20 -1
  79. package/dist/cjs/api/resources/users/client/Client.js +80 -28
  80. package/dist/cjs/api/resources/users/client/requests/CreateUsersRequest.d.ts +26 -0
  81. package/dist/cjs/api/resources/users/client/requests/CreateUsersRequest.js +3 -0
  82. package/dist/cjs/api/resources/users/client/requests/index.d.ts +1 -0
  83. package/dist/cjs/api/resources/webhooks/client/Client.d.ts +23 -1
  84. package/dist/cjs/api/resources/webhooks/client/Client.js +91 -15
  85. package/dist/cjs/api/resources/webhooks/client/requests/CreateWebhooksRequest.d.ts +4 -0
  86. package/dist/cjs/api/resources/webhooks/client/requests/UpdateWebhooksRequest.d.ts +22 -0
  87. package/dist/cjs/api/resources/webhooks/client/requests/UpdateWebhooksRequest.js +3 -0
  88. package/dist/cjs/api/resources/webhooks/client/requests/index.d.ts +1 -0
  89. package/dist/cjs/api/resources/webhooks/types/UpdateWebhooksResponse.d.ts +26 -0
  90. package/dist/cjs/api/resources/webhooks/types/UpdateWebhooksResponse.js +3 -0
  91. package/dist/cjs/api/resources/webhooks/types/index.d.ts +1 -0
  92. package/dist/cjs/api/resources/webhooks/types/index.js +1 -0
  93. package/dist/cjs/api/types/Integration.d.ts +2 -0
  94. package/dist/cjs/api/types/IntegrationCreate.d.ts +7 -2
  95. package/dist/cjs/api/types/IntegrationList.d.ts +6 -0
  96. package/dist/cjs/api/types/IntegrationList.js +3 -0
  97. package/dist/cjs/api/types/IntegrationListResponse.d.ts +2 -0
  98. package/dist/cjs/api/types/IntegrationResponse.d.ts +2 -0
  99. package/dist/cjs/api/types/IntegrationUpdate.d.ts +2 -0
  100. package/dist/cjs/api/types/MeResponse.d.ts +22 -0
  101. package/dist/cjs/api/types/PrivateMessageUpdate.d.ts +8 -0
  102. package/dist/cjs/api/types/PrivateMessageUpdate.js +3 -0
  103. package/dist/cjs/api/types/Report.d.ts +4 -2
  104. package/dist/cjs/api/types/ReportCreate.d.ts +4 -0
  105. package/dist/cjs/api/types/ReportListResponse.d.ts +4 -2
  106. package/dist/cjs/api/types/ReportResponse.d.ts +4 -2
  107. package/dist/cjs/api/types/ReportUpdate.d.ts +8 -0
  108. package/dist/cjs/api/types/ReportUpdate.js +3 -0
  109. package/dist/cjs/api/types/RoleList.d.ts +19 -0
  110. package/dist/cjs/api/types/RoleList.js +13 -0
  111. package/dist/cjs/api/types/Search.d.ts +1 -0
  112. package/dist/cjs/api/types/Search.js +3 -0
  113. package/dist/cjs/api/types/SearchListResponse.d.ts +18 -0
  114. package/dist/cjs/api/types/SearchListResponse.js +3 -0
  115. package/dist/cjs/api/types/SearchResponse.d.ts +6 -0
  116. package/dist/cjs/api/types/SearchResponse.js +3 -0
  117. package/dist/cjs/api/types/Sso.d.ts +2 -0
  118. package/dist/cjs/api/types/SsoCreate.d.ts +19 -11
  119. package/dist/cjs/api/types/SsoCreate.js +10 -0
  120. package/dist/cjs/api/types/SsoList.d.ts +6 -0
  121. package/dist/cjs/api/types/SsoList.js +3 -0
  122. package/dist/cjs/api/types/SsoListResponse.d.ts +2 -0
  123. package/dist/cjs/api/types/SsoResponse.d.ts +2 -0
  124. package/dist/cjs/api/types/SsoUpdate.d.ts +15 -11
  125. package/dist/cjs/api/types/SsoUpdate.js +10 -0
  126. package/dist/cjs/api/types/Thread.d.ts +5 -5
  127. package/dist/cjs/api/types/ThreadCreate.d.ts +6 -0
  128. package/dist/cjs/api/types/ThreadListResponse.d.ts +5 -5
  129. package/dist/cjs/api/types/ThreadResponse.d.ts +5 -5
  130. package/dist/cjs/api/types/UserCreate.d.ts +20 -0
  131. package/dist/cjs/api/types/UserCreate.js +3 -0
  132. package/dist/cjs/api/types/Webhook.d.ts +2 -0
  133. package/dist/cjs/api/types/WebhookCreate.d.ts +4 -0
  134. package/dist/cjs/api/types/WebhookListResponse.d.ts +2 -0
  135. package/dist/cjs/api/types/WebhookResponse.d.ts +2 -0
  136. package/dist/cjs/api/types/WebhookUpdate.d.ts +14 -0
  137. package/dist/cjs/api/types/WebhookUpdate.js +3 -0
  138. package/dist/cjs/api/types/index.d.ts +10 -0
  139. package/dist/cjs/api/types/index.js +10 -0
  140. package/dist/cjs/auth/HeaderAuthProvider.d.ts +14 -10
  141. package/dist/cjs/auth/HeaderAuthProvider.js +18 -9
  142. package/dist/cjs/core/fetcher/EndpointSupplier.d.ts +2 -2
  143. package/dist/cjs/core/fetcher/Fetcher.d.ts +1 -2
  144. package/dist/cjs/core/headers.d.ts +2 -2
  145. package/dist/cjs/version.d.ts +1 -1
  146. package/dist/cjs/version.js +1 -1
  147. package/dist/esm/BaseClient.mjs +2 -2
  148. package/dist/esm/Client.d.mts +4 -1
  149. package/dist/esm/Client.mjs +6 -1
  150. package/dist/esm/api/resources/auth/client/Client.d.mts +1 -1
  151. package/dist/esm/api/resources/auth/client/Client.mjs +1 -1
  152. package/dist/esm/api/resources/index.d.mts +3 -0
  153. package/dist/esm/api/resources/index.mjs +3 -0
  154. package/dist/esm/api/resources/integrations/client/Client.d.mts +2 -1
  155. package/dist/esm/api/resources/integrations/client/Client.mjs +7 -9
  156. package/dist/esm/api/resources/integrations/client/requests/CreateIntegrationsRequest.d.mts +8 -2
  157. package/dist/esm/api/resources/integrations/client/requests/ListIntegrationsRequest.d.mts +2 -2
  158. package/dist/esm/api/resources/integrations/client/requests/UpdateIntegrationsRequest.d.mts +2 -0
  159. package/dist/esm/api/resources/integrations/types/UpdateIntegrationsResponse.d.mts +2 -0
  160. package/dist/esm/api/resources/notifications/client/Client.d.mts +1 -1
  161. package/dist/esm/api/resources/notifications/client/Client.mjs +7 -14
  162. package/dist/esm/api/resources/notifications/client/requests/index.d.mts +2 -2
  163. package/dist/esm/api/resources/notifications/client/requests/index.mjs +2 -1
  164. package/dist/esm/api/resources/posts/client/Client.d.mts +1 -1
  165. package/dist/esm/api/resources/posts/client/Client.mjs +22 -49
  166. package/dist/esm/api/resources/posts/client/requests/index.d.mts +1 -1
  167. package/dist/esm/api/resources/posts/client/requests/index.mjs +1 -1
  168. package/dist/esm/api/resources/privateMessages/client/Client.d.mts +21 -1
  169. package/dist/esm/api/resources/privateMessages/client/Client.mjs +79 -18
  170. package/dist/esm/api/resources/privateMessages/client/requests/UpdatePrivateMessagesRequest.d.mts +16 -0
  171. package/dist/esm/api/resources/privateMessages/client/requests/UpdatePrivateMessagesRequest.mjs +2 -0
  172. package/dist/esm/api/resources/privateMessages/client/requests/index.d.mts +1 -0
  173. package/dist/esm/api/resources/privateMessages/types/UpdatePrivateMessagesResponse.d.mts +26 -0
  174. package/dist/esm/api/resources/privateMessages/types/UpdatePrivateMessagesResponse.mjs +2 -0
  175. package/dist/esm/api/resources/privateMessages/types/index.d.mts +1 -0
  176. package/dist/esm/api/resources/privateMessages/types/index.mjs +1 -0
  177. package/dist/esm/api/resources/reports/client/Client.d.mts +21 -1
  178. package/dist/esm/api/resources/reports/client/Client.mjs +88 -17
  179. package/dist/esm/api/resources/reports/client/requests/CreateReportsRequest.d.mts +4 -0
  180. package/dist/esm/api/resources/reports/client/requests/UpdateReportsRequest.d.mts +16 -0
  181. package/dist/esm/api/resources/reports/client/requests/UpdateReportsRequest.mjs +2 -0
  182. package/dist/esm/api/resources/reports/client/requests/index.d.mts +1 -0
  183. package/dist/esm/api/resources/reports/index.d.mts +1 -0
  184. package/dist/esm/api/resources/reports/index.mjs +1 -0
  185. package/dist/esm/api/resources/reports/types/UpdateReportsResponse.d.mts +30 -0
  186. package/dist/esm/api/resources/reports/types/UpdateReportsResponse.mjs +2 -0
  187. package/dist/esm/api/resources/reports/types/index.d.mts +1 -0
  188. package/dist/esm/api/resources/reports/types/index.mjs +1 -0
  189. package/dist/esm/api/resources/roles/client/Client.d.mts +1 -1
  190. package/dist/esm/api/resources/roles/client/Client.mjs +8 -9
  191. package/dist/esm/api/resources/roles/client/requests/ListRolesRequest.d.mts +7 -2
  192. package/dist/esm/api/resources/roles/types/ListRolesRequestSort.d.mts +6 -0
  193. package/dist/esm/api/resources/roles/types/ListRolesRequestSort.mjs +6 -0
  194. package/dist/esm/api/resources/roles/types/index.d.mts +1 -0
  195. package/dist/esm/api/resources/roles/types/index.mjs +1 -0
  196. package/dist/esm/api/resources/search/client/Client.d.mts +29 -0
  197. package/dist/esm/api/resources/search/client/Client.mjs +78 -0
  198. package/dist/esm/api/resources/search/client/index.d.mts +1 -0
  199. package/dist/esm/api/resources/search/client/index.mjs +1 -0
  200. package/dist/esm/api/resources/search/index.d.mts +2 -0
  201. package/dist/esm/api/resources/search/index.mjs +2 -0
  202. package/dist/esm/api/resources/search/types/SearchSearchResponse.d.mts +33 -0
  203. package/dist/esm/api/resources/search/types/SearchSearchResponse.mjs +19 -0
  204. package/dist/esm/api/resources/search/types/index.d.mts +1 -0
  205. package/dist/esm/api/resources/search/types/index.mjs +1 -0
  206. package/dist/esm/api/resources/ssOs/client/Client.d.mts +6 -8
  207. package/dist/esm/api/resources/ssOs/client/Client.mjs +11 -16
  208. package/dist/esm/api/resources/ssOs/client/requests/CreateSsOsRequest.d.mts +24 -15
  209. package/dist/esm/api/resources/ssOs/client/requests/CreateSsOsRequest.mjs +9 -1
  210. package/dist/esm/api/resources/ssOs/client/requests/ListSsOsRequest.d.mts +2 -2
  211. package/dist/esm/api/resources/ssOs/client/requests/UpdateSsOsRequest.d.mts +15 -8
  212. package/dist/esm/api/resources/ssOs/client/requests/UpdateSsOsRequest.mjs +9 -1
  213. package/dist/esm/api/resources/ssOs/client/requests/index.d.mts +2 -2
  214. package/dist/esm/api/resources/ssOs/client/requests/index.mjs +2 -1
  215. package/dist/esm/api/resources/ssOs/types/UpdateSsOsResponse.d.mts +2 -0
  216. package/dist/esm/api/resources/tags/client/Client.d.mts +1 -1
  217. package/dist/esm/api/resources/tags/client/Client.mjs +10 -18
  218. package/dist/esm/api/resources/threads/client/Client.d.mts +1 -1
  219. package/dist/esm/api/resources/threads/client/Client.mjs +26 -56
  220. package/dist/esm/api/resources/threads/client/requests/CreateThreadsRequest.d.mts +6 -0
  221. package/dist/esm/api/resources/threads/client/requests/index.d.mts +1 -1
  222. package/dist/esm/api/resources/threads/client/requests/index.mjs +1 -1
  223. package/dist/esm/api/resources/threads/types/UpdateThreadsResponse.d.mts +5 -5
  224. package/dist/esm/api/resources/users/client/Client.d.mts +20 -1
  225. package/dist/esm/api/resources/users/client/Client.mjs +80 -28
  226. package/dist/esm/api/resources/users/client/requests/CreateUsersRequest.d.mts +26 -0
  227. package/dist/esm/api/resources/users/client/requests/CreateUsersRequest.mjs +2 -0
  228. package/dist/esm/api/resources/users/client/requests/index.d.mts +1 -0
  229. package/dist/esm/api/resources/webhooks/client/Client.d.mts +23 -1
  230. package/dist/esm/api/resources/webhooks/client/Client.mjs +91 -15
  231. package/dist/esm/api/resources/webhooks/client/requests/CreateWebhooksRequest.d.mts +4 -0
  232. package/dist/esm/api/resources/webhooks/client/requests/UpdateWebhooksRequest.d.mts +22 -0
  233. package/dist/esm/api/resources/webhooks/client/requests/UpdateWebhooksRequest.mjs +2 -0
  234. package/dist/esm/api/resources/webhooks/client/requests/index.d.mts +1 -0
  235. package/dist/esm/api/resources/webhooks/types/UpdateWebhooksResponse.d.mts +26 -0
  236. package/dist/esm/api/resources/webhooks/types/UpdateWebhooksResponse.mjs +2 -0
  237. package/dist/esm/api/resources/webhooks/types/index.d.mts +1 -0
  238. package/dist/esm/api/resources/webhooks/types/index.mjs +1 -0
  239. package/dist/esm/api/types/Integration.d.mts +2 -0
  240. package/dist/esm/api/types/IntegrationCreate.d.mts +7 -2
  241. package/dist/esm/api/types/IntegrationList.d.mts +6 -0
  242. package/dist/esm/api/types/IntegrationList.mjs +2 -0
  243. package/dist/esm/api/types/IntegrationListResponse.d.mts +2 -0
  244. package/dist/esm/api/types/IntegrationResponse.d.mts +2 -0
  245. package/dist/esm/api/types/IntegrationUpdate.d.mts +2 -0
  246. package/dist/esm/api/types/MeResponse.d.mts +22 -0
  247. package/dist/esm/api/types/PrivateMessageUpdate.d.mts +8 -0
  248. package/dist/esm/api/types/PrivateMessageUpdate.mjs +2 -0
  249. package/dist/esm/api/types/Report.d.mts +4 -2
  250. package/dist/esm/api/types/ReportCreate.d.mts +4 -0
  251. package/dist/esm/api/types/ReportListResponse.d.mts +4 -2
  252. package/dist/esm/api/types/ReportResponse.d.mts +4 -2
  253. package/dist/esm/api/types/ReportUpdate.d.mts +8 -0
  254. package/dist/esm/api/types/ReportUpdate.mjs +2 -0
  255. package/dist/esm/api/types/RoleList.d.mts +19 -0
  256. package/dist/esm/api/types/RoleList.mjs +10 -0
  257. package/dist/esm/api/types/Search.d.mts +1 -0
  258. package/dist/esm/api/types/Search.mjs +2 -0
  259. package/dist/esm/api/types/SearchListResponse.d.mts +18 -0
  260. package/dist/esm/api/types/SearchListResponse.mjs +2 -0
  261. package/dist/esm/api/types/SearchResponse.d.mts +6 -0
  262. package/dist/esm/api/types/SearchResponse.mjs +2 -0
  263. package/dist/esm/api/types/Sso.d.mts +2 -0
  264. package/dist/esm/api/types/SsoCreate.d.mts +19 -11
  265. package/dist/esm/api/types/SsoCreate.mjs +9 -1
  266. package/dist/esm/api/types/SsoList.d.mts +6 -0
  267. package/dist/esm/api/types/SsoList.mjs +2 -0
  268. package/dist/esm/api/types/SsoListResponse.d.mts +2 -0
  269. package/dist/esm/api/types/SsoResponse.d.mts +2 -0
  270. package/dist/esm/api/types/SsoUpdate.d.mts +15 -11
  271. package/dist/esm/api/types/SsoUpdate.mjs +9 -1
  272. package/dist/esm/api/types/Thread.d.mts +5 -5
  273. package/dist/esm/api/types/ThreadCreate.d.mts +6 -0
  274. package/dist/esm/api/types/ThreadListResponse.d.mts +5 -5
  275. package/dist/esm/api/types/ThreadResponse.d.mts +5 -5
  276. package/dist/esm/api/types/UserCreate.d.mts +20 -0
  277. package/dist/esm/api/types/UserCreate.mjs +2 -0
  278. package/dist/esm/api/types/Webhook.d.mts +2 -0
  279. package/dist/esm/api/types/WebhookCreate.d.mts +4 -0
  280. package/dist/esm/api/types/WebhookListResponse.d.mts +2 -0
  281. package/dist/esm/api/types/WebhookResponse.d.mts +2 -0
  282. package/dist/esm/api/types/WebhookUpdate.d.mts +14 -0
  283. package/dist/esm/api/types/WebhookUpdate.mjs +2 -0
  284. package/dist/esm/api/types/index.d.mts +10 -0
  285. package/dist/esm/api/types/index.mjs +10 -0
  286. package/dist/esm/auth/HeaderAuthProvider.d.mts +14 -10
  287. package/dist/esm/auth/HeaderAuthProvider.mjs +18 -9
  288. package/dist/esm/core/fetcher/EndpointSupplier.d.mts +2 -2
  289. package/dist/esm/core/fetcher/Fetcher.d.mts +1 -2
  290. package/dist/esm/core/headers.d.mts +2 -2
  291. package/dist/esm/version.d.mts +1 -1
  292. package/dist/esm/version.mjs +1 -1
  293. package/package.json +2 -2
  294. package/reference.md +310 -7
@@ -5,6 +5,7 @@ import { PostsClient } from "./api/resources/posts/client/Client.mjs";
5
5
  import { PrivateMessagesClient } from "./api/resources/privateMessages/client/Client.mjs";
6
6
  import { ReportsClient } from "./api/resources/reports/client/Client.mjs";
7
7
  import { RolesClient } from "./api/resources/roles/client/Client.mjs";
8
+ import { SearchClient } from "./api/resources/search/client/Client.mjs";
8
9
  import { SsOsClient } from "./api/resources/ssOs/client/Client.mjs";
9
10
  import { TagsClient } from "./api/resources/tags/client/Client.mjs";
10
11
  import { ThreadsClient } from "./api/resources/threads/client/Client.mjs";
@@ -20,6 +21,7 @@ export declare namespace ForumClient {
20
21
  export declare class ForumClient {
21
22
  protected readonly _options: NormalizedClientOptionsWithAuth<ForumClient.Options>;
22
23
  protected _auth: AuthClient | undefined;
24
+ protected _search: SearchClient | undefined;
23
25
  protected _tags: TagsClient | undefined;
24
26
  protected _threads: ThreadsClient | undefined;
25
27
  protected _posts: PostsClient | undefined;
@@ -31,8 +33,9 @@ export declare class ForumClient {
31
33
  protected _webhooks: WebhooksClient | undefined;
32
34
  protected _integrations: IntegrationsClient | undefined;
33
35
  protected _ssOs: SsOsClient | undefined;
34
- constructor(options: ForumClient.Options);
36
+ constructor(options?: ForumClient.Options);
35
37
  get auth(): AuthClient;
38
+ get search(): SearchClient;
36
39
  get tags(): TagsClient;
37
40
  get threads(): ThreadsClient;
38
41
  get posts(): PostsClient;
@@ -6,6 +6,7 @@ import { PostsClient } from "./api/resources/posts/client/Client.mjs";
6
6
  import { PrivateMessagesClient } from "./api/resources/privateMessages/client/Client.mjs";
7
7
  import { ReportsClient } from "./api/resources/reports/client/Client.mjs";
8
8
  import { RolesClient } from "./api/resources/roles/client/Client.mjs";
9
+ import { SearchClient } from "./api/resources/search/client/Client.mjs";
9
10
  import { SsOsClient } from "./api/resources/ssOs/client/Client.mjs";
10
11
  import { TagsClient } from "./api/resources/tags/client/Client.mjs";
11
12
  import { ThreadsClient } from "./api/resources/threads/client/Client.mjs";
@@ -13,13 +14,17 @@ import { UsersClient } from "./api/resources/users/client/Client.mjs";
13
14
  import { WebhooksClient } from "./api/resources/webhooks/client/Client.mjs";
14
15
  import { normalizeClientOptionsWithAuth } from "./BaseClient.mjs";
15
16
  export class ForumClient {
16
- constructor(options) {
17
+ constructor(options = {}) {
17
18
  this._options = normalizeClientOptionsWithAuth(options);
18
19
  }
19
20
  get auth() {
20
21
  var _a;
21
22
  return ((_a = this._auth) !== null && _a !== void 0 ? _a : (this._auth = new AuthClient(this._options)));
22
23
  }
24
+ get search() {
25
+ var _a;
26
+ return ((_a = this._search) !== null && _a !== void 0 ? _a : (this._search = new SearchClient(this._options)));
27
+ }
23
28
  get tags() {
24
29
  var _a;
25
30
  return ((_a = this._tags) !== null && _a !== void 0 ? _a : (this._tags = new TagsClient(this._options)));
@@ -12,7 +12,7 @@ export declare namespace AuthClient {
12
12
  */
13
13
  export declare class AuthClient {
14
14
  protected readonly _options: NormalizedClientOptionsWithAuth<AuthClient.Options>;
15
- constructor(options: AuthClient.Options);
15
+ constructor(options?: AuthClient.Options);
16
16
  /**
17
17
  * Register a new user in your forum instance. Requires API key for instance identification. Returns a JWT token for subsequent authenticated requests.
18
18
  *
@@ -19,7 +19,7 @@ import * as Forum from "../../../index.mjs";
19
19
  * Operations for auth
20
20
  */
21
21
  export class AuthClient {
22
- constructor(options) {
22
+ constructor(options = {}) {
23
23
  this._options = normalizeClientOptionsWithAuth(options);
24
24
  }
25
25
  /**
@@ -14,9 +14,12 @@ export * as privateMessages from "./privateMessages/index.mjs";
14
14
  export * from "./privateMessages/types/index.mjs";
15
15
  export * from "./reports/client/requests/index.mjs";
16
16
  export * as reports from "./reports/index.mjs";
17
+ export * from "./reports/types/index.mjs";
17
18
  export * from "./roles/client/requests/index.mjs";
18
19
  export * as roles from "./roles/index.mjs";
19
20
  export * from "./roles/types/index.mjs";
21
+ export * as search from "./search/index.mjs";
22
+ export * from "./search/types/index.mjs";
20
23
  export * from "./ssOs/client/requests/index.mjs";
21
24
  export * as ssOs from "./ssOs/index.mjs";
22
25
  export * from "./ssOs/types/index.mjs";
@@ -14,9 +14,12 @@ export * as privateMessages from "./privateMessages/index.mjs";
14
14
  export * from "./privateMessages/types/index.mjs";
15
15
  export * from "./reports/client/requests/index.mjs";
16
16
  export * as reports from "./reports/index.mjs";
17
+ export * from "./reports/types/index.mjs";
17
18
  export * from "./roles/client/requests/index.mjs";
18
19
  export * as roles from "./roles/index.mjs";
19
20
  export * from "./roles/types/index.mjs";
21
+ export * as search from "./search/index.mjs";
22
+ export * from "./search/types/index.mjs";
20
23
  export * from "./ssOs/client/requests/index.mjs";
21
24
  export * as ssOs from "./ssOs/index.mjs";
22
25
  export * from "./ssOs/types/index.mjs";
@@ -12,7 +12,7 @@ export declare namespace IntegrationsClient {
12
12
  */
13
13
  export declare class IntegrationsClient {
14
14
  protected readonly _options: NormalizedClientOptionsWithAuth<IntegrationsClient.Options>;
15
- constructor(options: IntegrationsClient.Options);
15
+ constructor(options?: IntegrationsClient.Options);
16
16
  /**
17
17
  * Retrieve a paginated list of integrations. Use cursor for pagination.
18
18
  *
@@ -48,6 +48,7 @@ export declare class IntegrationsClient {
48
48
  * @example
49
49
  * await client.integrations.create({
50
50
  * type: "type",
51
+ * name: "name",
51
52
  * config: {
52
53
  * "key": "value"
53
54
  * }
@@ -30,7 +30,7 @@ import * as Forum from "../../../index.mjs";
30
30
  * Operations for integrations
31
31
  */
32
32
  export class IntegrationsClient {
33
- constructor(options) {
33
+ constructor(options = {}) {
34
34
  this._options = normalizeClientOptionsWithAuth(options);
35
35
  }
36
36
  /**
@@ -55,14 +55,11 @@ export class IntegrationsClient {
55
55
  __list() {
56
56
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
57
57
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
58
- const { cursor, limit } = request;
59
- const _queryParams = {};
60
- if (cursor != null) {
61
- _queryParams.cursor = cursor;
62
- }
63
- if (limit != null) {
64
- _queryParams.limit = limit.toString();
65
- }
58
+ const { limit, cursor } = request;
59
+ const _queryParams = {
60
+ limit,
61
+ cursor,
62
+ };
66
63
  const _authRequest = yield this._options.authProvider.getAuthRequest();
67
64
  const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
68
65
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
@@ -117,6 +114,7 @@ export class IntegrationsClient {
117
114
  * @example
118
115
  * await client.integrations.create({
119
116
  * type: "type",
117
+ * name: "name",
120
118
  * config: {
121
119
  * "key": "value"
122
120
  * }
@@ -2,15 +2,21 @@
2
2
  * @example
3
3
  * {
4
4
  * type: "type",
5
+ * name: "name",
5
6
  * config: {
6
7
  * "key": "value"
7
8
  * }
8
9
  * }
9
10
  */
10
11
  export interface CreateIntegrationsRequest {
11
- /** Integration type (e.g. slack, discord) */
12
+ /** Integration type (e.g. SLACK, DISCORD) */
12
13
  type: string;
14
+ /** Integration name */
15
+ name: string;
13
16
  /** JSON configuration */
14
17
  config: Record<string, unknown>;
15
- enabled?: boolean;
18
+ /** Whether integration is active */
19
+ active?: boolean;
20
+ /** Custom extended data */
21
+ extendedData?: Record<string, unknown>;
16
22
  }
@@ -3,8 +3,8 @@
3
3
  * {}
4
4
  */
5
5
  export interface ListIntegrationsRequest {
6
- /** Pagination cursor */
7
- cursor?: string;
8
6
  /** Items per page (max 75) */
9
7
  limit?: number;
8
+ /** Cursor for pagination */
9
+ cursor?: string;
10
10
  }
@@ -13,4 +13,6 @@ export interface UpdateIntegrationsRequest {
13
13
  config?: Record<string, unknown>;
14
14
  /** Enable/disable integration */
15
15
  active?: boolean;
16
+ /** Custom extended data */
17
+ extendedData?: Record<string, unknown>;
16
18
  }
@@ -10,6 +10,8 @@ export declare namespace UpdateIntegrationsResponse {
10
10
  name: string;
11
11
  /** Whether integration is active */
12
12
  active: boolean;
13
+ /** Custom extended data */
14
+ extendedData: Record<string, unknown> | null;
13
15
  /** Integration creation timestamp */
14
16
  createdAt: string;
15
17
  /** Integration last update timestamp */
@@ -12,7 +12,7 @@ export declare namespace NotificationsClient {
12
12
  */
13
13
  export declare class NotificationsClient {
14
14
  protected readonly _options: NormalizedClientOptionsWithAuth<NotificationsClient.Options>;
15
- constructor(options: NotificationsClient.Options);
15
+ constructor(options?: NotificationsClient.Options);
16
16
  /**
17
17
  * Retrieve a paginated list of notifications. Use cursor for pagination.
18
18
  *
@@ -30,7 +30,7 @@ import * as Forum from "../../../index.mjs";
30
30
  * Operations for notifications
31
31
  */
32
32
  export class NotificationsClient {
33
- constructor(options) {
33
+ constructor(options = {}) {
34
34
  this._options = normalizeClientOptionsWithAuth(options);
35
35
  }
36
36
  /**
@@ -54,19 +54,12 @@ export class NotificationsClient {
54
54
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
55
55
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
56
56
  const { limit, cursor, status, userId } = request;
57
- const _queryParams = {};
58
- if (limit != null) {
59
- _queryParams.limit = limit.toString();
60
- }
61
- if (cursor != null) {
62
- _queryParams.cursor = cursor;
63
- }
64
- if (status != null) {
65
- _queryParams.status = status;
66
- }
67
- if (userId != null) {
68
- _queryParams.userId = userId;
69
- }
57
+ const _queryParams = {
58
+ limit,
59
+ cursor,
60
+ status: status != null ? status : undefined,
61
+ userId,
62
+ };
70
63
  const _authRequest = yield this._options.authProvider.getAuthRequest();
71
64
  const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
72
65
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
@@ -1,5 +1,5 @@
1
- export type { CreateNotificationsRequest } from "./CreateNotificationsRequest.mjs";
1
+ export { CreateNotificationsRequest } from "./CreateNotificationsRequest.mjs";
2
2
  export type { DeleteNotificationsRequest } from "./DeleteNotificationsRequest.mjs";
3
3
  export type { ListNotificationsRequest } from "./ListNotificationsRequest.mjs";
4
4
  export type { RetrieveNotificationsRequest } from "./RetrieveNotificationsRequest.mjs";
5
- export type { UpdateNotificationsRequest } from "./UpdateNotificationsRequest.mjs";
5
+ export { UpdateNotificationsRequest } from "./UpdateNotificationsRequest.mjs";
@@ -1 +1,2 @@
1
- export {};
1
+ export { CreateNotificationsRequest } from "./CreateNotificationsRequest.mjs";
2
+ export { UpdateNotificationsRequest } from "./UpdateNotificationsRequest.mjs";
@@ -12,7 +12,7 @@ export declare namespace PostsClient {
12
12
  */
13
13
  export declare class PostsClient {
14
14
  protected readonly _options: NormalizedClientOptionsWithAuth<PostsClient.Options>;
15
- constructor(options: PostsClient.Options);
15
+ constructor(options?: PostsClient.Options);
16
16
  /**
17
17
  * Retrieve a paginated list of posts. Use cursor for pagination.
18
18
  *
@@ -30,7 +30,7 @@ import * as Forum from "../../../index.mjs";
30
30
  * Operations for posts
31
31
  */
32
32
  export class PostsClient {
33
- constructor(options) {
33
+ constructor(options = {}) {
34
34
  this._options = normalizeClientOptionsWithAuth(options);
35
35
  }
36
36
  /**
@@ -54,25 +54,14 @@ export class PostsClient {
54
54
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
55
55
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
56
56
  const { limit, cursor, userId, sort, search, type: type_ } = request;
57
- const _queryParams = {};
58
- if (limit != null) {
59
- _queryParams.limit = limit.toString();
60
- }
61
- if (cursor != null) {
62
- _queryParams.cursor = cursor;
63
- }
64
- if (userId != null) {
65
- _queryParams.userId = userId;
66
- }
67
- if (sort != null) {
68
- _queryParams.sort = sort;
69
- }
70
- if (search != null) {
71
- _queryParams.search = search;
72
- }
73
- if (type_ != null) {
74
- _queryParams.type = type_;
75
- }
57
+ const _queryParams = {
58
+ limit,
59
+ cursor,
60
+ userId,
61
+ sort: sort != null ? sort : undefined,
62
+ search,
63
+ type: type_ != null ? type_ : undefined,
64
+ };
76
65
  const _authRequest = yield this._options.authProvider.getAuthRequest();
77
66
  const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
78
67
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
@@ -394,16 +383,11 @@ export class PostsClient {
394
383
  return __awaiter(this, void 0, void 0, function* () {
395
384
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
396
385
  const { id, limit, cursor, type: type_ } = request;
397
- const _queryParams = {};
398
- if (limit != null) {
399
- _queryParams.limit = limit.toString();
400
- }
401
- if (cursor != null) {
402
- _queryParams.cursor = cursor;
403
- }
404
- if (type_ != null) {
405
- _queryParams.type = type_;
406
- }
386
+ const _queryParams = {
387
+ limit,
388
+ cursor,
389
+ type: type_ != null ? type_ : undefined,
390
+ };
407
391
  const _authRequest = yield this._options.authProvider.getAuthRequest();
408
392
  const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
409
393
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
@@ -649,25 +633,14 @@ export class PostsClient {
649
633
  return __awaiter(this, void 0, void 0, function* () {
650
634
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
651
635
  const { id, limit, cursor, userId, sort, search, type: type_ } = request;
652
- const _queryParams = {};
653
- if (limit != null) {
654
- _queryParams.limit = limit.toString();
655
- }
656
- if (cursor != null) {
657
- _queryParams.cursor = cursor;
658
- }
659
- if (userId != null) {
660
- _queryParams.userId = userId;
661
- }
662
- if (sort != null) {
663
- _queryParams.sort = sort;
664
- }
665
- if (search != null) {
666
- _queryParams.search = search;
667
- }
668
- if (type_ != null) {
669
- _queryParams.type = type_;
670
- }
636
+ const _queryParams = {
637
+ limit,
638
+ cursor,
639
+ userId,
640
+ sort: sort != null ? sort : undefined,
641
+ search,
642
+ type: type_ != null ? type_ : undefined,
643
+ };
671
644
  const _authRequest = yield this._options.authProvider.getAuthRequest();
672
645
  const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
673
646
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
@@ -1,5 +1,5 @@
1
1
  export type { CreatePostsRequest } from "./CreatePostsRequest.mjs";
2
- export type { CreateReactionPostsRequest } from "./CreateReactionPostsRequest.mjs";
2
+ export { CreateReactionPostsRequest } from "./CreateReactionPostsRequest.mjs";
3
3
  export type { DeletePostPostsRequest } from "./DeletePostPostsRequest.mjs";
4
4
  export type { DeletePostsRequest } from "./DeletePostsRequest.mjs";
5
5
  export type { DeleteReactionPostsRequest } from "./DeleteReactionPostsRequest.mjs";
@@ -1 +1 @@
1
- export {};
1
+ export { CreateReactionPostsRequest } from "./CreateReactionPostsRequest.mjs";
@@ -12,7 +12,7 @@ export declare namespace PrivateMessagesClient {
12
12
  */
13
13
  export declare class PrivateMessagesClient {
14
14
  protected readonly _options: NormalizedClientOptionsWithAuth<PrivateMessagesClient.Options>;
15
- constructor(options: PrivateMessagesClient.Options);
15
+ constructor(options?: PrivateMessagesClient.Options);
16
16
  /**
17
17
  * Retrieve a paginated list of private messages. Use cursor for pagination.
18
18
  *
@@ -87,6 +87,26 @@ export declare class PrivateMessagesClient {
87
87
  */
88
88
  delete(request: Forum.DeletePrivateMessagesRequest, requestOptions?: PrivateMessagesClient.RequestOptions): core.HttpResponsePromise<Forum.SuccessResponse>;
89
89
  private __delete;
90
+ /**
91
+ * Update an existing private message. Only provided fields will be modified.
92
+ *
93
+ * @param {Forum.UpdatePrivateMessagesRequest} request
94
+ * @param {PrivateMessagesClient.RequestOptions} requestOptions - Request-specific configuration.
95
+ *
96
+ * @throws {@link Forum.BadRequestError}
97
+ * @throws {@link Forum.UnauthorizedError}
98
+ * @throws {@link Forum.PaymentRequiredError}
99
+ * @throws {@link Forum.NotFoundError}
100
+ * @throws {@link Forum.TooManyRequestsError}
101
+ * @throws {@link Forum.InternalServerError}
102
+ *
103
+ * @example
104
+ * await client.privateMessages.update({
105
+ * id: "id"
106
+ * })
107
+ */
108
+ update(request: Forum.UpdatePrivateMessagesRequest, requestOptions?: PrivateMessagesClient.RequestOptions): core.HttpResponsePromise<Forum.UpdatePrivateMessagesResponse>;
109
+ private __update;
90
110
  /**
91
111
  * Retrieve a paginated list of replies for Private Message.
92
112
  *
@@ -30,7 +30,7 @@ import * as Forum from "../../../index.mjs";
30
30
  * Operations for private messages
31
31
  */
32
32
  export class PrivateMessagesClient {
33
- constructor(options) {
33
+ constructor(options = {}) {
34
34
  this._options = normalizeClientOptionsWithAuth(options);
35
35
  }
36
36
  /**
@@ -54,16 +54,11 @@ export class PrivateMessagesClient {
54
54
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
55
55
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
56
56
  const { limit, cursor, query } = request;
57
- const _queryParams = {};
58
- if (limit != null) {
59
- _queryParams.limit = limit.toString();
60
- }
61
- if (cursor != null) {
62
- _queryParams.cursor = cursor;
63
- }
64
- if (query != null) {
65
- _queryParams.query = query;
66
- }
57
+ const _queryParams = {
58
+ limit,
59
+ cursor,
60
+ query,
61
+ };
67
62
  const _authRequest = yield this._options.authProvider.getAuthRequest();
68
63
  const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
69
64
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
@@ -293,6 +288,75 @@ export class PrivateMessagesClient {
293
288
  return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/private-messages/{id}");
294
289
  });
295
290
  }
291
+ /**
292
+ * Update an existing private message. Only provided fields will be modified.
293
+ *
294
+ * @param {Forum.UpdatePrivateMessagesRequest} request
295
+ * @param {PrivateMessagesClient.RequestOptions} requestOptions - Request-specific configuration.
296
+ *
297
+ * @throws {@link Forum.BadRequestError}
298
+ * @throws {@link Forum.UnauthorizedError}
299
+ * @throws {@link Forum.PaymentRequiredError}
300
+ * @throws {@link Forum.NotFoundError}
301
+ * @throws {@link Forum.TooManyRequestsError}
302
+ * @throws {@link Forum.InternalServerError}
303
+ *
304
+ * @example
305
+ * await client.privateMessages.update({
306
+ * id: "id"
307
+ * })
308
+ */
309
+ update(request, requestOptions) {
310
+ return core.HttpResponsePromise.fromPromise(this.__update(request, requestOptions));
311
+ }
312
+ __update(request, requestOptions) {
313
+ return __awaiter(this, void 0, void 0, function* () {
314
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
315
+ const { id } = request, _body = __rest(request, ["id"]);
316
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
317
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
318
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
319
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ForumEnvironment.Production, `private-messages/${core.url.encodePathParam(id)}`),
320
+ method: "PATCH",
321
+ headers: _headers,
322
+ contentType: "application/json",
323
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
324
+ requestType: "json",
325
+ body: _body,
326
+ timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
327
+ maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
328
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
329
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
330
+ logging: this._options.logging,
331
+ });
332
+ if (_response.ok) {
333
+ return { data: _response.body, rawResponse: _response.rawResponse };
334
+ }
335
+ if (_response.error.reason === "status-code") {
336
+ switch (_response.error.statusCode) {
337
+ case 400:
338
+ throw new Forum.BadRequestError(_response.error.body, _response.rawResponse);
339
+ case 401:
340
+ throw new Forum.UnauthorizedError(_response.error.body, _response.rawResponse);
341
+ case 402:
342
+ throw new Forum.PaymentRequiredError(_response.error.body, _response.rawResponse);
343
+ case 404:
344
+ throw new Forum.NotFoundError(_response.error.body, _response.rawResponse);
345
+ case 429:
346
+ throw new Forum.TooManyRequestsError(_response.error.body, _response.rawResponse);
347
+ case 500:
348
+ throw new Forum.InternalServerError(_response.error.body, _response.rawResponse);
349
+ default:
350
+ throw new errors.ForumError({
351
+ statusCode: _response.error.statusCode,
352
+ body: _response.error.body,
353
+ rawResponse: _response.rawResponse,
354
+ });
355
+ }
356
+ }
357
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "PATCH", "/private-messages/{id}");
358
+ });
359
+ }
296
360
  /**
297
361
  * Retrieve a paginated list of replies for Private Message.
298
362
  *
@@ -316,13 +380,10 @@ export class PrivateMessagesClient {
316
380
  return __awaiter(this, void 0, void 0, function* () {
317
381
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
318
382
  const { id, cursor, limit } = request;
319
- const _queryParams = {};
320
- if (cursor != null) {
321
- _queryParams.cursor = cursor;
322
- }
323
- if (limit != null) {
324
- _queryParams.limit = limit.toString();
325
- }
383
+ const _queryParams = {
384
+ cursor,
385
+ limit,
386
+ };
326
387
  const _authRequest = yield this._options.authProvider.getAuthRequest();
327
388
  const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
328
389
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * id: "id"
5
+ * }
6
+ */
7
+ export interface UpdatePrivateMessagesRequest {
8
+ /** Private Message ID */
9
+ id: string;
10
+ /** Message content */
11
+ body?: string;
12
+ /** Message status (read, unread, archived) */
13
+ status?: string;
14
+ /** Extended data */
15
+ extendedData?: Record<string, unknown>;
16
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -6,3 +6,4 @@ export type { ListPrivateMessagesRequest } from "./ListPrivateMessagesRequest.mj
6
6
  export type { ListRepliesPrivateMessagesRequest } from "./ListRepliesPrivateMessagesRequest.mjs";
7
7
  export type { RetrievePrivateMessagesRequest } from "./RetrievePrivateMessagesRequest.mjs";
8
8
  export type { RetrieveReplyPrivateMessagesRequest } from "./RetrieveReplyPrivateMessagesRequest.mjs";
9
+ export type { UpdatePrivateMessagesRequest } from "./UpdatePrivateMessagesRequest.mjs";
@@ -0,0 +1,26 @@
1
+ export interface UpdatePrivateMessagesResponse {
2
+ data?: UpdatePrivateMessagesResponse.Data;
3
+ }
4
+ export declare namespace UpdatePrivateMessagesResponse {
5
+ interface Data {
6
+ /** Recipient User ID */
7
+ recipientId: string;
8
+ /** Sender user ID (required for API key auth, ignored for JWT auth) */
9
+ senderId?: string;
10
+ /** Message title (optional for replies) */
11
+ title?: string;
12
+ /** Message content */
13
+ body: string;
14
+ /** Parent Message ID (for replies) */
15
+ parentId?: string;
16
+ /** Extended data */
17
+ extendedData?: Record<string, unknown>;
18
+ id: string;
19
+ /** Message status (sent, delivered, read, archived) */
20
+ status: string | null;
21
+ /** Message sent timestamp */
22
+ createdAt: string;
23
+ /** Message last update timestamp */
24
+ updatedAt: string;
25
+ }
26
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -1 +1,2 @@
1
1
  export * from "./RetrieveReplyPrivateMessagesResponse.mjs";
2
+ export * from "./UpdatePrivateMessagesResponse.mjs";
@@ -1 +1,2 @@
1
1
  export * from "./RetrieveReplyPrivateMessagesResponse.mjs";
2
+ export * from "./UpdatePrivateMessagesResponse.mjs";