@sendbird/sendbird-platform-sdk-typescript 2.1.5 → 2.1.7

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 (821) hide show
  1. package/CHANGELOG +27 -0
  2. package/README.md +12 -12
  3. package/apis/AnnouncementApi.d.ts +11 -0
  4. package/apis/AnnouncementApi.js +59 -0
  5. package/apis/AnnouncementApi.js.map +1 -0
  6. package/apis/BotApi.d.ts +36 -0
  7. package/apis/BotApi.js +434 -0
  8. package/apis/BotApi.js.map +1 -0
  9. package/apis/GroupChannelApi.d.ts +63 -0
  10. package/apis/GroupChannelApi.js +902 -0
  11. package/apis/GroupChannelApi.js.map +1 -0
  12. package/apis/MessageApi.d.ts +40 -0
  13. package/apis/MessageApi.js +567 -0
  14. package/apis/MessageApi.js.map +1 -0
  15. package/apis/MetadataApi.d.ts +18 -0
  16. package/apis/MetadataApi.js +191 -0
  17. package/apis/MetadataApi.js.map +1 -0
  18. package/apis/ModerationApi.d.ts +24 -0
  19. package/apis/ModerationApi.js +229 -0
  20. package/apis/ModerationApi.js.map +1 -0
  21. package/apis/OpenChannelApi.d.ts +29 -0
  22. package/apis/OpenChannelApi.js +340 -0
  23. package/apis/OpenChannelApi.js.map +1 -0
  24. package/apis/StatisticsApi.d.ts +13 -0
  25. package/apis/StatisticsApi.js +88 -0
  26. package/apis/StatisticsApi.js.map +1 -0
  27. package/apis/UserApi.d.ts +107 -0
  28. package/apis/UserApi.js +1418 -0
  29. package/apis/UserApi.js.map +1 -0
  30. package/apis/baseapi.d.ts +18 -0
  31. package/apis/baseapi.js +27 -0
  32. package/apis/baseapi.js.map +1 -0
  33. package/apis/exception.d.ts +10 -0
  34. package/apis/exception.js +14 -0
  35. package/apis/exception.js.map +1 -0
  36. package/auth/auth.d.ts +26 -0
  37. package/auth/auth.js +13 -0
  38. package/auth/auth.js.map +1 -0
  39. package/configuration.d.ts +18 -0
  40. package/configuration.js +21 -0
  41. package/configuration.js.map +1 -0
  42. package/http/http.d.ts +83 -0
  43. package/http/http.js +170 -0
  44. package/http/http.js.map +1 -0
  45. package/http/isomorphic-fetch.d.ts +5 -0
  46. package/http/isomorphic-fetch.js +34 -0
  47. package/http/isomorphic-fetch.js.map +1 -0
  48. package/index.d.ts +10 -0
  49. package/index.js +37 -0
  50. package/index.js.map +1 -0
  51. package/middleware.d.ts +16 -0
  52. package/middleware.js +17 -0
  53. package/middleware.js.map +1 -0
  54. package/models/AcceptAnInvitationRequest.d.ts +18 -0
  55. package/models/AcceptAnInvitationRequest.js +27 -0
  56. package/models/AcceptAnInvitationRequest.js.map +1 -0
  57. package/models/AddARegistrationOrDeviceTokenRequest.d.ts +19 -0
  58. package/models/AddARegistrationOrDeviceTokenRequest.js +33 -0
  59. package/models/AddARegistrationOrDeviceTokenRequest.js.map +1 -0
  60. package/models/AddARegistrationOrDeviceTokenResponse.d.ts +20 -0
  61. package/models/AddARegistrationOrDeviceTokenResponse.js +33 -0
  62. package/models/AddARegistrationOrDeviceTokenResponse.js.map +1 -0
  63. package/models/AddExtraDataToAMessageRequest.d.ts +18 -0
  64. package/models/AddExtraDataToAMessageRequest.js +21 -0
  65. package/models/AddExtraDataToAMessageRequest.js.map +1 -0
  66. package/models/AddExtraDataToAMessageResponse.d.ts +18 -0
  67. package/models/AddExtraDataToAMessageResponse.js +21 -0
  68. package/models/AddExtraDataToAMessageResponse.js.map +1 -0
  69. package/models/BlockAUserRequest.d.ts +18 -0
  70. package/models/BlockAUserRequest.js +27 -0
  71. package/models/BlockAUserRequest.js.map +1 -0
  72. package/models/BlockAUserResponse.d.ts +19 -0
  73. package/models/BlockAUserResponse.js +27 -0
  74. package/models/BlockAUserResponse.js.map +1 -0
  75. package/models/CheckIfMemberResponse.d.ts +19 -0
  76. package/models/CheckIfMemberResponse.js +27 -0
  77. package/models/CheckIfMemberResponse.js.map +1 -0
  78. package/models/ChooseAPushNotificationContentTemplateRequest.d.ts +18 -0
  79. package/models/ChooseAPushNotificationContentTemplateRequest.js +21 -0
  80. package/models/ChooseAPushNotificationContentTemplateRequest.js.map +1 -0
  81. package/models/ChooseAPushNotificationContentTemplateResponse.d.ts +17 -0
  82. package/models/ChooseAPushNotificationContentTemplateResponse.js +21 -0
  83. package/models/ChooseAPushNotificationContentTemplateResponse.js.map +1 -0
  84. package/models/CreateABotRequest.d.ts +25 -0
  85. package/models/CreateABotRequest.js +69 -0
  86. package/models/CreateABotRequest.js.map +1 -0
  87. package/models/CreateABotResponse.d.ts +26 -0
  88. package/models/CreateABotResponse.js +63 -0
  89. package/models/CreateABotResponse.js.map +1 -0
  90. package/models/CreateABotResponseBot.d.ts +25 -0
  91. package/models/CreateABotResponseBot.js +69 -0
  92. package/models/CreateABotResponseBot.js.map +1 -0
  93. package/models/CreateABotResponseBotStyle.d.ts +21 -0
  94. package/models/CreateABotResponseBotStyle.js +39 -0
  95. package/models/CreateABotResponseBotStyle.js.map +1 -0
  96. package/models/CreateAChannelMetadataRequest.d.ts +18 -0
  97. package/models/CreateAChannelMetadataRequest.js +27 -0
  98. package/models/CreateAChannelMetadataRequest.js.map +1 -0
  99. package/models/CreateAChannelMetadataResponse.d.ts +18 -0
  100. package/models/CreateAChannelMetadataResponse.js +27 -0
  101. package/models/CreateAChannelMetadataResponse.js.map +1 -0
  102. package/models/CreateAGroupChannelRequest.d.ts +37 -0
  103. package/models/CreateAGroupChannelRequest.js +129 -0
  104. package/models/CreateAGroupChannelRequest.js.map +1 -0
  105. package/models/CreateAUserRequest.d.ts +25 -0
  106. package/models/CreateAUserRequest.js +63 -0
  107. package/models/CreateAUserRequest.js.map +1 -0
  108. package/models/CreateAnOpenChannelRequest.d.ts +26 -0
  109. package/models/CreateAnOpenChannelRequest.js +69 -0
  110. package/models/CreateAnOpenChannelRequest.js.map +1 -0
  111. package/models/CreateUserMetadataRequest.d.ts +17 -0
  112. package/models/CreateUserMetadataRequest.js +21 -0
  113. package/models/CreateUserMetadataRequest.js.map +1 -0
  114. package/models/CreateUserTokenRequest.d.ts +17 -0
  115. package/models/CreateUserTokenRequest.js +21 -0
  116. package/models/CreateUserTokenRequest.js.map +1 -0
  117. package/models/CreateUserTokenResponse.d.ts +18 -0
  118. package/models/CreateUserTokenResponse.js +27 -0
  119. package/models/CreateUserTokenResponse.js.map +1 -0
  120. package/models/FreezeAGroupChannelRequest.d.ts +17 -0
  121. package/models/FreezeAGroupChannelRequest.js +21 -0
  122. package/models/FreezeAGroupChannelRequest.js.map +1 -0
  123. package/models/FreezeAnOpenChannelRequest.d.ts +17 -0
  124. package/models/FreezeAnOpenChannelRequest.js +21 -0
  125. package/models/FreezeAnOpenChannelRequest.js.map +1 -0
  126. package/models/GetAGroupChannelResponse.d.ts +75 -0
  127. package/models/GetAGroupChannelResponse.js +291 -0
  128. package/models/GetAGroupChannelResponse.js.map +1 -0
  129. package/models/GetAGroupChannelResponseAllOf.d.ts +18 -0
  130. package/models/GetAGroupChannelResponseAllOf.js +21 -0
  131. package/models/GetAGroupChannelResponseAllOf.js.map +1 -0
  132. package/models/GetAGroupChannelResponseAllOfChannel.d.ts +24 -0
  133. package/models/GetAGroupChannelResponseAllOfChannel.js +63 -0
  134. package/models/GetAGroupChannelResponseAllOfChannel.js.map +1 -0
  135. package/models/GetChannelInvitationPreferenceResponse.d.ts +17 -0
  136. package/models/GetChannelInvitationPreferenceResponse.js +21 -0
  137. package/models/GetChannelInvitationPreferenceResponse.js.map +1 -0
  138. package/models/GetTotalNumberOfMessagesInAChannelResponse.d.ts +17 -0
  139. package/models/GetTotalNumberOfMessagesInAChannelResponse.js +21 -0
  140. package/models/GetTotalNumberOfMessagesInAChannelResponse.js.map +1 -0
  141. package/models/GroupChannelListMembersResponse.d.ts +19 -0
  142. package/models/GroupChannelListMembersResponse.js +27 -0
  143. package/models/GroupChannelListMembersResponse.js.map +1 -0
  144. package/models/GroupChatListChannelsResponse.d.ts +20 -0
  145. package/models/GroupChatListChannelsResponse.js +33 -0
  146. package/models/GroupChatListChannelsResponse.js.map +1 -0
  147. package/models/HideAChannelRequest.d.ts +20 -0
  148. package/models/HideAChannelRequest.js +39 -0
  149. package/models/HideAChannelRequest.js.map +1 -0
  150. package/models/InviteAsMembersRequest.d.ts +20 -0
  151. package/models/InviteAsMembersRequest.js +39 -0
  152. package/models/InviteAsMembersRequest.js.map +1 -0
  153. package/models/InviteAsMembersResponse.d.ts +75 -0
  154. package/models/InviteAsMembersResponse.js +291 -0
  155. package/models/InviteAsMembersResponse.js.map +1 -0
  156. package/models/InviteAsMembersResponseAllOf.d.ts +18 -0
  157. package/models/InviteAsMembersResponseAllOf.js +21 -0
  158. package/models/InviteAsMembersResponseAllOf.js.map +1 -0
  159. package/models/JoinAChannelRequest.d.ts +18 -0
  160. package/models/JoinAChannelRequest.js +27 -0
  161. package/models/JoinAChannelRequest.js.map +1 -0
  162. package/models/JoinChannelsRequest.d.ts +17 -0
  163. package/models/JoinChannelsRequest.js +21 -0
  164. package/models/JoinChannelsRequest.js.map +1 -0
  165. package/models/LeaveAChannelRequest.d.ts +21 -0
  166. package/models/LeaveAChannelRequest.js +39 -0
  167. package/models/LeaveAChannelRequest.js.map +1 -0
  168. package/models/LeaveMyGroupChannelsRequest.d.ts +17 -0
  169. package/models/LeaveMyGroupChannelsRequest.js +21 -0
  170. package/models/LeaveMyGroupChannelsRequest.js.map +1 -0
  171. package/models/ListBlockedUsersResponse.d.ts +19 -0
  172. package/models/ListBlockedUsersResponse.js +27 -0
  173. package/models/ListBlockedUsersResponse.js.map +1 -0
  174. package/models/ListBotsResponse.d.ts +19 -0
  175. package/models/ListBotsResponse.js +27 -0
  176. package/models/ListBotsResponse.js.map +1 -0
  177. package/models/ListBotsResponseBotsInner.d.ts +30 -0
  178. package/models/ListBotsResponseBotsInner.js +75 -0
  179. package/models/ListBotsResponseBotsInner.js.map +1 -0
  180. package/models/ListBotsResponseBotsInnerAi.d.ts +28 -0
  181. package/models/ListBotsResponseBotsInnerAi.js +87 -0
  182. package/models/ListBotsResponseBotsInnerAi.js.map +1 -0
  183. package/models/ListBotsResponseBotsInnerBot.d.ts +24 -0
  184. package/models/ListBotsResponseBotsInnerBot.js +63 -0
  185. package/models/ListBotsResponseBotsInnerBot.js.map +1 -0
  186. package/models/ListBotsResponseBotsInnerBotStyle.d.ts +21 -0
  187. package/models/ListBotsResponseBotsInnerBotStyle.js +39 -0
  188. package/models/ListBotsResponseBotsInnerBotStyle.js.map +1 -0
  189. package/models/ListBotsResponseBotsInnerBotStyleColor.d.ts +19 -0
  190. package/models/ListBotsResponseBotsInnerBotStyleColor.js +33 -0
  191. package/models/ListBotsResponseBotsInnerBotStyleColor.js.map +1 -0
  192. package/models/ListBotsResponseBotsInnerFirstMessagesInner.d.ts +19 -0
  193. package/models/ListBotsResponseBotsInnerFirstMessagesInner.js +27 -0
  194. package/models/ListBotsResponseBotsInnerFirstMessagesInner.js.map +1 -0
  195. package/models/ListBotsResponseBotsInnerFirstMessagesInnerData.d.ts +17 -0
  196. package/models/ListBotsResponseBotsInnerFirstMessagesInnerData.js +21 -0
  197. package/models/ListBotsResponseBotsInnerFirstMessagesInnerData.js.map +1 -0
  198. package/models/ListBotsResponseBotsInnerSafeguard.d.ts +20 -0
  199. package/models/ListBotsResponseBotsInnerSafeguard.js +39 -0
  200. package/models/ListBotsResponseBotsInnerSafeguard.js.map +1 -0
  201. package/models/ListMessagesResponse.d.ts +18 -0
  202. package/models/ListMessagesResponse.js +21 -0
  203. package/models/ListMessagesResponse.js.map +1 -0
  204. package/models/ListMyGroupChannelsResponse.d.ts +20 -0
  205. package/models/ListMyGroupChannelsResponse.js +33 -0
  206. package/models/ListMyGroupChannelsResponse.js.map +1 -0
  207. package/models/ListOpenChannelsResponse.d.ts +20 -0
  208. package/models/ListOpenChannelsResponse.js +33 -0
  209. package/models/ListOpenChannelsResponse.js.map +1 -0
  210. package/models/ListOperatorsResponse.d.ts +19 -0
  211. package/models/ListOperatorsResponse.js +27 -0
  212. package/models/ListOperatorsResponse.js.map +1 -0
  213. package/models/ListRegistrationOrDeviceTokensResponse.d.ts +21 -0
  214. package/models/ListRegistrationOrDeviceTokensResponse.js +39 -0
  215. package/models/ListRegistrationOrDeviceTokensResponse.js.map +1 -0
  216. package/models/ListUsersResponse.d.ts +19 -0
  217. package/models/ListUsersResponse.js +27 -0
  218. package/models/ListUsersResponse.js.map +1 -0
  219. package/models/MarkAllMessagesAsReadRequest.d.ts +17 -0
  220. package/models/MarkAllMessagesAsReadRequest.js +21 -0
  221. package/models/MarkAllMessagesAsReadRequest.js.map +1 -0
  222. package/models/MarkChannelMessagesAsReadRequest.d.ts +17 -0
  223. package/models/MarkChannelMessagesAsReadRequest.js +21 -0
  224. package/models/MarkChannelMessagesAsReadRequest.js.map +1 -0
  225. package/models/MigrateMessagesAdminMessageRequest.d.ts +26 -0
  226. package/models/MigrateMessagesAdminMessageRequest.js +69 -0
  227. package/models/MigrateMessagesAdminMessageRequest.js.map +1 -0
  228. package/models/MigrateMessagesFileMessageRequest.d.ts +32 -0
  229. package/models/MigrateMessagesFileMessageRequest.js +99 -0
  230. package/models/MigrateMessagesFileMessageRequest.js.map +1 -0
  231. package/models/MigrateMessagesFileMessageRequestThumbnailsInner.d.ts +16 -0
  232. package/models/MigrateMessagesFileMessageRequestThumbnailsInner.js +14 -0
  233. package/models/MigrateMessagesFileMessageRequestThumbnailsInner.js.map +1 -0
  234. package/models/MigrateMessagesRequest.d.ts +20 -0
  235. package/models/MigrateMessagesRequest.js +33 -0
  236. package/models/MigrateMessagesRequest.js.map +1 -0
  237. package/models/MigrateMessagesRequestMessagesInner.d.ts +35 -0
  238. package/models/MigrateMessagesRequestMessagesInner.js +117 -0
  239. package/models/MigrateMessagesRequestMessagesInner.js.map +1 -0
  240. package/models/MigrateMessagesTextMessageRequest.d.ts +26 -0
  241. package/models/MigrateMessagesTextMessageRequest.js +69 -0
  242. package/models/MigrateMessagesTextMessageRequest.js.map +1 -0
  243. package/models/ObjectSerializer.d.ts +139 -0
  244. package/models/ObjectSerializer.js +630 -0
  245. package/models/ObjectSerializer.js.map +1 -0
  246. package/models/RegisterOperatorsToAGroupChannelRequest.d.ts +17 -0
  247. package/models/RegisterOperatorsToAGroupChannelRequest.js +21 -0
  248. package/models/RegisterOperatorsToAGroupChannelRequest.js.map +1 -0
  249. package/models/RemoveARegistrationOrDeviceTokenResponse.d.ts +19 -0
  250. package/models/RemoveARegistrationOrDeviceTokenResponse.js +27 -0
  251. package/models/RemoveARegistrationOrDeviceTokenResponse.js.map +1 -0
  252. package/models/RemoveAllRegistrationOrDeviceTokenResponse.d.ts +19 -0
  253. package/models/RemoveAllRegistrationOrDeviceTokenResponse.js +27 -0
  254. package/models/RemoveAllRegistrationOrDeviceTokenResponse.js.map +1 -0
  255. package/models/ResetChatHistoryRequest.d.ts +18 -0
  256. package/models/ResetChatHistoryRequest.js +27 -0
  257. package/models/ResetChatHistoryRequest.js.map +1 -0
  258. package/models/ResetChatHistoryResponse.d.ts +17 -0
  259. package/models/ResetChatHistoryResponse.js +21 -0
  260. package/models/ResetChatHistoryResponse.js.map +1 -0
  261. package/models/ScheduleAnAnnouncementRequest.d.ts +36 -0
  262. package/models/ScheduleAnAnnouncementRequest.js +123 -0
  263. package/models/ScheduleAnAnnouncementRequest.js.map +1 -0
  264. package/models/ScheduleAnAnnouncementRequestCreateChannelOptions.d.ts +21 -0
  265. package/models/ScheduleAnAnnouncementRequestCreateChannelOptions.js +45 -0
  266. package/models/ScheduleAnAnnouncementRequestCreateChannelOptions.js.map +1 -0
  267. package/models/ScheduleAnAnnouncementRequestMessage.d.ts +21 -0
  268. package/models/ScheduleAnAnnouncementRequestMessage.js +45 -0
  269. package/models/ScheduleAnAnnouncementRequestMessage.js.map +1 -0
  270. package/models/ScheduleAnAnnouncementResponse.d.ts +42 -0
  271. package/models/ScheduleAnAnnouncementResponse.js +159 -0
  272. package/models/ScheduleAnAnnouncementResponse.js.map +1 -0
  273. package/models/ScheduleAnAnnouncementResponseMessage.d.ts +22 -0
  274. package/models/ScheduleAnAnnouncementResponseMessage.js +51 -0
  275. package/models/ScheduleAnAnnouncementResponseMessage.js.map +1 -0
  276. package/models/SendABotMessageRequest.d.ts +42 -0
  277. package/models/SendABotMessageRequest.js +141 -0
  278. package/models/SendABotMessageRequest.js.map +1 -0
  279. package/models/SendABotMessageResponse.d.ts +18 -0
  280. package/models/SendABotMessageResponse.js +21 -0
  281. package/models/SendABotMessageResponse.js.map +1 -0
  282. package/models/SendAMessageRequest.d.ts +47 -0
  283. package/models/SendAMessageRequest.js +171 -0
  284. package/models/SendAMessageRequest.js.map +1 -0
  285. package/models/SendAMessageRequestPushMessageTemplate.d.ts +18 -0
  286. package/models/SendAMessageRequestPushMessageTemplate.js +27 -0
  287. package/models/SendAMessageRequestPushMessageTemplate.js.map +1 -0
  288. package/models/SendAMessageRequestPushMessageTemplateOneOf.d.ts +18 -0
  289. package/models/SendAMessageRequestPushMessageTemplateOneOf.js +27 -0
  290. package/models/SendAMessageRequestPushMessageTemplateOneOf.js.map +1 -0
  291. package/models/SendAdminMessageRequestBody.d.ts +32 -0
  292. package/models/SendAdminMessageRequestBody.js +87 -0
  293. package/models/SendAdminMessageRequestBody.js.map +1 -0
  294. package/models/SendFileMessageRequestBody.d.ts +41 -0
  295. package/models/SendFileMessageRequestBody.js +141 -0
  296. package/models/SendFileMessageRequestBody.js.map +1 -0
  297. package/models/SendTextMessageRequestBody.d.ts +39 -0
  298. package/models/SendTextMessageRequestBody.js +129 -0
  299. package/models/SendTextMessageRequestBody.js.map +1 -0
  300. package/models/SendTextMessageRequestBodyPushMessageTemplate.d.ts +18 -0
  301. package/models/SendTextMessageRequestBodyPushMessageTemplate.js +27 -0
  302. package/models/SendTextMessageRequestBodyPushMessageTemplate.js.map +1 -0
  303. package/models/SendbirdBasicUserInfo.d.ts +25 -0
  304. package/models/SendbirdBasicUserInfo.js +63 -0
  305. package/models/SendbirdBasicUserInfo.js.map +1 -0
  306. package/models/SendbirdDisappearingMessage.d.ts +18 -0
  307. package/models/SendbirdDisappearingMessage.js +27 -0
  308. package/models/SendbirdDisappearingMessage.js.map +1 -0
  309. package/models/SendbirdExtendedMessagePayload.d.ts +18 -0
  310. package/models/SendbirdExtendedMessagePayload.js +27 -0
  311. package/models/SendbirdExtendedMessagePayload.js.map +1 -0
  312. package/models/SendbirdFile.d.ts +23 -0
  313. package/models/SendbirdFile.js +51 -0
  314. package/models/SendbirdFile.js.map +1 -0
  315. package/models/SendbirdGroupChannel.d.ts +73 -0
  316. package/models/SendbirdGroupChannel.js +285 -0
  317. package/models/SendbirdGroupChannel.js.map +1 -0
  318. package/models/SendbirdGroupChannelDetail.d.ts +60 -0
  319. package/models/SendbirdGroupChannelDetail.js +213 -0
  320. package/models/SendbirdGroupChannelDetail.js.map +1 -0
  321. package/models/SendbirdGroupChannelDetailChannel.d.ts +24 -0
  322. package/models/SendbirdGroupChannelDetailChannel.js +63 -0
  323. package/models/SendbirdGroupChannelDetailChannel.js.map +1 -0
  324. package/models/SendbirdGroupChannelLastMessage.d.ts +53 -0
  325. package/models/SendbirdGroupChannelLastMessage.js +195 -0
  326. package/models/SendbirdGroupChannelLastMessage.js.map +1 -0
  327. package/models/SendbirdMember.d.ts +41 -0
  328. package/models/SendbirdMember.js +147 -0
  329. package/models/SendbirdMember.js.map +1 -0
  330. package/models/SendbirdMessageResponse.d.ts +53 -0
  331. package/models/SendbirdMessageResponse.js +195 -0
  332. package/models/SendbirdMessageResponse.js.map +1 -0
  333. package/models/SendbirdMessageResponseExtendedMessagePayload.d.ts +18 -0
  334. package/models/SendbirdMessageResponseExtendedMessagePayload.js +27 -0
  335. package/models/SendbirdMessageResponseExtendedMessagePayload.js.map +1 -0
  336. package/models/SendbirdMessageResponseMessageEvents.d.ts +20 -0
  337. package/models/SendbirdMessageResponseMessageEvents.js +39 -0
  338. package/models/SendbirdMessageResponseMessageEvents.js.map +1 -0
  339. package/models/SendbirdOpenChannel.d.ts +30 -0
  340. package/models/SendbirdOpenChannel.js +93 -0
  341. package/models/SendbirdOpenChannel.js.map +1 -0
  342. package/models/SendbirdParentMessageInfo.d.ts +25 -0
  343. package/models/SendbirdParentMessageInfo.js +57 -0
  344. package/models/SendbirdParentMessageInfo.js.map +1 -0
  345. package/models/SendbirdPushTriggerOption.d.ts +1 -0
  346. package/models/SendbirdPushTriggerOption.js +3 -0
  347. package/models/SendbirdPushTriggerOption.js.map +1 -0
  348. package/models/SendbirdReaction.d.ts +19 -0
  349. package/models/SendbirdReaction.js +33 -0
  350. package/models/SendbirdReaction.js.map +1 -0
  351. package/models/SendbirdSmsFallback.d.ts +18 -0
  352. package/models/SendbirdSmsFallback.js +27 -0
  353. package/models/SendbirdSmsFallback.js.map +1 -0
  354. package/models/SendbirdSortedMetaarrayInner.d.ts +18 -0
  355. package/models/SendbirdSortedMetaarrayInner.js +27 -0
  356. package/models/SendbirdSortedMetaarrayInner.js.map +1 -0
  357. package/models/SendbirdThumbnail.d.ts +22 -0
  358. package/models/SendbirdThumbnail.js +51 -0
  359. package/models/SendbirdThumbnail.js.map +1 -0
  360. package/models/SendbirdUser.d.ts +38 -0
  361. package/models/SendbirdUser.js +141 -0
  362. package/models/SendbirdUser.js.map +1 -0
  363. package/models/StartTypingIndicatorsRequest.d.ts +17 -0
  364. package/models/StartTypingIndicatorsRequest.js +21 -0
  365. package/models/StartTypingIndicatorsRequest.js.map +1 -0
  366. package/models/UpdateAChannelMetadataRequest.d.ts +18 -0
  367. package/models/UpdateAChannelMetadataRequest.js +27 -0
  368. package/models/UpdateAChannelMetadataRequest.js.map +1 -0
  369. package/models/UpdateAGroupChannelRequest.d.ts +27 -0
  370. package/models/UpdateAGroupChannelRequest.js +75 -0
  371. package/models/UpdateAGroupChannelRequest.js.map +1 -0
  372. package/models/UpdateAMessageRequest.d.ts +24 -0
  373. package/models/UpdateAMessageRequest.js +57 -0
  374. package/models/UpdateAMessageRequest.js.map +1 -0
  375. package/models/UpdateAUserRequest.d.ts +26 -0
  376. package/models/UpdateAUserRequest.js +69 -0
  377. package/models/UpdateAUserRequest.js.map +1 -0
  378. package/models/UpdateAnOpenChannelRequest.d.ts +23 -0
  379. package/models/UpdateAnOpenChannelRequest.js +51 -0
  380. package/models/UpdateAnOpenChannelRequest.js.map +1 -0
  381. package/models/UpdateBotByIdData.d.ts +24 -0
  382. package/models/UpdateBotByIdData.js +63 -0
  383. package/models/UpdateBotByIdData.js.map +1 -0
  384. package/models/UpdateBotByIdResponse.d.ts +23 -0
  385. package/models/UpdateBotByIdResponse.js +51 -0
  386. package/models/UpdateBotByIdResponse.js.map +1 -0
  387. package/models/UpdateChannelInvitationPreferenceRequest.d.ts +17 -0
  388. package/models/UpdateChannelInvitationPreferenceRequest.js +21 -0
  389. package/models/UpdateChannelInvitationPreferenceRequest.js.map +1 -0
  390. package/models/UpdateChannelInvitationPreferenceResponse.d.ts +17 -0
  391. package/models/UpdateChannelInvitationPreferenceResponse.js +21 -0
  392. package/models/UpdateChannelInvitationPreferenceResponse.js.map +1 -0
  393. package/models/UpdateCountPreferenceOfAChannelRequest.d.ts +18 -0
  394. package/models/UpdateCountPreferenceOfAChannelRequest.js +21 -0
  395. package/models/UpdateCountPreferenceOfAChannelRequest.js.map +1 -0
  396. package/models/UpdateCountPreferenceOfChannelByUrlResponse.d.ts +18 -0
  397. package/models/UpdateCountPreferenceOfChannelByUrlResponse.js +21 -0
  398. package/models/UpdateCountPreferenceOfChannelByUrlResponse.js.map +1 -0
  399. package/models/UpdateExtraDataInAMessageRequest.d.ts +20 -0
  400. package/models/UpdateExtraDataInAMessageRequest.js +33 -0
  401. package/models/UpdateExtraDataInAMessageRequest.js.map +1 -0
  402. package/models/UpdateExtraDataInAMessageResponse.d.ts +18 -0
  403. package/models/UpdateExtraDataInAMessageResponse.js +21 -0
  404. package/models/UpdateExtraDataInAMessageResponse.js.map +1 -0
  405. package/models/UpdatePushPreferencesForAChannelRequest.d.ts +19 -0
  406. package/models/UpdatePushPreferencesForAChannelRequest.js +27 -0
  407. package/models/UpdatePushPreferencesForAChannelRequest.js.map +1 -0
  408. package/models/UpdatePushPreferencesForAChannelResponse.d.ts +20 -0
  409. package/models/UpdatePushPreferencesForAChannelResponse.js +33 -0
  410. package/models/UpdatePushPreferencesForAChannelResponse.js.map +1 -0
  411. package/models/UpdatePushPreferencesRequest.d.ts +33 -0
  412. package/models/UpdatePushPreferencesRequest.js +105 -0
  413. package/models/UpdatePushPreferencesRequest.js.map +1 -0
  414. package/models/UpdatePushPreferencesRequestDndSchedulesInner.d.ts +20 -0
  415. package/models/UpdatePushPreferencesRequestDndSchedulesInner.js +27 -0
  416. package/models/UpdatePushPreferencesRequestDndSchedulesInner.js.map +1 -0
  417. package/models/UpdatePushPreferencesRequestDndSchedulesInnerTimeWindowsInner.d.ts +20 -0
  418. package/models/UpdatePushPreferencesRequestDndSchedulesInnerTimeWindowsInner.js +39 -0
  419. package/models/UpdatePushPreferencesRequestDndSchedulesInnerTimeWindowsInner.js.map +1 -0
  420. package/models/UpdatePushPreferencesResponse.d.ts +33 -0
  421. package/models/UpdatePushPreferencesResponse.js +105 -0
  422. package/models/UpdatePushPreferencesResponse.js.map +1 -0
  423. package/models/UpdateSpecificUserMetadataRequest.d.ts +17 -0
  424. package/models/UpdateSpecificUserMetadataRequest.js +21 -0
  425. package/models/UpdateSpecificUserMetadataRequest.js.map +1 -0
  426. package/models/UpdateUserMetadataRequest.d.ts +18 -0
  427. package/models/UpdateUserMetadataRequest.js +27 -0
  428. package/models/UpdateUserMetadataRequest.js.map +1 -0
  429. package/models/ViewBotByIdResponse.d.ts +23 -0
  430. package/models/ViewBotByIdResponse.js +51 -0
  431. package/models/ViewBotByIdResponse.js.map +1 -0
  432. package/models/ViewBotByIdResponseBot.d.ts +22 -0
  433. package/models/ViewBotByIdResponseBot.js +51 -0
  434. package/models/ViewBotByIdResponseBot.js.map +1 -0
  435. package/models/ViewCountPreferenceOfAChannelResponse.d.ts +18 -0
  436. package/models/ViewCountPreferenceOfAChannelResponse.js +21 -0
  437. package/models/ViewCountPreferenceOfAChannelResponse.js.map +1 -0
  438. package/models/ViewNumberOfChannelsWithUnreadMessagesResponse.d.ts +17 -0
  439. package/models/ViewNumberOfChannelsWithUnreadMessagesResponse.js +21 -0
  440. package/models/ViewNumberOfChannelsWithUnreadMessagesResponse.js.map +1 -0
  441. package/models/ViewNumberOfDailyActiveUsersResponse.d.ts +17 -0
  442. package/models/ViewNumberOfDailyActiveUsersResponse.js +21 -0
  443. package/models/ViewNumberOfDailyActiveUsersResponse.js.map +1 -0
  444. package/models/ViewNumberOfMonthlyActiveUsersResponse.d.ts +17 -0
  445. package/models/ViewNumberOfMonthlyActiveUsersResponse.js +21 -0
  446. package/models/ViewNumberOfMonthlyActiveUsersResponse.js.map +1 -0
  447. package/models/ViewNumberOfUnreadMessagesResponse.d.ts +17 -0
  448. package/models/ViewNumberOfUnreadMessagesResponse.js +21 -0
  449. package/models/ViewNumberOfUnreadMessagesResponse.js.map +1 -0
  450. package/models/ViewPushPreferencesForAChannelResponse.d.ts +20 -0
  451. package/models/ViewPushPreferencesForAChannelResponse.js +33 -0
  452. package/models/ViewPushPreferencesForAChannelResponse.js.map +1 -0
  453. package/models/ViewPushPreferencesResponse.d.ts +33 -0
  454. package/models/ViewPushPreferencesResponse.js +105 -0
  455. package/models/ViewPushPreferencesResponse.js.map +1 -0
  456. package/models/all.d.ts +130 -0
  457. package/models/all.js +147 -0
  458. package/models/all.js.map +1 -0
  459. package/package.json +28 -32
  460. package/rxjsStub.d.ts +10 -0
  461. package/rxjsStub.js +32 -0
  462. package/rxjsStub.js.map +1 -0
  463. package/servers.d.ts +21 -0
  464. package/servers.js +31 -0
  465. package/servers.js.map +1 -0
  466. package/types/ObjectParamAPI.d.ts +853 -0
  467. package/types/ObjectParamAPI.js +343 -0
  468. package/types/ObjectParamAPI.js.map +1 -0
  469. package/types/ObservableAPI.d.ts +246 -0
  470. package/types/ObservableAPI.js +1467 -0
  471. package/types/ObservableAPI.js.map +1 -0
  472. package/types/PromiseAPI.d.ts +227 -0
  473. package/types/PromiseAPI.js +435 -0
  474. package/types/PromiseAPI.js.map +1 -0
  475. package/util.d.ts +2 -0
  476. package/util.js +29 -0
  477. package/util.js.map +1 -0
  478. package/.gitattributes +0 -8
  479. package/.openapi-generator/FILES +0 -156
  480. package/.openapi-generator/VERSION +0 -1
  481. package/AnnouncementApi.md +0 -100
  482. package/BotApi.md +0 -459
  483. package/GroupChannelApi.md +0 -1429
  484. package/MessageApi.md +0 -880
  485. package/MetadataApi.md +0 -274
  486. package/ModerationApi.md +0 -338
  487. package/OpenChannelApi.md +0 -540
  488. package/StatisticsApi.md +0 -125
  489. package/UserApi.md +0 -1868
  490. package/apis/AnnouncementApi.ts +0 -96
  491. package/apis/BotApi.ts +0 -832
  492. package/apis/GroupChannelApi.ts +0 -1865
  493. package/apis/MessageApi.ts +0 -1150
  494. package/apis/MetadataApi.ts +0 -365
  495. package/apis/ModerationApi.ts +0 -449
  496. package/apis/OpenChannelApi.ts +0 -676
  497. package/apis/StatisticsApi.ts +0 -155
  498. package/apis/UserApi.ts +0 -2916
  499. package/apis/baseapi.ts +0 -37
  500. package/apis/exception.ts +0 -15
  501. package/auth/auth.ts +0 -54
  502. package/catalog-info.yaml +0 -12
  503. package/configuration.ts +0 -66
  504. package/git_push.sh +0 -51
  505. package/http/http.ts +0 -231
  506. package/http/isomorphic-fetch.ts +0 -32
  507. package/index.ts +0 -12
  508. package/jest.config.ts +0 -11
  509. package/jest.setup.ts +0 -5
  510. package/middleware.ts +0 -66
  511. package/models/AcceptAnInvitationRequest.ts +0 -42
  512. package/models/AddARegistrationOrDeviceTokenRequest.ts +0 -49
  513. package/models/AddARegistrationOrDeviceTokenResponse.ts +0 -50
  514. package/models/AddExtraDataToAMessageRequest.ts +0 -36
  515. package/models/AddExtraDataToAMessageResponse.ts +0 -36
  516. package/models/BlockAUserRequest.ts +0 -45
  517. package/models/BlockAUserResponse.ts +0 -43
  518. package/models/CheckIfMemberResponse.ts +0 -45
  519. package/models/ChooseAPushNotificationContentTemplateRequest.ts +0 -41
  520. package/models/ChooseAPushNotificationContentTemplateResponse.ts +0 -35
  521. package/models/CreateABotRequest.ts +0 -100
  522. package/models/CreateABotResponse.ts +0 -86
  523. package/models/CreateABotResponseBot.ts +0 -91
  524. package/models/CreateABotResponseBotStyle.ts +0 -57
  525. package/models/CreateAChannelMetadataRequest.ts +0 -42
  526. package/models/CreateAChannelMetadataResponse.ts +0 -42
  527. package/models/CreateAGroupChannelRequest.ts +0 -171
  528. package/models/CreateAUserRequest.ts +0 -80
  529. package/models/CreateAnOpenChannelRequest.ts +0 -91
  530. package/models/CreateUserMetadataRequest.ts +0 -35
  531. package/models/CreateUserTokenRequest.ts +0 -35
  532. package/models/CreateUserTokenResponse.ts +0 -42
  533. package/models/FreezeAGroupChannelRequest.ts +0 -35
  534. package/models/FreezeAnOpenChannelRequest.ts +0 -38
  535. package/models/GetAGroupChannelResponse.ts +0 -365
  536. package/models/GetAGroupChannelResponseAllOf.ts +0 -36
  537. package/models/GetAGroupChannelResponseAllOfChannel.ts +0 -84
  538. package/models/GetChannelInvitationPreferenceResponse.ts +0 -35
  539. package/models/GetTotalNumberOfMessagesInAChannelResponse.ts +0 -35
  540. package/models/GroupChannelListMembersResponse.ts +0 -43
  541. package/models/GroupChatListChannelsResponse.ts +0 -50
  542. package/models/HideAChannelRequest.ts +0 -68
  543. package/models/InviteAsMembersRequest.ts +0 -62
  544. package/models/InviteAsMembersResponse.ts +0 -365
  545. package/models/InviteAsMembersResponseAllOf.ts +0 -36
  546. package/models/JoinAChannelRequest.ts +0 -48
  547. package/models/JoinChannelsRequest.ts +0 -35
  548. package/models/LeaveAChannelRequest.ts +0 -71
  549. package/models/LeaveMyGroupChannelsRequest.ts +0 -35
  550. package/models/ListBlockedUsersResponse.ts +0 -43
  551. package/models/ListBotsResponse.ts +0 -43
  552. package/models/ListBotsResponseBotsInner.ts +0 -102
  553. package/models/ListBotsResponseBotsInnerAi.ts +0 -112
  554. package/models/ListBotsResponseBotsInnerBot.ts +0 -84
  555. package/models/ListBotsResponseBotsInnerBotStyle.ts +0 -57
  556. package/models/ListBotsResponseBotsInnerBotStyleColor.ts +0 -49
  557. package/models/ListBotsResponseBotsInnerFirstMessagesInner.ts +0 -43
  558. package/models/ListBotsResponseBotsInnerFirstMessagesInnerData.ts +0 -35
  559. package/models/ListBotsResponseBotsInnerSafeguard.ts +0 -56
  560. package/models/ListMessagesResponse.ts +0 -36
  561. package/models/ListMyGroupChannelsResponse.ts +0 -50
  562. package/models/ListOpenChannelsResponse.ts +0 -50
  563. package/models/ListOperatorsResponse.ts +0 -43
  564. package/models/ListRegistrationOrDeviceTokensResponse.ts +0 -57
  565. package/models/ListUsersResponse.ts +0 -43
  566. package/models/MarkAllMessagesAsReadRequest.ts +0 -38
  567. package/models/MarkChannelMessagesAsReadRequest.ts +0 -35
  568. package/models/MigrateMessagesAdminMessageRequest.ts +0 -94
  569. package/models/MigrateMessagesFileMessageRequest.ts +0 -130
  570. package/models/MigrateMessagesFileMessageRequestThumbnailsInner.ts +0 -29
  571. package/models/MigrateMessagesRequest.ts +0 -50
  572. package/models/MigrateMessagesRequestMessagesInner.ts +0 -154
  573. package/models/MigrateMessagesTextMessageRequest.ts +0 -94
  574. package/models/ObjectSerializer.ts +0 -647
  575. package/models/RegisterOperatorsToAGroupChannelRequest.ts +0 -35
  576. package/models/RemoveARegistrationOrDeviceTokenResponse.ts +0 -43
  577. package/models/RemoveAllRegistrationOrDeviceTokenResponse.ts +0 -43
  578. package/models/ResetChatHistoryRequest.ts +0 -42
  579. package/models/ResetChatHistoryResponse.ts +0 -38
  580. package/models/ScheduleAnAnnouncementRequest.ts +0 -156
  581. package/models/ScheduleAnAnnouncementRequestCreateChannelOptions.ts +0 -63
  582. package/models/ScheduleAnAnnouncementRequestMessage.ts +0 -63
  583. package/models/ScheduleAnAnnouncementResponse.ts +0 -198
  584. package/models/ScheduleAnAnnouncementResponseMessage.ts +0 -70
  585. package/models/SendABotMessageRequest.ts +0 -220
  586. package/models/SendABotMessageResponse.ts +0 -36
  587. package/models/SendAMessageRequest.ts +0 -238
  588. package/models/SendAMessageRequestPushMessageTemplate.ts +0 -52
  589. package/models/SendAMessageRequestPushMessageTemplateOneOf.ts +0 -48
  590. package/models/SendAdminMessageRequestBody.ts +0 -121
  591. package/models/SendBirdFile.ts +0 -71
  592. package/models/SendBirdGroupChannel.ts +0 -355
  593. package/models/SendBirdMember.ts +0 -187
  594. package/models/SendBirdMessageResponse.ts +0 -245
  595. package/models/SendBirdParentMessageInfo.ts +0 -79
  596. package/models/SendBirdUser.ts +0 -181
  597. package/models/SendFileMessageRequestBody.ts +0 -187
  598. package/models/SendTextMessageRequestBody.ts +0 -170
  599. package/models/SendTextMessageRequestBodyPushMessageTemplate.ts +0 -52
  600. package/models/SendbirdBasicUserInfo.ts +0 -87
  601. package/models/SendbirdDisappearingMessage.ts +0 -42
  602. package/models/SendbirdExtendedMessagePayload.ts +0 -51
  603. package/models/SendbirdGroupChannelDetail.ts +0 -266
  604. package/models/SendbirdGroupChannelDetailChannel.ts +0 -84
  605. package/models/SendbirdGroupChannelLastMessage.ts +0 -246
  606. package/models/SendbirdMessageResponseExtendedMessagePayload.ts +0 -49
  607. package/models/SendbirdMessageResponseMessageEvents.ts +0 -56
  608. package/models/SendbirdOpenChannel.ts +0 -120
  609. package/models/SendbirdPushTriggerOption.ts +0 -15
  610. package/models/SendbirdReaction.ts +0 -49
  611. package/models/SendbirdSmsFallback.ts +0 -42
  612. package/models/SendbirdSortedMetaarrayInner.ts +0 -42
  613. package/models/SendbirdThumbnail.ts +0 -70
  614. package/models/StartTypingIndicatorsRequest.ts +0 -35
  615. package/models/UpdateAChannelMetadataRequest.ts +0 -42
  616. package/models/UpdateAGroupChannelRequest.ts +0 -98
  617. package/models/UpdateAMessageRequest.ts +0 -80
  618. package/models/UpdateAUserRequest.ts +0 -91
  619. package/models/UpdateAnOpenChannelRequest.ts +0 -70
  620. package/models/UpdateBotByIdData.ts +0 -108
  621. package/models/UpdateBotByIdResponse.ts +0 -71
  622. package/models/UpdateChannelInvitationPreferenceRequest.ts +0 -35
  623. package/models/UpdateChannelInvitationPreferenceResponse.ts +0 -35
  624. package/models/UpdateCountPreferenceOfAChannelRequest.ts +0 -38
  625. package/models/UpdateCountPreferenceOfChannelByUrlResponse.ts +0 -38
  626. package/models/UpdateExtraDataInAMessageRequest.ts +0 -50
  627. package/models/UpdateExtraDataInAMessageResponse.ts +0 -36
  628. package/models/UpdatePushPreferencesForAChannelRequest.ts +0 -48
  629. package/models/UpdatePushPreferencesForAChannelResponse.ts +0 -50
  630. package/models/UpdatePushPreferencesRequest.ts +0 -135
  631. package/models/UpdatePushPreferencesRequestDndSchedulesInner.ts +0 -46
  632. package/models/UpdatePushPreferencesRequestDndSchedulesInnerTimeWindowsInner.ts +0 -56
  633. package/models/UpdatePushPreferencesResponse.ts +0 -135
  634. package/models/UpdateSpecificUserMetadataRequest.ts +0 -35
  635. package/models/UpdateUserMetadataRequest.ts +0 -42
  636. package/models/ViewBotByIdResponse.ts +0 -71
  637. package/models/ViewBotByIdResponseBot.ts +0 -70
  638. package/models/ViewCountPreferenceOfAChannelResponse.ts +0 -38
  639. package/models/ViewNumberOfChannelsWithUnreadMessagesResponse.ts +0 -35
  640. package/models/ViewNumberOfDailyActiveUsersResponse.ts +0 -35
  641. package/models/ViewNumberOfMonthlyActiveUsersResponse.ts +0 -35
  642. package/models/ViewNumberOfUnreadMessagesResponse.ts +0 -35
  643. package/models/ViewPushPreferencesForAChannelResponse.ts +0 -50
  644. package/models/ViewPushPreferencesResponse.ts +0 -135
  645. package/models/all.ts +0 -130
  646. package/package.json-e +0 -40
  647. package/rxjsStub.ts +0 -27
  648. package/servers.ts +0 -53
  649. package/src/api/generated/.openapi-generator/FILES +0 -151
  650. package/src/api/generated/.openapi-generator/VERSION +0 -1
  651. package/src/api/generated/README.md +0 -30
  652. package/src/api/generated/apis/AnnouncementApi.ts +0 -96
  653. package/src/api/generated/apis/BotApi.ts +0 -471
  654. package/src/api/generated/apis/GroupChannelApi.ts +0 -1865
  655. package/src/api/generated/apis/MessageApi.ts +0 -1150
  656. package/src/api/generated/apis/MetadataApi.ts +0 -365
  657. package/src/api/generated/apis/ModerationApi.ts +0 -449
  658. package/src/api/generated/apis/OpenChannelApi.ts +0 -676
  659. package/src/api/generated/apis/StatisticsApi.ts +0 -155
  660. package/src/api/generated/apis/UserApi.ts +0 -2454
  661. package/src/api/generated/apis/baseapi.ts +0 -37
  662. package/src/api/generated/apis/exception.ts +0 -15
  663. package/src/api/generated/auth/auth.ts +0 -54
  664. package/src/api/generated/configuration.ts +0 -66
  665. package/src/api/generated/git_push.sh +0 -51
  666. package/src/api/generated/http/http.ts +0 -231
  667. package/src/api/generated/http/isomorphic-fetch.ts +0 -32
  668. package/src/api/generated/index.ts +0 -12
  669. package/src/api/generated/middleware.ts +0 -66
  670. package/src/api/generated/models/AcceptAnInvitationRequest.ts +0 -42
  671. package/src/api/generated/models/AddARegistrationOrDeviceTokenRequest.ts +0 -49
  672. package/src/api/generated/models/AddARegistrationOrDeviceTokenResponse.ts +0 -50
  673. package/src/api/generated/models/AddExtraDataToAMessageRequest.ts +0 -36
  674. package/src/api/generated/models/AddExtraDataToAMessageResponse.ts +0 -36
  675. package/src/api/generated/models/BlockAUserRequest.ts +0 -45
  676. package/src/api/generated/models/BlockAUserResponse.ts +0 -43
  677. package/src/api/generated/models/CheckIfMemberResponse.ts +0 -45
  678. package/src/api/generated/models/ChooseAPushNotificationContentTemplateRequest.ts +0 -41
  679. package/src/api/generated/models/ChooseAPushNotificationContentTemplateResponse.ts +0 -35
  680. package/src/api/generated/models/CreateABotRequest.ts +0 -100
  681. package/src/api/generated/models/CreateABotResponse.ts +0 -86
  682. package/src/api/generated/models/CreateABotResponseBot.ts +0 -91
  683. package/src/api/generated/models/CreateABotResponseBotStyle.ts +0 -57
  684. package/src/api/generated/models/CreateAChannelMetadataRequest.ts +0 -42
  685. package/src/api/generated/models/CreateAChannelMetadataResponse.ts +0 -42
  686. package/src/api/generated/models/CreateAGroupChannelRequest.ts +0 -171
  687. package/src/api/generated/models/CreateAUserRequest.ts +0 -80
  688. package/src/api/generated/models/CreateAnOpenChannelRequest.ts +0 -91
  689. package/src/api/generated/models/CreateUserTokenRequest.ts +0 -35
  690. package/src/api/generated/models/CreateUserTokenResponse.ts +0 -42
  691. package/src/api/generated/models/FreezeAGroupChannelRequest.ts +0 -35
  692. package/src/api/generated/models/FreezeAnOpenChannelRequest.ts +0 -38
  693. package/src/api/generated/models/GetAGroupChannelResponse.ts +0 -365
  694. package/src/api/generated/models/GetAGroupChannelResponseAllOf.ts +0 -36
  695. package/src/api/generated/models/GetAGroupChannelResponseAllOfChannel.ts +0 -84
  696. package/src/api/generated/models/GetChannelInvitationPreferenceResponse.ts +0 -35
  697. package/src/api/generated/models/GetTotalNumberOfMessagesInAChannelResponse.ts +0 -35
  698. package/src/api/generated/models/GroupChannelListMembersResponse.ts +0 -43
  699. package/src/api/generated/models/GroupChatListChannelsResponse.ts +0 -50
  700. package/src/api/generated/models/HideAChannelRequest.ts +0 -68
  701. package/src/api/generated/models/InviteAsMembersRequest.ts +0 -62
  702. package/src/api/generated/models/InviteAsMembersResponse.ts +0 -365
  703. package/src/api/generated/models/InviteAsMembersResponseAllOf.ts +0 -36
  704. package/src/api/generated/models/JoinAChannelRequest.ts +0 -48
  705. package/src/api/generated/models/JoinChannelsRequest.ts +0 -35
  706. package/src/api/generated/models/LeaveAChannelRequest.ts +0 -71
  707. package/src/api/generated/models/LeaveMyGroupChannelsRequest.ts +0 -35
  708. package/src/api/generated/models/ListBlockedUsersResponse.ts +0 -43
  709. package/src/api/generated/models/ListBotsResponse.ts +0 -43
  710. package/src/api/generated/models/ListBotsResponseBotsInner.ts +0 -110
  711. package/src/api/generated/models/ListBotsResponseBotsInnerAi.ts +0 -112
  712. package/src/api/generated/models/ListBotsResponseBotsInnerBot.ts +0 -84
  713. package/src/api/generated/models/ListBotsResponseBotsInnerBotStyle.ts +0 -57
  714. package/src/api/generated/models/ListBotsResponseBotsInnerBotStyleColor.ts +0 -49
  715. package/src/api/generated/models/ListBotsResponseBotsInnerFirstMessagesInner.ts +0 -43
  716. package/src/api/generated/models/ListBotsResponseBotsInnerFirstMessagesInnerData.ts +0 -35
  717. package/src/api/generated/models/ListBotsResponseBotsInnerSafeguard.ts +0 -56
  718. package/src/api/generated/models/ListMessagesResponse.ts +0 -36
  719. package/src/api/generated/models/ListMyGroupChannelsResponse.ts +0 -50
  720. package/src/api/generated/models/ListOpenChannelsResponse.ts +0 -50
  721. package/src/api/generated/models/ListOperatorsResponse.ts +0 -43
  722. package/src/api/generated/models/ListRegistrationOrDeviceTokensResponse.ts +0 -57
  723. package/src/api/generated/models/ListUsersResponse.ts +0 -43
  724. package/src/api/generated/models/MarkAllMessagesAsReadRequest.ts +0 -38
  725. package/src/api/generated/models/MarkChannelMessagesAsReadRequest.ts +0 -35
  726. package/src/api/generated/models/MigrateMessagesAdminMessageRequest.ts +0 -94
  727. package/src/api/generated/models/MigrateMessagesFileMessageRequest.ts +0 -130
  728. package/src/api/generated/models/MigrateMessagesFileMessageRequestThumbnailsInner.ts +0 -29
  729. package/src/api/generated/models/MigrateMessagesRequest.ts +0 -50
  730. package/src/api/generated/models/MigrateMessagesRequestMessagesInner.ts +0 -154
  731. package/src/api/generated/models/MigrateMessagesTextMessageRequest.ts +0 -94
  732. package/src/api/generated/models/ObjectSerializer.ts +0 -619
  733. package/src/api/generated/models/RegisterOperatorsToAGroupChannelRequest.ts +0 -35
  734. package/src/api/generated/models/RemoveARegistrationOrDeviceTokenResponse.ts +0 -43
  735. package/src/api/generated/models/RemoveAllRegistrationOrDeviceTokenResponse.ts +0 -43
  736. package/src/api/generated/models/ResetChatHistoryRequest.ts +0 -42
  737. package/src/api/generated/models/ResetChatHistoryResponse.ts +0 -38
  738. package/src/api/generated/models/ScheduleAnAnnouncementRequest.ts +0 -156
  739. package/src/api/generated/models/ScheduleAnAnnouncementRequestCreateChannelOptions.ts +0 -63
  740. package/src/api/generated/models/ScheduleAnAnnouncementRequestMessage.ts +0 -63
  741. package/src/api/generated/models/ScheduleAnAnnouncementResponse.ts +0 -198
  742. package/src/api/generated/models/ScheduleAnAnnouncementResponseMessage.ts +0 -70
  743. package/src/api/generated/models/SendABotMessageRequest.ts +0 -214
  744. package/src/api/generated/models/SendABotMessageResponse.ts +0 -36
  745. package/src/api/generated/models/SendAMessageRequest.ts +0 -238
  746. package/src/api/generated/models/SendAMessageRequestPushMessageTemplate.ts +0 -52
  747. package/src/api/generated/models/SendAMessageRequestPushMessageTemplateOneOf.ts +0 -48
  748. package/src/api/generated/models/SendAdminMessageRequestBody.ts +0 -121
  749. package/src/api/generated/models/SendFileMessageRequestBody.ts +0 -187
  750. package/src/api/generated/models/SendTextMessageRequestBody.ts +0 -170
  751. package/src/api/generated/models/SendTextMessageRequestBodyPushMessageTemplate.ts +0 -52
  752. package/src/api/generated/models/SendbirdBasicUserInfo.ts +0 -87
  753. package/src/api/generated/models/SendbirdDisappearingMessage.ts +0 -42
  754. package/src/api/generated/models/SendbirdExtendedMessagePayload.ts +0 -51
  755. package/src/api/generated/models/SendbirdFile.ts +0 -71
  756. package/src/api/generated/models/SendbirdGroupChannel.ts +0 -355
  757. package/src/api/generated/models/SendbirdGroupChannelDetail.ts +0 -266
  758. package/src/api/generated/models/SendbirdGroupChannelDetailChannel.ts +0 -84
  759. package/src/api/generated/models/SendbirdMember.ts +0 -187
  760. package/src/api/generated/models/SendbirdMessageResponse.ts +0 -245
  761. package/src/api/generated/models/SendbirdMessageResponseMessageEvents.ts +0 -56
  762. package/src/api/generated/models/SendbirdOpenChannel.ts +0 -120
  763. package/src/api/generated/models/SendbirdParentMessageInfo.ts +0 -79
  764. package/src/api/generated/models/SendbirdPushTriggerOption.ts +0 -15
  765. package/src/api/generated/models/SendbirdReaction.ts +0 -49
  766. package/src/api/generated/models/SendbirdSmsFallback.ts +0 -42
  767. package/src/api/generated/models/SendbirdSortedMetaarrayInner.ts +0 -42
  768. package/src/api/generated/models/SendbirdThumbnail.ts +0 -70
  769. package/src/api/generated/models/SendbirdUser.ts +0 -188
  770. package/src/api/generated/models/StartTypingIndicatorsRequest.ts +0 -35
  771. package/src/api/generated/models/UpdateAChannelMetadataRequest.ts +0 -42
  772. package/src/api/generated/models/UpdateAGroupChannelRequest.ts +0 -98
  773. package/src/api/generated/models/UpdateAMessageRequest.ts +0 -80
  774. package/src/api/generated/models/UpdateAUserRequest.ts +0 -91
  775. package/src/api/generated/models/UpdateAnOpenChannelRequest.ts +0 -70
  776. package/src/api/generated/models/UpdateChannelInvitationPreferenceRequest.ts +0 -35
  777. package/src/api/generated/models/UpdateChannelInvitationPreferenceResponse.ts +0 -35
  778. package/src/api/generated/models/UpdateCountPreferenceOfAChannelRequest.ts +0 -38
  779. package/src/api/generated/models/UpdateCountPreferenceOfChannelByUrlResponse.ts +0 -38
  780. package/src/api/generated/models/UpdateExtraDataInAMessageRequest.ts +0 -50
  781. package/src/api/generated/models/UpdateExtraDataInAMessageResponse.ts +0 -36
  782. package/src/api/generated/models/UpdatePushPreferencesForAChannelRequest.ts +0 -48
  783. package/src/api/generated/models/UpdatePushPreferencesForAChannelResponse.ts +0 -50
  784. package/src/api/generated/models/UpdatePushPreferencesRequest.ts +0 -127
  785. package/src/api/generated/models/UpdatePushPreferencesResponse.ts +0 -127
  786. package/src/api/generated/models/ViewCountPreferenceOfAChannelResponse.ts +0 -38
  787. package/src/api/generated/models/ViewNumberOfChannelsWithUnreadMessagesResponse.ts +0 -35
  788. package/src/api/generated/models/ViewNumberOfDailyActiveUsersResponse.ts +0 -35
  789. package/src/api/generated/models/ViewNumberOfMonthlyActiveUsersResponse.ts +0 -35
  790. package/src/api/generated/models/ViewNumberOfUnreadMessagesResponse.ts +0 -35
  791. package/src/api/generated/models/ViewPushPreferencesForAChannelResponse.ts +0 -50
  792. package/src/api/generated/models/ViewPushPreferencesResponse.ts +0 -127
  793. package/src/api/generated/models/all.ts +0 -121
  794. package/src/api/generated/package.json +0 -40
  795. package/src/api/generated/rxjsStub.ts +0 -27
  796. package/src/api/generated/servers.ts +0 -53
  797. package/src/api/generated/tsconfig.json +0 -28
  798. package/src/api/generated/types/ObjectParamAPI.ts +0 -3611
  799. package/src/api/generated/types/ObservableAPI.ts +0 -2594
  800. package/src/api/generated/types/PromiseAPI.ts +0 -1440
  801. package/src/api/generated/util.ts +0 -37
  802. package/src/types/FileCompat.ts +0 -7
  803. package/tests/asset/image/test_20kb.jpg +0 -0
  804. package/tests/asset/image/test_25mb.bmp +0 -0
  805. package/tests/asset/image/test_5mb.jpg +0 -0
  806. package/tests/asset/image/test_75kb.jpg +0 -0
  807. package/tests/integration/bot.test.ts +0 -548
  808. package/tests/integration/constants.ts +0 -10
  809. package/tests/integration/groupChannel.test.ts +0 -1624
  810. package/tests/integration/helper.ts +0 -8
  811. package/tests/integration/metadata.test.ts +0 -22
  812. package/tests/integration/moderation.test.ts +0 -172
  813. package/tests/integration/openChannel.test.ts +0 -239
  814. package/tests/integration/statistics.test.ts +0 -44
  815. package/tests/integration/user.test.ts +0 -957
  816. package/tests/utils/fileLoader.ts +0 -46
  817. package/tsconfig.json +0 -29
  818. package/types/ObjectParamAPI.ts +0 -3998
  819. package/types/ObservableAPI.ts +0 -2855
  820. package/types/PromiseAPI.ts +0 -1575
  821. package/util.ts +0 -37
@@ -1,2454 +0,0 @@
1
- // TODO: better import syntax?
2
- import {BaseAPIRequestFactory, RequiredError} from './baseapi';
3
- import {Configuration} from '../configuration';
4
- import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http';
5
- import * as FormData from "form-data";
6
- import { URLSearchParams } from 'url';
7
- import {ObjectSerializer} from '../models/ObjectSerializer';
8
- import {ApiException} from './exception';
9
- import {canConsumeForm, isCodeInRange} from '../util';
10
- import {SecurityAuthentication} from '../auth/auth';
11
-
12
-
13
- import { AddARegistrationOrDeviceTokenRequest } from '../models/AddARegistrationOrDeviceTokenRequest';
14
- import { AddARegistrationOrDeviceTokenResponse } from '../models/AddARegistrationOrDeviceTokenResponse';
15
- import { ChooseAPushNotificationContentTemplateRequest } from '../models/ChooseAPushNotificationContentTemplateRequest';
16
- import { ChooseAPushNotificationContentTemplateResponse } from '../models/ChooseAPushNotificationContentTemplateResponse';
17
- import { CreateAUserRequest } from '../models/CreateAUserRequest';
18
- import { CreateUserTokenRequest } from '../models/CreateUserTokenRequest';
19
- import { CreateUserTokenResponse } from '../models/CreateUserTokenResponse';
20
- import { GetChannelInvitationPreferenceResponse } from '../models/GetChannelInvitationPreferenceResponse';
21
- import { LeaveMyGroupChannelsRequest } from '../models/LeaveMyGroupChannelsRequest';
22
- import { ListMyGroupChannelsResponse } from '../models/ListMyGroupChannelsResponse';
23
- import { ListRegistrationOrDeviceTokensResponse } from '../models/ListRegistrationOrDeviceTokensResponse';
24
- import { ListUsersResponse } from '../models/ListUsersResponse';
25
- import { MarkAllMessagesAsReadRequest } from '../models/MarkAllMessagesAsReadRequest';
26
- import { MarkChannelMessagesAsReadRequest } from '../models/MarkChannelMessagesAsReadRequest';
27
- import { RemoveARegistrationOrDeviceTokenResponse } from '../models/RemoveARegistrationOrDeviceTokenResponse';
28
- import { RemoveAllRegistrationOrDeviceTokenResponse } from '../models/RemoveAllRegistrationOrDeviceTokenResponse';
29
- import { SendbirdUser } from '../models/SendbirdUser';
30
- import { UpdateAUserRequest } from '../models/UpdateAUserRequest';
31
- import { UpdateChannelInvitationPreferenceRequest } from '../models/UpdateChannelInvitationPreferenceRequest';
32
- import { UpdateChannelInvitationPreferenceResponse } from '../models/UpdateChannelInvitationPreferenceResponse';
33
- import { UpdateCountPreferenceOfAChannelRequest } from '../models/UpdateCountPreferenceOfAChannelRequest';
34
- import { UpdateCountPreferenceOfChannelByUrlResponse } from '../models/UpdateCountPreferenceOfChannelByUrlResponse';
35
- import { UpdatePushPreferencesForAChannelRequest } from '../models/UpdatePushPreferencesForAChannelRequest';
36
- import { UpdatePushPreferencesForAChannelResponse } from '../models/UpdatePushPreferencesForAChannelResponse';
37
- import { UpdatePushPreferencesRequest } from '../models/UpdatePushPreferencesRequest';
38
- import { UpdatePushPreferencesResponse } from '../models/UpdatePushPreferencesResponse';
39
- import { ViewCountPreferenceOfAChannelResponse } from '../models/ViewCountPreferenceOfAChannelResponse';
40
- import { ViewNumberOfChannelsWithUnreadMessagesResponse } from '../models/ViewNumberOfChannelsWithUnreadMessagesResponse';
41
- import { ViewNumberOfUnreadMessagesResponse } from '../models/ViewNumberOfUnreadMessagesResponse';
42
- import { ViewPushPreferencesForAChannelResponse } from '../models/ViewPushPreferencesForAChannelResponse';
43
- import { ViewPushPreferencesResponse } from '../models/ViewPushPreferencesResponse';
44
-
45
- /**
46
- * no description
47
- */
48
- export class UserApiRequestFactory extends BaseAPIRequestFactory {
49
-
50
- /**
51
- * ## Add a registration or device token > __Note__: A user can have up to 20 FCM registration tokens, 20 HMS device tokens, and 20 APNs device tokens each. The oldest token will be deleted before a new token is added for a user who already has 20 registration or device tokens. Only the 20 newest tokens will be maintained for users who already have more than 20 of each token type. To send notification requests to push notification services on behalf of your server, adds a specific user's FCM registration token, HMS device token, or APNs device token to Sendbird server. Depending on which push service you are using, you can pass one of two values in `token_type`: `gcm`, `huawei`, or `apns`. A FCM registration token and an APNs device token allow identification of each client app instance on each device, and are generated and registered by Android and iOS apps through the corresponding SDKs. Use this method if you need to register a token via your own server. > __Note__: For more information on the registration token and device token, visit the Google's [FCM](https://firebase.google.com/docs/auth/admin/verify-id-tokens) page, Huawei's [Push kit](https://developer.huawei.com/consumer/en/doc/development/HMSCore-Guides/service-introduction-0000001050040060) and Apple's [APNs](https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/APNSOverview.html) page. https://sendbird.com/docs/chat/v3/platform-api/guides/user#2-add-a-registration-or-device-token ----------------------------
52
- * Add a registration or device token
53
- * @param userId (Required)
54
- * @param tokenType (Required)
55
- * @param apiToken
56
- * @param addARegistrationOrDeviceTokenRequest
57
- */
58
- public async addARegistrationOrDeviceToken(userId: string, tokenType: 'gcm' | 'huawei' | 'apns', apiToken?: string, addARegistrationOrDeviceTokenRequest?: AddARegistrationOrDeviceTokenRequest, _options?: Configuration): Promise<RequestContext> {
59
- let _config = _options || this.configuration;
60
-
61
- // verify required parameter 'userId' is not null or undefined
62
- if (userId === null || userId === undefined) {
63
- throw new RequiredError("UserApi", "addARegistrationOrDeviceToken", "userId");
64
- }
65
-
66
-
67
- // verify required parameter 'tokenType' is not null or undefined
68
- if (tokenType === null || tokenType === undefined) {
69
- throw new RequiredError("UserApi", "addARegistrationOrDeviceToken", "tokenType");
70
- }
71
-
72
-
73
-
74
-
75
- // Path Params
76
- const localVarPath = '/v3/users/{user_id}/push/{token_type}'
77
- .replace('{' + 'user_id' + '}', encodeURIComponent(String(userId)))
78
- .replace('{' + 'token_type' + '}', encodeURIComponent(String(tokenType)));
79
-
80
- // Make Request Context
81
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST);
82
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
83
-
84
- // Header Params
85
- requestContext.setHeaderParam("api-token", ObjectSerializer.serialize(apiToken, "string", ""));
86
-
87
-
88
- // Body Params
89
- const contentType = ObjectSerializer.getPreferredMediaType([
90
- "application/json"
91
- ]);
92
- requestContext.setHeaderParam("Content-Type", contentType);
93
- const serializedBody = ObjectSerializer.stringify(
94
- ObjectSerializer.serialize(addARegistrationOrDeviceTokenRequest, "AddARegistrationOrDeviceTokenRequest", ""),
95
- contentType
96
- );
97
- requestContext.setBody(serializedBody);
98
-
99
-
100
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
101
- if (defaultAuth?.applySecurityAuthentication) {
102
- await defaultAuth?.applySecurityAuthentication(requestContext);
103
- }
104
-
105
- return requestContext;
106
- }
107
-
108
- /**
109
- * ## Choose a push notification content template Users can choose a template to determine how push notifications appear to them. Push notification content templates are pre-formatted forms that can be customized to display your own push notification messages on a user's device. Sendbird provides two types: `default` and `alternative`. Go to **Settings** > **Chat** > **Push notifications** > **Push notification content templates** on [Sendbird Dashboard](https://dashboard.sendbird.com/auth/signin) to customize the templates. If the `push_message_template` property is specified when [sending a message](https://sendbird.com/docs/chat/platform-api/v3/message/messaging-basics/send-a-message), the content template customized for the message takes precedence over the user's choice. > **Note**: Push notifications are only available for group channels. https://sendbird.com/docs/chat/platform-api/v3/user/configuring-notification-preferences/choose-a-push-notification-content-template#1-choose-a-push-notification-content-template
110
- * Choose a push notification content template
111
- * @param userId (Required)
112
- * @param apiToken
113
- * @param chooseAPushNotificationContentTemplateRequest
114
- */
115
- public async chooseAPushNotificationContentTemplate(userId: string, apiToken?: string, chooseAPushNotificationContentTemplateRequest?: ChooseAPushNotificationContentTemplateRequest, _options?: Configuration): Promise<RequestContext> {
116
- let _config = _options || this.configuration;
117
-
118
- // verify required parameter 'userId' is not null or undefined
119
- if (userId === null || userId === undefined) {
120
- throw new RequiredError("UserApi", "chooseAPushNotificationContentTemplate", "userId");
121
- }
122
-
123
-
124
-
125
-
126
- // Path Params
127
- const localVarPath = '/v3/users/{user_id}/push/template'
128
- .replace('{' + 'user_id' + '}', encodeURIComponent(String(userId)));
129
-
130
- // Make Request Context
131
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PUT);
132
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
133
-
134
- // Header Params
135
- requestContext.setHeaderParam("api-token", ObjectSerializer.serialize(apiToken, "string", ""));
136
-
137
-
138
- // Body Params
139
- const contentType = ObjectSerializer.getPreferredMediaType([
140
- "application/json"
141
- ]);
142
- requestContext.setHeaderParam("Content-Type", contentType);
143
- const serializedBody = ObjectSerializer.stringify(
144
- ObjectSerializer.serialize(chooseAPushNotificationContentTemplateRequest, "ChooseAPushNotificationContentTemplateRequest", ""),
145
- contentType
146
- );
147
- requestContext.setBody(serializedBody);
148
-
149
-
150
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
151
- if (defaultAuth?.applySecurityAuthentication) {
152
- await defaultAuth?.applySecurityAuthentication(requestContext);
153
- }
154
-
155
- return requestContext;
156
- }
157
-
158
- /**
159
- * ## Create a user You should create a user in your Sendbird application to initiate conversations in channels. A user is identified by its unique user ID, and additionally have a changeable nickname, profile image, and so on. Users are at the core of all conversations. Sendbird applications are made up of users who chat in either Open Channels or Group Channels. Using this API, it is possible to have fine grained control over your users and what those users can do. To learn more about users, see [User overview](https://sendbird.com/docs/chat/platform-api/v3/user/user-overview#2-resource-representation). https://sendbird.com/docs/chat/platform-api/v3/user/creating-users/create-a-user#1-create-a-user
160
- * Create a user
161
- * @param apiToken
162
- * @param createAUserRequest
163
- */
164
- public async createAUser(apiToken?: string, createAUserRequest?: CreateAUserRequest, _options?: Configuration): Promise<RequestContext> {
165
- let _config = _options || this.configuration;
166
-
167
-
168
-
169
- // Path Params
170
- const localVarPath = '/v3/users';
171
-
172
- // Make Request Context
173
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST);
174
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
175
-
176
- // Header Params
177
- requestContext.setHeaderParam("api-token", ObjectSerializer.serialize(apiToken, "string", ""));
178
-
179
-
180
- // Body Params
181
- const contentType = ObjectSerializer.getPreferredMediaType([
182
- "application/json"
183
- ]);
184
- requestContext.setHeaderParam("Content-Type", contentType);
185
- const serializedBody = ObjectSerializer.stringify(
186
- ObjectSerializer.serialize(createAUserRequest, "CreateAUserRequest", ""),
187
- contentType
188
- );
189
- requestContext.setBody(serializedBody);
190
-
191
-
192
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
193
- if (defaultAuth?.applySecurityAuthentication) {
194
- await defaultAuth?.applySecurityAuthentication(requestContext);
195
- }
196
-
197
- return requestContext;
198
- }
199
-
200
- /**
201
- * ## Create user token This action issues a session token for user authentication. Session tokens provide an efficient stateless authentication method by not storing the tokens in the Sendbird database, and thus improving the server's performance. See [access token vs. session token](https://sendbird.com/docs/chat/platform-api/v3/user/creating-users/create-a-user#2-access-token-vs-session-token) to learn more about authenticating users. > **Note**: The endpoint `/users/{user_id}` is deprecated. Use `/users/{user_id}/token` for greater efficiency. https://sendbird.com/docs/chat/platform-api/v3/user/managing-session-tokens/issue-a-session-token#1-issue-a-session-token
202
- * Create user token
203
- * @param userId (Required)
204
- * @param apiToken
205
- * @param createUserTokenRequest
206
- */
207
- public async createUserToken(userId: string, apiToken?: string, createUserTokenRequest?: CreateUserTokenRequest, _options?: Configuration): Promise<RequestContext> {
208
- let _config = _options || this.configuration;
209
-
210
- // verify required parameter 'userId' is not null or undefined
211
- if (userId === null || userId === undefined) {
212
- throw new RequiredError("UserApi", "createUserToken", "userId");
213
- }
214
-
215
-
216
-
217
-
218
- // Path Params
219
- const localVarPath = '/v3/users/{user_id}/token'
220
- .replace('{' + 'user_id' + '}', encodeURIComponent(String(userId)));
221
-
222
- // Make Request Context
223
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST);
224
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
225
-
226
- // Header Params
227
- requestContext.setHeaderParam("api-token", ObjectSerializer.serialize(apiToken, "string", ""));
228
-
229
-
230
- // Body Params
231
- const contentType = ObjectSerializer.getPreferredMediaType([
232
- "application/json"
233
- ]);
234
- requestContext.setHeaderParam("Content-Type", contentType);
235
- const serializedBody = ObjectSerializer.stringify(
236
- ObjectSerializer.serialize(createUserTokenRequest, "CreateUserTokenRequest", ""),
237
- contentType
238
- );
239
- requestContext.setBody(serializedBody);
240
-
241
-
242
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
243
- if (defaultAuth?.applySecurityAuthentication) {
244
- await defaultAuth?.applySecurityAuthentication(requestContext);
245
- }
246
-
247
- return requestContext;
248
- }
249
-
250
- /**
251
- * ## Delete a user You can delete a user from your Sendbird application using this API. > **Note**: This API deletes user data and metadata, except for their messages. If you wish to delete user data including their messages, use the [GDPR request](https://sendbird.com/docs/chat/platform-api/v3/privacy/privacy-overview). [https://sendbird.com/docs/chat/platform-api/v3/user/managing-users/delete-a-user#1-delete-a-user](https://sendbird.com/docs/chat/platform-api/v3/user/managing-users/delete-a-user#1-delete-a-user)
252
- * Delete a user
253
- * @param userId (Required)
254
- * @param apiToken
255
- */
256
- public async deleteAUser(userId: string, apiToken?: string, _options?: Configuration): Promise<RequestContext> {
257
- let _config = _options || this.configuration;
258
-
259
- // verify required parameter 'userId' is not null or undefined
260
- if (userId === null || userId === undefined) {
261
- throw new RequiredError("UserApi", "deleteAUser", "userId");
262
- }
263
-
264
-
265
-
266
- // Path Params
267
- const localVarPath = '/v3/users/{user_id}'
268
- .replace('{' + 'user_id' + '}', encodeURIComponent(String(userId)));
269
-
270
- // Make Request Context
271
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.DELETE);
272
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
273
-
274
- // Header Params
275
- requestContext.setHeaderParam("api-token", ObjectSerializer.serialize(apiToken, "string", ""));
276
-
277
-
278
-
279
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
280
- if (defaultAuth?.applySecurityAuthentication) {
281
- await defaultAuth?.applySecurityAuthentication(requestContext);
282
- }
283
-
284
- return requestContext;
285
- }
286
-
287
- /**
288
- * ## Get channel invitation preference This action retrieves a user's [group channel](https://sendbird.com/docs/chat/platform-api/v3/channel/channel-overview#2-channel-types-3-group-channel) invitation preference. Users are subject to both user-specific and application-wide invitation preferences. Of the two, the invitation preference set for a specific user takes precedence over [the default channel invitation preference](https://sendbird.com/docs/chat/platform-api/v3/channel/setting-up-channels/get-default-invitation-preference). [https://sendbird.com/docs/chat/platform-api/v3/channel/managing-a-channel/get-channel-invitation-preference#1-get-channel-invitation-preference](https://sendbird.com/docs/chat/platform-api/v3/channel/managing-a-channel/get-channel-invitation-preference#1-get-channel-invitation-preference)
289
- * Get channel invitation preference
290
- * @param userId (Required)
291
- * @param apiToken
292
- */
293
- public async getChannelInvitationPreference(userId: string, apiToken?: string, _options?: Configuration): Promise<RequestContext> {
294
- let _config = _options || this.configuration;
295
-
296
- // verify required parameter 'userId' is not null or undefined
297
- if (userId === null || userId === undefined) {
298
- throw new RequiredError("UserApi", "getChannelInvitationPreference", "userId");
299
- }
300
-
301
-
302
-
303
- // Path Params
304
- const localVarPath = '/v3/users/{user_id}/channel_invitation_preference'
305
- .replace('{' + 'user_id' + '}', encodeURIComponent(String(userId)));
306
-
307
- // Make Request Context
308
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
309
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
310
-
311
- // Header Params
312
- requestContext.setHeaderParam("api-token", ObjectSerializer.serialize(apiToken, "string", ""));
313
-
314
-
315
-
316
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
317
- if (defaultAuth?.applySecurityAuthentication) {
318
- await defaultAuth?.applySecurityAuthentication(requestContext);
319
- }
320
-
321
- return requestContext;
322
- }
323
-
324
- /**
325
- * ## Leave my group channels This action allows a user to leave all group channels or channels with a specific custom type. This API is useful if you want to let a user leave a set of channels at once. To let a user leave only one of their group channels, use the [leave a channel API](https://sendbird.com/docs/chat/platform-api/v3/channel/managing-a-channel/leave-a-channel) instead. Since this API can't be called for a deactivated user, ensure that the [<code>leave_all_when_deactivated</code>](https://sendbird.com/docs/chat/platform-api/v3/user/managing-users/update-a-user#2-request-body) property of the user is set to its default value of `true` to let the user leave all joined group channels upon deactivation. https://sendbird.com/docs/chat/platform-api/v3/user/managing-joined-group-channels/leave-group-channels#1-leave-group-channels `user_id` Type: string Description: Specifies the unique ID of the user to leave all joined group channels.
326
- * Leave my group channels
327
- * @param userId (Required)
328
- * @param apiToken
329
- * @param leaveMyGroupChannelsRequest
330
- */
331
- public async leaveMyGroupChannels(userId: string, apiToken?: string, leaveMyGroupChannelsRequest?: LeaveMyGroupChannelsRequest, _options?: Configuration): Promise<RequestContext> {
332
- let _config = _options || this.configuration;
333
-
334
- // verify required parameter 'userId' is not null or undefined
335
- if (userId === null || userId === undefined) {
336
- throw new RequiredError("UserApi", "leaveMyGroupChannels", "userId");
337
- }
338
-
339
-
340
-
341
-
342
- // Path Params
343
- const localVarPath = '/v3/users/{user_id}/my_group_channels/leave'
344
- .replace('{' + 'user_id' + '}', encodeURIComponent(String(userId)));
345
-
346
- // Make Request Context
347
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PUT);
348
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
349
-
350
- // Header Params
351
- requestContext.setHeaderParam("api-token", ObjectSerializer.serialize(apiToken, "string", ""));
352
-
353
-
354
- // Body Params
355
- const contentType = ObjectSerializer.getPreferredMediaType([
356
- "application/json"
357
- ]);
358
- requestContext.setHeaderParam("Content-Type", contentType);
359
- const serializedBody = ObjectSerializer.stringify(
360
- ObjectSerializer.serialize(leaveMyGroupChannelsRequest, "LeaveMyGroupChannelsRequest", ""),
361
- contentType
362
- );
363
- requestContext.setBody(serializedBody);
364
-
365
-
366
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
367
- if (defaultAuth?.applySecurityAuthentication) {
368
- await defaultAuth?.applySecurityAuthentication(requestContext);
369
- }
370
-
371
- return requestContext;
372
- }
373
-
374
- /**
375
- * ## List my group channels This action retrieves a list of [group channels](https://sendbird.com/docs/chat/platform-api/v3/channel/channel-overview#2-channel-types-3-group-channel) that a specific user has joined. You can use various query parameters to determine the search scope and select what kind of information you want to receive about the queried channels. If you're looking to retrieve a list of group channels in a specific application, visit the [list group channels](https://sendbird.com/docs/chat/platform-api/v3/channel/listing-channels-in-an-application/list-group-channels) page under the Channel section. https://sendbird.com/docs/chat/platform-api/v3/user/managing-joined-group-channels/list-group-channels-by-user#1-list-group-channels-by-user `user_id` Type: string Description: Specifies the unique ID of the target user.
376
- * List my group channels
377
- * @param userId (Required)
378
- * @param apiToken
379
- * @param token Specifies a page token that indicates the starting index of a chunk of results. If not specified, the index is set as 0.
380
- * @param limit Specifies the number of results to return per page. Acceptable values are 1 to 100, inclusive. (Default: 10)
381
- * @param distinctMode
382
- * @param publicMode
383
- * @param superMode
384
- * @param createdAfter Restricts the search scope to only retrieve group channels which have been created after the specified time, in Unix milliseconds format.
385
- * @param createdBefore Restricts the search scope to only retrieve group channels which have been created before the specified time, in Unix milliseconds format.
386
- * @param showEmpty
387
- * @param showMember
388
- * @param showDeliveryReceipt
389
- * @param showReadReceipt
390
- * @param showMetadata
391
- * @param showFrozen
392
- * @param order
393
- * @param metadataOrderKey Specifies the key of an item in metadata. When a value of the order parameter is set to metadata_value_alphabetical, the results are alphabetically sorted by the value of the item specified by the key.
394
- * @param customTypes Specifies a comma-separated string of one or more custom types to filter group channels. URL encoding each type is recommended. If not specified, all channels are returned, regardless of their custom type.
395
- * @param customTypeStartswith Searches for group channels with the custom type which starts with the specified value. URL encoding the value is recommended.
396
- * @param channelUrls Specifies a comma-separated string of one or more group channel URLs to restrict the search scope. URL encoding each channel URL is recommended.
397
- * @param name Specifies one or more group channel names.
398
- * @param nameContains Searches for group channels whose names contain the specified value. Note that this parameter is case-insensitive. URL encoding the value is recommended.
399
- * @param nameStartswith Searches for group channels whose names start with the specified value. Note that this parameter is case-insensitive. URL encoding the value is recommended.
400
- * @param membersExactlyIn Searches for group channels with all the specified users as members. The parameter value should consist of user IDs separated by commas. Only user IDs that match those of existing users are used for channel search. URL encoding each ID is recommended.
401
- * @param membersIncludeIn Searches for group channels that include one or more users as members among the specified users. The value should consist of user IDs separated by commas or %2C. You can specify up to 60 user IDs. Only user IDs that match those of existing users are used for channel search. URL encoding each ID is recommended.
402
- * @param queryType Specifies a logical condition applied to the members_include_in parameter. Acceptable values are either AND or OR. For example, if you specify three members, A, B, and C, in members_include_in, the value of AND returns all channels that include every one of {A. B, C} as members. The value of OR returns channels that include {A}, plus those that include {B}, plus those that include {C}. (Default: AND)
403
- * @param membersNickname Searches for group channels with members whose nicknames match the specified value. URL encoding the value is recommended.
404
- * @param membersNicknameContains Searches for group channels with members whose nicknames contain the specified value. Note that this parameter is case-insensitive. URL encoding the value is recommended. * We recommend using at least three characters for the parameter value for better search efficiency when you design and implement related features. If you would like to allow one or two characters for searching, use members_nickname instead to prevent performance issues.
405
- * @param membersNicknameStartswith Searches for group channels with members whose nicknames begin with the specified value. This parameter isn&#39;t case-sensitive. URL encoding the value is recommended.
406
- * @param searchQuery Searches for group channels where the specified query string matches the channel name or the nickname of the member. This parameter isn&#39;t case-sensitive and should be specified in conjunction with the search_fields parameter below. URL encoding the value is recommended.
407
- * @param searchFields Specifies a comma-separated string of one or more search fields to apply to the query, which restricts the results within the specified fields (OR search condition). Acceptable values are channel_name and member_nickname. This is effective only when the search_query parameter above is specified. (Default: channel_name, member_nickname together)
408
- * @param metadataKey Searches for group channels with metadata containing an item with the specified value as its key. To use this parameter, either the metadata_values parameter or the metadata_value_startswith parameter should be specified.
409
- * @param metadataValues Searches for group channels with metadata containing an item with the key specified by the metadata_key parameter, and the value of that item matches one or more values specified by this parameter. The string should be specified with multiple values separated by commas. URL encoding each value is recommended. To use this parameter, the metadata_key parameter should be specified.
410
- * @param metadataValueStartswith Searches for group channels with metadata containing an item with the key specified by the metadata_key parameter, and the values of that item that start with the specified value of this parameter. URL encoding the value is recommended. To use this parameter, the metadata_key parameter should be specified.
411
- * @param metacounterKey Searches for group channels with metacounter containing an item with the specified value as its key. To use this parameter, either the metacounter_values parameter or one of the metacounter_value_gt, metacounter_value_gte, metacounter_value_lt, and metacounter_value_lte parameters should be specified.
412
- * @param metacounterValues Searches for group channels with metacounter containing an item with the key specified by the metadata_key parameter, where the value of that item is equal to one or more values specified by this parameter. The string should be specified with multiple values separated by commas. To use this parameter, the metacounter_key parameter should be specified.
413
- * @param metacounterValueGt Searches for group channels with metacounter containing an item with the key specified by the metadata_key parameter, where the value of that item is greater than the value specified by this parameter. To use this parameter, the metacounter_key parameter should be specified.
414
- * @param metacounterValueGte Searches for group channels with metacounter containing an item with the key specified by the metadata_key parameter, where the value of that item is greater than or equal to the value specified by this parameter. To use this parameter, the metacounter_key parameter should be specified.
415
- * @param metacounterValueLt Searches for group channels with metacounter containing an item with the key specified by the metadata_key parameter, where the value of that item is lower than the value specified by this parameter. To use this parameter, the metacounter_key parameter should be specified.
416
- * @param metacounterValueLte Searches for group channels with metacounter containing an item with the key specified by the metadata_key parameter, where the value of that item is lower than or equal to the value specified by this parameter. To use this parameter, the metacounter_key parameter should be specified.
417
- * @param includeSortedMetaarrayInLastMessage Determines whether to include the sorted_metaarray as one of the last_message’s properties in the response.
418
- * @param hiddenMode Restricts the search scope to group channels that match a specific hidden_status and operating behavior
419
- * @param unreadFilter Restricts the search scope to only retrieve group channels with one or more unread messages. This filter doesn&#39;t support Supergroup channels. Acceptable values are all and unread_message. (Default: all)
420
- * @param memberStateFilter
421
- */
422
- public async listMyGroupChannels(userId: string, apiToken: string, token?: string, limit?: number, distinctMode?: 'all' | 'distinct' | 'nondistinct', publicMode?: 'all' | 'private' | 'public', superMode?: 'all' | 'super' | 'nonsuper', createdAfter?: number, createdBefore?: number, showEmpty?: boolean, showMember?: boolean, showDeliveryReceipt?: boolean, showReadReceipt?: boolean, showMetadata?: boolean, showFrozen?: boolean, order?: 'chronological' | 'latest_last_message' | 'channel_name_alphabetical' | 'metadata_value_alphabetical', metadataOrderKey?: string, customTypes?: string, customTypeStartswith?: string, channelUrls?: string, name?: string, nameContains?: string, nameStartswith?: string, membersExactlyIn?: string, membersIncludeIn?: string, queryType?: string, membersNickname?: string, membersNicknameContains?: string, membersNicknameStartswith?: string, searchQuery?: string, searchFields?: string, metadataKey?: string, metadataValues?: string, metadataValueStartswith?: string, metacounterKey?: string, metacounterValues?: string, metacounterValueGt?: string, metacounterValueGte?: string, metacounterValueLt?: string, metacounterValueLte?: string, includeSortedMetaarrayInLastMessage?: boolean, hiddenMode?: 'unhidden_only' | 'hidden_only' | 'hidden_allow_auto_unhide' | 'hidden_prevent_auto_unhide' | 'all', unreadFilter?: 'all' | 'unread_message', memberStateFilter?: 'all' | 'invited_only' | 'joined_only' | 'invited_by_friend' | 'invited_by_non_friend', _options?: Configuration): Promise<RequestContext> {
423
- let _config = _options || this.configuration;
424
-
425
- // verify required parameter 'userId' is not null or undefined
426
- if (userId === null || userId === undefined) {
427
- throw new RequiredError("UserApi", "listMyGroupChannels", "userId");
428
- }
429
-
430
-
431
- // verify required parameter 'apiToken' is not null or undefined
432
- if (apiToken === null || apiToken === undefined) {
433
- throw new RequiredError("UserApi", "listMyGroupChannels", "apiToken");
434
- }
435
-
436
-
437
-
438
-
439
-
440
-
441
-
442
-
443
-
444
-
445
-
446
-
447
-
448
-
449
-
450
-
451
-
452
-
453
-
454
-
455
-
456
-
457
-
458
-
459
-
460
-
461
-
462
-
463
-
464
-
465
-
466
-
467
-
468
-
469
-
470
-
471
-
472
-
473
-
474
-
475
-
476
-
477
-
478
-
479
- // Path Params
480
- const localVarPath = '/v3/users/{user_id}/my_group_channels'
481
- .replace('{' + 'user_id' + '}', encodeURIComponent(String(userId)));
482
-
483
- // Make Request Context
484
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
485
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
486
-
487
- // Query Params
488
- if (token !== undefined) {
489
- requestContext.setQueryParam("token", ObjectSerializer.serialize(token, "string", ""));
490
- }
491
-
492
- // Query Params
493
- if (limit !== undefined) {
494
- requestContext.setQueryParam("limit", ObjectSerializer.serialize(limit, "number", ""));
495
- }
496
-
497
- // Query Params
498
- if (distinctMode !== undefined) {
499
- requestContext.setQueryParam("distinct_mode", ObjectSerializer.serialize(distinctMode, "'all' | 'distinct' | 'nondistinct'", ""));
500
- }
501
-
502
- // Query Params
503
- if (publicMode !== undefined) {
504
- requestContext.setQueryParam("public_mode", ObjectSerializer.serialize(publicMode, "'all' | 'private' | 'public'", ""));
505
- }
506
-
507
- // Query Params
508
- if (superMode !== undefined) {
509
- requestContext.setQueryParam("super_mode", ObjectSerializer.serialize(superMode, "'all' | 'super' | 'nonsuper'", ""));
510
- }
511
-
512
- // Query Params
513
- if (createdAfter !== undefined) {
514
- requestContext.setQueryParam("created_after", ObjectSerializer.serialize(createdAfter, "number", "int64"));
515
- }
516
-
517
- // Query Params
518
- if (createdBefore !== undefined) {
519
- requestContext.setQueryParam("created_before", ObjectSerializer.serialize(createdBefore, "number", "int64"));
520
- }
521
-
522
- // Query Params
523
- if (showEmpty !== undefined) {
524
- requestContext.setQueryParam("show_empty", ObjectSerializer.serialize(showEmpty, "boolean", ""));
525
- }
526
-
527
- // Query Params
528
- if (showMember !== undefined) {
529
- requestContext.setQueryParam("show_member", ObjectSerializer.serialize(showMember, "boolean", ""));
530
- }
531
-
532
- // Query Params
533
- if (showDeliveryReceipt !== undefined) {
534
- requestContext.setQueryParam("show_delivery_receipt", ObjectSerializer.serialize(showDeliveryReceipt, "boolean", ""));
535
- }
536
-
537
- // Query Params
538
- if (showReadReceipt !== undefined) {
539
- requestContext.setQueryParam("show_read_receipt", ObjectSerializer.serialize(showReadReceipt, "boolean", ""));
540
- }
541
-
542
- // Query Params
543
- if (showMetadata !== undefined) {
544
- requestContext.setQueryParam("show_metadata", ObjectSerializer.serialize(showMetadata, "boolean", ""));
545
- }
546
-
547
- // Query Params
548
- if (showFrozen !== undefined) {
549
- requestContext.setQueryParam("show_frozen", ObjectSerializer.serialize(showFrozen, "boolean", ""));
550
- }
551
-
552
- // Query Params
553
- if (order !== undefined) {
554
- requestContext.setQueryParam("order", ObjectSerializer.serialize(order, "'chronological' | 'latest_last_message' | 'channel_name_alphabetical' | 'metadata_value_alphabetical'", ""));
555
- }
556
-
557
- // Query Params
558
- if (metadataOrderKey !== undefined) {
559
- requestContext.setQueryParam("metadata_order_key", ObjectSerializer.serialize(metadataOrderKey, "string", ""));
560
- }
561
-
562
- // Query Params
563
- if (customTypes !== undefined) {
564
- requestContext.setQueryParam("custom_types", ObjectSerializer.serialize(customTypes, "string", ""));
565
- }
566
-
567
- // Query Params
568
- if (customTypeStartswith !== undefined) {
569
- requestContext.setQueryParam("custom_type_startswith", ObjectSerializer.serialize(customTypeStartswith, "string", ""));
570
- }
571
-
572
- // Query Params
573
- if (channelUrls !== undefined) {
574
- requestContext.setQueryParam("channel_urls", ObjectSerializer.serialize(channelUrls, "string", ""));
575
- }
576
-
577
- // Query Params
578
- if (name !== undefined) {
579
- requestContext.setQueryParam("name", ObjectSerializer.serialize(name, "string", ""));
580
- }
581
-
582
- // Query Params
583
- if (nameContains !== undefined) {
584
- requestContext.setQueryParam("name_contains", ObjectSerializer.serialize(nameContains, "string", ""));
585
- }
586
-
587
- // Query Params
588
- if (nameStartswith !== undefined) {
589
- requestContext.setQueryParam("name_startswith", ObjectSerializer.serialize(nameStartswith, "string", ""));
590
- }
591
-
592
- // Query Params
593
- if (membersExactlyIn !== undefined) {
594
- requestContext.setQueryParam("members_exactly_in", ObjectSerializer.serialize(membersExactlyIn, "string", ""));
595
- }
596
-
597
- // Query Params
598
- if (membersIncludeIn !== undefined) {
599
- requestContext.setQueryParam("members_include_in", ObjectSerializer.serialize(membersIncludeIn, "string", ""));
600
- }
601
-
602
- // Query Params
603
- if (queryType !== undefined) {
604
- requestContext.setQueryParam("query_type", ObjectSerializer.serialize(queryType, "string", ""));
605
- }
606
-
607
- // Query Params
608
- if (membersNickname !== undefined) {
609
- requestContext.setQueryParam("members_nickname", ObjectSerializer.serialize(membersNickname, "string", ""));
610
- }
611
-
612
- // Query Params
613
- if (membersNicknameContains !== undefined) {
614
- requestContext.setQueryParam("members_nickname_contains", ObjectSerializer.serialize(membersNicknameContains, "string", ""));
615
- }
616
-
617
- // Query Params
618
- if (membersNicknameStartswith !== undefined) {
619
- requestContext.setQueryParam("members_nickname_startswith", ObjectSerializer.serialize(membersNicknameStartswith, "string", ""));
620
- }
621
-
622
- // Query Params
623
- if (searchQuery !== undefined) {
624
- requestContext.setQueryParam("search_query", ObjectSerializer.serialize(searchQuery, "string", ""));
625
- }
626
-
627
- // Query Params
628
- if (searchFields !== undefined) {
629
- requestContext.setQueryParam("search_fields", ObjectSerializer.serialize(searchFields, "string", ""));
630
- }
631
-
632
- // Query Params
633
- if (metadataKey !== undefined) {
634
- requestContext.setQueryParam("metadata_key", ObjectSerializer.serialize(metadataKey, "string", ""));
635
- }
636
-
637
- // Query Params
638
- if (metadataValues !== undefined) {
639
- requestContext.setQueryParam("metadata_values", ObjectSerializer.serialize(metadataValues, "string", ""));
640
- }
641
-
642
- // Query Params
643
- if (metadataValueStartswith !== undefined) {
644
- requestContext.setQueryParam("metadata_value_startswith", ObjectSerializer.serialize(metadataValueStartswith, "string", ""));
645
- }
646
-
647
- // Query Params
648
- if (metacounterKey !== undefined) {
649
- requestContext.setQueryParam("metacounter_key", ObjectSerializer.serialize(metacounterKey, "string", ""));
650
- }
651
-
652
- // Query Params
653
- if (metacounterValues !== undefined) {
654
- requestContext.setQueryParam("metacounter_values", ObjectSerializer.serialize(metacounterValues, "string", ""));
655
- }
656
-
657
- // Query Params
658
- if (metacounterValueGt !== undefined) {
659
- requestContext.setQueryParam("metacounter_value_gt", ObjectSerializer.serialize(metacounterValueGt, "string", ""));
660
- }
661
-
662
- // Query Params
663
- if (metacounterValueGte !== undefined) {
664
- requestContext.setQueryParam("metacounter_value_gte", ObjectSerializer.serialize(metacounterValueGte, "string", ""));
665
- }
666
-
667
- // Query Params
668
- if (metacounterValueLt !== undefined) {
669
- requestContext.setQueryParam("metacounter_value_lt", ObjectSerializer.serialize(metacounterValueLt, "string", ""));
670
- }
671
-
672
- // Query Params
673
- if (metacounterValueLte !== undefined) {
674
- requestContext.setQueryParam("metacounter_value_lte", ObjectSerializer.serialize(metacounterValueLte, "string", ""));
675
- }
676
-
677
- // Query Params
678
- if (includeSortedMetaarrayInLastMessage !== undefined) {
679
- requestContext.setQueryParam("include_sorted_metaarray_in_last_message", ObjectSerializer.serialize(includeSortedMetaarrayInLastMessage, "boolean", ""));
680
- }
681
-
682
- // Query Params
683
- if (hiddenMode !== undefined) {
684
- requestContext.setQueryParam("hidden_mode", ObjectSerializer.serialize(hiddenMode, "'unhidden_only' | 'hidden_only' | 'hidden_allow_auto_unhide' | 'hidden_prevent_auto_unhide' | 'all'", ""));
685
- }
686
-
687
- // Query Params
688
- if (unreadFilter !== undefined) {
689
- requestContext.setQueryParam("unread_filter", ObjectSerializer.serialize(unreadFilter, "'all' | 'unread_message'", ""));
690
- }
691
-
692
- // Query Params
693
- if (memberStateFilter !== undefined) {
694
- requestContext.setQueryParam("member_state_filter", ObjectSerializer.serialize(memberStateFilter, "'all' | 'invited_only' | 'joined_only' | 'invited_by_friend' | 'invited_by_non_friend'", ""));
695
- }
696
-
697
- // Header Params
698
- requestContext.setHeaderParam("api-token", ObjectSerializer.serialize(apiToken, "string", ""));
699
-
700
-
701
-
702
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
703
- if (defaultAuth?.applySecurityAuthentication) {
704
- await defaultAuth?.applySecurityAuthentication(requestContext);
705
- }
706
-
707
- return requestContext;
708
- }
709
-
710
- /**
711
- * ## List registration or device tokens Retrieves a list of a user's registration or device tokens. You can pass `gcm`, `huawei`, or `apns` for FCM registration token, HMS device token, or APNs device token, respectively, in the `token_type` parameter for the push notification service you are using. https://sendbird.com/docs/chat/platform-api/v3/user/managing-device-tokens/list-registration-or-device-tokens#1-list-registration-or-device-tokens
712
- * List registration or device tokens
713
- * @param userId (Required)
714
- * @param tokenType (Required)
715
- * @param apiToken
716
- */
717
- public async listRegistrationOrDeviceTokens(userId: string, tokenType: 'gcm' | 'huawei' | 'apns', apiToken?: string, _options?: Configuration): Promise<RequestContext> {
718
- let _config = _options || this.configuration;
719
-
720
- // verify required parameter 'userId' is not null or undefined
721
- if (userId === null || userId === undefined) {
722
- throw new RequiredError("UserApi", "listRegistrationOrDeviceTokens", "userId");
723
- }
724
-
725
-
726
- // verify required parameter 'tokenType' is not null or undefined
727
- if (tokenType === null || tokenType === undefined) {
728
- throw new RequiredError("UserApi", "listRegistrationOrDeviceTokens", "tokenType");
729
- }
730
-
731
-
732
-
733
- // Path Params
734
- const localVarPath = '/v3/users/{user_id}/push/{token_type}'
735
- .replace('{' + 'user_id' + '}', encodeURIComponent(String(userId)))
736
- .replace('{' + 'token_type' + '}', encodeURIComponent(String(tokenType)));
737
-
738
- // Make Request Context
739
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
740
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
741
-
742
- // Header Params
743
- requestContext.setHeaderParam("api-token", ObjectSerializer.serialize(apiToken, "string", ""));
744
-
745
-
746
-
747
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
748
- if (defaultAuth?.applySecurityAuthentication) {
749
- await defaultAuth?.applySecurityAuthentication(requestContext);
750
- }
751
-
752
- return requestContext;
753
- }
754
-
755
- /**
756
- * ## List users You can retrieve a list of users in your Sendbird application using this API. You can generate a customized list using various parameter combinations. https://sendbird.com/docs/chat/platform-api/v3/user/listing-users/list-users#1-list-users
757
- * List users
758
- * @param token
759
- * @param limit
760
- * @param activeMode Specifies the activation status of the users in the list. Acceptable values are &#x60;activated&#x60;, &#x60;deactivated&#x60;, and &#x60;all&#x60;. (Default: &#x60;activated&#x60;)
761
- * @param showBot Determines whether to include bots in the list. (Default: true)
762
- * @param userIds Specifies the user IDs. The value should be a comma-separated string that consists of multiple urlencoded user IDs. An example of a urlencoded string is ?user_ids&#x3D;urlencoded_id_1,urlencoded_id_2. * The maximum number of user IDs in this parameter is 250. If you exceed the maximum number, your request may receive an HTTP 414 error indicating that the request URL is longer than what Sendbird server can interpret.
763
- * @param nickname
764
- * @param nicknameStartswith
765
- * @param metadatakey
766
- * @param metadatavaluesIn Searches for blocked users with metadata containing an item with the key specified by the metadatakey parameter above, and the value of that item matches one or more values specified by this parameter. The string should be specified with multiple urlencoded metadata values separated by commas (for example, &#x60;?metadatavalues_in&#x3D;urlencoded_value_1, urlencoded_value_2&#x60;). This parameter should be specified in conjunction with the &#x60;metadatakey&#x60; above.
767
- * @param apiToken
768
- */
769
- public async listUsers(token?: string, limit?: number, activeMode?: 'activated' | 'deactivated' | 'all', showBot?: boolean, userIds?: string, nickname?: string, nicknameStartswith?: string, metadatakey?: string, metadatavaluesIn?: string, apiToken?: string, _options?: Configuration): Promise<RequestContext> {
770
- let _config = _options || this.configuration;
771
-
772
-
773
-
774
-
775
-
776
-
777
-
778
-
779
-
780
-
781
-
782
- // Path Params
783
- const localVarPath = '/v3/users';
784
-
785
- // Make Request Context
786
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
787
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
788
-
789
- // Query Params
790
- if (token !== undefined) {
791
- requestContext.setQueryParam("token", ObjectSerializer.serialize(token, "string", ""));
792
- }
793
-
794
- // Query Params
795
- if (limit !== undefined) {
796
- requestContext.setQueryParam("limit", ObjectSerializer.serialize(limit, "number", ""));
797
- }
798
-
799
- // Query Params
800
- if (activeMode !== undefined) {
801
- requestContext.setQueryParam("active_mode", ObjectSerializer.serialize(activeMode, "'activated' | 'deactivated' | 'all'", ""));
802
- }
803
-
804
- // Query Params
805
- if (showBot !== undefined) {
806
- requestContext.setQueryParam("show_bot", ObjectSerializer.serialize(showBot, "boolean", ""));
807
- }
808
-
809
- // Query Params
810
- if (userIds !== undefined) {
811
- requestContext.setQueryParam("user_ids", ObjectSerializer.serialize(userIds, "string", ""));
812
- }
813
-
814
- // Query Params
815
- if (nickname !== undefined) {
816
- requestContext.setQueryParam("nickname", ObjectSerializer.serialize(nickname, "string", ""));
817
- }
818
-
819
- // Query Params
820
- if (nicknameStartswith !== undefined) {
821
- requestContext.setQueryParam("nickname_startswith", ObjectSerializer.serialize(nicknameStartswith, "string", ""));
822
- }
823
-
824
- // Query Params
825
- if (metadatakey !== undefined) {
826
- requestContext.setQueryParam("metadatakey", ObjectSerializer.serialize(metadatakey, "string", ""));
827
- }
828
-
829
- // Query Params
830
- if (metadatavaluesIn !== undefined) {
831
- requestContext.setQueryParam("metadatavalues_in", ObjectSerializer.serialize(metadatavaluesIn, "string", ""));
832
- }
833
-
834
- // Header Params
835
- requestContext.setHeaderParam("api-token", ObjectSerializer.serialize(apiToken, "string", ""));
836
-
837
-
838
-
839
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
840
- if (defaultAuth?.applySecurityAuthentication) {
841
- await defaultAuth?.applySecurityAuthentication(requestContext);
842
- }
843
-
844
- return requestContext;
845
- }
846
-
847
- /**
848
- * ## Mark all messages as read This action marks all of a user's unread messages as read in certain group channels. If channels aren't specified, the user's unread messages in all group channels are marked as read. https://sendbird.com/docs/chat/platform-api/v3/user/marking-messages-as-read/mark-all-of-a-users-messages-as-read#1-mark-all-of-a-user-s-messages-as-read
849
- * Mark all messages as read
850
- * @param userId (Required)
851
- * @param apiToken
852
- * @param markAllMessagesAsReadRequest
853
- */
854
- public async markAllMessagesAsRead(userId: string, apiToken?: string, markAllMessagesAsReadRequest?: MarkAllMessagesAsReadRequest, _options?: Configuration): Promise<RequestContext> {
855
- let _config = _options || this.configuration;
856
-
857
- // verify required parameter 'userId' is not null or undefined
858
- if (userId === null || userId === undefined) {
859
- throw new RequiredError("UserApi", "markAllMessagesAsRead", "userId");
860
- }
861
-
862
-
863
-
864
-
865
- // Path Params
866
- const localVarPath = '/v3/users/{user_id}/mark_as_read_all'
867
- .replace('{' + 'user_id' + '}', encodeURIComponent(String(userId)));
868
-
869
- // Make Request Context
870
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PUT);
871
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
872
-
873
- // Header Params
874
- requestContext.setHeaderParam("api-token", ObjectSerializer.serialize(apiToken, "string", ""));
875
-
876
-
877
- // Body Params
878
- const contentType = ObjectSerializer.getPreferredMediaType([
879
- "application/json"
880
- ]);
881
- requestContext.setHeaderParam("Content-Type", contentType);
882
- const serializedBody = ObjectSerializer.stringify(
883
- ObjectSerializer.serialize(markAllMessagesAsReadRequest, "MarkAllMessagesAsReadRequest", ""),
884
- contentType
885
- );
886
- requestContext.setBody(serializedBody);
887
-
888
-
889
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
890
- if (defaultAuth?.applySecurityAuthentication) {
891
- await defaultAuth?.applySecurityAuthentication(requestContext);
892
- }
893
-
894
- return requestContext;
895
- }
896
-
897
- /**
898
- * ## Remove a registration or device token Removes a user's specific registration or device token or all tokens. You can pass `gcm`, `huawei`, or `apns` for FCM registration token, HMS device token, or APNs device token, respectively, in the `token_type` parameter for the push notification service you are using. https://sendbird.com/docs/chat/platform-api/v3/user/managing-device-tokens/remove-a-registration-or-device-token#1-remove-a-registration-or-device-token
899
- * Remove a registration or device token - When unregistering a specific token
900
- * @param userId (Required)
901
- * @param tokenType (Required)
902
- * @param token (Required)
903
- * @param apiToken
904
- */
905
- public async removeARegistrationOrDeviceToken(userId: string, tokenType: 'gcm' | 'huawei' | 'apns', token: string, apiToken?: string, _options?: Configuration): Promise<RequestContext> {
906
- let _config = _options || this.configuration;
907
-
908
- // verify required parameter 'userId' is not null or undefined
909
- if (userId === null || userId === undefined) {
910
- throw new RequiredError("UserApi", "removeARegistrationOrDeviceToken", "userId");
911
- }
912
-
913
-
914
- // verify required parameter 'tokenType' is not null or undefined
915
- if (tokenType === null || tokenType === undefined) {
916
- throw new RequiredError("UserApi", "removeARegistrationOrDeviceToken", "tokenType");
917
- }
918
-
919
-
920
- // verify required parameter 'token' is not null or undefined
921
- if (token === null || token === undefined) {
922
- throw new RequiredError("UserApi", "removeARegistrationOrDeviceToken", "token");
923
- }
924
-
925
-
926
-
927
- // Path Params
928
- const localVarPath = '/v3/users/{user_id}/push/{token_type}/{token}'
929
- .replace('{' + 'user_id' + '}', encodeURIComponent(String(userId)))
930
- .replace('{' + 'token_type' + '}', encodeURIComponent(String(tokenType)))
931
- .replace('{' + 'token' + '}', encodeURIComponent(String(token)));
932
-
933
- // Make Request Context
934
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.DELETE);
935
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
936
-
937
- // Header Params
938
- requestContext.setHeaderParam("api-token", ObjectSerializer.serialize(apiToken, "string", ""));
939
-
940
-
941
-
942
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
943
- if (defaultAuth?.applySecurityAuthentication) {
944
- await defaultAuth?.applySecurityAuthentication(requestContext);
945
- }
946
-
947
- return requestContext;
948
- }
949
-
950
- /**
951
- * ## Remove a registration or device token from an owner Removes a registration or device token from a user who is the owner of the token. You can pass `gcm`, `huawei`, or `apns` for FCM registration token, HMS device token, or APNs device token, respectively, in the `token_type` parameter for the push notification service you are using. https://sendbird.com/docs/chat/platform-api/v3/user/managing-device-tokens/remove-a-registration-or-device-token-from-an-owner#1-remove-a-registration-or-device-token-from-an-owner
952
- * Remove a registration or device token from an owner
953
- * @param tokenType (Required)
954
- * @param token (Required)
955
- * @param apiToken
956
- */
957
- public async removeARegistrationOrDeviceTokenFromAnOwner(tokenType: string, token: string, apiToken?: string, _options?: Configuration): Promise<RequestContext> {
958
- let _config = _options || this.configuration;
959
-
960
- // verify required parameter 'tokenType' is not null or undefined
961
- if (tokenType === null || tokenType === undefined) {
962
- throw new RequiredError("UserApi", "removeARegistrationOrDeviceTokenFromAnOwner", "tokenType");
963
- }
964
-
965
-
966
- // verify required parameter 'token' is not null or undefined
967
- if (token === null || token === undefined) {
968
- throw new RequiredError("UserApi", "removeARegistrationOrDeviceTokenFromAnOwner", "token");
969
- }
970
-
971
-
972
-
973
- // Path Params
974
- const localVarPath = '/v3/push/device_tokens/{token_type}/{token}'
975
- .replace('{' + 'token_type' + '}', encodeURIComponent(String(tokenType)))
976
- .replace('{' + 'token' + '}', encodeURIComponent(String(token)));
977
-
978
- // Make Request Context
979
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.DELETE);
980
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
981
-
982
- // Header Params
983
- requestContext.setHeaderParam("api-token", ObjectSerializer.serialize(apiToken, "string", ""));
984
-
985
-
986
-
987
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
988
- if (defaultAuth?.applySecurityAuthentication) {
989
- await defaultAuth?.applySecurityAuthentication(requestContext);
990
- }
991
-
992
- return requestContext;
993
- }
994
-
995
- /**
996
- * ## Remove a registration or device token Removes a user's specific registration or device token or all tokens. You can pass `gcm`, `huawei`, or `apns` for FCM registration token, HMS device token, or APNs device token, respectively, in the `token_type` parameter for the push notification service you are using. https://sendbird.com/docs/chat/platform-api/v3/user/managing-device-tokens/remove-a-registration-or-device-token#1-remove-a-registration-or-device-token
997
- * Remove a registration or device token - When unregistering all device tokens
998
- * @param userId (Required)
999
- * @param apiToken
1000
- */
1001
- public async removeAllRegistrationOrDeviceToken(userId: string, apiToken?: string, _options?: Configuration): Promise<RequestContext> {
1002
- let _config = _options || this.configuration;
1003
-
1004
- // verify required parameter 'userId' is not null or undefined
1005
- if (userId === null || userId === undefined) {
1006
- throw new RequiredError("UserApi", "removeAllRegistrationOrDeviceToken", "userId");
1007
- }
1008
-
1009
-
1010
-
1011
- // Path Params
1012
- const localVarPath = '/v3/users/{user_id}/push'
1013
- .replace('{' + 'user_id' + '}', encodeURIComponent(String(userId)));
1014
-
1015
- // Make Request Context
1016
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.DELETE);
1017
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1018
-
1019
- // Header Params
1020
- requestContext.setHeaderParam("api-token", ObjectSerializer.serialize(apiToken, "string", ""));
1021
-
1022
-
1023
-
1024
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
1025
- if (defaultAuth?.applySecurityAuthentication) {
1026
- await defaultAuth?.applySecurityAuthentication(requestContext);
1027
- }
1028
-
1029
- return requestContext;
1030
- }
1031
-
1032
- /**
1033
- * ## Reset push preferences You can reset a user's notifications preferences. The values are reset to the default as the following. - The values for the `do_not_disturb` and `snooze_enabled` properties are set to `false`. - The values of the parameters associated with the time frame are all set to `0`. - The value for the `timezone` property is set to `UTC`. - The value for the `push_sound` property is set to `default`. > **Note**: Push notifications are only available for group channels. [https://sendbird.com/docs/chat/platform-api/v3/user/configuring-notification-preferences/reset-push-notification-preferences#1-reset-push-notification-preferences](https://sendbird.com/docs/chat/platform-api/v3/user/configuring-notification-preferences/reset-push-notification-preferences#1-reset-push-notification-preferences)
1034
- * Reset push preferences
1035
- * @param userId (Required)
1036
- * @param apiToken
1037
- */
1038
- public async resetPushPreferences(userId: string, apiToken?: string, _options?: Configuration): Promise<RequestContext> {
1039
- let _config = _options || this.configuration;
1040
-
1041
- // verify required parameter 'userId' is not null or undefined
1042
- if (userId === null || userId === undefined) {
1043
- throw new RequiredError("UserApi", "resetPushPreferences", "userId");
1044
- }
1045
-
1046
-
1047
-
1048
- // Path Params
1049
- const localVarPath = '/v3/users/{user_id}/push_preference'
1050
- .replace('{' + 'user_id' + '}', encodeURIComponent(String(userId)));
1051
-
1052
- // Make Request Context
1053
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.DELETE);
1054
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1055
-
1056
- // Header Params
1057
- requestContext.setHeaderParam("api-token", ObjectSerializer.serialize(apiToken, "string", ""));
1058
-
1059
-
1060
-
1061
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
1062
- if (defaultAuth?.applySecurityAuthentication) {
1063
- await defaultAuth?.applySecurityAuthentication(requestContext);
1064
- }
1065
-
1066
- return requestContext;
1067
- }
1068
-
1069
- /**
1070
- * ## Update a user You can update information about a user using this API. In addition to changing a user's nickname or profile image, you can issue a new access token for the user. The new access token replaces the previous one as the necessary token for authentication. You can also deactivate or reactivate a user using this API request. If the `leave_all_when_deactivated` is set to `true`, a user leaves all joined group channels and becomes deactivated. > **Note**: Issuing session tokens through the `/users/{user_id}` endpoint is now deprecated and it&apos;s replaced with [&lt;code&gt;/users/{user_id}/token&lt;/code&gt;](https://sendbird.com/docs/chat/platform-api/v3/user/managing-session-tokens/issue-a-session-token) endpoint for greater efficiency. For those who are currently using the old endpoint, you can start issuing tokens using the new endpoint. [https://sendbird.com/docs/chat/platform-api/v3/user/managing-users/update-a-user#1-update-a-user](https://sendbird.com/docs/chat/platform-api/v3/user/managing-users/update-a-user#1-update-a-user)
1071
- * Update a user
1072
- * @param userId (Required)
1073
- * @param apiToken
1074
- * @param updateAUserRequest
1075
- */
1076
- public async updateAUser(userId: string, apiToken?: string, updateAUserRequest?: UpdateAUserRequest, _options?: Configuration): Promise<RequestContext> {
1077
- let _config = _options || this.configuration;
1078
-
1079
- // verify required parameter 'userId' is not null or undefined
1080
- if (userId === null || userId === undefined) {
1081
- throw new RequiredError("UserApi", "updateAUser", "userId");
1082
- }
1083
-
1084
-
1085
-
1086
-
1087
- // Path Params
1088
- const localVarPath = '/v3/users/{user_id}'
1089
- .replace('{' + 'user_id' + '}', encodeURIComponent(String(userId)));
1090
-
1091
- // Make Request Context
1092
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PUT);
1093
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1094
-
1095
- // Header Params
1096
- requestContext.setHeaderParam("api-token", ObjectSerializer.serialize(apiToken, "string", ""));
1097
-
1098
-
1099
- // Body Params
1100
- const contentType = ObjectSerializer.getPreferredMediaType([
1101
- "application/json"
1102
- ]);
1103
- requestContext.setHeaderParam("Content-Type", contentType);
1104
- const serializedBody = ObjectSerializer.stringify(
1105
- ObjectSerializer.serialize(updateAUserRequest, "UpdateAUserRequest", ""),
1106
- contentType
1107
- );
1108
- requestContext.setBody(serializedBody);
1109
-
1110
-
1111
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
1112
- if (defaultAuth?.applySecurityAuthentication) {
1113
- await defaultAuth?.applySecurityAuthentication(requestContext);
1114
- }
1115
-
1116
- return requestContext;
1117
- }
1118
-
1119
- /**
1120
- * ## Update channel invitation preference This action updates a user's [group channel](https://sendbird.com/docs/chat/platform-api/v3/channel/channel-overview#2-channel-types-3-group-channel) invitation preference. Updating the [application's default channel invitation preference](https://sendbird.com/docs/chat/platform-api/v3/channel/setting-up-channels/update-default-invitation-preference) won't override existing users' individual channel invitation preferences. The changed preference only affects the users created after the update. https://sendbird.com/docs/chat/platform-api/v3/channel/managing-a-channel/update-channel-invitation-preference#1-update-channel-invitation-preference
1121
- * Update channel invitation preference
1122
- * @param userId (Required)
1123
- * @param apiToken
1124
- * @param updateChannelInvitationPreferenceRequest
1125
- */
1126
- public async updateChannelInvitationPreference(userId: string, apiToken?: string, updateChannelInvitationPreferenceRequest?: UpdateChannelInvitationPreferenceRequest, _options?: Configuration): Promise<RequestContext> {
1127
- let _config = _options || this.configuration;
1128
-
1129
- // verify required parameter 'userId' is not null or undefined
1130
- if (userId === null || userId === undefined) {
1131
- throw new RequiredError("UserApi", "updateChannelInvitationPreference", "userId");
1132
- }
1133
-
1134
-
1135
-
1136
-
1137
- // Path Params
1138
- const localVarPath = '/v3/users/{user_id}/channel_invitation_preference'
1139
- .replace('{' + 'user_id' + '}', encodeURIComponent(String(userId)));
1140
-
1141
- // Make Request Context
1142
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PUT);
1143
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1144
-
1145
- // Header Params
1146
- requestContext.setHeaderParam("api-token", ObjectSerializer.serialize(apiToken, "string", ""));
1147
-
1148
-
1149
- // Body Params
1150
- const contentType = ObjectSerializer.getPreferredMediaType([
1151
- "application/json"
1152
- ]);
1153
- requestContext.setHeaderParam("Content-Type", contentType);
1154
- const serializedBody = ObjectSerializer.stringify(
1155
- ObjectSerializer.serialize(updateChannelInvitationPreferenceRequest, "UpdateChannelInvitationPreferenceRequest", ""),
1156
- contentType
1157
- );
1158
- requestContext.setBody(serializedBody);
1159
-
1160
-
1161
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
1162
- if (defaultAuth?.applySecurityAuthentication) {
1163
- await defaultAuth?.applySecurityAuthentication(requestContext);
1164
- }
1165
-
1166
- return requestContext;
1167
- }
1168
-
1169
- /**
1170
- * ## Update count preference of a channel This action updates a user's count preference of a specific group channel. The count preference allows a user to either update the number of unread messages or the number of unread mentioned messages, or both in a specific group channel. If you want to retrieve the total number count of a specific group channel, go to the [get count preference of a channel](https://sendbird.com/docs/chat/platform-api/v3/user/managing-unread-count/get-count-preference-of-a-channel) page. https://sendbird.com/docs/chat/platform-api/v3/user/managing-unread-count/update-count-preference-of-a-channel#1-update-count-preference-of-a-channel
1171
- * Update count preference of a channel
1172
- * @param userId (Required)
1173
- * @param channelUrl (Required)
1174
- * @param apiToken
1175
- * @param updateCountPreferenceOfAChannelRequest
1176
- */
1177
- public async updateCountPreferenceOfAChannel(userId: string, channelUrl: string, apiToken?: string, updateCountPreferenceOfAChannelRequest?: UpdateCountPreferenceOfAChannelRequest, _options?: Configuration): Promise<RequestContext> {
1178
- let _config = _options || this.configuration;
1179
-
1180
- // verify required parameter 'userId' is not null or undefined
1181
- if (userId === null || userId === undefined) {
1182
- throw new RequiredError("UserApi", "updateCountPreferenceOfAChannel", "userId");
1183
- }
1184
-
1185
-
1186
- // verify required parameter 'channelUrl' is not null or undefined
1187
- if (channelUrl === null || channelUrl === undefined) {
1188
- throw new RequiredError("UserApi", "updateCountPreferenceOfAChannel", "channelUrl");
1189
- }
1190
-
1191
-
1192
-
1193
-
1194
- // Path Params
1195
- const localVarPath = '/v3/users/{user_id}/count_preference/{channel_url}'
1196
- .replace('{' + 'user_id' + '}', encodeURIComponent(String(userId)))
1197
- .replace('{' + 'channel_url' + '}', encodeURIComponent(String(channelUrl)));
1198
-
1199
- // Make Request Context
1200
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PUT);
1201
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1202
-
1203
- // Header Params
1204
- requestContext.setHeaderParam("api-token", ObjectSerializer.serialize(apiToken, "string", ""));
1205
-
1206
-
1207
- // Body Params
1208
- const contentType = ObjectSerializer.getPreferredMediaType([
1209
- "application/json"
1210
- ]);
1211
- requestContext.setHeaderParam("Content-Type", contentType);
1212
- const serializedBody = ObjectSerializer.stringify(
1213
- ObjectSerializer.serialize(updateCountPreferenceOfAChannelRequest, "UpdateCountPreferenceOfAChannelRequest", ""),
1214
- contentType
1215
- );
1216
- requestContext.setBody(serializedBody);
1217
-
1218
-
1219
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
1220
- if (defaultAuth?.applySecurityAuthentication) {
1221
- await defaultAuth?.applySecurityAuthentication(requestContext);
1222
- }
1223
-
1224
- return requestContext;
1225
- }
1226
-
1227
- /**
1228
- * ## Update push preferences You can update a user's notifications preferences. A push notification is a message that is immediately delivered to a user's device when the device is either idle or running the client app in the background. > **Note**: Push notifications are only available for group channels. [https://sendbird.com/docs/chat/platform-api/v3/user/configuring-notification-preferences/update-push-notification-preferences#1-update-push-notification-preferences](https://sendbird.com/docs/chat/platform-api/v3/user/configuring-notification-preferences/update-push-notification-preferences#1-update-push-notification-preferences)
1229
- * Update push preferences
1230
- * @param userId (Required)
1231
- * @param apiToken
1232
- * @param updatePushPreferencesRequest
1233
- */
1234
- public async updatePushPreferences(userId: string, apiToken?: string, updatePushPreferencesRequest?: UpdatePushPreferencesRequest, _options?: Configuration): Promise<RequestContext> {
1235
- let _config = _options || this.configuration;
1236
-
1237
- // verify required parameter 'userId' is not null or undefined
1238
- if (userId === null || userId === undefined) {
1239
- throw new RequiredError("UserApi", "updatePushPreferences", "userId");
1240
- }
1241
-
1242
-
1243
-
1244
-
1245
- // Path Params
1246
- const localVarPath = '/v3/users/{user_id}/push_preference'
1247
- .replace('{' + 'user_id' + '}', encodeURIComponent(String(userId)));
1248
-
1249
- // Make Request Context
1250
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PUT);
1251
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1252
-
1253
- // Header Params
1254
- requestContext.setHeaderParam("api-token", ObjectSerializer.serialize(apiToken, "string", ""));
1255
-
1256
-
1257
- // Body Params
1258
- const contentType = ObjectSerializer.getPreferredMediaType([
1259
- "application/json"
1260
- ]);
1261
- requestContext.setHeaderParam("Content-Type", contentType);
1262
- const serializedBody = ObjectSerializer.stringify(
1263
- ObjectSerializer.serialize(updatePushPreferencesRequest, "UpdatePushPreferencesRequest", ""),
1264
- contentType
1265
- );
1266
- requestContext.setBody(serializedBody);
1267
-
1268
-
1269
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
1270
- if (defaultAuth?.applySecurityAuthentication) {
1271
- await defaultAuth?.applySecurityAuthentication(requestContext);
1272
- }
1273
-
1274
- return requestContext;
1275
- }
1276
-
1277
- /**
1278
- * ## Update push preferences for a channel You can update a user's notifications preferences for a specific channel. A push notification is a message that is immediately delivered to a user's device when the device is either idle or running the client app in the background. > **Note**: Push notifications are only available for group channels. [https://sendbird.com/docs/chat/platform-api/v3/user/configuring-notification-preferences/update-push-notification-preferences-for-a-channel#1-update-push-notification-preferences-for-a-channel](https://sendbird.com/docs/chat/platform-api/v3/user/configuring-notification-preferences/update-push-notification-preferences-for-a-channel#1-update-push-notification-preferences-for-a-channel)
1279
- * Update push preferences for a channel
1280
- * @param userId (Required)
1281
- * @param channelUrl (Required)
1282
- * @param apiToken
1283
- * @param updatePushPreferencesForAChannelRequest
1284
- */
1285
- public async updatePushPreferencesForAChannel(userId: string, channelUrl: string, apiToken?: string, updatePushPreferencesForAChannelRequest?: UpdatePushPreferencesForAChannelRequest, _options?: Configuration): Promise<RequestContext> {
1286
- let _config = _options || this.configuration;
1287
-
1288
- // verify required parameter 'userId' is not null or undefined
1289
- if (userId === null || userId === undefined) {
1290
- throw new RequiredError("UserApi", "updatePushPreferencesForAChannel", "userId");
1291
- }
1292
-
1293
-
1294
- // verify required parameter 'channelUrl' is not null or undefined
1295
- if (channelUrl === null || channelUrl === undefined) {
1296
- throw new RequiredError("UserApi", "updatePushPreferencesForAChannel", "channelUrl");
1297
- }
1298
-
1299
-
1300
-
1301
-
1302
- // Path Params
1303
- const localVarPath = '/v3/users/{user_id}/push_preference/{channel_url}'
1304
- .replace('{' + 'user_id' + '}', encodeURIComponent(String(userId)))
1305
- .replace('{' + 'channel_url' + '}', encodeURIComponent(String(channelUrl)));
1306
-
1307
- // Make Request Context
1308
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PUT);
1309
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1310
-
1311
- // Header Params
1312
- requestContext.setHeaderParam("api-token", ObjectSerializer.serialize(apiToken, "string", ""));
1313
-
1314
-
1315
- // Body Params
1316
- const contentType = ObjectSerializer.getPreferredMediaType([
1317
- "application/json"
1318
- ]);
1319
- requestContext.setHeaderParam("Content-Type", contentType);
1320
- const serializedBody = ObjectSerializer.stringify(
1321
- ObjectSerializer.serialize(updatePushPreferencesForAChannelRequest, "UpdatePushPreferencesForAChannelRequest", ""),
1322
- contentType
1323
- );
1324
- requestContext.setBody(serializedBody);
1325
-
1326
-
1327
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
1328
- if (defaultAuth?.applySecurityAuthentication) {
1329
- await defaultAuth?.applySecurityAuthentication(requestContext);
1330
- }
1331
-
1332
- return requestContext;
1333
- }
1334
-
1335
- /**
1336
- * ## View a user You can retrieve information about a user using this API. https://sendbird.com/docs/chat/platform-api/v3/user/listing-users/get-a-user#1-get-a-user `user_id` Type: string Description: Specifies the unique ID of the user to retrieve.
1337
- * View a user
1338
- * @param userId (Required)
1339
- * @param includeUnreadCount
1340
- * @param customTypes
1341
- * @param superMode Restricts the search scope to retrieve only Supergroup or non-Supergroup channels. Acceptable values are &#x60;all&#x60;, &#x60;super&#x60;, and &#x60;nonsuper&#x60;. This parameter should be specified in conjunction with &#x60;include_unread_count&#x60; above. (Default: &#x60;all&#x60;)
1342
- * @param apiToken
1343
- */
1344
- public async viewAUser(userId: string, includeUnreadCount?: boolean, customTypes?: string, superMode?: 'all' | 'super' | 'nonsuper', apiToken?: string, _options?: Configuration): Promise<RequestContext> {
1345
- let _config = _options || this.configuration;
1346
-
1347
- // verify required parameter 'userId' is not null or undefined
1348
- if (userId === null || userId === undefined) {
1349
- throw new RequiredError("UserApi", "viewAUser", "userId");
1350
- }
1351
-
1352
-
1353
-
1354
-
1355
-
1356
-
1357
- // Path Params
1358
- const localVarPath = '/v3/users/{user_id}'
1359
- .replace('{' + 'user_id' + '}', encodeURIComponent(String(userId)));
1360
-
1361
- // Make Request Context
1362
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
1363
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1364
-
1365
- // Query Params
1366
- if (includeUnreadCount !== undefined) {
1367
- requestContext.setQueryParam("include_unread_count", ObjectSerializer.serialize(includeUnreadCount, "boolean", ""));
1368
- }
1369
-
1370
- // Query Params
1371
- if (customTypes !== undefined) {
1372
- requestContext.setQueryParam("custom_types", ObjectSerializer.serialize(customTypes, "string", ""));
1373
- }
1374
-
1375
- // Query Params
1376
- if (superMode !== undefined) {
1377
- requestContext.setQueryParam("super_mode", ObjectSerializer.serialize(superMode, "'all' | 'super' | 'nonsuper'", ""));
1378
- }
1379
-
1380
- // Header Params
1381
- requestContext.setHeaderParam("api-token", ObjectSerializer.serialize(apiToken, "string", ""));
1382
-
1383
-
1384
-
1385
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
1386
- if (defaultAuth?.applySecurityAuthentication) {
1387
- await defaultAuth?.applySecurityAuthentication(requestContext);
1388
- }
1389
-
1390
- return requestContext;
1391
- }
1392
-
1393
- /**
1394
- * ## View count preference of a channel This action retrieves a user's count preference of a specific group channel. The count preference allows a user to either retrieve the number of unread messages or unread mentioned messages, or both in a specific group channel. If you want to update the total number count of a specific group channel, visit the [update count preference of a channel](https://sendbird.com/docs/chat/platform-api/v3/user/managing-unread-count/update-count-preference-of-a-channel). https://sendbird.com/docs/chat/platform-api/v3/user/managing-unread-count/get-count-preference-of-a-channel#1-get-count-preference-of-a-channel
1395
- * View count preference of a channel
1396
- * @param userId (Required)
1397
- * @param channelUrl (Required)
1398
- * @param apiToken
1399
- */
1400
- public async viewCountPreferenceOfAChannel(userId: string, channelUrl: string, apiToken?: string, _options?: Configuration): Promise<RequestContext> {
1401
- let _config = _options || this.configuration;
1402
-
1403
- // verify required parameter 'userId' is not null or undefined
1404
- if (userId === null || userId === undefined) {
1405
- throw new RequiredError("UserApi", "viewCountPreferenceOfAChannel", "userId");
1406
- }
1407
-
1408
-
1409
- // verify required parameter 'channelUrl' is not null or undefined
1410
- if (channelUrl === null || channelUrl === undefined) {
1411
- throw new RequiredError("UserApi", "viewCountPreferenceOfAChannel", "channelUrl");
1412
- }
1413
-
1414
-
1415
-
1416
- // Path Params
1417
- const localVarPath = '/v3/users/{user_id}/count_preference/{channel_url}'
1418
- .replace('{' + 'user_id' + '}', encodeURIComponent(String(userId)))
1419
- .replace('{' + 'channel_url' + '}', encodeURIComponent(String(channelUrl)));
1420
-
1421
- // Make Request Context
1422
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
1423
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1424
-
1425
- // Header Params
1426
- requestContext.setHeaderParam("api-token", ObjectSerializer.serialize(apiToken, "string", ""));
1427
-
1428
-
1429
-
1430
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
1431
- if (defaultAuth?.applySecurityAuthentication) {
1432
- await defaultAuth?.applySecurityAuthentication(requestContext);
1433
- }
1434
-
1435
- return requestContext;
1436
- }
1437
-
1438
- /**
1439
- * ## View number of channels with unread messages This action retrieves the total number of group channels in which a user has unread messages. You can use various query parameters to determine the search scope of group channels. https://sendbird.com/docs/chat/platform-api/v3/user/managing-unread-count/get-number-of-channels-with-unread-messages#1-get-number-of-channels-with-unread-messages
1440
- * View number of channels with unread messages
1441
- * @param userId (Required)
1442
- * @param customTypes
1443
- * @param superMode Restricts the search scope to either Supergroup channels or non-Supergroup channels or both. Acceptable values are all, super, and nonsuper. (Default: all)
1444
- * @param apiToken
1445
- */
1446
- public async viewNumberOfChannelsWithUnreadMessages(userId: string, customTypes?: string, superMode?: 'all' | 'super' | 'nonsuper', apiToken?: string, _options?: Configuration): Promise<RequestContext> {
1447
- let _config = _options || this.configuration;
1448
-
1449
- // verify required parameter 'userId' is not null or undefined
1450
- if (userId === null || userId === undefined) {
1451
- throw new RequiredError("UserApi", "viewNumberOfChannelsWithUnreadMessages", "userId");
1452
- }
1453
-
1454
-
1455
-
1456
-
1457
-
1458
- // Path Params
1459
- const localVarPath = '/v3/users/{user_id}/unread_channel_count'
1460
- .replace('{' + 'user_id' + '}', encodeURIComponent(String(userId)));
1461
-
1462
- // Make Request Context
1463
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
1464
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1465
-
1466
- // Query Params
1467
- if (customTypes !== undefined) {
1468
- requestContext.setQueryParam("custom_types", ObjectSerializer.serialize(customTypes, "string", ""));
1469
- }
1470
-
1471
- // Query Params
1472
- if (superMode !== undefined) {
1473
- requestContext.setQueryParam("super_mode", ObjectSerializer.serialize(superMode, "'all' | 'super' | 'nonsuper'", ""));
1474
- }
1475
-
1476
- // Header Params
1477
- requestContext.setHeaderParam("api-token", ObjectSerializer.serialize(apiToken, "string", ""));
1478
-
1479
-
1480
-
1481
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
1482
- if (defaultAuth?.applySecurityAuthentication) {
1483
- await defaultAuth?.applySecurityAuthentication(requestContext);
1484
- }
1485
-
1486
- return requestContext;
1487
- }
1488
-
1489
- /**
1490
- * ## View number of unread messages This action retrieves a user's total number of unread messages in group channels. > **Note**: The unread count feature is only available for group channels. [https://sendbird.com/docs/chat/platform-api/v3/user/managing-unread-count/get-number-of-unread-messages#1-get-number-of-unread-messages](https://sendbird.com/docs/chat/platform-api/v3/user/managing-unread-count/get-number-of-unread-messages#1-get-number-of-unread-messages) `user_id` Type: string Description: Specifies the unique ID of a user.
1491
- * View number of unread messages
1492
- * @param userId (Required)
1493
- * @param customTypes Specifies a comma-separated string of one or more custom types to filter group channels. URL encoding each type is recommended. If not specified, all channels are returned, regardless of their custom type.
1494
- * @param superMode Restricts the search scope to either Supergroup channels or non-Supergroup channels or both. Acceptable values are &#x60;all&#x60;, &#x60;super&#x60;, and &#x60;nonsuper&#x60;. (Default: &#x60;all&#x60;)
1495
- * @param apiToken
1496
- */
1497
- public async viewNumberOfUnreadMessages(userId: string, customTypes?: string, superMode?: string, apiToken?: string, _options?: Configuration): Promise<RequestContext> {
1498
- let _config = _options || this.configuration;
1499
-
1500
- // verify required parameter 'userId' is not null or undefined
1501
- if (userId === null || userId === undefined) {
1502
- throw new RequiredError("UserApi", "viewNumberOfUnreadMessages", "userId");
1503
- }
1504
-
1505
-
1506
-
1507
-
1508
-
1509
- // Path Params
1510
- const localVarPath = '/v3/users/{user_id}/unread_message_count'
1511
- .replace('{' + 'user_id' + '}', encodeURIComponent(String(userId)));
1512
-
1513
- // Make Request Context
1514
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
1515
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1516
-
1517
- // Query Params
1518
- if (customTypes !== undefined) {
1519
- requestContext.setQueryParam("custom_types", ObjectSerializer.serialize(customTypes, "string", ""));
1520
- }
1521
-
1522
- // Query Params
1523
- if (superMode !== undefined) {
1524
- requestContext.setQueryParam("super_mode", ObjectSerializer.serialize(superMode, "string", ""));
1525
- }
1526
-
1527
- // Header Params
1528
- requestContext.setHeaderParam("api-token", ObjectSerializer.serialize(apiToken, "string", ""));
1529
-
1530
-
1531
-
1532
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
1533
- if (defaultAuth?.applySecurityAuthentication) {
1534
- await defaultAuth?.applySecurityAuthentication(requestContext);
1535
- }
1536
-
1537
- return requestContext;
1538
- }
1539
-
1540
- /**
1541
- * ## View push preferences You can retrieves a user's notifications preferences. A push notification is a message that is immediately delivered to a user's device when the device is either idle or running the client app in the background. > **Note**: Push notifications are only available for group channels. [https://sendbird.com/docs/chat/platform-api/v3/user/configuring-notification-preferences/get-push-notification-preferences#1-get-push-notification-preferences](https://sendbird.com/docs/chat/platform-api/v3/user/configuring-notification-preferences/get-push-notification-preferences#1-get-push-notification-preferences)
1542
- * View push preferences
1543
- * @param userId (Required)
1544
- * @param apiToken
1545
- */
1546
- public async viewPushPreferences(userId: string, apiToken?: string, _options?: Configuration): Promise<RequestContext> {
1547
- let _config = _options || this.configuration;
1548
-
1549
- // verify required parameter 'userId' is not null or undefined
1550
- if (userId === null || userId === undefined) {
1551
- throw new RequiredError("UserApi", "viewPushPreferences", "userId");
1552
- }
1553
-
1554
-
1555
-
1556
- // Path Params
1557
- const localVarPath = '/v3/users/{user_id}/push_preference'
1558
- .replace('{' + 'user_id' + '}', encodeURIComponent(String(userId)));
1559
-
1560
- // Make Request Context
1561
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
1562
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1563
-
1564
- // Header Params
1565
- requestContext.setHeaderParam("api-token", ObjectSerializer.serialize(apiToken, "string", ""));
1566
-
1567
-
1568
-
1569
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
1570
- if (defaultAuth?.applySecurityAuthentication) {
1571
- await defaultAuth?.applySecurityAuthentication(requestContext);
1572
- }
1573
-
1574
- return requestContext;
1575
- }
1576
-
1577
- /**
1578
- * ## View push preferences for a channel You can retrieve a user's notifications preferences for a specific channel. A push notification is a message that is immediately delivered to a user's device when the device is either idle or running the client app in the background. These notifications preferences can be configured. > **Note**: Push notifications are only available for group channels. [https://sendbird.com/docs/chat/platform-api/v3/user/configuring-notification-preferences/get-push-notification-preferences-for-a-channel#1-get-push-notification-preferences-for-a-channel](https://sendbird.com/docs/chat/platform-api/v3/user/configuring-notification-preferences/get-push-notification-preferences-for-a-channel#1-get-push-notification-preferences-for-a-channel)
1579
- * View push preferences for a channel
1580
- * @param userId (Required)
1581
- * @param channelUrl (Required)
1582
- * @param apiToken
1583
- */
1584
- public async viewPushPreferencesForAChannel(userId: string, channelUrl: string, apiToken?: string, _options?: Configuration): Promise<RequestContext> {
1585
- let _config = _options || this.configuration;
1586
-
1587
- // verify required parameter 'userId' is not null or undefined
1588
- if (userId === null || userId === undefined) {
1589
- throw new RequiredError("UserApi", "viewPushPreferencesForAChannel", "userId");
1590
- }
1591
-
1592
-
1593
- // verify required parameter 'channelUrl' is not null or undefined
1594
- if (channelUrl === null || channelUrl === undefined) {
1595
- throw new RequiredError("UserApi", "viewPushPreferencesForAChannel", "channelUrl");
1596
- }
1597
-
1598
-
1599
-
1600
- // Path Params
1601
- const localVarPath = '/v3/users/{user_id}/push_preference/{channel_url}'
1602
- .replace('{' + 'user_id' + '}', encodeURIComponent(String(userId)))
1603
- .replace('{' + 'channel_url' + '}', encodeURIComponent(String(channelUrl)));
1604
-
1605
- // Make Request Context
1606
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
1607
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1608
-
1609
- // Header Params
1610
- requestContext.setHeaderParam("api-token", ObjectSerializer.serialize(apiToken, "string", ""));
1611
-
1612
-
1613
-
1614
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
1615
- if (defaultAuth?.applySecurityAuthentication) {
1616
- await defaultAuth?.applySecurityAuthentication(requestContext);
1617
- }
1618
-
1619
- return requestContext;
1620
- }
1621
-
1622
- /**
1623
- * ## View who owns a registration or device token Retrieves a user who owns a FCM registration token, HMS device token, or APNs device token. You can pass one of two values in `token_type`: `gcm`, `huawei`, or `apns`, depending on which push service you are using. https://sendbird.com/docs/chat/v3/platform-api/guides/user#2-view-who-owns-a-registration-or-device-token ----------------------------
1624
- * View who owns a registration or device token
1625
- * @param tokenType (Required)
1626
- * @param token (Required)
1627
- * @param apiToken
1628
- */
1629
- public async viewWhoOwnsARegistrationOrDeviceToken(tokenType: string, token: string, apiToken?: string, _options?: Configuration): Promise<RequestContext> {
1630
- let _config = _options || this.configuration;
1631
-
1632
- // verify required parameter 'tokenType' is not null or undefined
1633
- if (tokenType === null || tokenType === undefined) {
1634
- throw new RequiredError("UserApi", "viewWhoOwnsARegistrationOrDeviceToken", "tokenType");
1635
- }
1636
-
1637
-
1638
- // verify required parameter 'token' is not null or undefined
1639
- if (token === null || token === undefined) {
1640
- throw new RequiredError("UserApi", "viewWhoOwnsARegistrationOrDeviceToken", "token");
1641
- }
1642
-
1643
-
1644
-
1645
- // Path Params
1646
- const localVarPath = '/v3/push/device_tokens/{token_type}/{token}'
1647
- .replace('{' + 'token_type' + '}', encodeURIComponent(String(tokenType)))
1648
- .replace('{' + 'token' + '}', encodeURIComponent(String(token)));
1649
-
1650
- // Make Request Context
1651
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
1652
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1653
-
1654
- // Header Params
1655
- requestContext.setHeaderParam("api-token", ObjectSerializer.serialize(apiToken, "string", ""));
1656
-
1657
-
1658
-
1659
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
1660
- if (defaultAuth?.applySecurityAuthentication) {
1661
- await defaultAuth?.applySecurityAuthentication(requestContext);
1662
- }
1663
-
1664
- return requestContext;
1665
- }
1666
-
1667
- }
1668
-
1669
- export class UserApiResponseProcessor {
1670
-
1671
- /**
1672
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
1673
- * to the expected objects
1674
- *
1675
- * @params response Response returned by the server for a request to addARegistrationOrDeviceToken
1676
- * @throws ApiException if the response code was not in [200, 299]
1677
- */
1678
- public async addARegistrationOrDeviceToken(response: ResponseContext): Promise<AddARegistrationOrDeviceTokenResponse > {
1679
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
1680
- if (isCodeInRange("200", response.httpStatusCode)) {
1681
- const body: AddARegistrationOrDeviceTokenResponse = ObjectSerializer.deserialize(
1682
- ObjectSerializer.parse(await response.body.text(), contentType),
1683
- "AddARegistrationOrDeviceTokenResponse", ""
1684
- ) as AddARegistrationOrDeviceTokenResponse;
1685
- return body;
1686
- }
1687
-
1688
- // Work around for missing responses in specification, e.g. for petstore.yaml
1689
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
1690
- const body: AddARegistrationOrDeviceTokenResponse = ObjectSerializer.deserialize(
1691
- ObjectSerializer.parse(await response.body.text(), contentType),
1692
- "AddARegistrationOrDeviceTokenResponse", ""
1693
- ) as AddARegistrationOrDeviceTokenResponse;
1694
- return body;
1695
- }
1696
-
1697
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
1698
- }
1699
-
1700
- /**
1701
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
1702
- * to the expected objects
1703
- *
1704
- * @params response Response returned by the server for a request to chooseAPushNotificationContentTemplate
1705
- * @throws ApiException if the response code was not in [200, 299]
1706
- */
1707
- public async chooseAPushNotificationContentTemplate(response: ResponseContext): Promise<ChooseAPushNotificationContentTemplateResponse > {
1708
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
1709
- if (isCodeInRange("200", response.httpStatusCode)) {
1710
- const body: ChooseAPushNotificationContentTemplateResponse = ObjectSerializer.deserialize(
1711
- ObjectSerializer.parse(await response.body.text(), contentType),
1712
- "ChooseAPushNotificationContentTemplateResponse", ""
1713
- ) as ChooseAPushNotificationContentTemplateResponse;
1714
- return body;
1715
- }
1716
-
1717
- // Work around for missing responses in specification, e.g. for petstore.yaml
1718
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
1719
- const body: ChooseAPushNotificationContentTemplateResponse = ObjectSerializer.deserialize(
1720
- ObjectSerializer.parse(await response.body.text(), contentType),
1721
- "ChooseAPushNotificationContentTemplateResponse", ""
1722
- ) as ChooseAPushNotificationContentTemplateResponse;
1723
- return body;
1724
- }
1725
-
1726
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
1727
- }
1728
-
1729
- /**
1730
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
1731
- * to the expected objects
1732
- *
1733
- * @params response Response returned by the server for a request to createAUser
1734
- * @throws ApiException if the response code was not in [200, 299]
1735
- */
1736
- public async createAUser(response: ResponseContext): Promise<SendbirdUser > {
1737
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
1738
- if (isCodeInRange("200", response.httpStatusCode)) {
1739
- const body: SendbirdUser = ObjectSerializer.deserialize(
1740
- ObjectSerializer.parse(await response.body.text(), contentType),
1741
- "SendbirdUser", ""
1742
- ) as SendbirdUser;
1743
- return body;
1744
- }
1745
-
1746
- // Work around for missing responses in specification, e.g. for petstore.yaml
1747
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
1748
- const body: SendbirdUser = ObjectSerializer.deserialize(
1749
- ObjectSerializer.parse(await response.body.text(), contentType),
1750
- "SendbirdUser", ""
1751
- ) as SendbirdUser;
1752
- return body;
1753
- }
1754
-
1755
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
1756
- }
1757
-
1758
- /**
1759
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
1760
- * to the expected objects
1761
- *
1762
- * @params response Response returned by the server for a request to createUserToken
1763
- * @throws ApiException if the response code was not in [200, 299]
1764
- */
1765
- public async createUserToken(response: ResponseContext): Promise<CreateUserTokenResponse > {
1766
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
1767
- if (isCodeInRange("200", response.httpStatusCode)) {
1768
- const body: CreateUserTokenResponse = ObjectSerializer.deserialize(
1769
- ObjectSerializer.parse(await response.body.text(), contentType),
1770
- "CreateUserTokenResponse", ""
1771
- ) as CreateUserTokenResponse;
1772
- return body;
1773
- }
1774
-
1775
- // Work around for missing responses in specification, e.g. for petstore.yaml
1776
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
1777
- const body: CreateUserTokenResponse = ObjectSerializer.deserialize(
1778
- ObjectSerializer.parse(await response.body.text(), contentType),
1779
- "CreateUserTokenResponse", ""
1780
- ) as CreateUserTokenResponse;
1781
- return body;
1782
- }
1783
-
1784
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
1785
- }
1786
-
1787
- /**
1788
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
1789
- * to the expected objects
1790
- *
1791
- * @params response Response returned by the server for a request to deleteAUser
1792
- * @throws ApiException if the response code was not in [200, 299]
1793
- */
1794
- public async deleteAUser(response: ResponseContext): Promise<any > {
1795
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
1796
- if (isCodeInRange("200", response.httpStatusCode)) {
1797
- const body: any = ObjectSerializer.deserialize(
1798
- ObjectSerializer.parse(await response.body.text(), contentType),
1799
- "any", ""
1800
- ) as any;
1801
- return body;
1802
- }
1803
-
1804
- // Work around for missing responses in specification, e.g. for petstore.yaml
1805
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
1806
- const body: any = ObjectSerializer.deserialize(
1807
- ObjectSerializer.parse(await response.body.text(), contentType),
1808
- "any", ""
1809
- ) as any;
1810
- return body;
1811
- }
1812
-
1813
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
1814
- }
1815
-
1816
- /**
1817
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
1818
- * to the expected objects
1819
- *
1820
- * @params response Response returned by the server for a request to getChannelInvitationPreference
1821
- * @throws ApiException if the response code was not in [200, 299]
1822
- */
1823
- public async getChannelInvitationPreference(response: ResponseContext): Promise<GetChannelInvitationPreferenceResponse > {
1824
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
1825
- if (isCodeInRange("200", response.httpStatusCode)) {
1826
- const body: GetChannelInvitationPreferenceResponse = ObjectSerializer.deserialize(
1827
- ObjectSerializer.parse(await response.body.text(), contentType),
1828
- "GetChannelInvitationPreferenceResponse", ""
1829
- ) as GetChannelInvitationPreferenceResponse;
1830
- return body;
1831
- }
1832
-
1833
- // Work around for missing responses in specification, e.g. for petstore.yaml
1834
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
1835
- const body: GetChannelInvitationPreferenceResponse = ObjectSerializer.deserialize(
1836
- ObjectSerializer.parse(await response.body.text(), contentType),
1837
- "GetChannelInvitationPreferenceResponse", ""
1838
- ) as GetChannelInvitationPreferenceResponse;
1839
- return body;
1840
- }
1841
-
1842
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
1843
- }
1844
-
1845
- /**
1846
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
1847
- * to the expected objects
1848
- *
1849
- * @params response Response returned by the server for a request to leaveMyGroupChannels
1850
- * @throws ApiException if the response code was not in [200, 299]
1851
- */
1852
- public async leaveMyGroupChannels(response: ResponseContext): Promise<any > {
1853
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
1854
- if (isCodeInRange("200", response.httpStatusCode)) {
1855
- const body: any = ObjectSerializer.deserialize(
1856
- ObjectSerializer.parse(await response.body.text(), contentType),
1857
- "any", ""
1858
- ) as any;
1859
- return body;
1860
- }
1861
-
1862
- // Work around for missing responses in specification, e.g. for petstore.yaml
1863
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
1864
- const body: any = ObjectSerializer.deserialize(
1865
- ObjectSerializer.parse(await response.body.text(), contentType),
1866
- "any", ""
1867
- ) as any;
1868
- return body;
1869
- }
1870
-
1871
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
1872
- }
1873
-
1874
- /**
1875
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
1876
- * to the expected objects
1877
- *
1878
- * @params response Response returned by the server for a request to listMyGroupChannels
1879
- * @throws ApiException if the response code was not in [200, 299]
1880
- */
1881
- public async listMyGroupChannels(response: ResponseContext): Promise<ListMyGroupChannelsResponse > {
1882
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
1883
- if (isCodeInRange("200", response.httpStatusCode)) {
1884
- const body: ListMyGroupChannelsResponse = ObjectSerializer.deserialize(
1885
- ObjectSerializer.parse(await response.body.text(), contentType),
1886
- "ListMyGroupChannelsResponse", ""
1887
- ) as ListMyGroupChannelsResponse;
1888
- return body;
1889
- }
1890
-
1891
- // Work around for missing responses in specification, e.g. for petstore.yaml
1892
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
1893
- const body: ListMyGroupChannelsResponse = ObjectSerializer.deserialize(
1894
- ObjectSerializer.parse(await response.body.text(), contentType),
1895
- "ListMyGroupChannelsResponse", ""
1896
- ) as ListMyGroupChannelsResponse;
1897
- return body;
1898
- }
1899
-
1900
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
1901
- }
1902
-
1903
- /**
1904
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
1905
- * to the expected objects
1906
- *
1907
- * @params response Response returned by the server for a request to listRegistrationOrDeviceTokens
1908
- * @throws ApiException if the response code was not in [200, 299]
1909
- */
1910
- public async listRegistrationOrDeviceTokens(response: ResponseContext): Promise<ListRegistrationOrDeviceTokensResponse > {
1911
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
1912
- if (isCodeInRange("200", response.httpStatusCode)) {
1913
- const body: ListRegistrationOrDeviceTokensResponse = ObjectSerializer.deserialize(
1914
- ObjectSerializer.parse(await response.body.text(), contentType),
1915
- "ListRegistrationOrDeviceTokensResponse", ""
1916
- ) as ListRegistrationOrDeviceTokensResponse;
1917
- return body;
1918
- }
1919
-
1920
- // Work around for missing responses in specification, e.g. for petstore.yaml
1921
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
1922
- const body: ListRegistrationOrDeviceTokensResponse = ObjectSerializer.deserialize(
1923
- ObjectSerializer.parse(await response.body.text(), contentType),
1924
- "ListRegistrationOrDeviceTokensResponse", ""
1925
- ) as ListRegistrationOrDeviceTokensResponse;
1926
- return body;
1927
- }
1928
-
1929
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
1930
- }
1931
-
1932
- /**
1933
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
1934
- * to the expected objects
1935
- *
1936
- * @params response Response returned by the server for a request to listUsers
1937
- * @throws ApiException if the response code was not in [200, 299]
1938
- */
1939
- public async listUsers(response: ResponseContext): Promise<ListUsersResponse > {
1940
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
1941
- if (isCodeInRange("200", response.httpStatusCode)) {
1942
- const body: ListUsersResponse = ObjectSerializer.deserialize(
1943
- ObjectSerializer.parse(await response.body.text(), contentType),
1944
- "ListUsersResponse", ""
1945
- ) as ListUsersResponse;
1946
- return body;
1947
- }
1948
-
1949
- // Work around for missing responses in specification, e.g. for petstore.yaml
1950
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
1951
- const body: ListUsersResponse = ObjectSerializer.deserialize(
1952
- ObjectSerializer.parse(await response.body.text(), contentType),
1953
- "ListUsersResponse", ""
1954
- ) as ListUsersResponse;
1955
- return body;
1956
- }
1957
-
1958
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
1959
- }
1960
-
1961
- /**
1962
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
1963
- * to the expected objects
1964
- *
1965
- * @params response Response returned by the server for a request to markAllMessagesAsRead
1966
- * @throws ApiException if the response code was not in [200, 299]
1967
- */
1968
- public async markAllMessagesAsRead(response: ResponseContext): Promise<any > {
1969
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
1970
- if (isCodeInRange("200", response.httpStatusCode)) {
1971
- const body: any = ObjectSerializer.deserialize(
1972
- ObjectSerializer.parse(await response.body.text(), contentType),
1973
- "any", ""
1974
- ) as any;
1975
- return body;
1976
- }
1977
-
1978
- // Work around for missing responses in specification, e.g. for petstore.yaml
1979
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
1980
- const body: any = ObjectSerializer.deserialize(
1981
- ObjectSerializer.parse(await response.body.text(), contentType),
1982
- "any", ""
1983
- ) as any;
1984
- return body;
1985
- }
1986
-
1987
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
1988
- }
1989
-
1990
- /**
1991
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
1992
- * to the expected objects
1993
- *
1994
- * @params response Response returned by the server for a request to removeARegistrationOrDeviceToken
1995
- * @throws ApiException if the response code was not in [200, 299]
1996
- */
1997
- public async removeARegistrationOrDeviceToken(response: ResponseContext): Promise<RemoveARegistrationOrDeviceTokenResponse > {
1998
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
1999
- if (isCodeInRange("200", response.httpStatusCode)) {
2000
- const body: RemoveARegistrationOrDeviceTokenResponse = ObjectSerializer.deserialize(
2001
- ObjectSerializer.parse(await response.body.text(), contentType),
2002
- "RemoveARegistrationOrDeviceTokenResponse", ""
2003
- ) as RemoveARegistrationOrDeviceTokenResponse;
2004
- return body;
2005
- }
2006
-
2007
- // Work around for missing responses in specification, e.g. for petstore.yaml
2008
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2009
- const body: RemoveARegistrationOrDeviceTokenResponse = ObjectSerializer.deserialize(
2010
- ObjectSerializer.parse(await response.body.text(), contentType),
2011
- "RemoveARegistrationOrDeviceTokenResponse", ""
2012
- ) as RemoveARegistrationOrDeviceTokenResponse;
2013
- return body;
2014
- }
2015
-
2016
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
2017
- }
2018
-
2019
- /**
2020
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
2021
- * to the expected objects
2022
- *
2023
- * @params response Response returned by the server for a request to removeARegistrationOrDeviceTokenFromAnOwner
2024
- * @throws ApiException if the response code was not in [200, 299]
2025
- */
2026
- public async removeARegistrationOrDeviceTokenFromAnOwner(response: ResponseContext): Promise<Array<MarkChannelMessagesAsReadRequest> > {
2027
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2028
- if (isCodeInRange("200", response.httpStatusCode)) {
2029
- const body: Array<MarkChannelMessagesAsReadRequest> = ObjectSerializer.deserialize(
2030
- ObjectSerializer.parse(await response.body.text(), contentType),
2031
- "Array<MarkChannelMessagesAsReadRequest>", ""
2032
- ) as Array<MarkChannelMessagesAsReadRequest>;
2033
- return body;
2034
- }
2035
-
2036
- // Work around for missing responses in specification, e.g. for petstore.yaml
2037
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2038
- const body: Array<MarkChannelMessagesAsReadRequest> = ObjectSerializer.deserialize(
2039
- ObjectSerializer.parse(await response.body.text(), contentType),
2040
- "Array<MarkChannelMessagesAsReadRequest>", ""
2041
- ) as Array<MarkChannelMessagesAsReadRequest>;
2042
- return body;
2043
- }
2044
-
2045
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
2046
- }
2047
-
2048
- /**
2049
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
2050
- * to the expected objects
2051
- *
2052
- * @params response Response returned by the server for a request to removeAllRegistrationOrDeviceToken
2053
- * @throws ApiException if the response code was not in [200, 299]
2054
- */
2055
- public async removeAllRegistrationOrDeviceToken(response: ResponseContext): Promise<RemoveAllRegistrationOrDeviceTokenResponse > {
2056
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2057
- if (isCodeInRange("200", response.httpStatusCode)) {
2058
- const body: RemoveAllRegistrationOrDeviceTokenResponse = ObjectSerializer.deserialize(
2059
- ObjectSerializer.parse(await response.body.text(), contentType),
2060
- "RemoveAllRegistrationOrDeviceTokenResponse", ""
2061
- ) as RemoveAllRegistrationOrDeviceTokenResponse;
2062
- return body;
2063
- }
2064
-
2065
- // Work around for missing responses in specification, e.g. for petstore.yaml
2066
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2067
- const body: RemoveAllRegistrationOrDeviceTokenResponse = ObjectSerializer.deserialize(
2068
- ObjectSerializer.parse(await response.body.text(), contentType),
2069
- "RemoveAllRegistrationOrDeviceTokenResponse", ""
2070
- ) as RemoveAllRegistrationOrDeviceTokenResponse;
2071
- return body;
2072
- }
2073
-
2074
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
2075
- }
2076
-
2077
- /**
2078
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
2079
- * to the expected objects
2080
- *
2081
- * @params response Response returned by the server for a request to resetPushPreferences
2082
- * @throws ApiException if the response code was not in [200, 299]
2083
- */
2084
- public async resetPushPreferences(response: ResponseContext): Promise<any > {
2085
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2086
- if (isCodeInRange("200", response.httpStatusCode)) {
2087
- const body: any = ObjectSerializer.deserialize(
2088
- ObjectSerializer.parse(await response.body.text(), contentType),
2089
- "any", ""
2090
- ) as any;
2091
- return body;
2092
- }
2093
-
2094
- // Work around for missing responses in specification, e.g. for petstore.yaml
2095
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2096
- const body: any = ObjectSerializer.deserialize(
2097
- ObjectSerializer.parse(await response.body.text(), contentType),
2098
- "any", ""
2099
- ) as any;
2100
- return body;
2101
- }
2102
-
2103
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
2104
- }
2105
-
2106
- /**
2107
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
2108
- * to the expected objects
2109
- *
2110
- * @params response Response returned by the server for a request to updateAUser
2111
- * @throws ApiException if the response code was not in [200, 299]
2112
- */
2113
- public async updateAUser(response: ResponseContext): Promise<SendbirdUser > {
2114
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2115
- if (isCodeInRange("200", response.httpStatusCode)) {
2116
- const body: SendbirdUser = ObjectSerializer.deserialize(
2117
- ObjectSerializer.parse(await response.body.text(), contentType),
2118
- "SendbirdUser", ""
2119
- ) as SendbirdUser;
2120
- return body;
2121
- }
2122
-
2123
- // Work around for missing responses in specification, e.g. for petstore.yaml
2124
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2125
- const body: SendbirdUser = ObjectSerializer.deserialize(
2126
- ObjectSerializer.parse(await response.body.text(), contentType),
2127
- "SendbirdUser", ""
2128
- ) as SendbirdUser;
2129
- return body;
2130
- }
2131
-
2132
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
2133
- }
2134
-
2135
- /**
2136
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
2137
- * to the expected objects
2138
- *
2139
- * @params response Response returned by the server for a request to updateChannelInvitationPreference
2140
- * @throws ApiException if the response code was not in [200, 299]
2141
- */
2142
- public async updateChannelInvitationPreference(response: ResponseContext): Promise<UpdateChannelInvitationPreferenceResponse > {
2143
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2144
- if (isCodeInRange("200", response.httpStatusCode)) {
2145
- const body: UpdateChannelInvitationPreferenceResponse = ObjectSerializer.deserialize(
2146
- ObjectSerializer.parse(await response.body.text(), contentType),
2147
- "UpdateChannelInvitationPreferenceResponse", ""
2148
- ) as UpdateChannelInvitationPreferenceResponse;
2149
- return body;
2150
- }
2151
-
2152
- // Work around for missing responses in specification, e.g. for petstore.yaml
2153
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2154
- const body: UpdateChannelInvitationPreferenceResponse = ObjectSerializer.deserialize(
2155
- ObjectSerializer.parse(await response.body.text(), contentType),
2156
- "UpdateChannelInvitationPreferenceResponse", ""
2157
- ) as UpdateChannelInvitationPreferenceResponse;
2158
- return body;
2159
- }
2160
-
2161
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
2162
- }
2163
-
2164
- /**
2165
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
2166
- * to the expected objects
2167
- *
2168
- * @params response Response returned by the server for a request to updateCountPreferenceOfAChannel
2169
- * @throws ApiException if the response code was not in [200, 299]
2170
- */
2171
- public async updateCountPreferenceOfAChannel(response: ResponseContext): Promise<UpdateCountPreferenceOfChannelByUrlResponse > {
2172
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2173
- if (isCodeInRange("200", response.httpStatusCode)) {
2174
- const body: UpdateCountPreferenceOfChannelByUrlResponse = ObjectSerializer.deserialize(
2175
- ObjectSerializer.parse(await response.body.text(), contentType),
2176
- "UpdateCountPreferenceOfChannelByUrlResponse", ""
2177
- ) as UpdateCountPreferenceOfChannelByUrlResponse;
2178
- return body;
2179
- }
2180
-
2181
- // Work around for missing responses in specification, e.g. for petstore.yaml
2182
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2183
- const body: UpdateCountPreferenceOfChannelByUrlResponse = ObjectSerializer.deserialize(
2184
- ObjectSerializer.parse(await response.body.text(), contentType),
2185
- "UpdateCountPreferenceOfChannelByUrlResponse", ""
2186
- ) as UpdateCountPreferenceOfChannelByUrlResponse;
2187
- return body;
2188
- }
2189
-
2190
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
2191
- }
2192
-
2193
- /**
2194
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
2195
- * to the expected objects
2196
- *
2197
- * @params response Response returned by the server for a request to updatePushPreferences
2198
- * @throws ApiException if the response code was not in [200, 299]
2199
- */
2200
- public async updatePushPreferences(response: ResponseContext): Promise<UpdatePushPreferencesResponse > {
2201
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2202
- if (isCodeInRange("200", response.httpStatusCode)) {
2203
- const body: UpdatePushPreferencesResponse = ObjectSerializer.deserialize(
2204
- ObjectSerializer.parse(await response.body.text(), contentType),
2205
- "UpdatePushPreferencesResponse", ""
2206
- ) as UpdatePushPreferencesResponse;
2207
- return body;
2208
- }
2209
-
2210
- // Work around for missing responses in specification, e.g. for petstore.yaml
2211
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2212
- const body: UpdatePushPreferencesResponse = ObjectSerializer.deserialize(
2213
- ObjectSerializer.parse(await response.body.text(), contentType),
2214
- "UpdatePushPreferencesResponse", ""
2215
- ) as UpdatePushPreferencesResponse;
2216
- return body;
2217
- }
2218
-
2219
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
2220
- }
2221
-
2222
- /**
2223
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
2224
- * to the expected objects
2225
- *
2226
- * @params response Response returned by the server for a request to updatePushPreferencesForAChannel
2227
- * @throws ApiException if the response code was not in [200, 299]
2228
- */
2229
- public async updatePushPreferencesForAChannel(response: ResponseContext): Promise<UpdatePushPreferencesForAChannelResponse > {
2230
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2231
- if (isCodeInRange("200", response.httpStatusCode)) {
2232
- const body: UpdatePushPreferencesForAChannelResponse = ObjectSerializer.deserialize(
2233
- ObjectSerializer.parse(await response.body.text(), contentType),
2234
- "UpdatePushPreferencesForAChannelResponse", ""
2235
- ) as UpdatePushPreferencesForAChannelResponse;
2236
- return body;
2237
- }
2238
-
2239
- // Work around for missing responses in specification, e.g. for petstore.yaml
2240
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2241
- const body: UpdatePushPreferencesForAChannelResponse = ObjectSerializer.deserialize(
2242
- ObjectSerializer.parse(await response.body.text(), contentType),
2243
- "UpdatePushPreferencesForAChannelResponse", ""
2244
- ) as UpdatePushPreferencesForAChannelResponse;
2245
- return body;
2246
- }
2247
-
2248
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
2249
- }
2250
-
2251
- /**
2252
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
2253
- * to the expected objects
2254
- *
2255
- * @params response Response returned by the server for a request to viewAUser
2256
- * @throws ApiException if the response code was not in [200, 299]
2257
- */
2258
- public async viewAUser(response: ResponseContext): Promise<SendbirdUser > {
2259
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2260
- if (isCodeInRange("200", response.httpStatusCode)) {
2261
- const body: SendbirdUser = ObjectSerializer.deserialize(
2262
- ObjectSerializer.parse(await response.body.text(), contentType),
2263
- "SendbirdUser", ""
2264
- ) as SendbirdUser;
2265
- return body;
2266
- }
2267
-
2268
- // Work around for missing responses in specification, e.g. for petstore.yaml
2269
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2270
- const body: SendbirdUser = ObjectSerializer.deserialize(
2271
- ObjectSerializer.parse(await response.body.text(), contentType),
2272
- "SendbirdUser", ""
2273
- ) as SendbirdUser;
2274
- return body;
2275
- }
2276
-
2277
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
2278
- }
2279
-
2280
- /**
2281
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
2282
- * to the expected objects
2283
- *
2284
- * @params response Response returned by the server for a request to viewCountPreferenceOfAChannel
2285
- * @throws ApiException if the response code was not in [200, 299]
2286
- */
2287
- public async viewCountPreferenceOfAChannel(response: ResponseContext): Promise<ViewCountPreferenceOfAChannelResponse > {
2288
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2289
- if (isCodeInRange("200", response.httpStatusCode)) {
2290
- const body: ViewCountPreferenceOfAChannelResponse = ObjectSerializer.deserialize(
2291
- ObjectSerializer.parse(await response.body.text(), contentType),
2292
- "ViewCountPreferenceOfAChannelResponse", ""
2293
- ) as ViewCountPreferenceOfAChannelResponse;
2294
- return body;
2295
- }
2296
-
2297
- // Work around for missing responses in specification, e.g. for petstore.yaml
2298
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2299
- const body: ViewCountPreferenceOfAChannelResponse = ObjectSerializer.deserialize(
2300
- ObjectSerializer.parse(await response.body.text(), contentType),
2301
- "ViewCountPreferenceOfAChannelResponse", ""
2302
- ) as ViewCountPreferenceOfAChannelResponse;
2303
- return body;
2304
- }
2305
-
2306
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
2307
- }
2308
-
2309
- /**
2310
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
2311
- * to the expected objects
2312
- *
2313
- * @params response Response returned by the server for a request to viewNumberOfChannelsWithUnreadMessages
2314
- * @throws ApiException if the response code was not in [200, 299]
2315
- */
2316
- public async viewNumberOfChannelsWithUnreadMessages(response: ResponseContext): Promise<ViewNumberOfChannelsWithUnreadMessagesResponse > {
2317
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2318
- if (isCodeInRange("200", response.httpStatusCode)) {
2319
- const body: ViewNumberOfChannelsWithUnreadMessagesResponse = ObjectSerializer.deserialize(
2320
- ObjectSerializer.parse(await response.body.text(), contentType),
2321
- "ViewNumberOfChannelsWithUnreadMessagesResponse", ""
2322
- ) as ViewNumberOfChannelsWithUnreadMessagesResponse;
2323
- return body;
2324
- }
2325
-
2326
- // Work around for missing responses in specification, e.g. for petstore.yaml
2327
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2328
- const body: ViewNumberOfChannelsWithUnreadMessagesResponse = ObjectSerializer.deserialize(
2329
- ObjectSerializer.parse(await response.body.text(), contentType),
2330
- "ViewNumberOfChannelsWithUnreadMessagesResponse", ""
2331
- ) as ViewNumberOfChannelsWithUnreadMessagesResponse;
2332
- return body;
2333
- }
2334
-
2335
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
2336
- }
2337
-
2338
- /**
2339
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
2340
- * to the expected objects
2341
- *
2342
- * @params response Response returned by the server for a request to viewNumberOfUnreadMessages
2343
- * @throws ApiException if the response code was not in [200, 299]
2344
- */
2345
- public async viewNumberOfUnreadMessages(response: ResponseContext): Promise<ViewNumberOfUnreadMessagesResponse > {
2346
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2347
- if (isCodeInRange("200", response.httpStatusCode)) {
2348
- const body: ViewNumberOfUnreadMessagesResponse = ObjectSerializer.deserialize(
2349
- ObjectSerializer.parse(await response.body.text(), contentType),
2350
- "ViewNumberOfUnreadMessagesResponse", ""
2351
- ) as ViewNumberOfUnreadMessagesResponse;
2352
- return body;
2353
- }
2354
-
2355
- // Work around for missing responses in specification, e.g. for petstore.yaml
2356
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2357
- const body: ViewNumberOfUnreadMessagesResponse = ObjectSerializer.deserialize(
2358
- ObjectSerializer.parse(await response.body.text(), contentType),
2359
- "ViewNumberOfUnreadMessagesResponse", ""
2360
- ) as ViewNumberOfUnreadMessagesResponse;
2361
- return body;
2362
- }
2363
-
2364
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
2365
- }
2366
-
2367
- /**
2368
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
2369
- * to the expected objects
2370
- *
2371
- * @params response Response returned by the server for a request to viewPushPreferences
2372
- * @throws ApiException if the response code was not in [200, 299]
2373
- */
2374
- public async viewPushPreferences(response: ResponseContext): Promise<ViewPushPreferencesResponse > {
2375
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2376
- if (isCodeInRange("200", response.httpStatusCode)) {
2377
- const body: ViewPushPreferencesResponse = ObjectSerializer.deserialize(
2378
- ObjectSerializer.parse(await response.body.text(), contentType),
2379
- "ViewPushPreferencesResponse", ""
2380
- ) as ViewPushPreferencesResponse;
2381
- return body;
2382
- }
2383
-
2384
- // Work around for missing responses in specification, e.g. for petstore.yaml
2385
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2386
- const body: ViewPushPreferencesResponse = ObjectSerializer.deserialize(
2387
- ObjectSerializer.parse(await response.body.text(), contentType),
2388
- "ViewPushPreferencesResponse", ""
2389
- ) as ViewPushPreferencesResponse;
2390
- return body;
2391
- }
2392
-
2393
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
2394
- }
2395
-
2396
- /**
2397
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
2398
- * to the expected objects
2399
- *
2400
- * @params response Response returned by the server for a request to viewPushPreferencesForAChannel
2401
- * @throws ApiException if the response code was not in [200, 299]
2402
- */
2403
- public async viewPushPreferencesForAChannel(response: ResponseContext): Promise<ViewPushPreferencesForAChannelResponse > {
2404
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2405
- if (isCodeInRange("200", response.httpStatusCode)) {
2406
- const body: ViewPushPreferencesForAChannelResponse = ObjectSerializer.deserialize(
2407
- ObjectSerializer.parse(await response.body.text(), contentType),
2408
- "ViewPushPreferencesForAChannelResponse", ""
2409
- ) as ViewPushPreferencesForAChannelResponse;
2410
- return body;
2411
- }
2412
-
2413
- // Work around for missing responses in specification, e.g. for petstore.yaml
2414
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2415
- const body: ViewPushPreferencesForAChannelResponse = ObjectSerializer.deserialize(
2416
- ObjectSerializer.parse(await response.body.text(), contentType),
2417
- "ViewPushPreferencesForAChannelResponse", ""
2418
- ) as ViewPushPreferencesForAChannelResponse;
2419
- return body;
2420
- }
2421
-
2422
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
2423
- }
2424
-
2425
- /**
2426
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
2427
- * to the expected objects
2428
- *
2429
- * @params response Response returned by the server for a request to viewWhoOwnsARegistrationOrDeviceToken
2430
- * @throws ApiException if the response code was not in [200, 299]
2431
- */
2432
- public async viewWhoOwnsARegistrationOrDeviceToken(response: ResponseContext): Promise<Array<MarkChannelMessagesAsReadRequest> > {
2433
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2434
- if (isCodeInRange("200", response.httpStatusCode)) {
2435
- const body: Array<MarkChannelMessagesAsReadRequest> = ObjectSerializer.deserialize(
2436
- ObjectSerializer.parse(await response.body.text(), contentType),
2437
- "Array<MarkChannelMessagesAsReadRequest>", ""
2438
- ) as Array<MarkChannelMessagesAsReadRequest>;
2439
- return body;
2440
- }
2441
-
2442
- // Work around for missing responses in specification, e.g. for petstore.yaml
2443
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2444
- const body: Array<MarkChannelMessagesAsReadRequest> = ObjectSerializer.deserialize(
2445
- ObjectSerializer.parse(await response.body.text(), contentType),
2446
- "Array<MarkChannelMessagesAsReadRequest>", ""
2447
- ) as Array<MarkChannelMessagesAsReadRequest>;
2448
- return body;
2449
- }
2450
-
2451
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
2452
- }
2453
-
2454
- }