@ale-rainbow/web-sdk 5.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (556) hide show
  1. package/README.md +44 -0
  2. package/lib/index.d.ts +8 -0
  3. package/lib/index.d.ts.map +1 -0
  4. package/lib/index.js +501 -0
  5. package/lib/index.js.map +7 -0
  6. package/lib/libs/index.d.ts +3 -0
  7. package/lib/libs/index.d.ts.map +1 -0
  8. package/lib/libs/strophe/strophe-plugin.d.ts +13 -0
  9. package/lib/libs/strophe/strophe-plugin.d.ts.map +1 -0
  10. package/lib/libs/strophe/strophe.jingle.d.ts +35 -0
  11. package/lib/libs/strophe/strophe.jingle.d.ts.map +1 -0
  12. package/lib/libs/strophe/strophe.jingle.sdp.d.ts +44 -0
  13. package/lib/libs/strophe/strophe.jingle.sdp.d.ts.map +1 -0
  14. package/lib/libs/strophe/strophe.jingle.session.d.ts +624 -0
  15. package/lib/libs/strophe/strophe.jingle.session.d.ts.map +1 -0
  16. package/lib/libs/strophe/strophe.jingle.session.stats.d.ts +791 -0
  17. package/lib/libs/strophe/strophe.jingle.session.stats.d.ts.map +1 -0
  18. package/lib/libs/strophe/strophe.lastactivity.d.ts +9 -0
  19. package/lib/libs/strophe/strophe.lastactivity.d.ts.map +1 -0
  20. package/lib/libs/strophe/strophe.mam.d.ts +11 -0
  21. package/lib/libs/strophe/strophe.mam.d.ts.map +1 -0
  22. package/lib/libs/strophe/strophe.ping.d.ts +39 -0
  23. package/lib/libs/strophe/strophe.ping.d.ts.map +1 -0
  24. package/lib/libs/strophe/strophe.rsm.d.ts +24 -0
  25. package/lib/libs/strophe/strophe.rsm.d.ts.map +1 -0
  26. package/lib/libs/strophe/types.d.ts +23 -0
  27. package/lib/libs/strophe/types.d.ts.map +1 -0
  28. package/lib/models/authSettings.model.d.ts +38 -0
  29. package/lib/models/authSettings.model.d.ts.map +1 -0
  30. package/lib/models/bubble.model.d.ts +1114 -0
  31. package/lib/models/bubble.model.d.ts.map +1 -0
  32. package/lib/models/bubbleConferenceRecap.model.d.ts +532 -0
  33. package/lib/models/bubbleConferenceRecap.model.d.ts.map +1 -0
  34. package/lib/models/call.model.d.ts +1271 -0
  35. package/lib/models/call.model.d.ts.map +1 -0
  36. package/lib/models/callLog.model.d.ts +361 -0
  37. package/lib/models/callLog.model.d.ts.map +1 -0
  38. package/lib/models/channel.model.d.ts +692 -0
  39. package/lib/models/channel.model.d.ts.map +1 -0
  40. package/lib/models/channelMessage.model.d.ts +300 -0
  41. package/lib/models/channelMessage.model.d.ts.map +1 -0
  42. package/lib/models/cli.model.d.ts +59 -0
  43. package/lib/models/cli.model.d.ts.map +1 -0
  44. package/lib/models/common/context.d.ts +37 -0
  45. package/lib/models/common/context.d.ts.map +1 -0
  46. package/lib/models/common/error.d.ts +26 -0
  47. package/lib/models/common/error.d.ts.map +1 -0
  48. package/lib/models/common/fileDescriptor.d.ts +317 -0
  49. package/lib/models/common/fileDescriptor.d.ts.map +1 -0
  50. package/lib/models/common/filePublicDownload.d.ts +26 -0
  51. package/lib/models/common/filePublicDownload.d.ts.map +1 -0
  52. package/lib/models/common/fileViewer.d.ts +20 -0
  53. package/lib/models/common/fileViewer.d.ts.map +1 -0
  54. package/lib/models/common/index.d.ts +9 -0
  55. package/lib/models/common/index.d.ts.map +1 -0
  56. package/lib/models/common/theme.d.ts +185 -0
  57. package/lib/models/common/theme.d.ts.map +1 -0
  58. package/lib/models/common/themeColor.d.ts +47 -0
  59. package/lib/models/common/themeColor.d.ts.map +1 -0
  60. package/lib/models/common/userTheme.d.ts +42 -0
  61. package/lib/models/common/userTheme.d.ts.map +1 -0
  62. package/lib/models/company-invitation.model.d.ts +42 -0
  63. package/lib/models/company-invitation.model.d.ts.map +1 -0
  64. package/lib/models/company.model.d.ts +639 -0
  65. package/lib/models/company.model.d.ts.map +1 -0
  66. package/lib/models/contact.model.d.ts +1208 -0
  67. package/lib/models/contact.model.d.ts.map +1 -0
  68. package/lib/models/conversation.model.d.ts +768 -0
  69. package/lib/models/conversation.model.d.ts.map +1 -0
  70. package/lib/models/customManifest.model.d.ts +82 -0
  71. package/lib/models/customManifest.model.d.ts.map +1 -0
  72. package/lib/models/dataChannel.model.d.ts +178 -0
  73. package/lib/models/dataChannel.model.d.ts.map +1 -0
  74. package/lib/models/dial-in-phone-numbers.model.d.ts +18 -0
  75. package/lib/models/dial-in-phone-numbers.model.d.ts.map +1 -0
  76. package/lib/models/directoryContact.model.d.ts +205 -0
  77. package/lib/models/directoryContact.model.d.ts.map +1 -0
  78. package/lib/models/event.model.d.ts +14 -0
  79. package/lib/models/event.model.d.ts.map +1 -0
  80. package/lib/models/favorite.model.d.ts +94 -0
  81. package/lib/models/favorite.model.d.ts.map +1 -0
  82. package/lib/models/fileDocument.model.d.ts +345 -0
  83. package/lib/models/fileDocument.model.d.ts.map +1 -0
  84. package/lib/models/geoLoc.model.d.ts +6 -0
  85. package/lib/models/geoLoc.model.d.ts.map +1 -0
  86. package/lib/models/index.d.ts +46 -0
  87. package/lib/models/index.d.ts.map +1 -0
  88. package/lib/models/invitation.model.d.ts +88 -0
  89. package/lib/models/invitation.model.d.ts.map +1 -0
  90. package/lib/models/invoices.model.d.ts +76 -0
  91. package/lib/models/invoices.model.d.ts.map +1 -0
  92. package/lib/models/logEntry.model.d.ts +23 -0
  93. package/lib/models/logEntry.model.d.ts.map +1 -0
  94. package/lib/models/message.model.d.ts +400 -0
  95. package/lib/models/message.model.d.ts.map +1 -0
  96. package/lib/models/messageAdditionalContent.parsers.d.ts +32 -0
  97. package/lib/models/messageAdditionalContent.parsers.d.ts.map +1 -0
  98. package/lib/models/offer.model.d.ts +16 -0
  99. package/lib/models/offer.model.d.ts.map +1 -0
  100. package/lib/models/p2pRecap.model.d.ts +372 -0
  101. package/lib/models/p2pRecap.model.d.ts.map +1 -0
  102. package/lib/models/paymentMethods.model.d.ts +98 -0
  103. package/lib/models/paymentMethods.model.d.ts.map +1 -0
  104. package/lib/models/personalRoutine.model.d.ts +173 -0
  105. package/lib/models/personalRoutine.model.d.ts.map +1 -0
  106. package/lib/models/poll.model.d.ts +139 -0
  107. package/lib/models/poll.model.d.ts.map +1 -0
  108. package/lib/models/rainbow-auth.model.d.ts +137 -0
  109. package/lib/models/rainbow-auth.model.d.ts.map +1 -0
  110. package/lib/models/searchTextConvResults.model.d.ts +30 -0
  111. package/lib/models/searchTextConvResults.model.d.ts.map +1 -0
  112. package/lib/models/site.model.d.ts +165 -0
  113. package/lib/models/site.model.d.ts.map +1 -0
  114. package/lib/models/subscription.model.d.ts +592 -0
  115. package/lib/models/subscription.model.d.ts.map +1 -0
  116. package/lib/models/telephonyConfig.model.d.ts +144 -0
  117. package/lib/models/telephonyConfig.model.d.ts.map +1 -0
  118. package/lib/models/telephonyForward.model.d.ts +47 -0
  119. package/lib/models/telephonyForward.model.d.ts.map +1 -0
  120. package/lib/models/todo.model.d.ts +103 -0
  121. package/lib/models/todo.model.d.ts.map +1 -0
  122. package/lib/models/transcription.model.d.ts +59 -0
  123. package/lib/models/transcription.model.d.ts.map +1 -0
  124. package/lib/models/user.model.d.ts +1008 -0
  125. package/lib/models/user.model.d.ts.map +1 -0
  126. package/lib/models/userProfileTemplate.model.d.ts +735 -0
  127. package/lib/models/userProfileTemplate.model.d.ts.map +1 -0
  128. package/lib/models/usersList.model.d.ts +117 -0
  129. package/lib/models/usersList.model.d.ts.map +1 -0
  130. package/lib/models/webConferenceParticipant.model.d.ts +135 -0
  131. package/lib/models/webConferenceParticipant.model.d.ts.map +1 -0
  132. package/lib/models/webConferenceSession.model.d.ts +658 -0
  133. package/lib/models/webConferenceSession.model.d.ts.map +1 -0
  134. package/lib/models/webinar.model.d.ts +738 -0
  135. package/lib/models/webinar.model.d.ts.map +1 -0
  136. package/lib/models/webinarRecap.model.d.ts +118 -0
  137. package/lib/models/webinarRecap.model.d.ts.map +1 -0
  138. package/lib/node.d.ts +3 -0
  139. package/lib/node.d.ts.map +1 -0
  140. package/lib/node.js +423 -0
  141. package/lib/node.js.map +7 -0
  142. package/lib/node.sdk.d.ts +41 -0
  143. package/lib/node.sdk.d.ts.map +1 -0
  144. package/lib/plugins/admin.plugin.d.ts +6 -0
  145. package/lib/plugins/admin.plugin.d.ts.map +1 -0
  146. package/lib/plugins/bubbleConference.plugin.d.ts +6 -0
  147. package/lib/plugins/bubbleConference.plugin.d.ts.map +1 -0
  148. package/lib/plugins/bubbleTag.plugin.d.ts +6 -0
  149. package/lib/plugins/bubbleTag.plugin.d.ts.map +1 -0
  150. package/lib/plugins/bubbles.plugin.d.ts +6 -0
  151. package/lib/plugins/bubbles.plugin.d.ts.map +1 -0
  152. package/lib/plugins/businessDirectory.plugin.d.ts +6 -0
  153. package/lib/plugins/businessDirectory.plugin.d.ts.map +1 -0
  154. package/lib/plugins/callRecorder.plugin.d.ts +6 -0
  155. package/lib/plugins/callRecorder.plugin.d.ts.map +1 -0
  156. package/lib/plugins/calllog.plugin.d.ts +6 -0
  157. package/lib/plugins/calllog.plugin.d.ts.map +1 -0
  158. package/lib/plugins/calls.plugin.d.ts +6 -0
  159. package/lib/plugins/calls.plugin.d.ts.map +1 -0
  160. package/lib/plugins/channels.plugin.d.ts +6 -0
  161. package/lib/plugins/channels.plugin.d.ts.map +1 -0
  162. package/lib/plugins/dataChannel.plugin.d.ts +6 -0
  163. package/lib/plugins/dataChannel.plugin.d.ts.map +1 -0
  164. package/lib/plugins/deviceManagement.plugin.d.ts +6 -0
  165. package/lib/plugins/deviceManagement.plugin.d.ts.map +1 -0
  166. package/lib/plugins/favorites.plugin.d.ts +6 -0
  167. package/lib/plugins/favorites.plugin.d.ts.map +1 -0
  168. package/lib/plugins/fileDocument.plugin.d.ts +6 -0
  169. package/lib/plugins/fileDocument.plugin.d.ts.map +1 -0
  170. package/lib/plugins/helpCenter.plugin.d.ts +6 -0
  171. package/lib/plugins/helpCenter.plugin.d.ts.map +1 -0
  172. package/lib/plugins/index.d.ts +27 -0
  173. package/lib/plugins/index.d.ts.map +1 -0
  174. package/lib/plugins/microsoft0365Ad.plugin.d.ts +6 -0
  175. package/lib/plugins/microsoft0365Ad.plugin.d.ts.map +1 -0
  176. package/lib/plugins/pbxUsers.plugin.d.ts +6 -0
  177. package/lib/plugins/pbxUsers.plugin.d.ts.map +1 -0
  178. package/lib/plugins/personalDirectory.plugin.d.ts +6 -0
  179. package/lib/plugins/personalDirectory.plugin.d.ts.map +1 -0
  180. package/lib/plugins/plugin.d.ts +8 -0
  181. package/lib/plugins/plugin.d.ts.map +1 -0
  182. package/lib/plugins/polls.plugin.d.ts +6 -0
  183. package/lib/plugins/polls.plugin.d.ts.map +1 -0
  184. package/lib/plugins/rpc.plugin.d.ts +6 -0
  185. package/lib/plugins/rpc.plugin.d.ts.map +1 -0
  186. package/lib/plugins/telemetry.plugin.d.ts +6 -0
  187. package/lib/plugins/telemetry.plugin.d.ts.map +1 -0
  188. package/lib/plugins/telephony.plugin.d.ts +6 -0
  189. package/lib/plugins/telephony.plugin.d.ts.map +1 -0
  190. package/lib/plugins/telephonyConfig.plugin.d.ts +6 -0
  191. package/lib/plugins/telephonyConfig.plugin.d.ts.map +1 -0
  192. package/lib/plugins/transcription.plugin.d.ts +6 -0
  193. package/lib/plugins/transcription.plugin.d.ts.map +1 -0
  194. package/lib/plugins/usersList.plugin.d.ts +6 -0
  195. package/lib/plugins/usersList.plugin.d.ts.map +1 -0
  196. package/lib/plugins/virtualBackground.plugin.d.ts +6 -0
  197. package/lib/plugins/virtualBackground.plugin.d.ts.map +1 -0
  198. package/lib/plugins/webinar.plugin.d.ts +6 -0
  199. package/lib/plugins/webinar.plugin.d.ts.map +1 -0
  200. package/lib/rainbow.sdk.d.ts +309 -0
  201. package/lib/rainbow.sdk.d.ts.map +1 -0
  202. package/lib/services/admin/admin-alarm.service.d.ts +42 -0
  203. package/lib/services/admin/admin-alarm.service.d.ts.map +1 -0
  204. package/lib/services/admin/admin-company.service.d.ts +167 -0
  205. package/lib/services/admin/admin-company.service.d.ts.map +1 -0
  206. package/lib/services/admin/admin-department.service.d.ts +39 -0
  207. package/lib/services/admin/admin-department.service.d.ts.map +1 -0
  208. package/lib/services/admin/admin-invitation.service.d.ts +114 -0
  209. package/lib/services/admin/admin-invitation.service.d.ts.map +1 -0
  210. package/lib/services/admin/admin-management.service.d.ts +100 -0
  211. package/lib/services/admin/admin-management.service.d.ts.map +1 -0
  212. package/lib/services/admin/admin-rvcp.service.d.ts +43 -0
  213. package/lib/services/admin/admin-rvcp.service.d.ts.map +1 -0
  214. package/lib/services/admin/admin-site.service.d.ts +64 -0
  215. package/lib/services/admin/admin-site.service.d.ts.map +1 -0
  216. package/lib/services/admin/admin-subscription.service.d.ts +135 -0
  217. package/lib/services/admin/admin-subscription.service.d.ts.map +1 -0
  218. package/lib/services/admin/admin-tag.service.d.ts +79 -0
  219. package/lib/services/admin/admin-tag.service.d.ts.map +1 -0
  220. package/lib/services/admin/admin-user-profile.service.d.ts +76 -0
  221. package/lib/services/admin/admin-user-profile.service.d.ts.map +1 -0
  222. package/lib/services/admin/admin-user.service.d.ts +338 -0
  223. package/lib/services/admin/admin-user.service.d.ts.map +1 -0
  224. package/lib/services/admin/admin.common.d.ts +40 -0
  225. package/lib/services/admin/admin.common.d.ts.map +1 -0
  226. package/lib/services/admin/admin.service.d.ts +138 -0
  227. package/lib/services/admin/admin.service.d.ts.map +1 -0
  228. package/lib/services/admin/index.d.ts +14 -0
  229. package/lib/services/admin/index.d.ts.map +1 -0
  230. package/lib/services/bot/bot.service.d.ts +121 -0
  231. package/lib/services/bot/bot.service.d.ts.map +1 -0
  232. package/lib/services/bubbles/bubble.service.d.ts +889 -0
  233. package/lib/services/bubbles/bubble.service.d.ts.map +1 -0
  234. package/lib/services/bubbles/bubbleTag.service.d.ts +132 -0
  235. package/lib/services/bubbles/bubbleTag.service.d.ts.map +1 -0
  236. package/lib/services/bubbles/index.d.ts +3 -0
  237. package/lib/services/bubbles/index.d.ts.map +1 -0
  238. package/lib/services/call/call.service.d.ts +297 -0
  239. package/lib/services/call/call.service.d.ts.map +1 -0
  240. package/lib/services/call/callRecorder.service.d.ts +358 -0
  241. package/lib/services/call/callRecorder.service.d.ts.map +1 -0
  242. package/lib/services/call/index.d.ts +3 -0
  243. package/lib/services/call/index.d.ts.map +1 -0
  244. package/lib/services/callLog/callLog.service.d.ts +563 -0
  245. package/lib/services/callLog/callLog.service.d.ts.map +1 -0
  246. package/lib/services/callLog/index.d.ts +5 -0
  247. package/lib/services/callLog/index.d.ts.map +1 -0
  248. package/lib/services/callLog/p2pRecap.service.d.ts +206 -0
  249. package/lib/services/callLog/p2pRecap.service.d.ts.map +1 -0
  250. package/lib/services/channels/channel.service.d.ts +626 -0
  251. package/lib/services/channels/channel.service.d.ts.map +1 -0
  252. package/lib/services/channels/index.d.ts +3 -0
  253. package/lib/services/channels/index.d.ts.map +1 -0
  254. package/lib/services/citrix/citrix.service.d.ts +30 -0
  255. package/lib/services/citrix/citrix.service.d.ts.map +1 -0
  256. package/lib/services/citrix/index.d.ts +3 -0
  257. package/lib/services/citrix/index.d.ts.map +1 -0
  258. package/lib/services/company/company-directory.service.d.ts +222 -0
  259. package/lib/services/company/company-directory.service.d.ts.map +1 -0
  260. package/lib/services/conference/bubbleConference.service.d.ts +1237 -0
  261. package/lib/services/conference/bubbleConference.service.d.ts.map +1 -0
  262. package/lib/services/conference/bubbleConferenceRecap.service.d.ts +159 -0
  263. package/lib/services/conference/bubbleConferenceRecap.service.d.ts.map +1 -0
  264. package/lib/services/conference/index.d.ts +5 -0
  265. package/lib/services/conference/index.d.ts.map +1 -0
  266. package/lib/services/conference/webConferenceHelper.d.ts +25 -0
  267. package/lib/services/conference/webConferenceHelper.d.ts.map +1 -0
  268. package/lib/services/conversation/conversation.service.d.ts +723 -0
  269. package/lib/services/conversation/conversation.service.d.ts.map +1 -0
  270. package/lib/services/conversation/conversationServiceBulkHistoryHandler.d.ts +39 -0
  271. package/lib/services/conversation/conversationServiceBulkHistoryHandler.d.ts.map +1 -0
  272. package/lib/services/conversation/conversationServiceEventHandler.d.ts +78 -0
  273. package/lib/services/conversation/conversationServiceEventHandler.d.ts.map +1 -0
  274. package/lib/services/conversation/index.d.ts +3 -0
  275. package/lib/services/conversation/index.d.ts.map +1 -0
  276. package/lib/services/core/account.service.d.ts +98 -0
  277. package/lib/services/core/account.service.d.ts.map +1 -0
  278. package/lib/services/core/auth.service.d.ts +303 -0
  279. package/lib/services/core/auth.service.d.ts.map +1 -0
  280. package/lib/services/core/company.service.d.ts +30 -0
  281. package/lib/services/core/company.service.d.ts.map +1 -0
  282. package/lib/services/core/connection.service.d.ts +209 -0
  283. package/lib/services/core/connection.service.d.ts.map +1 -0
  284. package/lib/services/core/contact.service.d.ts +617 -0
  285. package/lib/services/core/contact.service.d.ts.map +1 -0
  286. package/lib/services/core/country.service.d.ts +66 -0
  287. package/lib/services/core/country.service.d.ts.map +1 -0
  288. package/lib/services/core/directorySearch.service.d.ts +305 -0
  289. package/lib/services/core/directorySearch.service.d.ts.map +1 -0
  290. package/lib/services/core/event.service.d.ts +31 -0
  291. package/lib/services/core/event.service.d.ts.map +1 -0
  292. package/lib/services/core/i18n.service.d.ts +19 -0
  293. package/lib/services/core/i18n.service.d.ts.map +1 -0
  294. package/lib/services/core/imageUtils.service.d.ts +15 -0
  295. package/lib/services/core/imageUtils.service.d.ts.map +1 -0
  296. package/lib/services/core/index.d.ts +19 -0
  297. package/lib/services/core/index.d.ts.map +1 -0
  298. package/lib/services/core/logger.service.d.ts +143 -0
  299. package/lib/services/core/logger.service.d.ts.map +1 -0
  300. package/lib/services/core/logging.service.d.ts +51 -0
  301. package/lib/services/core/logging.service.d.ts.map +1 -0
  302. package/lib/services/core/main.service.d.ts +124 -0
  303. package/lib/services/core/main.service.d.ts.map +1 -0
  304. package/lib/services/core/presenceHelper.service.d.ts +73 -0
  305. package/lib/services/core/presenceHelper.service.d.ts.map +1 -0
  306. package/lib/services/core/profile.service.d.ts +453 -0
  307. package/lib/services/core/profile.service.d.ts.map +1 -0
  308. package/lib/services/core/settings.service.d.ts +82 -0
  309. package/lib/services/core/settings.service.d.ts.map +1 -0
  310. package/lib/services/core/userInfo.service.d.ts +25 -0
  311. package/lib/services/core/userInfo.service.d.ts.map +1 -0
  312. package/lib/services/core/userNetwork.service.d.ts +171 -0
  313. package/lib/services/core/userNetwork.service.d.ts.map +1 -0
  314. package/lib/services/core/xmpp.service.d.ts +99 -0
  315. package/lib/services/core/xmpp.service.d.ts.map +1 -0
  316. package/lib/services/dataChannel/dataChannel.service.d.ts +102 -0
  317. package/lib/services/dataChannel/dataChannel.service.d.ts.map +1 -0
  318. package/lib/services/dataChannel/index.d.ts +3 -0
  319. package/lib/services/dataChannel/index.d.ts.map +1 -0
  320. package/lib/services/deviceManagement/deviceEchoFilter.d.ts +86 -0
  321. package/lib/services/deviceManagement/deviceEchoFilter.d.ts.map +1 -0
  322. package/lib/services/deviceManagement/deviceManagement.service.d.ts +290 -0
  323. package/lib/services/deviceManagement/deviceManagement.service.d.ts.map +1 -0
  324. package/lib/services/deviceManagement/index.d.ts +2 -0
  325. package/lib/services/deviceManagement/index.d.ts.map +1 -0
  326. package/lib/services/deviceManagement/webHidManager.service.d.ts +616 -0
  327. package/lib/services/deviceManagement/webHidManager.service.d.ts.map +1 -0
  328. package/lib/services/directory/directory.service.d.ts +108 -0
  329. package/lib/services/directory/directory.service.d.ts.map +1 -0
  330. package/lib/services/directory/index.d.ts +3 -0
  331. package/lib/services/directory/index.d.ts.map +1 -0
  332. package/lib/services/directory/office365ad.service.d.ts +74 -0
  333. package/lib/services/directory/office365ad.service.d.ts.map +1 -0
  334. package/lib/services/directory/personal-directory.service.d.ts +425 -0
  335. package/lib/services/directory/personal-directory.service.d.ts.map +1 -0
  336. package/lib/services/directory/phonebook.service.d.ts +43 -0
  337. package/lib/services/directory/phonebook.service.d.ts.map +1 -0
  338. package/lib/services/event-mixin.d.ts +75 -0
  339. package/lib/services/event-mixin.d.ts.map +1 -0
  340. package/lib/services/favorites/favorites.service.d.ts +313 -0
  341. package/lib/services/favorites/favorites.service.d.ts.map +1 -0
  342. package/lib/services/favorites/index.d.ts +3 -0
  343. package/lib/services/favorites/index.d.ts.map +1 -0
  344. package/lib/services/fileDocument/fileDocument.service.d.ts +229 -0
  345. package/lib/services/fileDocument/fileDocument.service.d.ts.map +1 -0
  346. package/lib/services/fileDocument/index.d.ts +5 -0
  347. package/lib/services/fileDocument/index.d.ts.map +1 -0
  348. package/lib/services/files/fileDescriptorEventHandler.service.d.ts +18 -0
  349. package/lib/services/files/fileDescriptorEventHandler.service.d.ts.map +1 -0
  350. package/lib/services/files/fileServer.service.d.ts +268 -0
  351. package/lib/services/files/fileServer.service.d.ts.map +1 -0
  352. package/lib/services/files/fileStorage.service.d.ts +426 -0
  353. package/lib/services/files/fileStorage.service.d.ts.map +1 -0
  354. package/lib/services/helpcenter/helpCenter.service.d.ts +207 -0
  355. package/lib/services/helpcenter/helpCenter.service.d.ts.map +1 -0
  356. package/lib/services/helpcenter/index.d.ts +4 -0
  357. package/lib/services/helpcenter/index.d.ts.map +1 -0
  358. package/lib/services/helpcenter/whatsNew.service.d.ts +47 -0
  359. package/lib/services/helpcenter/whatsNew.service.d.ts.map +1 -0
  360. package/lib/services/horizon/horizon.service.d.ts +31 -0
  361. package/lib/services/horizon/horizon.service.d.ts.map +1 -0
  362. package/lib/services/horizon/index.d.ts +3 -0
  363. package/lib/services/horizon/index.d.ts.map +1 -0
  364. package/lib/services/index.d.ts +35 -0
  365. package/lib/services/index.d.ts.map +1 -0
  366. package/lib/services/launcher/config/sdkLaunchConfig.d.ts +8 -0
  367. package/lib/services/launcher/config/sdkLaunchConfig.d.ts.map +1 -0
  368. package/lib/services/localTranslation/chromeTranslation.engine.d.ts +79 -0
  369. package/lib/services/localTranslation/chromeTranslation.engine.d.ts.map +1 -0
  370. package/lib/services/localTranslation/index.d.ts +6 -0
  371. package/lib/services/localTranslation/index.d.ts.map +1 -0
  372. package/lib/services/localTranslation/localTranslation.service.d.ts +129 -0
  373. package/lib/services/localTranslation/localTranslation.service.d.ts.map +1 -0
  374. package/lib/services/localTranslation/translationEngine.d.ts +81 -0
  375. package/lib/services/localTranslation/translationEngine.d.ts.map +1 -0
  376. package/lib/services/metrics/analytics.service.d.ts +63 -0
  377. package/lib/services/metrics/analytics.service.d.ts.map +1 -0
  378. package/lib/services/metrics/index.d.ts +2 -0
  379. package/lib/services/metrics/index.d.ts.map +1 -0
  380. package/lib/services/notifications/index.d.ts +2 -0
  381. package/lib/services/notifications/index.d.ts.map +1 -0
  382. package/lib/services/notifications/notificationCenter.service.d.ts +178 -0
  383. package/lib/services/notifications/notificationCenter.service.d.ts.map +1 -0
  384. package/lib/services/notifications/notificationsViewer.service.d.ts +46 -0
  385. package/lib/services/notifications/notificationsViewer.service.d.ts.map +1 -0
  386. package/lib/services/personalRoutines/personal-routines.service.d.ts +159 -0
  387. package/lib/services/personalRoutines/personal-routines.service.d.ts.map +1 -0
  388. package/lib/services/polls/index.d.ts +2 -0
  389. package/lib/services/polls/index.d.ts.map +1 -0
  390. package/lib/services/polls/polls.service.d.ts +139 -0
  391. package/lib/services/polls/polls.service.d.ts.map +1 -0
  392. package/lib/services/ringing/index.d.ts +2 -0
  393. package/lib/services/ringing/index.d.ts.map +1 -0
  394. package/lib/services/ringing/ringing.service.d.ts +535 -0
  395. package/lib/services/ringing/ringing.service.d.ts.map +1 -0
  396. package/lib/services/rpc/index.d.ts +2 -0
  397. package/lib/services/rpc/index.d.ts.map +1 -0
  398. package/lib/services/rpc/rpc.service.d.ts +75 -0
  399. package/lib/services/rpc/rpc.service.d.ts.map +1 -0
  400. package/lib/services/service.d.ts +9 -0
  401. package/lib/services/service.d.ts.map +1 -0
  402. package/lib/services/speechRecognitionService/speechRecognition.service.d.ts +87 -0
  403. package/lib/services/speechRecognitionService/speechRecognition.service.d.ts.map +1 -0
  404. package/lib/services/subscription/index.d.ts +4 -0
  405. package/lib/services/subscription/index.d.ts.map +1 -0
  406. package/lib/services/subscription/invoices.service.d.ts +78 -0
  407. package/lib/services/subscription/invoices.service.d.ts.map +1 -0
  408. package/lib/services/subscription/paymentMethods.service.d.ts +164 -0
  409. package/lib/services/subscription/paymentMethods.service.d.ts.map +1 -0
  410. package/lib/services/subscription/subscription.service.d.ts +510 -0
  411. package/lib/services/subscription/subscription.service.d.ts.map +1 -0
  412. package/lib/services/support/index.d.ts +2 -0
  413. package/lib/services/support/index.d.ts.map +1 -0
  414. package/lib/services/support/support.model.d.ts +143 -0
  415. package/lib/services/support/support.model.d.ts.map +1 -0
  416. package/lib/services/support/support.service.d.ts +162 -0
  417. package/lib/services/support/support.service.d.ts.map +1 -0
  418. package/lib/services/telemetry/index.d.ts +3 -0
  419. package/lib/services/telemetry/index.d.ts.map +1 -0
  420. package/lib/services/telemetry/jsonRPC.service.d.ts +25 -0
  421. package/lib/services/telemetry/jsonRPC.service.d.ts.map +1 -0
  422. package/lib/services/telemetry/telemetry.service.d.ts +22 -0
  423. package/lib/services/telemetry/telemetry.service.d.ts.map +1 -0
  424. package/lib/services/telephony/index.d.ts +4 -0
  425. package/lib/services/telephony/index.d.ts.map +1 -0
  426. package/lib/services/telephony/supervision.service.d.ts +277 -0
  427. package/lib/services/telephony/supervision.service.d.ts.map +1 -0
  428. package/lib/services/telephony/telephony.service.d.ts +1476 -0
  429. package/lib/services/telephony/telephony.service.d.ts.map +1 -0
  430. package/lib/services/telephony/telephonyCcdAgent.service.d.ts +63 -0
  431. package/lib/services/telephony/telephonyCcdAgent.service.d.ts.map +1 -0
  432. package/lib/services/telephony/telephonyHybridEventHandler.d.ts +360 -0
  433. package/lib/services/telephony/telephonyHybridEventHandler.d.ts.map +1 -0
  434. package/lib/services/telephony/telephonyKeys.service.d.ts +86 -0
  435. package/lib/services/telephony/telephonyKeys.service.d.ts.map +1 -0
  436. package/lib/services/telephony/telephonySipWise.service.d.ts +543 -0
  437. package/lib/services/telephony/telephonySipWise.service.d.ts.map +1 -0
  438. package/lib/services/telephony/telephonySipWiseEventHandler.d.ts +462 -0
  439. package/lib/services/telephony/telephonySipWiseEventHandler.d.ts.map +1 -0
  440. package/lib/services/telephonyConfig/index.d.ts +3 -0
  441. package/lib/services/telephonyConfig/index.d.ts.map +1 -0
  442. package/lib/services/telephonyConfig/telephonyConfig.service.d.ts +150 -0
  443. package/lib/services/telephonyConfig/telephonyConfig.service.d.ts.map +1 -0
  444. package/lib/services/todo/todo.service.d.ts +358 -0
  445. package/lib/services/todo/todo.service.d.ts.map +1 -0
  446. package/lib/services/transcription/index.d.ts +2 -0
  447. package/lib/services/transcription/index.d.ts.map +1 -0
  448. package/lib/services/transcription/liveTranscription.service.d.ts +94 -0
  449. package/lib/services/transcription/liveTranscription.service.d.ts.map +1 -0
  450. package/lib/services/ulrMetadata/urlMetadata.service.d.ts +51 -0
  451. package/lib/services/ulrMetadata/urlMetadata.service.d.ts.map +1 -0
  452. package/lib/services/users/index.d.ts +3 -0
  453. package/lib/services/users/index.d.ts.map +1 -0
  454. package/lib/services/users/user.service.d.ts +146 -0
  455. package/lib/services/users/user.service.d.ts.map +1 -0
  456. package/lib/services/users/usersLists.service.d.ts +239 -0
  457. package/lib/services/users/usersLists.service.d.ts.map +1 -0
  458. package/lib/services/utilities/browserDatabase.service.d.ts +69 -0
  459. package/lib/services/utilities/browserDatabase.service.d.ts.map +1 -0
  460. package/lib/services/utilities/errorHelper.service.d.ts +24 -0
  461. package/lib/services/utilities/errorHelper.service.d.ts.map +1 -0
  462. package/lib/services/utilities/index.d.ts +4 -0
  463. package/lib/services/utilities/index.d.ts.map +1 -0
  464. package/lib/services/utilities/utilities.service.d.ts +74 -0
  465. package/lib/services/utilities/utilities.service.d.ts.map +1 -0
  466. package/lib/services/virtualBackground/RBVirtualBackground.service.d.ts +228 -0
  467. package/lib/services/virtualBackground/RBVirtualBackground.service.d.ts.map +1 -0
  468. package/lib/services/virtualBackground/index.d.ts +4 -0
  469. package/lib/services/virtualBackground/index.d.ts.map +1 -0
  470. package/lib/services/virtualBackground/personalVideoBackground.d.ts +190 -0
  471. package/lib/services/virtualBackground/personalVideoBackground.d.ts.map +1 -0
  472. package/lib/services/virtualBackground/pipeline/canvas2D/canvas2DPipeline.d.ts +66 -0
  473. package/lib/services/virtualBackground/pipeline/canvas2D/canvas2DPipeline.d.ts.map +1 -0
  474. package/lib/services/virtualBackground/pipeline/webgl2/blurStage.d.ts +88 -0
  475. package/lib/services/virtualBackground/pipeline/webgl2/blurStage.d.ts.map +1 -0
  476. package/lib/services/virtualBackground/pipeline/webgl2/imageStage.d.ts +69 -0
  477. package/lib/services/virtualBackground/pipeline/webgl2/imageStage.d.ts.map +1 -0
  478. package/lib/services/virtualBackground/pipeline/webgl2/jointBilateralFilter.d.ts +55 -0
  479. package/lib/services/virtualBackground/pipeline/webgl2/jointBilateralFilter.d.ts.map +1 -0
  480. package/lib/services/virtualBackground/pipeline/webgl2/resizingStage.d.ts +59 -0
  481. package/lib/services/virtualBackground/pipeline/webgl2/resizingStage.d.ts.map +1 -0
  482. package/lib/services/virtualBackground/pipeline/webgl2/softMax.d.ts +34 -0
  483. package/lib/services/virtualBackground/pipeline/webgl2/softMax.d.ts.map +1 -0
  484. package/lib/services/virtualBackground/pipeline/webgl2/webgl2Pipeline.d.ts +62 -0
  485. package/lib/services/virtualBackground/pipeline/webgl2/webgl2Pipeline.d.ts.map +1 -0
  486. package/lib/services/virtualBackground/pipeline/webgl2/webglHelper.d.ts +56 -0
  487. package/lib/services/virtualBackground/pipeline/webgl2/webglHelper.d.ts.map +1 -0
  488. package/lib/services/virtualBackground/virtualBackground.service.d.ts +399 -0
  489. package/lib/services/virtualBackground/virtualBackground.service.d.ts.map +1 -0
  490. package/lib/services/webinars/index.d.ts +10 -0
  491. package/lib/services/webinars/index.d.ts.map +1 -0
  492. package/lib/services/webinars/telemetry/webinarTelemetry.model.d.ts +71 -0
  493. package/lib/services/webinars/telemetry/webinarTelemetry.model.d.ts.map +1 -0
  494. package/lib/services/webinars/telemetry/webinarTelemetry.service.d.ts +86 -0
  495. package/lib/services/webinars/telemetry/webinarTelemetry.service.d.ts.map +1 -0
  496. package/lib/services/webinars/telemetry/webinarTelemetryDatabase.d.ts +31 -0
  497. package/lib/services/webinars/telemetry/webinarTelemetryDatabase.d.ts.map +1 -0
  498. package/lib/services/webinars/webinarAudioMixer.d.ts +45 -0
  499. package/lib/services/webinars/webinarAudioMixer.d.ts.map +1 -0
  500. package/lib/services/webinars/webinarConference.service.d.ts +323 -0
  501. package/lib/services/webinars/webinarConference.service.d.ts.map +1 -0
  502. package/lib/services/webinars/webinarConference.utils.d.ts +24 -0
  503. package/lib/services/webinars/webinarConference.utils.d.ts.map +1 -0
  504. package/lib/services/webinars/webinarParticipants.service.d.ts +43 -0
  505. package/lib/services/webinars/webinarParticipants.service.d.ts.map +1 -0
  506. package/lib/services/webinars/webinarSpeakers.service.d.ts +25 -0
  507. package/lib/services/webinars/webinarSpeakers.service.d.ts.map +1 -0
  508. package/lib/services/webinars/webinarStoryLine.service.d.ts +117 -0
  509. package/lib/services/webinars/webinarStoryLine.service.d.ts.map +1 -0
  510. package/lib/services/webinars/webinars.service.d.ts +600 -0
  511. package/lib/services/webinars/webinars.service.d.ts.map +1 -0
  512. package/lib/services/webrtc/index.d.ts +5 -0
  513. package/lib/services/webrtc/index.d.ts.map +1 -0
  514. package/lib/services/webrtc/webrtcConfigAndUtils.d.ts +170 -0
  515. package/lib/services/webrtc/webrtcConfigAndUtils.d.ts.map +1 -0
  516. package/lib/services/webrtc/webrtcP2P.service.d.ts +521 -0
  517. package/lib/services/webrtc/webrtcP2P.service.d.ts.map +1 -0
  518. package/lib/services/webrtc/webrtcP2PEventHandler.d.ts +55 -0
  519. package/lib/services/webrtc/webrtcP2PEventHandler.d.ts.map +1 -0
  520. package/lib/services/webrtcGateway/webrtcGateway.service.d.ts +605 -0
  521. package/lib/services/webrtcGateway/webrtcGateway.service.d.ts.map +1 -0
  522. package/lib/strophejs.d.ts +3 -0
  523. package/lib/strophejs.d.ts.map +1 -0
  524. package/lib/typings/helpers.d.ts +3 -0
  525. package/lib/typings/helpers.d.ts.map +1 -0
  526. package/lib/utils/allSettled.d.ts +2 -0
  527. package/lib/utils/allSettled.d.ts.map +1 -0
  528. package/lib/utils/anonymizer.d.ts +28 -0
  529. package/lib/utils/anonymizer.d.ts.map +1 -0
  530. package/lib/utils/branded.d.ts +4 -0
  531. package/lib/utils/branded.d.ts.map +1 -0
  532. package/lib/utils/browser.d.ts +231 -0
  533. package/lib/utils/browser.d.ts.map +1 -0
  534. package/lib/utils/index.d.ts +12 -0
  535. package/lib/utils/index.d.ts.map +1 -0
  536. package/lib/utils/mediaPermissionError.d.ts +2 -0
  537. package/lib/utils/mediaPermissionError.d.ts.map +1 -0
  538. package/lib/utils/promiseQueue.d.ts +10 -0
  539. package/lib/utils/promiseQueue.d.ts.map +1 -0
  540. package/lib/utils/randomString.d.ts +3 -0
  541. package/lib/utils/randomString.d.ts.map +1 -0
  542. package/lib/utils/recordingArchiveName.d.ts +13 -0
  543. package/lib/utils/recordingArchiveName.d.ts.map +1 -0
  544. package/lib/utils/serverTimestamp.d.ts +15 -0
  545. package/lib/utils/serverTimestamp.d.ts.map +1 -0
  546. package/lib/utils/stringifyError.d.ts +2 -0
  547. package/lib/utils/stringifyError.d.ts.map +1 -0
  548. package/lib/utils/video.d.ts +27 -0
  549. package/lib/utils/video.d.ts.map +1 -0
  550. package/lib/utils/wait.d.ts +2 -0
  551. package/lib/utils/wait.d.ts.map +1 -0
  552. package/lib/utils/xmlParser.d.ts +102 -0
  553. package/lib/utils/xmlParser.d.ts.map +1 -0
  554. package/lib/utils/xmlValidation.d.ts +119 -0
  555. package/lib/utils/xmlValidation.d.ts.map +1 -0
  556. package/package.json +58 -0
@@ -0,0 +1,510 @@
1
+ /**
2
+ * @module Subscription
3
+ */
4
+ import type { EventableService } from "../../services/service";
5
+ import { CompanySubscription, TrialStatus } from "../../models/subscription.model";
6
+ import type { CommercialState, OfferGroup, PurchaseOptions, SeatUsage, SubscriptionOffer, SubscriptionPurchaseOrder, SubscriptionQuotation, SubscriptionQuotationOptions, UpdateSubscriptionPatch } from "../../models/subscription.model";
7
+ export declare const SUBSCRIPTION_SVC = "SubscriptionService";
8
+ export interface ISubscriptionServiceEvents {
9
+ /**
10
+ * @eventProperty
11
+ * This `RBEvent` is sent when the company's subscriptions have changed — bought, updated,
12
+ * cancelled, or announced by the backend over XMPP.
13
+ *
14
+ * Carries no payload: it says the previous read is stale, not what now holds. Ask the service
15
+ * again — the cache is already dropped when this fires, so the next read hits the server.
16
+ */
17
+ ON_COMPANY_SUBSCRIPTIONS_CHANGED: unknown;
18
+ }
19
+ export interface SubscriptionService extends EventableService<ISubscriptionServiceEvents> {
20
+ /**
21
+ * Fetches all available subscription offers (the catalog).
22
+ *
23
+ * Does not require authentication. Results may be geo-filtered based on the caller's location.
24
+ *
25
+ * @returns An array of available {@link SubscriptionOffer} objects.
26
+ * @throws {@link RainbowError} when the request fails.
27
+ */
28
+ getOffers: () => Promise<SubscriptionOffer[]>;
29
+ /**
30
+ * Subscribes the authenticated user to an offer. The user id is read from the current session;
31
+ * {@link SubscriptionOffer.isFreemium} decides the path:
32
+ * - **Freemium**: free self-service. The backend creates the company on the fly, named after
33
+ * `companyName` when given, otherwise a placeholder the caller is expected to replace via
34
+ * {@link CompanyService.updateCompany}.
35
+ * - **Paid**: requires `purchaseOptions` (billing cycle, seats, billing address).
36
+ *
37
+ * @param purchaseOptions - Required for a paid offer, ignored for freemium.
38
+ * @param companyName - Only meaningful for a user with no company yet; ignored for a paid offer.
39
+ * @returns The {@link SubscriptionPurchaseOrder} for a paid offer; `undefined` for freemium.
40
+ * @throws {@link RainbowError} when the request fails, or an error when a paid offer is
41
+ * subscribed without `purchaseOptions`.
42
+ */
43
+ subscribeToOffer: (offer: SubscriptionOffer, purchaseOptions?: PurchaseOptions, companyName?: string) => Promise<SubscriptionPurchaseOrder | undefined>;
44
+ /**
45
+ * Fetches the subscriptions of the authenticated user's company, read from the current
46
+ * session. Cached in memory until invalidated (a new subscription, or a `companysubscription`
47
+ * XMPP event).
48
+ *
49
+ * @param forceRefresh - Bypasses the cache and refetches.
50
+ */
51
+ getCompanySubscriptions: (forceRefresh?: boolean) => Promise<CompanySubscription[]>;
52
+ /**
53
+ * Fetches a single subscription of the authenticated user's company.
54
+ *
55
+ * @returns The {@link CompanySubscription} or `undefined` if not found.
56
+ */
57
+ getCompanySubscription: (subscriptionId: string) => Promise<CompanySubscription | undefined>;
58
+ /**
59
+ * Updates an existing subscription. Mainly used to change the licence count:
60
+ * `patch.maxNumberUsers` is the new **absolute total**, not a delta.
61
+ *
62
+ * Takes no payment method — the billing consequence (immediate pro-rata charge or adjustment
63
+ * at the next renewal) is decided server-side.
64
+ *
65
+ * @param patch - Only the keys present are sent; the backend leaves the others untouched.
66
+ * @throws {@link RainbowError} when the request fails (e.g. the new seat count is below the
67
+ * number of assigned licences, or the admin lacks the right).
68
+ */
69
+ updateSubscription: (subscriptionId: string, patch: UpdateSubscriptionPatch) => Promise<CompanySubscription>;
70
+ /**
71
+ * Cancels a subscription. **Never immediate** — the period already paid for runs out, then
72
+ * access stops.
73
+ *
74
+ * Two backend calls, chosen from the billing cycle:
75
+ * - **monthly** — `DELETE .../companies/:companyId/subscriptions/:subscriptionId`. Keeps
76
+ * `status: "active"` with an `expirationDate`; a cron moves it to `terminated` on that date,
77
+ * so it stays listed meanwhile.
78
+ * - **prepaid** — `DELETE` is refused whatever the date (`403450`, "Prepaid subscriptions
79
+ * cannot be deleted in direct sell model"); automatic renewal is switched off instead, via
80
+ * {@link updateSubscription} as `{ autoRenew: false }`. Same outcome.
81
+ *
82
+ * {@link CompanySubscription.isCancelled} tells either apart from a live subscription.
83
+ *
84
+ * Also refused by the backend: sync with Business Store / Zuora in flight (`403311`), licences
85
+ * still allocated (`403316`, `403317`, `403318`), promo code outside its window on a monthly
86
+ * subscription (`403394`). The default subscription is never cancellable. A
87
+ * `linkedSubscriptionId` is cancelled in the same request. No cancellation reason is accepted
88
+ * by either endpoint — collect it separately if the product needs one.
89
+ */
90
+ cancelSubscription: (subscriptionId: string) => Promise<void>;
91
+ /**
92
+ * Un-cancels a prepaid subscription by switching automatic renewal back on — the mirror of
93
+ * {@link cancelSubscription}'s prepaid branch.
94
+ *
95
+ * Prepaid only: a cancelled monthly one was `DELETE`d and carries an `expirationDate` nothing
96
+ * takes back. Running only: past the end date the backend has terminated it and released its
97
+ * licences, so the offer has to be bought again. Renewal already on returns without a call —
98
+ * the backend answers a second `autoRenew: true` with a `409`.
99
+ *
100
+ * The backend may still refuse: sync with Business Store / Zuora in flight answers `403311`.
101
+ *
102
+ * @throws When the subscription is unknown, monthly, or already over.
103
+ */
104
+ restoreSubscription: (subscriptionId: string) => Promise<void>;
105
+ /**
106
+ * Prices a prospective change without applying it — read-only, nothing is written.
107
+ *
108
+ * Which fields come back depends on the subscription: a monthly one reports recurring amounts
109
+ * ({@link SubscriptionQuotation.contractedMrr}, {@link SubscriptionQuotation.totalDeltaMrr}), a
110
+ * prepaid one reports contract values ({@link SubscriptionQuotation.totalContractedValue},
111
+ * {@link SubscriptionQuotation.totalDeltaTcv}). Branch on
112
+ * {@link CompanySubscription.isMonthly} — reading `contractedMrr` on a prepaid subscription
113
+ * reports a monthly figure as if it were the contract total.
114
+ *
115
+ * Every field is optional: treat an absent one as "do not show that row" rather than
116
+ * substituting a computed value. {@link SubscriptionQuotation.taxAmount} in particular is the
117
+ * only trustworthy tax figure.
118
+ *
119
+ * @throws {@link RainbowError} when the request fails (e.g. invalid promo code).
120
+ */
121
+ getSubscriptionQuotation: (subscriptionId: string, options: SubscriptionQuotationOptions) => Promise<SubscriptionQuotation>;
122
+ /**
123
+ * Prices a catalog offer without buying it — read-only, nothing is written.
124
+ *
125
+ * What {@link getSubscriptionQuotation} does for an existing subscription, keyed by the offer
126
+ * instead. Monthly and annual are separate offers, so `offerId` already fixes the cycle.
127
+ *
128
+ * @throws {@link RainbowError} when the request fails.
129
+ */
130
+ getOfferQuotation: (offerId: string, maxNumberUsers: number) => Promise<SubscriptionQuotation>;
131
+ /**
132
+ * The company's trial as the interface needs to talk about it: end date, days left, whether it
133
+ * is over, whether an upsell is still worth showing.
134
+ *
135
+ * The single answer to "should this screen show the trial banner?" — read
136
+ * {@link TrialStatus.shouldPromptUpsell} rather than re-combining the trial, the paid
137
+ * subscriptions and the user's flags, which is how the several banners drift apart.
138
+ *
139
+ * Synchronous: read off the in-memory subscription cache, which `start()` fills before any
140
+ * screen runs and every change refreshes in place.
141
+ *
142
+ * @param groupName - Case-insensitive group filter (e.g. `"webinar"`); all trials when omitted.
143
+ * @returns `undefined` when the user is on no trial offer, or the company runs no trial
144
+ * carrying an end date.
145
+ */
146
+ getTrialStatus: (groupName?: string) => TrialStatus | undefined;
147
+ /**
148
+ * Every trial the banner has to talk about: one status per product among the running trials,
149
+ * soonest to end first. A company running a Webinar and a Collaboration trial gets both, which
150
+ * is what lets the banner name each product with its own day count.
151
+ *
152
+ * When no trial is running, the last one to have ended alone, as {@link getTrialStatus} would
153
+ * answer — there is only one "your trial has ended" to say.
154
+ *
155
+ * @returns An empty array when the user is on no trial offer, or the company runs no trial
156
+ * carrying an end date.
157
+ */
158
+ getTrialStatuses: () => TrialStatus[];
159
+ /**
160
+ * Where the account stands commercially — see {@link CommercialState}.
161
+ *
162
+ * The one place to ask "may we sell to this user, and is there anything left to sell?". Do not
163
+ * rebuild it from the trial roles: those survive the trial's end and a purchase.
164
+ */
165
+ getCommercialState: () => CommercialState;
166
+ /**
167
+ * Whether the company runs at least one live subscription in `groupName` — asked of the
168
+ * subscriptions, not of the login payload: {@link Contact.isWebinarTrial} /
169
+ * {@link Contact.isCollaborationTrial} are rebuilt from roles read at login, so an offer
170
+ * subscribed since leaves them false and one that ended leaves them true.
171
+ *
172
+ * Unlike a paid-only check, freemium trials **count** here — a trial grants the product,
173
+ * which is its point. A running one sits at `status: "trial"`, so this reads
174
+ * {@link ACCESS_STATUSES}, not the paid-only list; a spent trial keeps that status and is
175
+ * ruled out by its date.
176
+ *
177
+ * Excludes the default base tier (held by every company) and `terminated` / `terminating`.
178
+ *
179
+ * @param groupName - Matched case-insensitively (e.g. `"collaboration"`, `"webinar"`).
180
+ */
181
+ hasLiveSubscriptionOfGroup: (groupName: string) => boolean;
182
+ /**
183
+ * The live **paid** subscriptions the company runs in `groupName` — what it bought, not what
184
+ * it was granted. The paid-only counterpart of {@link hasLiveSubscriptionOfGroup}: a freemium
185
+ * trial grants the product but is precisely what a purchase upgrades, so it is excluded here,
186
+ * as are the default base tier (held by every company) and the never-sold Beta offer.
187
+ *
188
+ * Reads {@link LIVE_STATUSES}, not {@link ACCESS_STATUSES}: a running trial sits at
189
+ * `status: "trial"`, absent from the paid list, and a spent one is ruled out by its date.
190
+ *
191
+ * Returns the subscriptions rather than a boolean so a caller can also tell *which* plans are
192
+ * held — the offer sizes, for instance, which a yes/no answer cannot give. Emptiness is the
193
+ * boolean: no live paid subscription in that group.
194
+ *
195
+ * Synchronous: read off the in-memory subscription cache, which `start()` fills before any
196
+ * screen runs and every change refreshes in place.
197
+ *
198
+ * @param groupName - Matched case-insensitively (e.g. `"webinar"`, `"collaboration"`).
199
+ */
200
+ getLivePaidSubscriptionsOfGroup: (groupName: string) => CompanySubscription[];
201
+ /**
202
+ * The group the company holds **only** a running trial of, when that trial is the single thing
203
+ * it runs at all — `undefined` in every other case.
204
+ *
205
+ * Answers "is this account here on the strength of one free trial, and nothing else?", which is
206
+ * what an offer catalog reads to decide which family to open on: a company trialling one
207
+ * product and owning nothing wants that product's offers in front of it, not the first family
208
+ * of the catalog's own order.
209
+ *
210
+ * Deliberately stricter than {@link hasLiveSubscriptionOfGroup}, which answers per group and
211
+ * says nothing of what else is held. Every subscription of the company is weighed here: a
212
+ * second trial in another family, or any live paid plan, means the account is not defined by
213
+ * the one trial and this returns `undefined` rather than picking a winner.
214
+ *
215
+ * Ignores what {@link getLivePaidSubscriptionsOfGroup} ignores, and for the same reasons: the
216
+ * default base tier every company holds, and the never-sold Beta offer. A spent trial is ruled
217
+ * out by its date, not its status, which the backend leaves at `trial`.
218
+ *
219
+ * Group-agnostic: it reports whichever family the trial belongs to, so no caller has to name
220
+ * the products it expects.
221
+ *
222
+ * Synchronous, off the in-memory cache `start()` fills and every change refreshes.
223
+ *
224
+ * @returns The trial's group name as the catalog spells it (e.g. `"Webinar"`), or `undefined`.
225
+ */
226
+ getSoleTrialGroupName: () => string | undefined;
227
+ /**
228
+ * Seats the company holds and seats already taken — read this before offering to invite
229
+ * anyone, and to show any "x / y licences" figure.
230
+ *
231
+ * Sums only the subscriptions whose licences are seats
232
+ * ({@link CompanySubscription.isUserLicense}): Webinar and the other `nb_services` offers hold
233
+ * their licences against the company, not against a user, so adding them would credit the
234
+ * company with places nobody can take.
235
+ *
236
+ * A cancelled subscription still counts until its last paid day — its seats are still assigned
237
+ * and still billed. A terminated or expired one does not: its licences are released.
238
+ *
239
+ * Synchronous, off the in-memory cache `start()` fills and every change refreshes.
240
+ */
241
+ getSeatUsage: () => SeatUsage;
242
+ /**
243
+ * Purchasable offers grouped by product and variant: one {@link OfferGroup} per product family
244
+ * (e.g. "Webinar"), one {@link OfferVariant} per size (e.g. "Webinar 120") with its monthly
245
+ * and/or annual offer.
246
+ *
247
+ * A group whose trial is still available carries it in {@link OfferVariant.trial}. Trials
248
+ * already granted are filtered out upstream by {@link getPurchasableOffers}.
249
+ *
250
+ * @param groupName - Case-insensitive filter on the group name.
251
+ */
252
+ getPurchasableOfferGroups: (groupName?: string) => Promise<OfferGroup[]>;
253
+ }
254
+ declare const SubscriptionServiceRB_base: object & (abstract new (...args: any[]) => import("../../services/service").EventsMixinTemplate<ISubscriptionServiceEvents>);
255
+ /** @internal */
256
+ export declare class SubscriptionServiceRB extends SubscriptionServiceRB_base implements SubscriptionService {
257
+ /**
258
+ * Statuses of a running *paid* subscription — "has this company bought anything?". Excludes
259
+ * `terminated` (licences released) and `terminating` (cancellation requested — the offer must
260
+ * stay re-purchasable). A trial carries none of them; it sits at `trial`. To ask whether the
261
+ * company *holds* the product rather than paid for it, read {@link ACCESS_STATUSES}.
262
+ */
263
+ private static readonly LIVE_STATUSES;
264
+ /**
265
+ * Statuses under which the company holds the product — {@link LIVE_STATUSES} plus `trial`,
266
+ * a trial granting it exactly as a purchase does.
267
+ * Says nothing of the trial's end: a spent trial stays at `status: "trial"`, so the date ends
268
+ * it, not the status. Pair with {@link CompanySubscription.isExpired}.
269
+ */
270
+ private static readonly ACCESS_STATUSES;
271
+ private readonly loggerService;
272
+ private readonly errorHelperService;
273
+ private readonly xmppService;
274
+ private xmppHandler;
275
+ private pendingSubscriptionResolvers;
276
+ private companySubscriptions;
277
+ static getInstance(): SubscriptionServiceRB;
278
+ static build(): SubscriptionServiceRB;
279
+ private constructor();
280
+ start(): Promise<void>;
281
+ reconnect(): Promise<void>;
282
+ stop(): void;
283
+ /**
284
+ * Refetch then announce — the subscriptions, and the company features they unlock. Both are
285
+ * awaited before the event so a listener reading either back is served the new state, and the
286
+ * cache is never left empty in between: `getCompanySubscriptions` only overwrites it once the
287
+ * response is in.
288
+ */
289
+ private onSubscriptionsChanged;
290
+ private registerXmppHandler;
291
+ private removeXmppHandler;
292
+ private onManagementMessage;
293
+ private waitForXmppConfirmation;
294
+ getOffers(): Promise<SubscriptionOffer[]>;
295
+ subscribeToOffer(offer: SubscriptionOffer, purchaseOptions?: PurchaseOptions, companyName?: string): Promise<SubscriptionPurchaseOrder | undefined>;
296
+ /**
297
+ * Re-reads the user's own company in place on the connected contact, after any subscription.
298
+ *
299
+ * Nothing else pushes the company back: the user payload carries only `companyId` and
300
+ * `companyName`, and the company is otherwise re-read on reconnection alone. Yet a
301
+ * subscription changes it — a first purchase stamps its business model as direct-sell (see
302
+ * {@link purchaseFirstSubscription}), a trial stamps `freemiumTypes`, which
303
+ * {@link Company.trialTypes} reads and the launch pad gates on.
304
+ *
305
+ * Done for every purchase, the caller having no way to tell which fields the backend touched.
306
+ * Failure is swallowed: the purchase went through, and the refresh can be retried on its own.
307
+ */
308
+ private refreshOwnCompany;
309
+ /**
310
+ * Re-reads the company features, which live on their own endpoint and are otherwise loaded at
311
+ * login alone — yet a subscription is precisely what turns one on, `webinarAccess` for a
312
+ * webinar offer, which {@link ConnectedUserRB.companyHasWebinarAccess} reads.
313
+ *
314
+ * Hung off the subscription change rather than off the purchase, so an offer bought from
315
+ * another tab or granted by an administrator lands here too.
316
+ *
317
+ * Failure is swallowed: the previous features are kept rather than cleared, so nothing the
318
+ * company holds is withdrawn from the interface over a failed refresh.
319
+ */
320
+ private refreshOwnCompanyFeatures;
321
+ /**
322
+ * Freemium path: creates the company on the fly, waits for the XMPP provisioning
323
+ * confirmation, then optimistically applies the unlocked roles.
324
+ *
325
+ * @param companyName - When omitted, a recognizable placeholder is sent and the caller is
326
+ * expected to rename the company afterwards, as the onboarding wizard does.
327
+ */
328
+ private subscribeFreemium;
329
+ /**
330
+ * Reads the authenticated user's company id from the current session.
331
+ * Mirrors how {@link subscribeToOffer} reads the user id — the caller is already logged in.
332
+ */
333
+ private getCompanyId;
334
+ /**
335
+ * The connected user, non-optional: `CONTACT_SVC` starts `sync: true, blocking: true` ahead of
336
+ * this service in the launch config, so nothing here runs before it is set. Throws rather than
337
+ * answering a hollow object, which would read as "no company, no trial, not an admin" and
338
+ * silently deny what the user owns.
339
+ */
340
+ private userContact;
341
+ getCompanySubscriptions(forceRefresh?: boolean): Promise<CompanySubscription[]>;
342
+ getCompanySubscription(subscriptionId: string): Promise<CompanySubscription | undefined>;
343
+ /** `PUT .../companies/:companyId/subscriptions/:subscriptionId` — see the interface. */
344
+ updateSubscription(subscriptionId: string, patch: UpdateSubscriptionPatch): Promise<CompanySubscription>;
345
+ /**
346
+ * The cycle is not carried by the id, hence the lookup first — served from the warm cache when
347
+ * a subscription list is what triggered this. See the interface.
348
+ */
349
+ cancelSubscription(subscriptionId: string): Promise<void>;
350
+ /** See the interface. */
351
+ restoreSubscription(subscriptionId: string): Promise<void>;
352
+ /**
353
+ * Finds a subscription by id, for a caller given only the id. Cache first — a screen
354
+ * cancelling a subscription has just listed them — then the single-subscription endpoint.
355
+ *
356
+ * Answers `undefined` rather than throwing: callers use this to pick a branch, and a failed
357
+ * lookup should leave them on their default one, not abort them.
358
+ */
359
+ private resolveSubscription;
360
+ /**
361
+ * `POST .../companies/:companyId/quotations` — read-only pricing, see the interface.
362
+ */
363
+ getSubscriptionQuotation(subscriptionId: string, options: SubscriptionQuotationOptions): Promise<SubscriptionQuotation>;
364
+ /**
365
+ * `POST .../companies/:companyId/quotations` — read-only pricing, see the interface.
366
+ */
367
+ getOfferQuotation(offerId: string, maxNumberUsers: number): Promise<SubscriptionQuotation>;
368
+ /** Shared POST + error handling for both quotation entry points. */
369
+ private postQuotation;
370
+ /**
371
+ * Keeps only the keys actually set in the patch — the backend treats an absent key
372
+ * as "leave unchanged", so sending `undefined` values would be a behaviour change.
373
+ */
374
+ private buildUpdateBody;
375
+ /** The trial an upsell should talk about, picked from an already-read list. */
376
+ private pickTrial;
377
+ /**
378
+ * The trial to talk about among already-filtered ones.
379
+ *
380
+ * A trial keeps `status: "trial"` past its end date until the backend terminates it, so an
381
+ * expired one can sit next to a running one. Running ones answer first, soonest to end — the
382
+ * one about to run out, and the one an upsell should talk about. When all are expired, the
383
+ * last to have ended is the one the company just lost.
384
+ */
385
+ private static pickAmong;
386
+ getTrialStatus(groupName?: string): TrialStatus | undefined;
387
+ getTrialStatuses(): TrialStatus[];
388
+ getCommercialState(): CommercialState;
389
+ /**
390
+ * The two populations who may buy: the company administrator, for the company, and the
391
+ * standalone user of the default company, for themselves.
392
+ *
393
+ * `isCompanyAdmin`, not `isAdmin`: site, organization and support admins carry the ADMIN role
394
+ * without being the ones who sign. Guests are excluded first — they land in the default
395
+ * company holding no admin role, so they would pass as standalone buyers. Platform-wide roles
396
+ * administer other people's companies and are never sold to.
397
+ */
398
+ private mayBuyOffers;
399
+ /**
400
+ * The catalog offers the company can still purchase. An offer is excluded when:
401
+ * - `groupName` is given and the offer's does not match (case-insensitive);
402
+ * - it is freemium **and** the company already holds any subscription for that group, in any
403
+ * status. A trial is granted once, and a paid plan is never offered the free tier of what it
404
+ * already bought.
405
+ *
406
+ * Not on the public interface: callers want {@link getPurchasableOfferGroups}, which is what
407
+ * the offer cards render. Kept public for that method and its tests.
408
+ *
409
+ * @param groupName - Group filter (e.g. `"webinar"`, `"collaboration"`).
410
+ */
411
+ getPurchasableOffers(groupName?: string): Promise<SubscriptionOffer[]>;
412
+ /**
413
+ * The company's own subscriptions, read straight off the cache — `start()` fills it before any
414
+ * screen runs and every change refreshes it in place, so there is nothing to await.
415
+ *
416
+ * A default-company user owns nothing: the shared company's lines are not theirs.
417
+ */
418
+ private ownCompanySubscriptions;
419
+ getPurchasableOfferGroups(groupName?: string): Promise<OfferGroup[]>;
420
+ hasLiveSubscriptionOfGroup(groupName: string): boolean;
421
+ getLivePaidSubscriptionsOfGroup(groupName: string): CompanySubscription[];
422
+ getSoleTrialGroupName(): string | undefined;
423
+ getSeatUsage(): SeatUsage;
424
+ /**
425
+ * Whether the company actually bought something that is running right now.
426
+ *
427
+ * Drives the upsell surfaces — the boot offer catalog and the trial banner — so everything
428
+ * that is not a purchase has to be excluded, or a company holding none is told it already paid
429
+ * and never sees an offer again:
430
+ * - `isDefault` — the Essential base tier, granted to everyone.
431
+ * - `isFreemium` — the trials, which are precisely what the paid catalog upgrades.
432
+ * - `isInternal` — the Beta offer. Granted for feature testing, never sold, and it is
433
+ * `nb_users` with a licence of its own, so nothing but its reference tells it apart from a
434
+ * purchase. See {@link CompanySubscription.isInternal}.
435
+ */
436
+ private static holdsLivePaid;
437
+ /**
438
+ * Lower-cased `offerReference` of every offer the company runs a live subscription to.
439
+ *
440
+ * "Live" excludes `terminated` (licences released, the offer is buyable again) and
441
+ * `terminating` (cancellation requested — the customer must be able to re-subscribe). The
442
+ * default base tier and the freemium trials are excluded too: not purchases, and a trial is
443
+ * precisely what the paid catalog upgrades.
444
+ */
445
+ private getOwnedOfferReferences;
446
+ /**
447
+ * Folds the group's free trial into the paid variant it gives away — the cheapest — and orders
448
+ * the cards cheapest first.
449
+ *
450
+ * The trial is that cheapest paid offer free for a month, not a product of its own: as a card
451
+ * of its own beside it, the two read as competing plans. It becomes a property of that card,
452
+ * which the call to action then sells as a trial or as a purchase.
453
+ *
454
+ * Runs after the variants are built, not during the slotting: the prices it ranks on are only
455
+ * known once `monthly`/`annual` are in.
456
+ */
457
+ private mergeTrialIntoCheapest;
458
+ /** Cheapest first, so the trial-bearing card leads and the row reads up in price. */
459
+ private sortByPrice;
460
+ /**
461
+ * What a seat of `variant` costs per month, whichever cycle it sells in — the only basis on
462
+ * which variants priced in different cycles compare.
463
+ *
464
+ * Mirrors the offer card's `currentPrice`, so the ranking matches the prices on screen. A
465
+ * variant sold in both cycles ranks on its cheaper one (in practice the annual, ~20% off):
466
+ * which one the card shows follows the billing switch, and "cheapest" must not move when the
467
+ * user flips it.
468
+ *
469
+ * A missing price ranks last, never at zero — it would otherwise win the cheapest race and
470
+ * take the trial with it.
471
+ */
472
+ private monthlyEquivalentPrice;
473
+ /**
474
+ * Whether `offer` is already owned. Matches on the exact `offerReference`, so the
475
+ * monthly and annual variants of one product (`RB-Collab` vs `RB-Collab-1Y`) are
476
+ * independent — owning one leaves the other purchasable.
477
+ */
478
+ private isOfferOwned;
479
+ /**
480
+ * Paid purchase. Two backend flows, chosen through `paymentMethodId`:
481
+ * - **First purchase** (set): `POST .../subscriptions/purchase` — atomically converts the
482
+ * company to direct-sell, creates the Zuora account from the payment method, and creates
483
+ * the subscription.
484
+ * - **Account exists** (absent): `POST .../subscriptions` — adds the subscription to it.
485
+ *
486
+ * Amounts are computed client-side, the endpoints returning the subscription rather than a
487
+ * priced order; `orderId` is the real subscription id from the backend.
488
+ */
489
+ private purchasePaid;
490
+ /** First purchase: creates the Zuora account from the payment method and the subscription in one call. */
491
+ private purchaseFirstSubscription;
492
+ /** Subscribe on an existing Zuora account: only the subscription is created. */
493
+ private subscribeToExistingAccount;
494
+ /** Shared POST + error handling for the two subscription-creation endpoints. */
495
+ private postSubscription;
496
+ /**
497
+ * Optimistically pushes the matching freemium UserRole onto the in-memory user
498
+ * contact so the UI reflects unlocked features immediately after subscribing.
499
+ *
500
+ * ⚠️ TECH DEBT — patch, do not extend. Duplicates the role mapping already done
501
+ * during Contact hydration (contact.model.ts, `freemiumTypes` → UserRole). It
502
+ * exists only because the BE did not reliably return `freemiumTypes` right after
503
+ * a subscription. It derives the role from `hasWebinar` (NOT `freemiumTypes`) and
504
+ * does NOT handle the "webinar + collaboration" case. Remove once the BE returns
505
+ * correct subscription data and the contact refresh repopulates roles.
506
+ */
507
+ private applySubscriptionRoles;
508
+ }
509
+ export {};
510
+ //# sourceMappingURL=subscription.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"subscription.service.d.ts","sourceRoot":"","sources":["../../../src/services/subscription/subscription.service.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,2 @@
1
+ export * from "./support.service";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/services/support/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC"}
@@ -0,0 +1,143 @@
1
+ /**
2
+ * @module Support
3
+ */
4
+ /**
5
+ * Lifecycle status of a support ticket.
6
+ *
7
+ * Mirrors the statuses exposed by the support backend. Any unknown value coming
8
+ * from the backend is normalized to `open` server-side, so this union is closed.
9
+ */
10
+ export type SupportTicketStatus = "new" | "open" | "pending" | "hold" | "solved" | "closed";
11
+ /** A file attached to a ticket comment. */
12
+ export interface SupportAttachment {
13
+ /** Attachment id — feed to `downloadAttachment`. */
14
+ readonly id: string;
15
+ readonly fileName: string;
16
+ /** MIME type reported by the backend (e.g. `"image/png"`). */
17
+ readonly contentType: string;
18
+ readonly sizeBytes: number;
19
+ }
20
+ /**
21
+ * A ticket as listed by `getMyTickets` / `getCompanyTickets`.
22
+ *
23
+ * Only public information is exposed: the backend filters its own payload before
24
+ * returning it, so no internal identifier ever reaches the client.
25
+ */
26
+ export interface SupportTicket {
27
+ readonly id: number;
28
+ readonly subject: string;
29
+ readonly status: SupportTicketStatus;
30
+ /** ISO 8601 creation date. */
31
+ readonly createdAt: string;
32
+ /** ISO 8601 date of the last update. */
33
+ readonly updatedAt: string;
34
+ /** Display name of the person who opened the ticket. */
35
+ readonly requesterName: string;
36
+ /**
37
+ * Email of the requester, only present when the caller is entitled to it:
38
+ * their own ticket, or a role covering the owning company.
39
+ */
40
+ readonly requesterEmail?: string;
41
+ /**
42
+ * Rainbow userId of the requester, when their support account carries one.
43
+ *
44
+ * The key to join a ticket back to a Rainbow user: unlike `requesterEmail` it is not
45
+ * gated on the caller's entitlements, and unlike `requesterName` it survives a rename.
46
+ */
47
+ readonly requesterRainbowId?: string;
48
+ /**
49
+ * Display name of the admin who filed the ticket on the requester's behalf.
50
+ *
51
+ * Absent on a ticket a user filed for themselves, which is the common case.
52
+ */
53
+ readonly createdByName?: string;
54
+ /** Rainbow userId of that admin, when the ticket was filed on behalf of someone. */
55
+ readonly createdByRainbowId?: string;
56
+ readonly tags: readonly string[];
57
+ /** `true` when the authenticated caller is the requester of this ticket. */
58
+ readonly isOwnTicket: boolean;
59
+ }
60
+ /**
61
+ * A comment on a ticket.
62
+ *
63
+ * Non-public comments are dropped by the backend, and `htmlBody` is sanitized
64
+ * server-side before being returned.
65
+ */
66
+ export interface SupportComment {
67
+ readonly id: number;
68
+ /** Display name of the comment author. */
69
+ readonly authorName: string;
70
+ /**
71
+ * Rainbow userId of the author, when their support account carries one.
72
+ *
73
+ * Absent for support agents, who have no Rainbow account.
74
+ */
75
+ readonly authorRainbowId?: string;
76
+ /** Sanitized HTML body. */
77
+ readonly htmlBody: string;
78
+ readonly public: boolean;
79
+ /** ISO 8601 creation date. */
80
+ readonly createdAt: string;
81
+ readonly attachments: readonly SupportAttachment[];
82
+ }
83
+ /** A ticket with its description and full comment thread, as returned by `getTicket`. */
84
+ export interface SupportTicketDetail extends SupportTicket {
85
+ readonly description: string;
86
+ readonly comments: readonly SupportComment[];
87
+ /**
88
+ * Display name of the support agent handling the ticket, when one is assigned.
89
+ *
90
+ * Resolved backend-side — the client never sees the underlying support-tool identifier.
91
+ */
92
+ readonly assigneeName?: string;
93
+ }
94
+ /** A Help Center article matching a knowledge base search. */
95
+ export interface HelpCenterArticle {
96
+ readonly id: number;
97
+ readonly title: string;
98
+ /** Public URL of the article. */
99
+ readonly url: string;
100
+ /** Short excerpt highlighting the match. */
101
+ readonly snippet: string;
102
+ }
103
+ /** Technical context attached to a new ticket. */
104
+ export interface SupportDeviceInfo {
105
+ readonly application?: string;
106
+ readonly browser?: string;
107
+ readonly hardware?: string;
108
+ readonly os?: string;
109
+ readonly version?: string;
110
+ }
111
+ /**
112
+ * Payload of `createTicket`.
113
+ *
114
+ * The requester defaults to the authenticated user and cannot be set freely — the
115
+ * only way to file for someone else is `onBehalfOfRainbowUserId`, which the backend
116
+ * accepts from a company admin and rejects from anyone else.
117
+ */
118
+ export interface CreateTicketPayload {
119
+ readonly subject: string;
120
+ readonly description: string;
121
+ readonly tags?: readonly string[];
122
+ /** When the problem happened, as entered by the user. */
123
+ readonly occurrenceDate?: string;
124
+ readonly deviceInfo?: SupportDeviceInfo;
125
+ /** Tokens returned by `uploadAttachment`. */
126
+ readonly attachmentTokens?: readonly string[];
127
+ /** Reference to a related internal ticket, when the ticket is an escalation. */
128
+ readonly internalTicketId?: string;
129
+ /**
130
+ * Rainbow userId of the user this ticket is filed for, when an admin files it
131
+ * on their behalf. Omit for the ordinary case of a user filing their own ticket.
132
+ *
133
+ * That user becomes the requester — the ticket lands in their own list and they
134
+ * can follow it, comment on it and attach files. The caller is added as a CC, so
135
+ * both sides see the thread.
136
+ *
137
+ * The backend enforces who may use this: the caller must be a company admin and
138
+ * the target must belong to their company, otherwise the call is rejected. The
139
+ * client-side gate is a convenience, never the guarantee.
140
+ */
141
+ readonly onBehalfOfRainbowUserId?: string;
142
+ }
143
+ //# sourceMappingURL=support.model.d.ts.map