@rocket.chat/core-typings 6.13.1 → 8.3.0-rc.1

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 (366) hide show
  1. package/dist/Abac.d.ts +7 -0
  2. package/dist/Abac.js +14 -0
  3. package/dist/Abac.js.map +1 -0
  4. package/dist/Ajv.d.ts +23 -0
  5. package/dist/Ajv.js +9748 -0
  6. package/dist/Ajv.js.map +1 -0
  7. package/dist/Apps.d.ts +133 -13
  8. package/dist/Apps.js.map +1 -1
  9. package/dist/IAbacAttribute.d.ts +14 -0
  10. package/dist/IAbacAttribute.js +3 -0
  11. package/dist/IAbacAttribute.js.map +1 -0
  12. package/dist/{IAnalytic.d.ts → IAnalytics.d.ts} +3 -9
  13. package/dist/{IBaseData.js → IAnalytics.js} +1 -1
  14. package/dist/IAnalytics.js.map +1 -0
  15. package/dist/IAvatar.d.ts +2 -1
  16. package/dist/IBanner.d.ts +27 -20
  17. package/dist/IBanner.js +59 -1
  18. package/dist/IBanner.js.map +1 -1
  19. package/dist/ICalendarEvent.d.ts +6 -2
  20. package/dist/ICallHistoryItem.d.ts +42 -0
  21. package/dist/ICallHistoryItem.js +3 -0
  22. package/dist/ICallHistoryItem.js.map +1 -0
  23. package/dist/IEmojiCustom.d.ts +1 -0
  24. package/dist/IInquiry.d.ts +2 -0
  25. package/dist/IInquiry.js +8 -1
  26. package/dist/IInquiry.js.map +1 -1
  27. package/dist/IIntegration.d.ts +1 -1
  28. package/dist/IIntegrationHistory.d.ts +4 -0
  29. package/dist/ILivechatAgent.d.ts +11 -0
  30. package/dist/ILivechatContact.d.ts +32 -8
  31. package/dist/ILivechatDepartment.d.ts +3 -0
  32. package/dist/ILivechatPriority.d.ts +0 -1
  33. package/dist/ILivechatTag.d.ts +6 -0
  34. package/dist/ILivechatTrigger.d.ts +0 -3
  35. package/dist/ILivechatTrigger.js +1 -5
  36. package/dist/ILivechatTrigger.js.map +1 -1
  37. package/dist/ILivechatVisitor.d.ts +6 -12
  38. package/dist/ILivechatVisitor.js.map +1 -1
  39. package/dist/{ILogs.d.ts → ILogItem.d.ts} +7 -7
  40. package/dist/{IAnalytic.js → ILogItem.js} +1 -1
  41. package/dist/ILogItem.js.map +1 -0
  42. package/dist/ILoginServiceConfiguration.d.ts +2 -0
  43. package/dist/IMessage/IMessage.d.ts +48 -58
  44. package/dist/IMessage/IMessage.js +24 -29
  45. package/dist/IMessage/IMessage.js.map +1 -1
  46. package/dist/IMessage/MessageAttachment/Files/FileAttachmentProps.d.ts +6 -8
  47. package/dist/IMessage/MessageAttachment/Files/FileAttachmentProps.js.map +1 -1
  48. package/dist/IMessage/MessageAttachment/Files/FileProp.d.ts +1 -0
  49. package/dist/IMessage/MessageAttachment/Files/ImageAttachmentProps.d.ts +4 -2
  50. package/dist/IMessage/MessageAttachment/Files/ImageAttachmentProps.js.map +1 -1
  51. package/dist/IMessage/MessageAttachment/Files/RemovedFileAttachmentProps.d.ts +7 -0
  52. package/dist/IMessage/MessageAttachment/Files/RemovedFileAttachmentProps.js +6 -0
  53. package/dist/IMessage/MessageAttachment/Files/RemovedFileAttachmentProps.js.map +1 -0
  54. package/dist/IMessage/MessageAttachment/Files/index.d.ts +2 -3
  55. package/dist/IMessage/MessageAttachment/Files/index.js +1 -3
  56. package/dist/IMessage/MessageAttachment/Files/index.js.map +1 -1
  57. package/dist/IMessage/MessageAttachment/MessageAttachment.d.ts +2 -1
  58. package/dist/IMessage/MessageAttachment/MessageAttachmentAction.js +0 -1
  59. package/dist/IMessage/MessageAttachment/MessageAttachmentAction.js.map +1 -1
  60. package/dist/IMessage/MessageAttachment/MessageAttachmentBase.d.ts +4 -0
  61. package/dist/IMessage/MessageAttachment/MessageAttachmentBase.js +5 -0
  62. package/dist/IMessage/MessageAttachment/MessageAttachmentBase.js.map +1 -1
  63. package/dist/IMessage/MessageAttachment/MessageAttachmentDefault.d.ts +9 -4
  64. package/dist/IMessage/MessageAttachment/TranslatedMessageAttachment.d.ts +2 -1
  65. package/dist/IMessage/MessageAttachment/index.d.ts +2 -3
  66. package/dist/IMessage/MessageAttachment/index.js +0 -3
  67. package/dist/IMessage/MessageAttachment/index.js.map +1 -1
  68. package/dist/IMethodConnection.d.ts +7 -0
  69. package/dist/IMethodConnection.js +3 -0
  70. package/dist/IMethodConnection.js.map +1 -0
  71. package/dist/IModerationReport.d.ts +11 -12
  72. package/dist/INotification.d.ts +4 -0
  73. package/dist/IOAuthApps.d.ts +1 -1
  74. package/dist/IOembed.d.ts +4 -2
  75. package/dist/IOembed.js +1 -3
  76. package/dist/IOembed.js.map +1 -1
  77. package/dist/IOmnichannelBusinessUnit.d.ts +17 -0
  78. package/dist/IPermission.d.ts +2 -2
  79. package/dist/IPushToken.d.ts +5 -2
  80. package/dist/IReadReceipt.d.ts +18 -0
  81. package/dist/{AppRequests.js → IReadReceipt.js} +1 -1
  82. package/dist/IReadReceipt.js.map +1 -0
  83. package/dist/IRocketChatAssets.d.ts +4 -5
  84. package/dist/IRoom.d.ts +55 -49
  85. package/dist/IRoom.js +11 -21
  86. package/dist/IRoom.js.map +1 -1
  87. package/dist/IServerEvent.d.ts +54 -1
  88. package/dist/IServerEvent.js.map +1 -1
  89. package/dist/ISetting.d.ts +23 -29
  90. package/dist/ISetting.js +3 -5
  91. package/dist/ISetting.js.map +1 -1
  92. package/dist/IStats.d.ts +41 -3
  93. package/dist/ISubscription.d.ts +21 -7
  94. package/dist/ISubscription.js +9 -0
  95. package/dist/ISubscription.js.map +1 -1
  96. package/dist/ITeam.d.ts +2 -2
  97. package/dist/ITeam.js +6 -6
  98. package/dist/ITeam.js.map +1 -1
  99. package/dist/IUpload.d.ts +15 -12
  100. package/dist/IUpload.js.map +1 -1
  101. package/dist/IUser.d.ts +62 -37
  102. package/dist/IUser.js +9 -6
  103. package/dist/IUser.js.map +1 -1
  104. package/dist/IUserDataFile.d.ts +2 -1
  105. package/dist/IVideoConference.d.ts +45 -4
  106. package/dist/IVideoConference.js.map +1 -1
  107. package/dist/IWebdavAccount.d.ts +2 -2
  108. package/dist/IWorkspaceInfo.d.ts +2 -2
  109. package/dist/{ICustomOAuthConfig.d.ts → OauthConfig.d.ts} +2 -0
  110. package/dist/{AppOverview.js → OauthConfig.js} +1 -1
  111. package/dist/OauthConfig.js.map +1 -0
  112. package/dist/{IOmnichannel.d.ts → OmnichannelSortingMechanismSettingType.d.ts} +0 -6
  113. package/dist/{IOmnichannel.js → OmnichannelSortingMechanismSettingType.js} +1 -1
  114. package/dist/OmnichannelSortingMechanismSettingType.js.map +1 -0
  115. package/dist/RoomType.d.ts +1 -1
  116. package/dist/ServerAudit/IAuditServerAbacAction.d.ts +88 -0
  117. package/dist/ServerAudit/IAuditServerAbacAction.js +3 -0
  118. package/dist/ServerAudit/IAuditServerAbacAction.js.map +1 -0
  119. package/dist/ServerAudit/IAuditServerSettingEvent.d.ts +14 -0
  120. package/dist/ServerAudit/IAuditServerSettingEvent.js +3 -0
  121. package/dist/ServerAudit/IAuditServerSettingEvent.js.map +1 -0
  122. package/dist/ServerAudit/IAuditUserChangedEvent.d.ts +19 -0
  123. package/dist/ServerAudit/IAuditUserChangedEvent.js +3 -0
  124. package/dist/ServerAudit/IAuditUserChangedEvent.js.map +1 -0
  125. package/dist/SlashCommands/index.d.ts +2 -2
  126. package/dist/SpotlightUser.d.ts +1 -1
  127. package/dist/{IAutoTranslate.d.ts → autoTranslate.d.ts} +0 -10
  128. package/dist/autoTranslate.js +3 -0
  129. package/dist/autoTranslate.js.map +1 -0
  130. package/dist/cloud/Announcement.d.ts +27 -6
  131. package/dist/cloud/Announcement.js +40 -0
  132. package/dist/cloud/Announcement.js.map +1 -1
  133. package/dist/cloud/CloudSyncAnnouncement.d.ts +9 -0
  134. package/dist/cloud/CloudSyncAnnouncement.js +3 -0
  135. package/dist/cloud/CloudSyncAnnouncement.js.map +1 -0
  136. package/dist/cloud/NpsSurveyAnnouncement.d.ts +7 -5
  137. package/dist/cloud/NpsSurveyAnnouncement.js +41 -1
  138. package/dist/cloud/NpsSurveyAnnouncement.js.map +1 -1
  139. package/dist/cloud/WorkspaceLicensePayload.d.ts +9 -8
  140. package/dist/cloud/WorkspaceLicensePayload.js +43 -1
  141. package/dist/cloud/WorkspaceLicensePayload.js.map +1 -1
  142. package/dist/cloud/WorkspaceSyncPayload.d.ts +101 -49
  143. package/dist/cloud/WorkspaceSyncPayload.js +82 -1
  144. package/dist/cloud/WorkspaceSyncPayload.js.map +1 -1
  145. package/dist/cloud/index.d.ts +5 -4
  146. package/dist/cloud/index.js +11 -0
  147. package/dist/cloud/index.js.map +1 -1
  148. package/dist/ee/IWorkspaceCredentials.d.ts +7 -0
  149. package/dist/ee/IWorkspaceCredentials.js +3 -0
  150. package/dist/ee/IWorkspaceCredentials.js.map +1 -0
  151. package/dist/federation/index.d.ts +0 -2
  152. package/dist/federation/index.js +0 -2
  153. package/dist/federation/index.js.map +1 -1
  154. package/dist/federation/v1/events.d.ts +13 -13
  155. package/dist/federation/v1/events.js.map +1 -1
  156. package/dist/federation/v1/index.d.ts +3 -3
  157. package/dist/import/IImport.d.ts +1 -0
  158. package/dist/import/IImportContact.d.ts +9 -0
  159. package/dist/import/IImportContact.js +3 -0
  160. package/dist/import/IImportContact.js.map +1 -0
  161. package/dist/import/IImportMessage.d.ts +10 -10
  162. package/dist/import/IImportProgress.d.ts +1 -1
  163. package/dist/import/IImportRecord.d.ts +7 -2
  164. package/dist/import/IImportUser.d.ts +2 -0
  165. package/dist/import/IImporterSelection.d.ts +2 -0
  166. package/dist/import/IImporterSelectionContact.d.ts +7 -0
  167. package/dist/import/IImporterSelectionContact.js +3 -0
  168. package/dist/import/IImporterSelectionContact.js.map +1 -0
  169. package/dist/import/IImporterShortSelection.d.ts +9 -0
  170. package/dist/import/IImporterShortSelection.js +3 -0
  171. package/dist/import/IImporterShortSelection.js.map +1 -0
  172. package/dist/import/ImportState.d.ts +1 -2
  173. package/dist/import/index.d.ts +13 -12
  174. package/dist/import/index.js +0 -26
  175. package/dist/import/index.js.map +1 -1
  176. package/dist/index.d.ts +90 -99
  177. package/dist/index.js +23 -110
  178. package/dist/index.js.map +1 -1
  179. package/dist/ldap/ILDAPOptions.d.ts +2 -0
  180. package/dist/ldap/index.d.ts +6 -6
  181. package/dist/ldap/index.js +0 -20
  182. package/dist/ldap/index.js.map +1 -1
  183. package/dist/license/ILicenseV3.d.ts +16 -9
  184. package/dist/license/LicenseInfo.d.ts +5 -1
  185. package/dist/license/LicenseModule.d.ts +4 -1
  186. package/dist/license/LicenseModule.js +28 -0
  187. package/dist/license/LicenseModule.js.map +1 -1
  188. package/dist/license/LicensePeriod.d.ts +4 -6
  189. package/dist/license/events.d.ts +1 -0
  190. package/dist/license/index.d.ts +10 -10
  191. package/dist/license/index.js +0 -10
  192. package/dist/license/index.js.map +1 -1
  193. package/dist/mediaCalls/IMediaCall.d.ts +51 -0
  194. package/dist/{ACDQueues.js → mediaCalls/IMediaCall.js} +1 -1
  195. package/dist/mediaCalls/IMediaCall.js.map +1 -0
  196. package/dist/mediaCalls/IMediaCallChannel.d.ts +13 -0
  197. package/dist/mediaCalls/IMediaCallChannel.js +3 -0
  198. package/dist/mediaCalls/IMediaCallChannel.js.map +1 -0
  199. package/dist/mediaCalls/IMediaCallNegotiation.d.ts +17 -0
  200. package/dist/mediaCalls/IMediaCallNegotiation.js +3 -0
  201. package/dist/mediaCalls/IMediaCallNegotiation.js.map +1 -0
  202. package/dist/mediaCalls/index.d.ts +3 -0
  203. package/dist/{ILogs.js → mediaCalls/index.js} +1 -1
  204. package/dist/mediaCalls/index.js.map +1 -0
  205. package/dist/migrations/IControl.d.ts +2 -2
  206. package/dist/omnichannel/index.d.ts +6 -5
  207. package/dist/omnichannel/index.js +1 -5
  208. package/dist/omnichannel/index.js.map +1 -1
  209. package/dist/omnichannel/outbound.d.ts +130 -0
  210. package/dist/omnichannel/outbound.js +5 -0
  211. package/dist/omnichannel/outbound.js.map +1 -0
  212. package/dist/omnichannel/sms.d.ts +5 -18
  213. package/dist/omnichannel/sms.js +0 -9
  214. package/dist/omnichannel/sms.js.map +1 -1
  215. package/dist/search/index.d.ts +2 -2
  216. package/dist/search/index.js +0 -16
  217. package/dist/search/index.js.map +1 -1
  218. package/dist/themes.d.ts +1 -1
  219. package/dist/userAction.d.ts +5 -0
  220. package/dist/{AppsTokens.js → userAction.js} +1 -1
  221. package/dist/userAction.js.map +1 -0
  222. package/dist/utils.d.ts +32 -4
  223. package/dist/utils.js +41 -0
  224. package/dist/utils.js.map +1 -1
  225. package/package.json +27 -20
  226. package/CHANGELOG.md +0 -681
  227. package/dist/ACDQueues.d.ts +0 -35
  228. package/dist/ACDQueues.js.map +0 -1
  229. package/dist/AppOverview.d.ts +0 -104
  230. package/dist/AppOverview.js.map +0 -1
  231. package/dist/AppRequests.d.ts +0 -38
  232. package/dist/AppRequests.js.map +0 -1
  233. package/dist/AppsTokens.d.ts +0 -15
  234. package/dist/AppsTokens.js.map +0 -1
  235. package/dist/FeaturedApps.d.ts +0 -6
  236. package/dist/FeaturedApps.js +0 -3
  237. package/dist/FeaturedApps.js.map +0 -1
  238. package/dist/IAnalytic.js.map +0 -1
  239. package/dist/IAutoTranslate.js +0 -3
  240. package/dist/IAutoTranslate.js.map +0 -1
  241. package/dist/IBaseData.d.ts +0 -3
  242. package/dist/IBaseData.js.map +0 -1
  243. package/dist/ICustomOAuthConfig.js +0 -3
  244. package/dist/ICustomOAuthConfig.js.map +0 -1
  245. package/dist/ILivechatMonitorRecord.d.ts +0 -9
  246. package/dist/ILivechatMonitorRecord.js +0 -3
  247. package/dist/ILivechatMonitorRecord.js.map +0 -1
  248. package/dist/ILogs.js.map +0 -1
  249. package/dist/IMessage/MessageAttachment/FieldProps.d.ts +0 -5
  250. package/dist/IMessage/MessageAttachment/FieldProps.js +0 -3
  251. package/dist/IMessage/MessageAttachment/FieldProps.js.map +0 -1
  252. package/dist/IMessage/MessageAttachment/Files/Dimensions.d.ts +0 -4
  253. package/dist/IMessage/MessageAttachment/Files/Dimensions.js +0 -3
  254. package/dist/IMessage/MessageAttachment/Files/Dimensions.js.map +0 -1
  255. package/dist/IMessage/MessageAttachment/Files/PDFAttachmentProps.d.ts +0 -5
  256. package/dist/IMessage/MessageAttachment/Files/PDFAttachmentProps.js +0 -3
  257. package/dist/IMessage/MessageAttachment/Files/PDFAttachmentProps.js.map +0 -1
  258. package/dist/IMethodThisType.d.ts +0 -15
  259. package/dist/IMethodThisType.js +0 -3
  260. package/dist/IMethodThisType.js.map +0 -1
  261. package/dist/IMethodType.d.ts +0 -4
  262. package/dist/IMethodType.js +0 -3
  263. package/dist/IMethodType.js.map +0 -1
  264. package/dist/IOmnichannel.js.map +0 -1
  265. package/dist/IOmnichannelVoipServiceResult.d.ts +0 -10
  266. package/dist/IOmnichannelVoipServiceResult.js +0 -3
  267. package/dist/IOmnichannelVoipServiceResult.js.map +0 -1
  268. package/dist/IPbxEvent.d.ts +0 -12
  269. package/dist/IPbxEvent.js +0 -3
  270. package/dist/IPbxEvent.js.map +0 -1
  271. package/dist/IUserAction.d.ts +0 -11
  272. package/dist/IUserAction.js +0 -3
  273. package/dist/IUserAction.js.map +0 -1
  274. package/dist/IVoipConnectorResult.d.ts +0 -6
  275. package/dist/IVoipConnectorResult.js +0 -3
  276. package/dist/IVoipConnectorResult.js.map +0 -1
  277. package/dist/IVoipExtension.d.ts +0 -38
  278. package/dist/IVoipExtension.js +0 -22
  279. package/dist/IVoipExtension.js.map +0 -1
  280. package/dist/IVoipServerConfig.d.ts +0 -24
  281. package/dist/IVoipServerConfig.js +0 -11
  282. package/dist/IVoipServerConfig.js.map +0 -1
  283. package/dist/IVoipServerConnectivityStatus.d.ts +0 -4
  284. package/dist/IVoipServerConnectivityStatus.js +0 -3
  285. package/dist/IVoipServerConnectivityStatus.js.map +0 -1
  286. package/dist/MarketplaceRest.d.ts +0 -15
  287. package/dist/MarketplaceRest.js +0 -3
  288. package/dist/MarketplaceRest.js.map +0 -1
  289. package/dist/ReadReceipt.d.ts +0 -12
  290. package/dist/ReadReceipt.js +0 -3
  291. package/dist/ReadReceipt.js.map +0 -1
  292. package/dist/Serialized.d.ts +0 -14
  293. package/dist/Serialized.js +0 -4
  294. package/dist/Serialized.js.map +0 -1
  295. package/dist/VideoConferenceOptions.d.ts +0 -4
  296. package/dist/VideoConferenceOptions.js +0 -3
  297. package/dist/VideoConferenceOptions.js.map +0 -1
  298. package/dist/federation/IMatrixBridgedRoom.d.ts +0 -5
  299. package/dist/federation/IMatrixBridgedRoom.js +0 -3
  300. package/dist/federation/IMatrixBridgedRoom.js.map +0 -1
  301. package/dist/federation/IMatrixBridgedUser.d.ts +0 -7
  302. package/dist/federation/IMatrixBridgedUser.js +0 -3
  303. package/dist/federation/IMatrixBridgedUser.js.map +0 -1
  304. package/dist/import/IImportFileData.d.ts +0 -7
  305. package/dist/import/IImportFileData.js +0 -3
  306. package/dist/import/IImportFileData.js.map +0 -1
  307. package/dist/import/IImporterInfo.d.ts +0 -4
  308. package/dist/import/IImporterInfo.js +0 -3
  309. package/dist/import/IImporterInfo.js.map +0 -1
  310. package/dist/voip/CallStates.d.ts +0 -5
  311. package/dist/voip/CallStates.js +0 -7
  312. package/dist/voip/CallStates.js.map +0 -1
  313. package/dist/voip/ConnectionState.d.ts +0 -5
  314. package/dist/voip/ConnectionState.js +0 -7
  315. package/dist/voip/ConnectionState.js.map +0 -1
  316. package/dist/voip/ICallDetails.d.ts +0 -6
  317. package/dist/voip/ICallDetails.js +0 -3
  318. package/dist/voip/ICallDetails.js.map +0 -1
  319. package/dist/voip/ICallerInfo.d.ts +0 -5
  320. package/dist/voip/ICallerInfo.js +0 -3
  321. package/dist/voip/ICallerInfo.js.map +0 -1
  322. package/dist/voip/IConnectionDelegate.d.ts +0 -20
  323. package/dist/voip/IConnectionDelegate.js +0 -3
  324. package/dist/voip/IConnectionDelegate.js.map +0 -1
  325. package/dist/voip/IEvents.d.ts +0 -113
  326. package/dist/voip/IEvents.js +0 -26
  327. package/dist/voip/IEvents.js.map +0 -1
  328. package/dist/voip/IQueueInfo.d.ts +0 -8
  329. package/dist/voip/IQueueInfo.js +0 -7
  330. package/dist/voip/IQueueInfo.js.map +0 -1
  331. package/dist/voip/IRegisterHandlerDelegate.d.ts +0 -32
  332. package/dist/voip/IRegisterHandlerDelegate.js +0 -3
  333. package/dist/voip/IRegisterHandlerDelegate.js.map +0 -1
  334. package/dist/voip/IRegistrationInfo.d.ts +0 -19
  335. package/dist/voip/IRegistrationInfo.js +0 -9
  336. package/dist/voip/IRegistrationInfo.js.map +0 -1
  337. package/dist/voip/IVoipClientEvents.d.ts +0 -96
  338. package/dist/voip/IVoipClientEvents.js +0 -16
  339. package/dist/voip/IVoipClientEvents.js.map +0 -1
  340. package/dist/voip/Operations.d.ts +0 -15
  341. package/dist/voip/Operations.js +0 -20
  342. package/dist/voip/Operations.js.map +0 -1
  343. package/dist/voip/SignalingSocketEvents.d.ts +0 -8
  344. package/dist/voip/SignalingSocketEvents.js +0 -3
  345. package/dist/voip/SignalingSocketEvents.js.map +0 -1
  346. package/dist/voip/UserState.d.ts +0 -5
  347. package/dist/voip/UserState.js +0 -12
  348. package/dist/voip/UserState.js.map +0 -1
  349. package/dist/voip/VoIPUserConfiguration.d.ts +0 -50
  350. package/dist/voip/VoIPUserConfiguration.js +0 -3
  351. package/dist/voip/VoIPUserConfiguration.js.map +0 -1
  352. package/dist/voip/VoIpCallerInfo.d.ts +0 -15
  353. package/dist/voip/VoIpCallerInfo.js +0 -3
  354. package/dist/voip/VoIpCallerInfo.js.map +0 -1
  355. package/dist/voip/VoipClientEvents.d.ts +0 -8
  356. package/dist/voip/VoipClientEvents.js +0 -13
  357. package/dist/voip/VoipClientEvents.js.map +0 -1
  358. package/dist/voip/VoipEvents.d.ts +0 -21
  359. package/dist/voip/VoipEvents.js +0 -3
  360. package/dist/voip/VoipEvents.js.map +0 -1
  361. package/dist/voip/WorkflowTypes.d.ts +0 -10
  362. package/dist/voip/WorkflowTypes.js +0 -15
  363. package/dist/voip/WorkflowTypes.js.map +0 -1
  364. package/dist/voip/index.d.ts +0 -18
  365. package/dist/voip/index.js +0 -35
  366. package/dist/voip/index.js.map +0 -1
@@ -1,15 +1,20 @@
1
1
  import type { Root } from '@rocket.chat/message-parser';
2
- import type { FieldProps } from './FieldProps';
3
- import type { Dimensions } from './Files/Dimensions';
4
2
  import type { MessageAttachmentBase } from './MessageAttachmentBase';
5
3
  export type MarkdownFields = 'text' | 'pretext' | 'fields';
6
4
  export type MessageAttachmentDefault = {
7
5
  author_icon?: string;
8
6
  author_link?: string;
9
7
  author_name?: string;
10
- fields?: FieldProps[];
8
+ fields?: {
9
+ short?: boolean;
10
+ title: string;
11
+ value: string;
12
+ }[];
11
13
  image_url?: string;
12
- image_dimensions?: Dimensions;
14
+ image_dimensions?: {
15
+ width: number;
16
+ height: number;
17
+ };
13
18
  mrkdwn_in?: Array<MarkdownFields>;
14
19
  pretext?: string;
15
20
  text?: string;
@@ -1,9 +1,10 @@
1
1
  import type { MessageAttachment } from './MessageAttachment';
2
2
  import type { MessageAttachmentDefault } from './MessageAttachmentDefault';
3
- export interface ITranslatedMessageAttachment extends MessageAttachmentDefault {
3
+ interface ITranslatedMessageAttachment extends MessageAttachmentDefault {
4
4
  translations: {
5
5
  [language: string]: string;
6
6
  };
7
7
  }
8
8
  export declare const isTranslatedAttachment: (attachment: MessageAttachment) => attachment is ITranslatedMessageAttachment;
9
9
  export declare const isTranslatedMessageAttachment: (attachments: MessageAttachment[]) => attachments is ITranslatedMessageAttachment[];
10
+ export {};
@@ -1,8 +1,7 @@
1
1
  export * from './Files';
2
- export * from './FieldProps';
3
- export * from './MessageAttachment';
2
+ export type * from './MessageAttachment';
4
3
  export * from './MessageAttachmentAction';
5
4
  export * from './MessageAttachmentBase';
6
- export * from './MessageAttachmentDefault';
5
+ export type * from './MessageAttachmentDefault';
7
6
  export * from './MessageQuoteAttachment';
8
7
  export * from './TranslatedMessageAttachment';
@@ -15,11 +15,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./Files"), exports);
18
- __exportStar(require("./FieldProps"), exports);
19
- __exportStar(require("./MessageAttachment"), exports);
20
18
  __exportStar(require("./MessageAttachmentAction"), exports);
21
19
  __exportStar(require("./MessageAttachmentBase"), exports);
22
- __exportStar(require("./MessageAttachmentDefault"), exports);
23
20
  __exportStar(require("./MessageQuoteAttachment"), exports);
24
21
  __exportStar(require("./TranslatedMessageAttachment"), exports);
25
22
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/IMessage/MessageAttachment/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,+CAA6B;AAC7B,sDAAoC;AACpC,4DAA0C;AAC1C,0DAAwC;AACxC,6DAA2C;AAC3C,2DAAyC;AACzC,gEAA8C"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/IMessage/MessageAttachment/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AAExB,4DAA0C;AAC1C,0DAAwC;AAExC,2DAAyC;AACzC,gEAA8C"}
@@ -0,0 +1,7 @@
1
+ export interface IMethodConnection {
2
+ id: string;
3
+ close(fn: (...args: any[]) => void): void;
4
+ onClose(fn: (...args: any[]) => void): void;
5
+ clientAddress: string;
6
+ httpHeaders: Record<string, any>;
7
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=IMethodConnection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IMethodConnection.js","sourceRoot":"","sources":["../src/IMethodConnection.ts"],"names":[],"mappings":""}
@@ -2,17 +2,6 @@ import type { IMessage } from './IMessage/IMessage';
2
2
  import type { IRocketChatRecord } from './IRocketChatRecord';
3
3
  import type { IRoom } from './IRoom';
4
4
  import type { IUser } from './IUser';
5
- /**
6
- * Right now we're assuming neither Room Info or User Info changes.
7
- * There's no update method referencing reports as of now (6.3.0-develop).
8
- * This means that a possible user or room change will not be reflected in the report.
9
- */
10
- export interface IModerationInfo {
11
- moderatedBy: IUser['_id'];
12
- hiddenAt: Date;
13
- action: string;
14
- reason: string;
15
- }
16
5
  export interface IModerationReport extends IRocketChatRecord {
17
6
  message?: IMessage;
18
7
  room?: Pick<IRoom, '_id' | 'name' | 'fname' | 't' | 'federated' | 'prid'>;
@@ -20,7 +9,17 @@ export interface IModerationReport extends IRocketChatRecord {
20
9
  description: string;
21
10
  ts: Date | string;
22
11
  reportedBy: Pick<IUser, '_id' | 'username' | 'name' | 'createdAt'>;
23
- moderationInfo?: IModerationInfo;
12
+ /**
13
+ * Right now we're assuming neither Room Info or User Info changes.
14
+ * There's no update method referencing reports as of now (6.3.0-develop).
15
+ * This means that a possible user or room change will not be reflected in the report.
16
+ */
17
+ moderationInfo?: {
18
+ moderatedBy: IUser['_id'];
19
+ hiddenAt: Date;
20
+ action: string;
21
+ reason: string;
22
+ };
24
23
  _hidden?: boolean;
25
24
  }
26
25
  export type MessageReport = Omit<IModerationReport, 'reportedUser'> & {
@@ -1,6 +1,7 @@
1
1
  import type { ICalendarEvent } from './ICalendarEvent';
2
2
  import type { IMessage } from './IMessage';
3
3
  import type { IRoom } from './IRoom';
4
+ import type { ISubscription } from './ISubscription';
4
5
  export interface INotificationItemPush {
5
6
  type: 'push';
6
7
  data: {
@@ -58,7 +59,9 @@ export interface INotificationDesktop {
58
59
  message: {
59
60
  msg: IMessage['msg'];
60
61
  t?: IMessage['t'];
62
+ content?: IMessage['content'];
61
63
  };
64
+ audioNotificationValue: ISubscription['audioNotificationValue'];
62
65
  };
63
66
  }
64
67
  export interface ICalendarNotification {
@@ -66,5 +69,6 @@ export interface ICalendarNotification {
66
69
  text: string;
67
70
  payload: {
68
71
  _id: ICalendarEvent['_id'];
72
+ startTimeUtc?: string;
69
73
  };
70
74
  }
@@ -3,7 +3,7 @@ export interface IOAuthApps {
3
3
  name: string;
4
4
  active: boolean;
5
5
  clientId: string;
6
- clientSecret: string;
6
+ clientSecret?: string;
7
7
  redirectUri: string;
8
8
  _createdAt: Date;
9
9
  _createdBy: {
package/dist/IOembed.d.ts CHANGED
@@ -15,7 +15,10 @@ export type OEmbedUrlContent = {
15
15
  };
16
16
  export type OEmbedProvider = {
17
17
  urls: RegExp[];
18
- endPoint: string;
18
+ endPoint?: string;
19
+ getHeaderOverrides?: () => {
20
+ [k: string]: string;
21
+ };
19
22
  };
20
23
  export type OEmbedUrlContentResult = {
21
24
  headers: {
@@ -25,7 +28,6 @@ export type OEmbedUrlContentResult = {
25
28
  statusCode: number;
26
29
  attachments?: MessageAttachment[];
27
30
  };
28
- export declare const isOEmbedUrlContentResult: (value: any) => value is OEmbedUrlContentResult;
29
31
  export type OEmbedUrlWithMetadata = {
30
32
  url: string;
31
33
  meta: OEmbedMeta;
package/dist/IOembed.js CHANGED
@@ -1,8 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isOEmbedUrlWithMetadata = exports.isOEmbedUrlContentResult = void 0;
4
- const isOEmbedUrlContentResult = (value) => 'attachments' in value;
5
- exports.isOEmbedUrlContentResult = isOEmbedUrlContentResult;
3
+ exports.isOEmbedUrlWithMetadata = void 0;
6
4
  const isOEmbedUrlWithMetadata = (value) => 'meta' in value;
7
5
  exports.isOEmbedUrlWithMetadata = isOEmbedUrlWithMetadata;
8
6
  //# sourceMappingURL=IOembed.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"IOembed.js","sourceRoot":"","sources":["../src/IOembed.ts"],"names":[],"mappings":";;;AA4BO,MAAM,wBAAwB,GAAG,CAAC,KAAU,EAAmC,EAAE,CAAC,aAAa,IAAI,KAAK,CAAC;AAAnG,QAAA,wBAAwB,4BAA2E;AASzG,MAAM,uBAAuB,GAAG,CAAC,KAAU,EAAkC,EAAE,CAAC,MAAM,IAAI,KAAK,CAAC;AAA1F,QAAA,uBAAuB,2BAAmE"}
1
+ {"version":3,"file":"IOembed.js","sourceRoot":"","sources":["../src/IOembed.ts"],"names":[],"mappings":";;;AAoCO,MAAM,uBAAuB,GAAG,CAAC,KAAU,EAAkC,EAAE,CAAC,MAAM,IAAI,KAAK,CAAC;AAA1F,QAAA,uBAAuB,2BAAmE"}
@@ -8,3 +8,20 @@ export interface IOmnichannelBusinessUnit extends IRocketChatRecord {
8
8
  numDepartments: number;
9
9
  ancestors?: string[];
10
10
  }
11
+ export type OmnichannelBusinessUnitPayload = {
12
+ unitData: {
13
+ name: string;
14
+ visibility: string;
15
+ enabled?: boolean;
16
+ description?: string;
17
+ email?: string;
18
+ showOnOfflineForm?: boolean;
19
+ };
20
+ unitMonitors: {
21
+ monitorId: string;
22
+ username: string;
23
+ }[];
24
+ unitDepartments: {
25
+ departmentId: string;
26
+ }[];
27
+ };
@@ -2,10 +2,10 @@ export interface IPermission {
2
2
  _id: string;
3
3
  _updatedAt: Date;
4
4
  roles: string[];
5
- group?: string;
5
+ group?: string | null;
6
+ section?: string | null;
6
7
  groupPermissionId?: string;
7
8
  level?: 'settings';
8
- section?: string;
9
9
  sectionPermissionId?: string;
10
10
  settingId?: string;
11
11
  sorter?: number;
@@ -1,10 +1,13 @@
1
1
  import type { IRocketChatRecord } from './IRocketChatRecord';
2
+ import type { ILoginToken } from './IUser';
2
3
  export type IPushTokenTypes = 'gcm' | 'apn';
3
4
  export interface IPushToken extends IRocketChatRecord {
4
- token: Record<IPushTokenTypes, string>;
5
+ token: Partial<Record<IPushTokenTypes, string>>;
5
6
  appName: string;
6
7
  userId: string;
7
8
  enabled: boolean;
9
+ authToken: ILoginToken['hashedToken'];
10
+ metadata?: Record<string, unknown>;
8
11
  createdAt: Date;
9
- updatedAt: Date;
12
+ voipToken?: string;
10
13
  }
@@ -0,0 +1,18 @@
1
+ import type { IMessage } from './IMessage/IMessage';
2
+ import type { IRoom } from './IRoom';
3
+ import type { IUser } from './IUser';
4
+ export interface IReadReceipt {
5
+ token?: string;
6
+ messageId: IMessage['_id'];
7
+ roomId: IRoom['_id'];
8
+ ts: Date;
9
+ t?: IMessage['t'];
10
+ pinned?: IMessage['pinned'];
11
+ drid?: IMessage['drid'];
12
+ tmid?: IMessage['tmid'];
13
+ userId: IUser['_id'];
14
+ _id: string;
15
+ }
16
+ export interface IReadReceiptWithUser extends IReadReceipt {
17
+ user?: Pick<IUser, '_id' | 'name' | 'username'> | undefined;
18
+ }
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=AppRequests.js.map
3
+ //# sourceMappingURL=IReadReceipt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IReadReceipt.js","sourceRoot":"","sources":["../src/IReadReceipt.ts"],"names":[],"mappings":""}
@@ -4,10 +4,6 @@ export interface IRocketChatAssetConstraint {
4
4
  width?: number;
5
5
  height?: number;
6
6
  }
7
- export interface IRocketChatAssetWizard {
8
- step: number;
9
- order: number;
10
- }
11
7
  export interface IRocketChatAssetCache {
12
8
  path: string;
13
9
  cacheable: boolean;
@@ -27,7 +23,10 @@ export interface IRocketChatAsset {
27
23
  constraints: IRocketChatAssetConstraint;
28
24
  defaultUrl?: string;
29
25
  url?: string;
30
- wizard?: IRocketChatAssetWizard;
26
+ wizard?: {
27
+ step: number;
28
+ order: number;
29
+ };
31
30
  cache?: IRocketChatAssetCache;
32
31
  }
33
32
  export interface IRocketChatAssets {
package/dist/IRoom.d.ts CHANGED
@@ -1,23 +1,14 @@
1
+ import type { IAbacAttributeDefinition } from './IAbacAttribute';
2
+ import type { ILivechatDepartment } from './ILivechatDepartment';
1
3
  import type { ILivechatPriority } from './ILivechatPriority';
2
4
  import type { ILivechatVisitor } from './ILivechatVisitor';
3
5
  import type { IMessage, MessageTypesValues } from './IMessage';
4
6
  import type { IOmnichannelServiceLevelAgreements } from './IOmnichannelServiceLevelAgreements';
5
7
  import type { IRocketChatRecord } from './IRocketChatRecord';
6
- import type { IUser, Username } from './IUser';
8
+ import type { IUser } from './IUser';
7
9
  import type { RoomType } from './RoomType';
8
- type CallStatus = 'ringing' | 'ended' | 'declined' | 'ongoing';
9
- declare const sidepanelItemValues: readonly ["channels", "discussions"];
10
- export type SidepanelItem = (typeof sidepanelItemValues)[number];
11
- export type RoomID = string;
12
- export type ChannelName = string;
13
- interface IRequestTranscript {
14
- email: string;
15
- subject: string;
16
- requestedAt: Date;
17
- requestedBy: Pick<IUser, '_id' | 'username' | 'name' | 'utcOffset'>;
18
- }
10
+ import type { Branded } from './utils';
19
11
  export interface IRoom extends IRocketChatRecord {
20
- _id: RoomID;
21
12
  t: RoomType;
22
13
  name?: string;
23
14
  fname?: string;
@@ -31,6 +22,7 @@ export interface IRoom extends IRocketChatRecord {
31
22
  style?: string;
32
23
  };
33
24
  encrypted?: boolean;
25
+ abacAttributes?: IAbacAttributeDefinition[];
34
26
  topic?: string;
35
27
  reactWhenReadOnly?: boolean;
36
28
  sysMes?: MessageTypesValues[] | boolean;
@@ -39,7 +31,6 @@ export interface IRoom extends IRocketChatRecord {
39
31
  lastMessage?: IMessage;
40
32
  lm?: Date;
41
33
  usersCount: number;
42
- callStatus?: CallStatus;
43
34
  webRtcCallStartTime?: Date;
44
35
  servedBy?: {
45
36
  _id: string;
@@ -65,7 +56,6 @@ export interface IRoom extends IRocketChatRecord {
65
56
  favorite?: boolean;
66
57
  archived?: boolean;
67
58
  description?: string;
68
- createdOTR?: boolean;
69
59
  e2eKeyId?: string;
70
60
  federated?: boolean;
71
61
  customFields?: Record<string, any>;
@@ -73,21 +63,33 @@ export interface IRoom extends IRocketChatRecord {
73
63
  userId: IUser['_id'];
74
64
  ts: Date;
75
65
  }[];
76
- sidepanel?: {
77
- items: [SidepanelItem, SidepanelItem?];
78
- };
66
+ /**
67
+ * @deprecated Using `boolean` is deprecated. Use `number` instead.
68
+ */
69
+ rolePrioritiesCreated?: number | boolean;
79
70
  }
80
- export declare const isSidepanelItem: (item: any) => item is SidepanelItem;
81
- export declare const isValidSidepanel: (sidepanel: IRoom["sidepanel"]) => boolean;
71
+ export type IDirectoryChannelResult = Pick<IRoom, '_id' | 't' | 'usersCount' | 'name' | 'fname' | 'description' | 'topic' | 'lastMessage' | 'ts' | 'archived' | 'default' | 'featured' | 'prid' | 'teamId' | 'teamMain' | 'federated'> & {
72
+ belongsTo?: string;
73
+ roomsCount?: number;
74
+ };
82
75
  export declare const isRoomWithJoinCode: (room: Partial<IRoom>) => room is IRoomWithJoinCode;
83
76
  export interface IRoomWithJoinCode extends IRoom {
84
77
  joinCodeRequired: true;
85
78
  joinCode: string;
86
79
  }
87
80
  export interface IRoomFederated extends IRoom {
81
+ _id: Branded<string, 'IRoomFederated'>;
88
82
  federated: true;
89
83
  }
84
+ export interface IRoomNativeFederated extends IRoomFederated {
85
+ federation: {
86
+ version: number;
87
+ mrid: string;
88
+ origin: string;
89
+ };
90
+ }
90
91
  export declare const isRoomFederated: (room: Partial<IRoom>) => room is IRoomFederated;
92
+ export declare const isRoomNativeFederated: (room: Partial<IRoom>) => room is IRoomNativeFederated;
91
93
  export interface ICreatedRoom extends IRoom {
92
94
  rid: string;
93
95
  inserted: boolean;
@@ -104,10 +106,13 @@ export declare const isPrivateDiscussion: (room: Partial<IRoom>) => room is IRoo
104
106
  export declare const isPublicDiscussion: (room: Partial<IRoom>) => room is IRoom;
105
107
  export declare const isPublicRoom: (room: Partial<IRoom>) => room is IRoom;
106
108
  export declare const isPrivateRoom: (room: Partial<IRoom>) => room is IRoom;
109
+ export declare const isABACManagedRoom: (room: Partial<IRoom>) => room is IRoom & {
110
+ abacAttributes: IAbacAttributeDefinition[];
111
+ };
107
112
  export interface IDirectMessageRoom extends Omit<IRoom, 'default' | 'featured' | 'u' | 'name'> {
108
113
  t: 'd';
109
114
  uids: Array<string>;
110
- usernames: Array<Username>;
115
+ usernames: Array<NonNullable<IUser['username']>>;
111
116
  }
112
117
  export declare const isDirectMessageRoom: (room: Partial<IRoom> | IDirectMessageRoom) => room is IDirectMessageRoom;
113
118
  export declare const isMultipleDirectMessageRoom: (room: IRoom | IDirectMessageRoom) => room is IDirectMessageRoom;
@@ -126,6 +131,7 @@ export interface IOmnichannelSource {
126
131
  label?: string;
127
132
  sidebarIcon?: string;
128
133
  defaultIcon?: string;
134
+ destination?: string;
129
135
  }
130
136
  export interface IOmnichannelSourceFromApp extends IOmnichannelSource {
131
137
  type: OmnichannelSourceType.APP;
@@ -134,9 +140,10 @@ export interface IOmnichannelSourceFromApp extends IOmnichannelSource {
134
140
  sidebarIcon?: string;
135
141
  defaultIcon?: string;
136
142
  alias?: string;
143
+ destination?: string;
137
144
  }
138
145
  export interface IOmnichannelGenericRoom extends Omit<IRoom, 'default' | 'featured' | 'broadcast'> {
139
- t: 'l' | 'v';
146
+ t: 'l';
140
147
  v: Pick<ILivechatVisitor, '_id' | 'username' | 'status' | 'name' | 'token' | 'activity'> & {
141
148
  lastMessageTs?: Date;
142
149
  phone?: string;
@@ -145,10 +152,15 @@ export interface IOmnichannelGenericRoom extends Omit<IRoom, 'default' | 'featur
145
152
  inbox: string;
146
153
  thread: string[];
147
154
  replyTo: string;
148
- subject: string;
155
+ subject?: string;
149
156
  };
150
157
  source: IOmnichannelSource;
151
- transcriptRequest?: IRequestTranscript;
158
+ transcriptRequest?: {
159
+ email: string;
160
+ subject: string;
161
+ requestedAt: Date;
162
+ requestedBy: Pick<IUser, '_id' | 'username' | 'name' | 'utcOffset'>;
163
+ };
152
164
  servedBy?: {
153
165
  _id: string;
154
166
  ts: Date;
@@ -184,6 +196,7 @@ export interface IOmnichannelGenericRoom extends Omit<IRoom, 'default' | 'featur
184
196
  };
185
197
  closingMessage?: IMessage;
186
198
  departmentAncestors?: string[];
199
+ contactId?: string;
187
200
  }
188
201
  export interface IOmnichannelRoom extends IOmnichannelGenericRoom {
189
202
  t: 'l';
@@ -197,7 +210,6 @@ export interface IOmnichannelRoom extends IOmnichannelGenericRoom {
197
210
  priorityWeight: ILivechatPriority['sortItem'];
198
211
  slaId?: string;
199
212
  estimatedWaitingTimeQueue: IOmnichannelServiceLevelAgreements['dueTimeInMinutes'];
200
- pdfTranscriptRequested?: boolean;
201
213
  pdfTranscriptFileId?: string;
202
214
  metrics?: {
203
215
  serviceTimeDuration?: number;
@@ -223,36 +235,25 @@ export interface IOmnichannelRoom extends IOmnichannelGenericRoom {
223
235
  };
224
236
  autoTransferredAt?: Date;
225
237
  autoTransferOngoing?: boolean;
238
+ verified?: boolean;
226
239
  }
227
- export interface IVoipRoom extends IOmnichannelGenericRoom {
228
- t: 'v';
229
- name: string;
230
- callStarted: Date;
231
- callDuration?: number;
232
- callWaitingTime?: number;
233
- callTotalHoldTime?: number;
234
- queue: string;
235
- callUniqueId?: string;
236
- v: Pick<ILivechatVisitor, '_id' | 'username' | 'status' | 'name' | 'token'> & {
237
- lastMessageTs?: Date;
238
- phone?: string;
239
- };
240
- direction: 'inbound' | 'outbound';
241
- }
242
- export interface IOmnichannelRoomFromAppSource extends IOmnichannelRoom {
243
- source: IOmnichannelSourceFromApp;
244
- }
245
- export type IVoipRoomClosingInfo = Pick<IOmnichannelGenericRoom, 'closer' | 'closedBy' | 'closedAt' | 'tags'> & Pick<IVoipRoom, 'callDuration' | 'callTotalHoldTime'> & {
246
- serviceTimeDuration?: number;
247
- };
248
240
  export type IOmnichannelRoomClosingInfo = Pick<IOmnichannelGenericRoom, 'closer' | 'closedBy' | 'closedAt' | 'tags'> & {
249
241
  serviceTimeDuration?: number;
250
242
  chatDuration: number;
251
243
  };
244
+ export type IOmnichannelRoomWithDepartment = IOmnichannelRoom & {
245
+ department?: ILivechatDepartment;
246
+ };
252
247
  export declare const isOmnichannelRoom: (room: Pick<IRoom, "t">) => room is IOmnichannelRoom & IRoom;
253
- export declare const isVoipRoom: (room: IRoom) => room is IVoipRoom & IRoom;
254
248
  export declare const isOmnichannelSourceFromApp: (source: IOmnichannelSource) => source is IOmnichannelSourceFromApp;
255
- export type RoomAdminFieldsType = '_id' | 'prid' | 'fname' | 'name' | 't' | 'cl' | 'u' | 'usernames' | 'ts' | 'usersCount' | 'muted' | 'unmuted' | 'ro' | 'default' | 'favorite' | 'featured' | 'reactWhenReadOnly' | 'topic' | 'msgs' | 'archived' | 'teamId' | 'teamMain' | 'announcement' | 'description' | 'broadcast' | 'uids' | 'avatarETag';
249
+ export type IOmnichannelRoomInfo = Pick<Partial<IOmnichannelRoom>, 'sms' | 'email'> & Pick<IOmnichannelRoom, 'source'>;
250
+ export type IOmnichannelRoomExtraData = Pick<Partial<IOmnichannelRoom>, 'customFields' | 'source'> & {
251
+ sla?: string;
252
+ };
253
+ export type IOmnichannelInquiryExtraData = IOmnichannelRoomExtraData & {
254
+ priority?: string;
255
+ };
256
+ export type RoomAdminFieldsType = '_id' | 'prid' | 'fname' | 'name' | 't' | 'cl' | 'u' | 'usernames' | 'ts' | 'usersCount' | 'muted' | 'unmuted' | 'ro' | 'default' | 'favorite' | 'featured' | 'reactWhenReadOnly' | 'topic' | 'msgs' | 'archived' | 'teamId' | 'teamMain' | 'announcement' | 'description' | 'broadcast' | 'uids' | 'avatarETag' | 'abacAttributes';
256
257
  export interface IRoomWithRetentionPolicy extends IRoom {
257
258
  retention: {
258
259
  enabled?: boolean;
@@ -263,4 +264,9 @@ export interface IRoomWithRetentionPolicy extends IRoom {
263
264
  overrideGlobal?: boolean;
264
265
  };
265
266
  }
266
- export {};
267
+ export declare const ROOM_ROLE_PRIORITY_MAP: {
268
+ owner: number;
269
+ leader: number;
270
+ moderator: number;
271
+ default: number;
272
+ };
package/dist/IRoom.js CHANGED
@@ -1,28 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isOmnichannelSourceFromApp = exports.isVoipRoom = exports.isOmnichannelRoom = exports.OmnichannelSourceType = exports.isMultipleDirectMessageRoom = exports.isDirectMessageRoom = exports.isPrivateRoom = exports.isPublicRoom = exports.isPublicDiscussion = exports.isPrivateDiscussion = exports.isDiscussion = exports.isPublicTeamRoom = exports.isPrivateTeamRoom = exports.isTeamRoom = exports.isRoomFederated = exports.isRoomWithJoinCode = exports.isValidSidepanel = exports.isSidepanelItem = void 0;
4
- const sidepanelItemValues = ['channels', 'discussions'];
5
- const isSidepanelItem = (item) => {
6
- return sidepanelItemValues.includes(item);
7
- };
8
- exports.isSidepanelItem = isSidepanelItem;
9
- const isValidSidepanel = (sidepanel) => {
10
- if (sidepanel === null) {
11
- return true;
12
- }
13
- if (!sidepanel?.items) {
14
- return false;
15
- }
16
- return (Array.isArray(sidepanel.items) &&
17
- sidepanel.items.length &&
18
- sidepanel.items.every(exports.isSidepanelItem) &&
19
- sidepanel.items.length === new Set(sidepanel.items).size);
20
- };
21
- exports.isValidSidepanel = isValidSidepanel;
3
+ exports.ROOM_ROLE_PRIORITY_MAP = exports.isOmnichannelSourceFromApp = exports.isOmnichannelRoom = exports.OmnichannelSourceType = exports.isMultipleDirectMessageRoom = exports.isDirectMessageRoom = exports.isABACManagedRoom = exports.isPrivateRoom = exports.isPublicRoom = exports.isPublicDiscussion = exports.isPrivateDiscussion = exports.isDiscussion = exports.isPublicTeamRoom = exports.isPrivateTeamRoom = exports.isTeamRoom = exports.isRoomNativeFederated = exports.isRoomFederated = exports.isRoomWithJoinCode = void 0;
22
4
  const isRoomWithJoinCode = (room) => 'joinCodeRequired' in room && room.joinCodeRequired === true;
23
5
  exports.isRoomWithJoinCode = isRoomWithJoinCode;
24
6
  const isRoomFederated = (room) => 'federated' in room && room.federated === true;
25
7
  exports.isRoomFederated = isRoomFederated;
8
+ const isRoomNativeFederated = (room) => (0, exports.isRoomFederated)(room) && 'federation' in room && room.federation !== undefined;
9
+ exports.isRoomNativeFederated = isRoomNativeFederated;
26
10
  const isTeamRoom = (room) => !!room.teamMain;
27
11
  exports.isTeamRoom = isTeamRoom;
28
12
  const isPrivateTeamRoom = (room) => (0, exports.isTeamRoom)(room) && room.t === 'p';
@@ -39,6 +23,8 @@ const isPublicRoom = (room) => room.t === 'c';
39
23
  exports.isPublicRoom = isPublicRoom;
40
24
  const isPrivateRoom = (room) => room.t === 'p';
41
25
  exports.isPrivateRoom = isPrivateRoom;
26
+ const isABACManagedRoom = (room) => Array.isArray(room?.abacAttributes) && room.abacAttributes.length > 0;
27
+ exports.isABACManagedRoom = isABACManagedRoom;
42
28
  const isDirectMessageRoom = (room) => room.t === 'd';
43
29
  exports.isDirectMessageRoom = isDirectMessageRoom;
44
30
  const isMultipleDirectMessageRoom = (room) => (0, exports.isDirectMessageRoom)(room) && room.uids.length > 2;
@@ -54,10 +40,14 @@ var OmnichannelSourceType;
54
40
  })(OmnichannelSourceType || (exports.OmnichannelSourceType = OmnichannelSourceType = {}));
55
41
  const isOmnichannelRoom = (room) => room.t === 'l';
56
42
  exports.isOmnichannelRoom = isOmnichannelRoom;
57
- const isVoipRoom = (room) => room.t === 'v';
58
- exports.isVoipRoom = isVoipRoom;
59
43
  const isOmnichannelSourceFromApp = (source) => {
60
44
  return source?.type === OmnichannelSourceType.APP;
61
45
  };
62
46
  exports.isOmnichannelSourceFromApp = isOmnichannelSourceFromApp;
47
+ exports.ROOM_ROLE_PRIORITY_MAP = {
48
+ owner: 0,
49
+ leader: 250,
50
+ moderator: 500,
51
+ default: 10000,
52
+ };
63
53
  //# sourceMappingURL=IRoom.js.map
package/dist/IRoom.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"IRoom.js","sourceRoot":"","sources":["../src/IRoom.ts"],"names":[],"mappings":";;;AASA,MAAM,mBAAmB,GAAG,CAAC,UAAU,EAAE,aAAa,CAAU,CAAC;AAuF1D,MAAM,eAAe,GAAG,CAAC,IAAS,EAAyB,EAAE;IACnE,OAAO,mBAAmB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AAC3C,CAAC,CAAC;AAFW,QAAA,eAAe,mBAE1B;AAEK,MAAM,gBAAgB,GAAG,CAAC,SAA6B,EAAE,EAAE;IACjE,IAAI,SAAS,KAAK,IAAI,EAAE,CAAC;QACxB,OAAO,IAAI,CAA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