@foru-ms/sdk 2.1.2 → 2.1.4

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 (289) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/BaseClient.d.ts +4 -0
  3. package/dist/cjs/BaseClient.js +3 -2
  4. package/dist/cjs/Client.d.ts +4 -1
  5. package/dist/cjs/Client.js +22 -17
  6. package/dist/cjs/api/resources/auth/client/Client.d.ts +1 -1
  7. package/dist/cjs/api/resources/auth/client/Client.js +46 -36
  8. package/dist/cjs/api/resources/index.d.ts +3 -0
  9. package/dist/cjs/api/resources/index.js +4 -1
  10. package/dist/cjs/api/resources/integrations/client/Client.d.ts +1 -1
  11. package/dist/cjs/api/resources/integrations/client/Client.js +46 -36
  12. package/dist/cjs/api/resources/notifications/client/Client.d.ts +1 -1
  13. package/dist/cjs/api/resources/notifications/client/Client.js +46 -36
  14. package/dist/cjs/api/resources/posts/client/Client.d.ts +1 -1
  15. package/dist/cjs/api/resources/posts/client/Client.js +109 -85
  16. package/dist/cjs/api/resources/privateMessages/client/Client.d.ts +1 -1
  17. package/dist/cjs/api/resources/privateMessages/client/Client.js +82 -64
  18. package/dist/cjs/api/resources/provisioning/client/Client.d.ts +359 -0
  19. package/dist/cjs/api/resources/provisioning/client/Client.js +1291 -0
  20. package/dist/cjs/api/resources/provisioning/client/index.d.ts +1 -0
  21. package/dist/cjs/api/resources/provisioning/client/index.js +17 -0
  22. package/dist/cjs/api/resources/provisioning/client/requests/AddDomainProvisioningRequest.d.ts +13 -0
  23. package/dist/cjs/api/resources/provisioning/client/requests/AddDomainProvisioningRequest.js +3 -0
  24. package/dist/cjs/api/resources/provisioning/client/requests/CreateInstance.d.ts +13 -0
  25. package/dist/cjs/api/resources/provisioning/client/requests/CreateInstance.js +3 -0
  26. package/dist/cjs/api/resources/provisioning/client/requests/CreateWebhookProvisioningRequest.d.ts +15 -0
  27. package/dist/cjs/api/resources/provisioning/client/requests/CreateWebhookProvisioningRequest.js +3 -0
  28. package/dist/cjs/api/resources/provisioning/client/requests/DeleteInstance.d.ts +10 -0
  29. package/dist/cjs/api/resources/provisioning/client/requests/DeleteInstance.js +3 -0
  30. package/dist/cjs/api/resources/provisioning/client/requests/DeleteWebhookProvisioningRequest.d.ts +11 -0
  31. package/dist/cjs/api/resources/provisioning/client/requests/DeleteWebhookProvisioningRequest.js +3 -0
  32. package/dist/cjs/api/resources/provisioning/client/requests/ExportDataProvisioningRequest.d.ts +9 -0
  33. package/dist/cjs/api/resources/provisioning/client/requests/ExportDataProvisioningRequest.js +3 -0
  34. package/dist/cjs/api/resources/provisioning/client/requests/GetBillingProvisioningRequest.d.ts +10 -0
  35. package/dist/cjs/api/resources/provisioning/client/requests/GetBillingProvisioningRequest.js +3 -0
  36. package/dist/cjs/api/resources/provisioning/client/requests/GetUsageProvisioningRequest.d.ts +10 -0
  37. package/dist/cjs/api/resources/provisioning/client/requests/GetUsageProvisioningRequest.js +3 -0
  38. package/dist/cjs/api/resources/provisioning/client/requests/InviteTeamProvisioningRequest.d.ts +29 -0
  39. package/dist/cjs/api/resources/provisioning/client/requests/InviteTeamProvisioningRequest.js +17 -0
  40. package/dist/cjs/api/resources/provisioning/client/requests/ListDomainsProvisioningRequest.d.ts +10 -0
  41. package/dist/cjs/api/resources/provisioning/client/requests/ListDomainsProvisioningRequest.js +3 -0
  42. package/dist/cjs/api/resources/provisioning/client/requests/ListProvisioningRequest.d.ts +8 -0
  43. package/dist/cjs/api/resources/provisioning/client/requests/ListProvisioningRequest.js +3 -0
  44. package/dist/cjs/api/resources/provisioning/client/requests/ListTeamProvisioningRequest.d.ts +10 -0
  45. package/dist/cjs/api/resources/provisioning/client/requests/ListTeamProvisioningRequest.js +3 -0
  46. package/dist/cjs/api/resources/provisioning/client/requests/ListWebhooksProvisioningRequest.d.ts +10 -0
  47. package/dist/cjs/api/resources/provisioning/client/requests/ListWebhooksProvisioningRequest.js +3 -0
  48. package/dist/cjs/api/resources/provisioning/client/requests/RegenerateApiKeyProvisioningRequest.d.ts +9 -0
  49. package/dist/cjs/api/resources/provisioning/client/requests/RegenerateApiKeyProvisioningRequest.js +3 -0
  50. package/dist/cjs/api/resources/provisioning/client/requests/RemoveDomainProvisioningRequest.d.ts +11 -0
  51. package/dist/cjs/api/resources/provisioning/client/requests/RemoveDomainProvisioningRequest.js +3 -0
  52. package/dist/cjs/api/resources/provisioning/client/requests/RemoveTeamMemberProvisioningRequest.d.ts +11 -0
  53. package/dist/cjs/api/resources/provisioning/client/requests/RemoveTeamMemberProvisioningRequest.js +3 -0
  54. package/dist/cjs/api/resources/provisioning/client/requests/UpdateInstance.d.ts +14 -0
  55. package/dist/cjs/api/resources/provisioning/client/requests/UpdateInstance.js +3 -0
  56. package/dist/cjs/api/resources/provisioning/client/requests/UpdateWebhookProvisioningRequest.d.ts +15 -0
  57. package/dist/cjs/api/resources/provisioning/client/requests/UpdateWebhookProvisioningRequest.js +3 -0
  58. package/dist/cjs/api/resources/provisioning/client/requests/UpgradeInstance.d.ts +26 -0
  59. package/dist/cjs/api/resources/provisioning/client/requests/UpgradeInstance.js +13 -0
  60. package/dist/cjs/api/resources/provisioning/client/requests/index.d.ts +19 -0
  61. package/dist/cjs/api/resources/provisioning/client/requests/index.js +7 -0
  62. package/dist/cjs/api/resources/provisioning/index.d.ts +2 -0
  63. package/dist/cjs/api/resources/provisioning/index.js +18 -0
  64. package/dist/cjs/api/resources/provisioning/types/AddDomainProvisioningResponse.d.ts +4 -0
  65. package/dist/cjs/api/resources/provisioning/types/AddDomainProvisioningResponse.js +3 -0
  66. package/dist/cjs/api/resources/provisioning/types/ChangePlanProvisioningResponse.d.ts +19 -0
  67. package/dist/cjs/api/resources/provisioning/types/ChangePlanProvisioningResponse.js +14 -0
  68. package/dist/cjs/api/resources/provisioning/types/CreateProvisioningResponse.d.ts +4 -0
  69. package/dist/cjs/api/resources/provisioning/types/CreateProvisioningResponse.js +3 -0
  70. package/dist/cjs/api/resources/provisioning/types/CreateWebhookProvisioningResponse.d.ts +4 -0
  71. package/dist/cjs/api/resources/provisioning/types/CreateWebhookProvisioningResponse.js +3 -0
  72. package/dist/cjs/api/resources/provisioning/types/DeleteProvisioningResponse.d.ts +8 -0
  73. package/dist/cjs/api/resources/provisioning/types/DeleteProvisioningResponse.js +3 -0
  74. package/dist/cjs/api/resources/provisioning/types/DeleteWebhookProvisioningResponse.d.ts +8 -0
  75. package/dist/cjs/api/resources/provisioning/types/DeleteWebhookProvisioningResponse.js +3 -0
  76. package/dist/cjs/api/resources/provisioning/types/ExportDataProvisioningResponse.d.ts +17 -0
  77. package/dist/cjs/api/resources/provisioning/types/ExportDataProvisioningResponse.js +3 -0
  78. package/dist/cjs/api/resources/provisioning/types/GetBillingProvisioningResponse.d.ts +4 -0
  79. package/dist/cjs/api/resources/provisioning/types/GetBillingProvisioningResponse.js +3 -0
  80. package/dist/cjs/api/resources/provisioning/types/GetUsageProvisioningResponse.d.ts +4 -0
  81. package/dist/cjs/api/resources/provisioning/types/GetUsageProvisioningResponse.js +3 -0
  82. package/dist/cjs/api/resources/provisioning/types/InviteTeamProvisioningResponse.d.ts +8 -0
  83. package/dist/cjs/api/resources/provisioning/types/InviteTeamProvisioningResponse.js +3 -0
  84. package/dist/cjs/api/resources/provisioning/types/ListDomainsProvisioningResponse.d.ts +10 -0
  85. package/dist/cjs/api/resources/provisioning/types/ListDomainsProvisioningResponse.js +3 -0
  86. package/dist/cjs/api/resources/provisioning/types/ListProvisioningResponse.d.ts +4 -0
  87. package/dist/cjs/api/resources/provisioning/types/ListProvisioningResponse.js +3 -0
  88. package/dist/cjs/api/resources/provisioning/types/ListTeamProvisioningResponse.d.ts +10 -0
  89. package/dist/cjs/api/resources/provisioning/types/ListTeamProvisioningResponse.js +3 -0
  90. package/dist/cjs/api/resources/provisioning/types/ListWebhooksProvisioningResponse.d.ts +10 -0
  91. package/dist/cjs/api/resources/provisioning/types/ListWebhooksProvisioningResponse.js +3 -0
  92. package/dist/cjs/api/resources/provisioning/types/RegenerateApiKeyProvisioningResponse.d.ts +9 -0
  93. package/dist/cjs/api/resources/provisioning/types/RegenerateApiKeyProvisioningResponse.js +3 -0
  94. package/dist/cjs/api/resources/provisioning/types/RemoveDomainProvisioningResponse.d.ts +8 -0
  95. package/dist/cjs/api/resources/provisioning/types/RemoveDomainProvisioningResponse.js +3 -0
  96. package/dist/cjs/api/resources/provisioning/types/RemoveTeamMemberProvisioningResponse.d.ts +8 -0
  97. package/dist/cjs/api/resources/provisioning/types/RemoveTeamMemberProvisioningResponse.js +3 -0
  98. package/dist/cjs/api/resources/provisioning/types/UpdateProvisioningResponse.d.ts +9 -0
  99. package/dist/cjs/api/resources/provisioning/types/UpdateProvisioningResponse.js +3 -0
  100. package/dist/cjs/api/resources/provisioning/types/UpdateWebhookProvisioningResponse.d.ts +4 -0
  101. package/dist/cjs/api/resources/provisioning/types/UpdateWebhookProvisioningResponse.js +3 -0
  102. package/dist/cjs/api/resources/provisioning/types/index.d.ts +19 -0
  103. package/dist/cjs/api/resources/provisioning/types/index.js +35 -0
  104. package/dist/cjs/api/resources/reports/client/Client.d.ts +1 -1
  105. package/dist/cjs/api/resources/reports/client/Client.js +46 -36
  106. package/dist/cjs/api/resources/roles/client/Client.d.ts +1 -1
  107. package/dist/cjs/api/resources/roles/client/Client.js +46 -36
  108. package/dist/cjs/api/resources/search/client/Client.d.ts +1 -1
  109. package/dist/cjs/api/resources/search/client/Client.js +10 -8
  110. package/dist/cjs/api/resources/ssOs/client/Client.d.ts +1 -1
  111. package/dist/cjs/api/resources/ssOs/client/Client.js +46 -36
  112. package/dist/cjs/api/resources/tags/client/Client.d.ts +1 -1
  113. package/dist/cjs/api/resources/tags/client/Client.js +73 -57
  114. package/dist/cjs/api/resources/threads/client/Client.d.ts +1 -1
  115. package/dist/cjs/api/resources/threads/client/Client.js +163 -127
  116. package/dist/cjs/api/resources/users/client/Client.d.ts +1 -1
  117. package/dist/cjs/api/resources/users/client/Client.js +100 -78
  118. package/dist/cjs/api/resources/users/types/UpdateUsersResponse.d.ts +3 -1
  119. package/dist/cjs/api/resources/webhooks/client/Client.d.ts +1 -1
  120. package/dist/cjs/api/resources/webhooks/client/Client.js +73 -57
  121. package/dist/cjs/api/types/BillingInfo.d.ts +17 -0
  122. package/dist/cjs/api/types/BillingInfo.js +13 -0
  123. package/dist/cjs/api/types/Instance.d.ts +7 -0
  124. package/dist/cjs/api/types/Instance.js +3 -0
  125. package/dist/cjs/api/types/InstanceDomain.d.ts +6 -0
  126. package/dist/cjs/api/types/InstanceDomain.js +3 -0
  127. package/dist/cjs/api/types/InstanceList.d.ts +14 -0
  128. package/dist/cjs/api/types/InstanceList.js +3 -0
  129. package/dist/cjs/api/types/InstanceWebhook.d.ts +8 -0
  130. package/dist/cjs/api/types/InstanceWebhook.js +3 -0
  131. package/dist/cjs/api/types/LoginResponse.d.ts +35 -1
  132. package/dist/cjs/api/types/MeResponse.d.ts +15 -1
  133. package/dist/cjs/api/types/RegisterResponse.d.ts +35 -1
  134. package/dist/cjs/api/types/TeamMember.d.ts +21 -0
  135. package/dist/cjs/api/types/TeamMember.js +16 -0
  136. package/dist/cjs/api/types/UsageStats.d.ts +10 -0
  137. package/dist/cjs/api/types/UsageStats.js +3 -0
  138. package/dist/cjs/api/types/User.d.ts +2 -0
  139. package/dist/cjs/api/types/UserListResponse.d.ts +2 -0
  140. package/dist/cjs/api/types/UserResponse.d.ts +3 -1
  141. package/dist/cjs/api/types/index.d.ts +7 -0
  142. package/dist/cjs/api/types/index.js +7 -0
  143. package/dist/cjs/version.d.ts +1 -1
  144. package/dist/cjs/version.js +1 -1
  145. package/dist/esm/BaseClient.d.mts +4 -0
  146. package/dist/esm/BaseClient.mjs +3 -2
  147. package/dist/esm/Client.d.mts +4 -1
  148. package/dist/esm/Client.mjs +6 -1
  149. package/dist/esm/api/resources/auth/client/Client.d.mts +1 -1
  150. package/dist/esm/api/resources/auth/client/Client.mjs +47 -37
  151. package/dist/esm/api/resources/index.d.mts +3 -0
  152. package/dist/esm/api/resources/index.mjs +3 -0
  153. package/dist/esm/api/resources/integrations/client/Client.d.mts +1 -1
  154. package/dist/esm/api/resources/integrations/client/Client.mjs +47 -37
  155. package/dist/esm/api/resources/notifications/client/Client.d.mts +1 -1
  156. package/dist/esm/api/resources/notifications/client/Client.mjs +47 -37
  157. package/dist/esm/api/resources/posts/client/Client.d.mts +1 -1
  158. package/dist/esm/api/resources/posts/client/Client.mjs +110 -86
  159. package/dist/esm/api/resources/privateMessages/client/Client.d.mts +1 -1
  160. package/dist/esm/api/resources/privateMessages/client/Client.mjs +83 -65
  161. package/dist/esm/api/resources/provisioning/client/Client.d.mts +359 -0
  162. package/dist/esm/api/resources/provisioning/client/Client.mjs +1254 -0
  163. package/dist/esm/api/resources/provisioning/client/index.d.mts +1 -0
  164. package/dist/esm/api/resources/provisioning/client/index.mjs +1 -0
  165. package/dist/esm/api/resources/provisioning/client/requests/AddDomainProvisioningRequest.d.mts +13 -0
  166. package/dist/esm/api/resources/provisioning/client/requests/AddDomainProvisioningRequest.mjs +2 -0
  167. package/dist/esm/api/resources/provisioning/client/requests/CreateInstance.d.mts +13 -0
  168. package/dist/esm/api/resources/provisioning/client/requests/CreateInstance.mjs +2 -0
  169. package/dist/esm/api/resources/provisioning/client/requests/CreateWebhookProvisioningRequest.d.mts +15 -0
  170. package/dist/esm/api/resources/provisioning/client/requests/CreateWebhookProvisioningRequest.mjs +2 -0
  171. package/dist/esm/api/resources/provisioning/client/requests/DeleteInstance.d.mts +10 -0
  172. package/dist/esm/api/resources/provisioning/client/requests/DeleteInstance.mjs +2 -0
  173. package/dist/esm/api/resources/provisioning/client/requests/DeleteWebhookProvisioningRequest.d.mts +11 -0
  174. package/dist/esm/api/resources/provisioning/client/requests/DeleteWebhookProvisioningRequest.mjs +2 -0
  175. package/dist/esm/api/resources/provisioning/client/requests/ExportDataProvisioningRequest.d.mts +9 -0
  176. package/dist/esm/api/resources/provisioning/client/requests/ExportDataProvisioningRequest.mjs +2 -0
  177. package/dist/esm/api/resources/provisioning/client/requests/GetBillingProvisioningRequest.d.mts +10 -0
  178. package/dist/esm/api/resources/provisioning/client/requests/GetBillingProvisioningRequest.mjs +2 -0
  179. package/dist/esm/api/resources/provisioning/client/requests/GetUsageProvisioningRequest.d.mts +10 -0
  180. package/dist/esm/api/resources/provisioning/client/requests/GetUsageProvisioningRequest.mjs +2 -0
  181. package/dist/esm/api/resources/provisioning/client/requests/InviteTeamProvisioningRequest.d.mts +29 -0
  182. package/dist/esm/api/resources/provisioning/client/requests/InviteTeamProvisioningRequest.mjs +14 -0
  183. package/dist/esm/api/resources/provisioning/client/requests/ListDomainsProvisioningRequest.d.mts +10 -0
  184. package/dist/esm/api/resources/provisioning/client/requests/ListDomainsProvisioningRequest.mjs +2 -0
  185. package/dist/esm/api/resources/provisioning/client/requests/ListProvisioningRequest.d.mts +8 -0
  186. package/dist/esm/api/resources/provisioning/client/requests/ListProvisioningRequest.mjs +2 -0
  187. package/dist/esm/api/resources/provisioning/client/requests/ListTeamProvisioningRequest.d.mts +10 -0
  188. package/dist/esm/api/resources/provisioning/client/requests/ListTeamProvisioningRequest.mjs +2 -0
  189. package/dist/esm/api/resources/provisioning/client/requests/ListWebhooksProvisioningRequest.d.mts +10 -0
  190. package/dist/esm/api/resources/provisioning/client/requests/ListWebhooksProvisioningRequest.mjs +2 -0
  191. package/dist/esm/api/resources/provisioning/client/requests/RegenerateApiKeyProvisioningRequest.d.mts +9 -0
  192. package/dist/esm/api/resources/provisioning/client/requests/RegenerateApiKeyProvisioningRequest.mjs +2 -0
  193. package/dist/esm/api/resources/provisioning/client/requests/RemoveDomainProvisioningRequest.d.mts +11 -0
  194. package/dist/esm/api/resources/provisioning/client/requests/RemoveDomainProvisioningRequest.mjs +2 -0
  195. package/dist/esm/api/resources/provisioning/client/requests/RemoveTeamMemberProvisioningRequest.d.mts +11 -0
  196. package/dist/esm/api/resources/provisioning/client/requests/RemoveTeamMemberProvisioningRequest.mjs +2 -0
  197. package/dist/esm/api/resources/provisioning/client/requests/UpdateInstance.d.mts +14 -0
  198. package/dist/esm/api/resources/provisioning/client/requests/UpdateInstance.mjs +2 -0
  199. package/dist/esm/api/resources/provisioning/client/requests/UpdateWebhookProvisioningRequest.d.mts +15 -0
  200. package/dist/esm/api/resources/provisioning/client/requests/UpdateWebhookProvisioningRequest.mjs +2 -0
  201. package/dist/esm/api/resources/provisioning/client/requests/UpgradeInstance.d.mts +26 -0
  202. package/dist/esm/api/resources/provisioning/client/requests/UpgradeInstance.mjs +10 -0
  203. package/dist/esm/api/resources/provisioning/client/requests/index.d.mts +19 -0
  204. package/dist/esm/api/resources/provisioning/client/requests/index.mjs +2 -0
  205. package/dist/esm/api/resources/provisioning/index.d.mts +2 -0
  206. package/dist/esm/api/resources/provisioning/index.mjs +2 -0
  207. package/dist/esm/api/resources/provisioning/types/AddDomainProvisioningResponse.d.mts +4 -0
  208. package/dist/esm/api/resources/provisioning/types/AddDomainProvisioningResponse.mjs +2 -0
  209. package/dist/esm/api/resources/provisioning/types/ChangePlanProvisioningResponse.d.mts +19 -0
  210. package/dist/esm/api/resources/provisioning/types/ChangePlanProvisioningResponse.mjs +11 -0
  211. package/dist/esm/api/resources/provisioning/types/CreateProvisioningResponse.d.mts +4 -0
  212. package/dist/esm/api/resources/provisioning/types/CreateProvisioningResponse.mjs +2 -0
  213. package/dist/esm/api/resources/provisioning/types/CreateWebhookProvisioningResponse.d.mts +4 -0
  214. package/dist/esm/api/resources/provisioning/types/CreateWebhookProvisioningResponse.mjs +2 -0
  215. package/dist/esm/api/resources/provisioning/types/DeleteProvisioningResponse.d.mts +8 -0
  216. package/dist/esm/api/resources/provisioning/types/DeleteProvisioningResponse.mjs +2 -0
  217. package/dist/esm/api/resources/provisioning/types/DeleteWebhookProvisioningResponse.d.mts +8 -0
  218. package/dist/esm/api/resources/provisioning/types/DeleteWebhookProvisioningResponse.mjs +2 -0
  219. package/dist/esm/api/resources/provisioning/types/ExportDataProvisioningResponse.d.mts +17 -0
  220. package/dist/esm/api/resources/provisioning/types/ExportDataProvisioningResponse.mjs +2 -0
  221. package/dist/esm/api/resources/provisioning/types/GetBillingProvisioningResponse.d.mts +4 -0
  222. package/dist/esm/api/resources/provisioning/types/GetBillingProvisioningResponse.mjs +2 -0
  223. package/dist/esm/api/resources/provisioning/types/GetUsageProvisioningResponse.d.mts +4 -0
  224. package/dist/esm/api/resources/provisioning/types/GetUsageProvisioningResponse.mjs +2 -0
  225. package/dist/esm/api/resources/provisioning/types/InviteTeamProvisioningResponse.d.mts +8 -0
  226. package/dist/esm/api/resources/provisioning/types/InviteTeamProvisioningResponse.mjs +2 -0
  227. package/dist/esm/api/resources/provisioning/types/ListDomainsProvisioningResponse.d.mts +10 -0
  228. package/dist/esm/api/resources/provisioning/types/ListDomainsProvisioningResponse.mjs +2 -0
  229. package/dist/esm/api/resources/provisioning/types/ListProvisioningResponse.d.mts +4 -0
  230. package/dist/esm/api/resources/provisioning/types/ListProvisioningResponse.mjs +2 -0
  231. package/dist/esm/api/resources/provisioning/types/ListTeamProvisioningResponse.d.mts +10 -0
  232. package/dist/esm/api/resources/provisioning/types/ListTeamProvisioningResponse.mjs +2 -0
  233. package/dist/esm/api/resources/provisioning/types/ListWebhooksProvisioningResponse.d.mts +10 -0
  234. package/dist/esm/api/resources/provisioning/types/ListWebhooksProvisioningResponse.mjs +2 -0
  235. package/dist/esm/api/resources/provisioning/types/RegenerateApiKeyProvisioningResponse.d.mts +9 -0
  236. package/dist/esm/api/resources/provisioning/types/RegenerateApiKeyProvisioningResponse.mjs +2 -0
  237. package/dist/esm/api/resources/provisioning/types/RemoveDomainProvisioningResponse.d.mts +8 -0
  238. package/dist/esm/api/resources/provisioning/types/RemoveDomainProvisioningResponse.mjs +2 -0
  239. package/dist/esm/api/resources/provisioning/types/RemoveTeamMemberProvisioningResponse.d.mts +8 -0
  240. package/dist/esm/api/resources/provisioning/types/RemoveTeamMemberProvisioningResponse.mjs +2 -0
  241. package/dist/esm/api/resources/provisioning/types/UpdateProvisioningResponse.d.mts +9 -0
  242. package/dist/esm/api/resources/provisioning/types/UpdateProvisioningResponse.mjs +2 -0
  243. package/dist/esm/api/resources/provisioning/types/UpdateWebhookProvisioningResponse.d.mts +4 -0
  244. package/dist/esm/api/resources/provisioning/types/UpdateWebhookProvisioningResponse.mjs +2 -0
  245. package/dist/esm/api/resources/provisioning/types/index.d.mts +19 -0
  246. package/dist/esm/api/resources/provisioning/types/index.mjs +19 -0
  247. package/dist/esm/api/resources/reports/client/Client.d.mts +1 -1
  248. package/dist/esm/api/resources/reports/client/Client.mjs +47 -37
  249. package/dist/esm/api/resources/roles/client/Client.d.mts +1 -1
  250. package/dist/esm/api/resources/roles/client/Client.mjs +47 -37
  251. package/dist/esm/api/resources/search/client/Client.d.mts +1 -1
  252. package/dist/esm/api/resources/search/client/Client.mjs +11 -9
  253. package/dist/esm/api/resources/ssOs/client/Client.d.mts +1 -1
  254. package/dist/esm/api/resources/ssOs/client/Client.mjs +47 -37
  255. package/dist/esm/api/resources/tags/client/Client.d.mts +1 -1
  256. package/dist/esm/api/resources/tags/client/Client.mjs +74 -58
  257. package/dist/esm/api/resources/threads/client/Client.d.mts +1 -1
  258. package/dist/esm/api/resources/threads/client/Client.mjs +164 -128
  259. package/dist/esm/api/resources/users/client/Client.d.mts +1 -1
  260. package/dist/esm/api/resources/users/client/Client.mjs +101 -79
  261. package/dist/esm/api/resources/users/types/UpdateUsersResponse.d.mts +3 -1
  262. package/dist/esm/api/resources/webhooks/client/Client.d.mts +1 -1
  263. package/dist/esm/api/resources/webhooks/client/Client.mjs +74 -58
  264. package/dist/esm/api/types/BillingInfo.d.mts +17 -0
  265. package/dist/esm/api/types/BillingInfo.mjs +10 -0
  266. package/dist/esm/api/types/Instance.d.mts +7 -0
  267. package/dist/esm/api/types/Instance.mjs +2 -0
  268. package/dist/esm/api/types/InstanceDomain.d.mts +6 -0
  269. package/dist/esm/api/types/InstanceDomain.mjs +2 -0
  270. package/dist/esm/api/types/InstanceList.d.mts +14 -0
  271. package/dist/esm/api/types/InstanceList.mjs +2 -0
  272. package/dist/esm/api/types/InstanceWebhook.d.mts +8 -0
  273. package/dist/esm/api/types/InstanceWebhook.mjs +2 -0
  274. package/dist/esm/api/types/LoginResponse.d.mts +35 -1
  275. package/dist/esm/api/types/MeResponse.d.mts +15 -1
  276. package/dist/esm/api/types/RegisterResponse.d.mts +35 -1
  277. package/dist/esm/api/types/TeamMember.d.mts +21 -0
  278. package/dist/esm/api/types/TeamMember.mjs +13 -0
  279. package/dist/esm/api/types/UsageStats.d.mts +10 -0
  280. package/dist/esm/api/types/UsageStats.mjs +2 -0
  281. package/dist/esm/api/types/User.d.mts +2 -0
  282. package/dist/esm/api/types/UserListResponse.d.mts +2 -0
  283. package/dist/esm/api/types/UserResponse.d.mts +3 -1
  284. package/dist/esm/api/types/index.d.mts +7 -0
  285. package/dist/esm/api/types/index.mjs +7 -0
  286. package/dist/esm/version.d.mts +1 -1
  287. package/dist/esm/version.mjs +1 -1
  288. package/package.json +1 -1
  289. package/reference.md +1246 -0
@@ -20,7 +20,7 @@ var __rest = (this && this.__rest) || function (s, e) {
20
20
  return t;
21
21
  };
22
22
  import { normalizeClientOptionsWithAuth } from "../../../../BaseClient.mjs";
23
- import { mergeHeaders } from "../../../../core/headers.mjs";
23
+ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.mjs";
24
24
  import * as core from "../../../../core/index.mjs";
25
25
  import * as environments from "../../../../environments.mjs";
26
26
  import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.mjs";
@@ -30,7 +30,7 @@ import * as Forum from "../../../index.mjs";
30
30
  * Operations for threads
31
31
  */
32
32
  export class ThreadsClient {
33
- constructor(options = {}) {
33
+ constructor(options) {
34
34
  this._options = normalizeClientOptionsWithAuth(options);
35
35
  }
36
36
  /**
@@ -52,7 +52,7 @@ export class ThreadsClient {
52
52
  }
53
53
  __list() {
54
54
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
55
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
55
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
56
56
  const { limit, cursor, search, tagId, userId, sort } = request;
57
57
  const _queryParams = {
58
58
  limit,
@@ -63,16 +63,18 @@ export class ThreadsClient {
63
63
  sort: sort != null ? sort : undefined,
64
64
  };
65
65
  const _authRequest = yield this._options.authProvider.getAuthRequest();
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);
67
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
68
- 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, "threads"),
66
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
67
+ "x-provisioning-key": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.provisioningKey) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.provisioningKey,
68
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
69
+ const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
70
+ url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ForumEnvironment.Production, "threads"),
69
71
  method: "GET",
70
72
  headers: _headers,
71
73
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
72
- 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,
73
- 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,
74
+ timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
75
+ maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
74
76
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
75
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
77
+ fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
76
78
  logging: this._options.logging,
77
79
  });
78
80
  if (_response.ok) {
@@ -122,21 +124,23 @@ export class ThreadsClient {
122
124
  }
123
125
  __create(request, requestOptions) {
124
126
  return __awaiter(this, void 0, void 0, function* () {
125
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
127
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
126
128
  const _authRequest = yield this._options.authProvider.getAuthRequest();
127
- 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);
128
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
129
- 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, "threads"),
129
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
130
+ "x-provisioning-key": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.provisioningKey) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.provisioningKey,
131
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
132
+ const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
133
+ url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ForumEnvironment.Production, "threads"),
130
134
  method: "POST",
131
135
  headers: _headers,
132
136
  contentType: "application/json",
133
137
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
134
138
  requestType: "json",
135
139
  body: request,
136
- 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,
137
- 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,
140
+ timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
141
+ maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
138
142
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
139
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
143
+ fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
140
144
  logging: this._options.logging,
141
145
  });
142
146
  if (_response.ok) {
@@ -187,19 +191,21 @@ export class ThreadsClient {
187
191
  }
188
192
  __retrieve(request, requestOptions) {
189
193
  return __awaiter(this, void 0, void 0, function* () {
190
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
194
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
191
195
  const { id } = request;
192
196
  const _authRequest = yield this._options.authProvider.getAuthRequest();
193
- 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);
194
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
195
- 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, `threads/${core.url.encodePathParam(id)}`),
197
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
198
+ "x-provisioning-key": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.provisioningKey) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.provisioningKey,
199
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
200
+ const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
201
+ url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ForumEnvironment.Production, `threads/${core.url.encodePathParam(id)}`),
196
202
  method: "GET",
197
203
  headers: _headers,
198
204
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
199
- 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,
200
- 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,
205
+ timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
206
+ maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
201
207
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
202
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
208
+ fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
203
209
  logging: this._options.logging,
204
210
  });
205
211
  if (_response.ok) {
@@ -250,19 +256,21 @@ export class ThreadsClient {
250
256
  }
251
257
  __delete(request, requestOptions) {
252
258
  return __awaiter(this, void 0, void 0, function* () {
253
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
259
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
254
260
  const { id } = request;
255
261
  const _authRequest = yield this._options.authProvider.getAuthRequest();
256
- 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);
257
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
258
- 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, `threads/${core.url.encodePathParam(id)}`),
262
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
263
+ "x-provisioning-key": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.provisioningKey) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.provisioningKey,
264
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
265
+ const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
266
+ url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ForumEnvironment.Production, `threads/${core.url.encodePathParam(id)}`),
259
267
  method: "DELETE",
260
268
  headers: _headers,
261
269
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
262
- 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,
263
- 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,
270
+ timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
271
+ maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
264
272
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
265
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
273
+ fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
266
274
  logging: this._options.logging,
267
275
  });
268
276
  if (_response.ok) {
@@ -314,22 +322,24 @@ export class ThreadsClient {
314
322
  }
315
323
  __update(request, requestOptions) {
316
324
  return __awaiter(this, void 0, void 0, function* () {
317
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
325
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
318
326
  const { id } = request, _body = __rest(request, ["id"]);
319
327
  const _authRequest = yield this._options.authProvider.getAuthRequest();
320
- 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);
321
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
322
- 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, `threads/${core.url.encodePathParam(id)}`),
328
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
329
+ "x-provisioning-key": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.provisioningKey) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.provisioningKey,
330
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
331
+ const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
332
+ url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ForumEnvironment.Production, `threads/${core.url.encodePathParam(id)}`),
323
333
  method: "PATCH",
324
334
  headers: _headers,
325
335
  contentType: "application/json",
326
336
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
327
337
  requestType: "json",
328
338
  body: _body,
329
- 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,
330
- 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,
339
+ timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
340
+ maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
331
341
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
332
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
342
+ fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
333
343
  logging: this._options.logging,
334
344
  });
335
345
  if (_response.ok) {
@@ -381,7 +391,7 @@ export class ThreadsClient {
381
391
  }
382
392
  __listPosts(request, requestOptions) {
383
393
  return __awaiter(this, void 0, void 0, function* () {
384
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
394
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
385
395
  const { id, limit, cursor, userId, sort, search, type: type_ } = request;
386
396
  const _queryParams = {
387
397
  limit,
@@ -392,16 +402,18 @@ export class ThreadsClient {
392
402
  type: type_ != null ? type_ : undefined,
393
403
  };
394
404
  const _authRequest = yield this._options.authProvider.getAuthRequest();
395
- 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);
396
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
397
- 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, `threads/${core.url.encodePathParam(id)}/posts`),
405
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
406
+ "x-provisioning-key": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.provisioningKey) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.provisioningKey,
407
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
408
+ const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
409
+ url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ForumEnvironment.Production, `threads/${core.url.encodePathParam(id)}/posts`),
398
410
  method: "GET",
399
411
  headers: _headers,
400
412
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
401
- 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,
402
- 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,
413
+ timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
414
+ maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
403
415
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
404
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
416
+ fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
405
417
  logging: this._options.logging,
406
418
  });
407
419
  if (_response.ok) {
@@ -448,19 +460,21 @@ export class ThreadsClient {
448
460
  }
449
461
  __retrievePost(request, requestOptions) {
450
462
  return __awaiter(this, void 0, void 0, function* () {
451
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
463
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
452
464
  const { id, subId } = request;
453
465
  const _authRequest = yield this._options.authProvider.getAuthRequest();
454
- 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);
455
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
456
- 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, `threads/${core.url.encodePathParam(id)}/posts/${core.url.encodePathParam(subId)}`),
466
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
467
+ "x-provisioning-key": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.provisioningKey) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.provisioningKey,
468
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
469
+ const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
470
+ url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ForumEnvironment.Production, `threads/${core.url.encodePathParam(id)}/posts/${core.url.encodePathParam(subId)}`),
457
471
  method: "GET",
458
472
  headers: _headers,
459
473
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
460
- 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,
461
- 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,
474
+ timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
475
+ maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
462
476
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
463
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
477
+ fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
464
478
  logging: this._options.logging,
465
479
  });
466
480
  if (_response.ok) {
@@ -507,19 +521,21 @@ export class ThreadsClient {
507
521
  }
508
522
  __deletePost(request, requestOptions) {
509
523
  return __awaiter(this, void 0, void 0, function* () {
510
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
524
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
511
525
  const { id, subId } = request;
512
526
  const _authRequest = yield this._options.authProvider.getAuthRequest();
513
- 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);
514
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
515
- 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, `threads/${core.url.encodePathParam(id)}/posts/${core.url.encodePathParam(subId)}`),
527
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
528
+ "x-provisioning-key": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.provisioningKey) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.provisioningKey,
529
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
530
+ const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
531
+ url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ForumEnvironment.Production, `threads/${core.url.encodePathParam(id)}/posts/${core.url.encodePathParam(subId)}`),
516
532
  method: "DELETE",
517
533
  headers: _headers,
518
534
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
519
- 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,
520
- 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,
535
+ timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
536
+ maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
521
537
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
522
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
538
+ fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
523
539
  logging: this._options.logging,
524
540
  });
525
541
  if (_response.ok) {
@@ -567,7 +583,7 @@ export class ThreadsClient {
567
583
  }
568
584
  __listReactions(request, requestOptions) {
569
585
  return __awaiter(this, void 0, void 0, function* () {
570
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
586
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
571
587
  const { id, limit, cursor, type: type_ } = request;
572
588
  const _queryParams = {
573
589
  limit,
@@ -575,16 +591,18 @@ export class ThreadsClient {
575
591
  type: type_ != null ? type_ : undefined,
576
592
  };
577
593
  const _authRequest = yield this._options.authProvider.getAuthRequest();
578
- 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);
579
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
580
- 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, `threads/${core.url.encodePathParam(id)}/reactions`),
594
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
595
+ "x-provisioning-key": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.provisioningKey) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.provisioningKey,
596
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
597
+ const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
598
+ url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ForumEnvironment.Production, `threads/${core.url.encodePathParam(id)}/reactions`),
581
599
  method: "GET",
582
600
  headers: _headers,
583
601
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
584
- 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,
585
- 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,
602
+ timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
603
+ maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
586
604
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
587
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
605
+ fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
588
606
  logging: this._options.logging,
589
607
  });
590
608
  if (_response.ok) {
@@ -634,22 +652,24 @@ export class ThreadsClient {
634
652
  }
635
653
  __createReaction(request, requestOptions) {
636
654
  return __awaiter(this, void 0, void 0, function* () {
637
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
655
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
638
656
  const { id } = request, _body = __rest(request, ["id"]);
639
657
  const _authRequest = yield this._options.authProvider.getAuthRequest();
640
- 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);
641
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
642
- 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, `threads/${core.url.encodePathParam(id)}/reactions`),
658
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
659
+ "x-provisioning-key": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.provisioningKey) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.provisioningKey,
660
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
661
+ const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
662
+ url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ForumEnvironment.Production, `threads/${core.url.encodePathParam(id)}/reactions`),
643
663
  method: "POST",
644
664
  headers: _headers,
645
665
  contentType: "application/json",
646
666
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
647
667
  requestType: "json",
648
668
  body: _body,
649
- 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,
650
- 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,
669
+ timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
670
+ maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
651
671
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
652
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
672
+ fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
653
673
  logging: this._options.logging,
654
674
  });
655
675
  if (_response.ok) {
@@ -698,19 +718,21 @@ export class ThreadsClient {
698
718
  }
699
719
  __deleteReaction(request, requestOptions) {
700
720
  return __awaiter(this, void 0, void 0, function* () {
701
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
721
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
702
722
  const { id, subId } = request;
703
723
  const _authRequest = yield this._options.authProvider.getAuthRequest();
704
- 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);
705
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
706
- 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, `threads/${core.url.encodePathParam(id)}/reactions/${core.url.encodePathParam(subId)}`),
724
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
725
+ "x-provisioning-key": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.provisioningKey) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.provisioningKey,
726
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
727
+ const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
728
+ url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ForumEnvironment.Production, `threads/${core.url.encodePathParam(id)}/reactions/${core.url.encodePathParam(subId)}`),
707
729
  method: "DELETE",
708
730
  headers: _headers,
709
731
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
710
- 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,
711
- 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,
732
+ timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
733
+ maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
712
734
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
713
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
735
+ fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
714
736
  logging: this._options.logging,
715
737
  });
716
738
  if (_response.ok) {
@@ -757,19 +779,21 @@ export class ThreadsClient {
757
779
  }
758
780
  __retrieveReaction(request, requestOptions) {
759
781
  return __awaiter(this, void 0, void 0, function* () {
760
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
782
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
761
783
  const { id, subId } = request;
762
784
  const _authRequest = yield this._options.authProvider.getAuthRequest();
763
- 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);
764
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
765
- 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, `threads/${core.url.encodePathParam(id)}/reactions/${core.url.encodePathParam(subId)}`),
785
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
786
+ "x-provisioning-key": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.provisioningKey) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.provisioningKey,
787
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
788
+ const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
789
+ url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ForumEnvironment.Production, `threads/${core.url.encodePathParam(id)}/reactions/${core.url.encodePathParam(subId)}`),
766
790
  method: "GET",
767
791
  headers: _headers,
768
792
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
769
- 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,
770
- 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,
793
+ timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
794
+ maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
771
795
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
772
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
796
+ fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
773
797
  logging: this._options.logging,
774
798
  });
775
799
  if (_response.ok) {
@@ -820,23 +844,25 @@ export class ThreadsClient {
820
844
  }
821
845
  __listSubscribers(request, requestOptions) {
822
846
  return __awaiter(this, void 0, void 0, function* () {
823
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
847
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
824
848
  const { id, limit, cursor } = request;
825
849
  const _queryParams = {
826
850
  limit,
827
851
  cursor,
828
852
  };
829
853
  const _authRequest = yield this._options.authProvider.getAuthRequest();
830
- 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);
831
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
832
- 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, `threads/${core.url.encodePathParam(id)}/subscribers`),
854
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
855
+ "x-provisioning-key": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.provisioningKey) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.provisioningKey,
856
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
857
+ const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
858
+ url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ForumEnvironment.Production, `threads/${core.url.encodePathParam(id)}/subscribers`),
833
859
  method: "GET",
834
860
  headers: _headers,
835
861
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
836
- 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,
837
- 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,
862
+ timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
863
+ maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
838
864
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
839
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
865
+ fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
840
866
  logging: this._options.logging,
841
867
  });
842
868
  if (_response.ok) {
@@ -883,19 +909,21 @@ export class ThreadsClient {
883
909
  }
884
910
  __retrieveSubscriber(request, requestOptions) {
885
911
  return __awaiter(this, void 0, void 0, function* () {
886
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
912
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
887
913
  const { id, subId } = request;
888
914
  const _authRequest = yield this._options.authProvider.getAuthRequest();
889
- 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);
890
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
891
- 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, `threads/${core.url.encodePathParam(id)}/subscribers/${core.url.encodePathParam(subId)}`),
915
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
916
+ "x-provisioning-key": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.provisioningKey) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.provisioningKey,
917
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
918
+ const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
919
+ url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ForumEnvironment.Production, `threads/${core.url.encodePathParam(id)}/subscribers/${core.url.encodePathParam(subId)}`),
892
920
  method: "GET",
893
921
  headers: _headers,
894
922
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
895
- 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,
896
- 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,
923
+ timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
924
+ maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
897
925
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
898
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
926
+ fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
899
927
  logging: this._options.logging,
900
928
  });
901
929
  if (_response.ok) {
@@ -945,19 +973,21 @@ export class ThreadsClient {
945
973
  }
946
974
  __deleteSubscriber(request, requestOptions) {
947
975
  return __awaiter(this, void 0, void 0, function* () {
948
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
976
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
949
977
  const { id, subId } = request;
950
978
  const _authRequest = yield this._options.authProvider.getAuthRequest();
951
- 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);
952
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
953
- 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, `threads/${core.url.encodePathParam(id)}/subscribers/${core.url.encodePathParam(subId)}`),
979
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
980
+ "x-provisioning-key": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.provisioningKey) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.provisioningKey,
981
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
982
+ const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
983
+ url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ForumEnvironment.Production, `threads/${core.url.encodePathParam(id)}/subscribers/${core.url.encodePathParam(subId)}`),
954
984
  method: "DELETE",
955
985
  headers: _headers,
956
986
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
957
- 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,
958
- 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,
987
+ timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
988
+ maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
959
989
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
960
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
990
+ fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
961
991
  logging: this._options.logging,
962
992
  });
963
993
  if (_response.ok) {
@@ -1003,19 +1033,21 @@ export class ThreadsClient {
1003
1033
  }
1004
1034
  __retrievePoll(request, requestOptions) {
1005
1035
  return __awaiter(this, void 0, void 0, function* () {
1006
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
1036
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
1007
1037
  const { id } = request;
1008
1038
  const _authRequest = yield this._options.authProvider.getAuthRequest();
1009
- 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);
1010
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
1011
- 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, `threads/${core.url.encodePathParam(id)}/poll`),
1039
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
1040
+ "x-provisioning-key": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.provisioningKey) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.provisioningKey,
1041
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1042
+ const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
1043
+ url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ForumEnvironment.Production, `threads/${core.url.encodePathParam(id)}/poll`),
1012
1044
  method: "GET",
1013
1045
  headers: _headers,
1014
1046
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
1015
- 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,
1016
- 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,
1047
+ timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
1048
+ maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
1017
1049
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1018
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
1050
+ fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
1019
1051
  logging: this._options.logging,
1020
1052
  });
1021
1053
  if (_response.ok) {
@@ -1066,22 +1098,24 @@ export class ThreadsClient {
1066
1098
  }
1067
1099
  __createPoll(request, requestOptions) {
1068
1100
  return __awaiter(this, void 0, void 0, function* () {
1069
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
1101
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
1070
1102
  const { id } = request, _body = __rest(request, ["id"]);
1071
1103
  const _authRequest = yield this._options.authProvider.getAuthRequest();
1072
- 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);
1073
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
1074
- 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, `threads/${core.url.encodePathParam(id)}/poll`),
1104
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
1105
+ "x-provisioning-key": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.provisioningKey) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.provisioningKey,
1106
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1107
+ const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
1108
+ url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ForumEnvironment.Production, `threads/${core.url.encodePathParam(id)}/poll`),
1075
1109
  method: "POST",
1076
1110
  headers: _headers,
1077
1111
  contentType: "application/json",
1078
1112
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
1079
1113
  requestType: "json",
1080
1114
  body: _body,
1081
- 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,
1082
- 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,
1115
+ timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
1116
+ maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
1083
1117
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1084
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
1118
+ fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
1085
1119
  logging: this._options.logging,
1086
1120
  });
1087
1121
  if (_response.ok) {
@@ -1130,22 +1164,24 @@ export class ThreadsClient {
1130
1164
  }
1131
1165
  __updatePoll(request, requestOptions) {
1132
1166
  return __awaiter(this, void 0, void 0, function* () {
1133
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
1167
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
1134
1168
  const { id } = request, _body = __rest(request, ["id"]);
1135
1169
  const _authRequest = yield this._options.authProvider.getAuthRequest();
1136
- 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);
1137
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
1138
- 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, `threads/${core.url.encodePathParam(id)}/poll`),
1170
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
1171
+ "x-provisioning-key": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.provisioningKey) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.provisioningKey,
1172
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1173
+ const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
1174
+ url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ForumEnvironment.Production, `threads/${core.url.encodePathParam(id)}/poll`),
1139
1175
  method: "PATCH",
1140
1176
  headers: _headers,
1141
1177
  contentType: "application/json",
1142
1178
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
1143
1179
  requestType: "json",
1144
1180
  body: _body,
1145
- 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,
1146
- 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,
1181
+ timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
1182
+ maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
1147
1183
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1148
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
1184
+ fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
1149
1185
  logging: this._options.logging,
1150
1186
  });
1151
1187
  if (_response.ok) {