@sendbird/sendbird-platform-sdk-typescript 2.1.2 → 2.1.6

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 (819) hide show
  1. package/CHANGELOG +18 -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 +24 -0
  106. package/models/CreateAUserRequest.js +57 -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 -154
  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 -640
  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/SendBirdGroupChannel.ts +0 -355
  592. package/models/SendBirdMessageResponse.ts +0 -245
  593. package/models/SendBirdUser.ts +0 -181
  594. package/models/SendFileMessageRequestBody.ts +0 -187
  595. package/models/SendTextMessageRequestBody.ts +0 -170
  596. package/models/SendTextMessageRequestBodyPushMessageTemplate.ts +0 -52
  597. package/models/SendbirdBasicUserInfo.ts +0 -87
  598. package/models/SendbirdDisappearingMessage.ts +0 -42
  599. package/models/SendbirdExtendedMessagePayload.ts +0 -51
  600. package/models/SendbirdFile.ts +0 -71
  601. package/models/SendbirdGroupChannelDetail.ts +0 -266
  602. package/models/SendbirdGroupChannelDetailChannel.ts +0 -84
  603. package/models/SendbirdGroupChannelLastMessage.ts +0 -246
  604. package/models/SendbirdMember.ts +0 -187
  605. package/models/SendbirdMessageResponseExtendedMessagePayload.ts +0 -49
  606. package/models/SendbirdMessageResponseMessageEvents.ts +0 -56
  607. package/models/SendbirdOpenChannel.ts +0 -120
  608. package/models/SendbirdParentMessageInfo.ts +0 -79
  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 -127
  631. package/models/UpdatePushPreferencesResponse.ts +0 -127
  632. package/models/UpdateSpecificUserMetadataRequest.ts +0 -35
  633. package/models/UpdateUserMetadataRequest.ts +0 -42
  634. package/models/ViewBotByIdResponse.ts +0 -71
  635. package/models/ViewBotByIdResponseBot.ts +0 -70
  636. package/models/ViewCountPreferenceOfAChannelResponse.ts +0 -38
  637. package/models/ViewNumberOfChannelsWithUnreadMessagesResponse.ts +0 -35
  638. package/models/ViewNumberOfDailyActiveUsersResponse.ts +0 -35
  639. package/models/ViewNumberOfMonthlyActiveUsersResponse.ts +0 -35
  640. package/models/ViewNumberOfUnreadMessagesResponse.ts +0 -35
  641. package/models/ViewPushPreferencesForAChannelResponse.ts +0 -50
  642. package/models/ViewPushPreferencesResponse.ts +0 -127
  643. package/models/all.ts +0 -128
  644. package/package.json-e +0 -40
  645. package/rxjsStub.ts +0 -27
  646. package/servers.ts +0 -53
  647. package/src/api/generated/.openapi-generator/FILES +0 -151
  648. package/src/api/generated/.openapi-generator/VERSION +0 -1
  649. package/src/api/generated/README.md +0 -30
  650. package/src/api/generated/apis/AnnouncementApi.ts +0 -96
  651. package/src/api/generated/apis/BotApi.ts +0 -471
  652. package/src/api/generated/apis/GroupChannelApi.ts +0 -1865
  653. package/src/api/generated/apis/MessageApi.ts +0 -1150
  654. package/src/api/generated/apis/MetadataApi.ts +0 -365
  655. package/src/api/generated/apis/ModerationApi.ts +0 -449
  656. package/src/api/generated/apis/OpenChannelApi.ts +0 -676
  657. package/src/api/generated/apis/StatisticsApi.ts +0 -155
  658. package/src/api/generated/apis/UserApi.ts +0 -2454
  659. package/src/api/generated/apis/baseapi.ts +0 -37
  660. package/src/api/generated/apis/exception.ts +0 -15
  661. package/src/api/generated/auth/auth.ts +0 -54
  662. package/src/api/generated/configuration.ts +0 -66
  663. package/src/api/generated/git_push.sh +0 -51
  664. package/src/api/generated/http/http.ts +0 -231
  665. package/src/api/generated/http/isomorphic-fetch.ts +0 -32
  666. package/src/api/generated/index.ts +0 -12
  667. package/src/api/generated/middleware.ts +0 -66
  668. package/src/api/generated/models/AcceptAnInvitationRequest.ts +0 -42
  669. package/src/api/generated/models/AddARegistrationOrDeviceTokenRequest.ts +0 -49
  670. package/src/api/generated/models/AddARegistrationOrDeviceTokenResponse.ts +0 -50
  671. package/src/api/generated/models/AddExtraDataToAMessageRequest.ts +0 -36
  672. package/src/api/generated/models/AddExtraDataToAMessageResponse.ts +0 -36
  673. package/src/api/generated/models/BlockAUserRequest.ts +0 -45
  674. package/src/api/generated/models/BlockAUserResponse.ts +0 -43
  675. package/src/api/generated/models/CheckIfMemberResponse.ts +0 -45
  676. package/src/api/generated/models/ChooseAPushNotificationContentTemplateRequest.ts +0 -41
  677. package/src/api/generated/models/ChooseAPushNotificationContentTemplateResponse.ts +0 -35
  678. package/src/api/generated/models/CreateABotRequest.ts +0 -100
  679. package/src/api/generated/models/CreateABotResponse.ts +0 -86
  680. package/src/api/generated/models/CreateABotResponseBot.ts +0 -91
  681. package/src/api/generated/models/CreateABotResponseBotStyle.ts +0 -57
  682. package/src/api/generated/models/CreateAChannelMetadataRequest.ts +0 -42
  683. package/src/api/generated/models/CreateAChannelMetadataResponse.ts +0 -42
  684. package/src/api/generated/models/CreateAGroupChannelRequest.ts +0 -171
  685. package/src/api/generated/models/CreateAUserRequest.ts +0 -80
  686. package/src/api/generated/models/CreateAnOpenChannelRequest.ts +0 -91
  687. package/src/api/generated/models/CreateUserTokenRequest.ts +0 -35
  688. package/src/api/generated/models/CreateUserTokenResponse.ts +0 -42
  689. package/src/api/generated/models/FreezeAGroupChannelRequest.ts +0 -35
  690. package/src/api/generated/models/FreezeAnOpenChannelRequest.ts +0 -38
  691. package/src/api/generated/models/GetAGroupChannelResponse.ts +0 -365
  692. package/src/api/generated/models/GetAGroupChannelResponseAllOf.ts +0 -36
  693. package/src/api/generated/models/GetAGroupChannelResponseAllOfChannel.ts +0 -84
  694. package/src/api/generated/models/GetChannelInvitationPreferenceResponse.ts +0 -35
  695. package/src/api/generated/models/GetTotalNumberOfMessagesInAChannelResponse.ts +0 -35
  696. package/src/api/generated/models/GroupChannelListMembersResponse.ts +0 -43
  697. package/src/api/generated/models/GroupChatListChannelsResponse.ts +0 -50
  698. package/src/api/generated/models/HideAChannelRequest.ts +0 -68
  699. package/src/api/generated/models/InviteAsMembersRequest.ts +0 -62
  700. package/src/api/generated/models/InviteAsMembersResponse.ts +0 -365
  701. package/src/api/generated/models/InviteAsMembersResponseAllOf.ts +0 -36
  702. package/src/api/generated/models/JoinAChannelRequest.ts +0 -48
  703. package/src/api/generated/models/JoinChannelsRequest.ts +0 -35
  704. package/src/api/generated/models/LeaveAChannelRequest.ts +0 -71
  705. package/src/api/generated/models/LeaveMyGroupChannelsRequest.ts +0 -35
  706. package/src/api/generated/models/ListBlockedUsersResponse.ts +0 -43
  707. package/src/api/generated/models/ListBotsResponse.ts +0 -43
  708. package/src/api/generated/models/ListBotsResponseBotsInner.ts +0 -110
  709. package/src/api/generated/models/ListBotsResponseBotsInnerAi.ts +0 -112
  710. package/src/api/generated/models/ListBotsResponseBotsInnerBot.ts +0 -84
  711. package/src/api/generated/models/ListBotsResponseBotsInnerBotStyle.ts +0 -57
  712. package/src/api/generated/models/ListBotsResponseBotsInnerBotStyleColor.ts +0 -49
  713. package/src/api/generated/models/ListBotsResponseBotsInnerFirstMessagesInner.ts +0 -43
  714. package/src/api/generated/models/ListBotsResponseBotsInnerFirstMessagesInnerData.ts +0 -35
  715. package/src/api/generated/models/ListBotsResponseBotsInnerSafeguard.ts +0 -56
  716. package/src/api/generated/models/ListMessagesResponse.ts +0 -36
  717. package/src/api/generated/models/ListMyGroupChannelsResponse.ts +0 -50
  718. package/src/api/generated/models/ListOpenChannelsResponse.ts +0 -50
  719. package/src/api/generated/models/ListOperatorsResponse.ts +0 -43
  720. package/src/api/generated/models/ListRegistrationOrDeviceTokensResponse.ts +0 -57
  721. package/src/api/generated/models/ListUsersResponse.ts +0 -43
  722. package/src/api/generated/models/MarkAllMessagesAsReadRequest.ts +0 -38
  723. package/src/api/generated/models/MarkChannelMessagesAsReadRequest.ts +0 -35
  724. package/src/api/generated/models/MigrateMessagesAdminMessageRequest.ts +0 -94
  725. package/src/api/generated/models/MigrateMessagesFileMessageRequest.ts +0 -130
  726. package/src/api/generated/models/MigrateMessagesFileMessageRequestThumbnailsInner.ts +0 -29
  727. package/src/api/generated/models/MigrateMessagesRequest.ts +0 -50
  728. package/src/api/generated/models/MigrateMessagesRequestMessagesInner.ts +0 -154
  729. package/src/api/generated/models/MigrateMessagesTextMessageRequest.ts +0 -94
  730. package/src/api/generated/models/ObjectSerializer.ts +0 -619
  731. package/src/api/generated/models/RegisterOperatorsToAGroupChannelRequest.ts +0 -35
  732. package/src/api/generated/models/RemoveARegistrationOrDeviceTokenResponse.ts +0 -43
  733. package/src/api/generated/models/RemoveAllRegistrationOrDeviceTokenResponse.ts +0 -43
  734. package/src/api/generated/models/ResetChatHistoryRequest.ts +0 -42
  735. package/src/api/generated/models/ResetChatHistoryResponse.ts +0 -38
  736. package/src/api/generated/models/ScheduleAnAnnouncementRequest.ts +0 -156
  737. package/src/api/generated/models/ScheduleAnAnnouncementRequestCreateChannelOptions.ts +0 -63
  738. package/src/api/generated/models/ScheduleAnAnnouncementRequestMessage.ts +0 -63
  739. package/src/api/generated/models/ScheduleAnAnnouncementResponse.ts +0 -198
  740. package/src/api/generated/models/ScheduleAnAnnouncementResponseMessage.ts +0 -70
  741. package/src/api/generated/models/SendABotMessageRequest.ts +0 -214
  742. package/src/api/generated/models/SendABotMessageResponse.ts +0 -36
  743. package/src/api/generated/models/SendAMessageRequest.ts +0 -238
  744. package/src/api/generated/models/SendAMessageRequestPushMessageTemplate.ts +0 -52
  745. package/src/api/generated/models/SendAMessageRequestPushMessageTemplateOneOf.ts +0 -48
  746. package/src/api/generated/models/SendAdminMessageRequestBody.ts +0 -121
  747. package/src/api/generated/models/SendFileMessageRequestBody.ts +0 -187
  748. package/src/api/generated/models/SendTextMessageRequestBody.ts +0 -170
  749. package/src/api/generated/models/SendTextMessageRequestBodyPushMessageTemplate.ts +0 -52
  750. package/src/api/generated/models/SendbirdBasicUserInfo.ts +0 -87
  751. package/src/api/generated/models/SendbirdDisappearingMessage.ts +0 -42
  752. package/src/api/generated/models/SendbirdExtendedMessagePayload.ts +0 -51
  753. package/src/api/generated/models/SendbirdFile.ts +0 -71
  754. package/src/api/generated/models/SendbirdGroupChannel.ts +0 -355
  755. package/src/api/generated/models/SendbirdGroupChannelDetail.ts +0 -266
  756. package/src/api/generated/models/SendbirdGroupChannelDetailChannel.ts +0 -84
  757. package/src/api/generated/models/SendbirdMember.ts +0 -187
  758. package/src/api/generated/models/SendbirdMessageResponse.ts +0 -245
  759. package/src/api/generated/models/SendbirdMessageResponseMessageEvents.ts +0 -56
  760. package/src/api/generated/models/SendbirdOpenChannel.ts +0 -120
  761. package/src/api/generated/models/SendbirdParentMessageInfo.ts +0 -79
  762. package/src/api/generated/models/SendbirdPushTriggerOption.ts +0 -15
  763. package/src/api/generated/models/SendbirdReaction.ts +0 -49
  764. package/src/api/generated/models/SendbirdSmsFallback.ts +0 -42
  765. package/src/api/generated/models/SendbirdSortedMetaarrayInner.ts +0 -42
  766. package/src/api/generated/models/SendbirdThumbnail.ts +0 -70
  767. package/src/api/generated/models/SendbirdUser.ts +0 -188
  768. package/src/api/generated/models/StartTypingIndicatorsRequest.ts +0 -35
  769. package/src/api/generated/models/UpdateAChannelMetadataRequest.ts +0 -42
  770. package/src/api/generated/models/UpdateAGroupChannelRequest.ts +0 -98
  771. package/src/api/generated/models/UpdateAMessageRequest.ts +0 -80
  772. package/src/api/generated/models/UpdateAUserRequest.ts +0 -91
  773. package/src/api/generated/models/UpdateAnOpenChannelRequest.ts +0 -70
  774. package/src/api/generated/models/UpdateChannelInvitationPreferenceRequest.ts +0 -35
  775. package/src/api/generated/models/UpdateChannelInvitationPreferenceResponse.ts +0 -35
  776. package/src/api/generated/models/UpdateCountPreferenceOfAChannelRequest.ts +0 -38
  777. package/src/api/generated/models/UpdateCountPreferenceOfChannelByUrlResponse.ts +0 -38
  778. package/src/api/generated/models/UpdateExtraDataInAMessageRequest.ts +0 -50
  779. package/src/api/generated/models/UpdateExtraDataInAMessageResponse.ts +0 -36
  780. package/src/api/generated/models/UpdatePushPreferencesForAChannelRequest.ts +0 -48
  781. package/src/api/generated/models/UpdatePushPreferencesForAChannelResponse.ts +0 -50
  782. package/src/api/generated/models/UpdatePushPreferencesRequest.ts +0 -127
  783. package/src/api/generated/models/UpdatePushPreferencesResponse.ts +0 -127
  784. package/src/api/generated/models/ViewCountPreferenceOfAChannelResponse.ts +0 -38
  785. package/src/api/generated/models/ViewNumberOfChannelsWithUnreadMessagesResponse.ts +0 -35
  786. package/src/api/generated/models/ViewNumberOfDailyActiveUsersResponse.ts +0 -35
  787. package/src/api/generated/models/ViewNumberOfMonthlyActiveUsersResponse.ts +0 -35
  788. package/src/api/generated/models/ViewNumberOfUnreadMessagesResponse.ts +0 -35
  789. package/src/api/generated/models/ViewPushPreferencesForAChannelResponse.ts +0 -50
  790. package/src/api/generated/models/ViewPushPreferencesResponse.ts +0 -127
  791. package/src/api/generated/models/all.ts +0 -121
  792. package/src/api/generated/package.json +0 -40
  793. package/src/api/generated/rxjsStub.ts +0 -27
  794. package/src/api/generated/servers.ts +0 -53
  795. package/src/api/generated/tsconfig.json +0 -28
  796. package/src/api/generated/types/ObjectParamAPI.ts +0 -3611
  797. package/src/api/generated/types/ObservableAPI.ts +0 -2594
  798. package/src/api/generated/types/PromiseAPI.ts +0 -1440
  799. package/src/api/generated/util.ts +0 -37
  800. package/src/types/FileCompat.ts +0 -7
  801. package/tests/asset/image/test_20kb.jpg +0 -0
  802. package/tests/asset/image/test_25mb.bmp +0 -0
  803. package/tests/asset/image/test_5mb.jpg +0 -0
  804. package/tests/asset/image/test_75kb.jpg +0 -0
  805. package/tests/integration/bot.test.ts +0 -548
  806. package/tests/integration/constants.ts +0 -10
  807. package/tests/integration/groupChannel.test.ts +0 -1624
  808. package/tests/integration/helper.ts +0 -8
  809. package/tests/integration/metadata.test.ts +0 -22
  810. package/tests/integration/moderation.test.ts +0 -172
  811. package/tests/integration/openChannel.test.ts +0 -239
  812. package/tests/integration/statistics.test.ts +0 -44
  813. package/tests/integration/user.test.ts +0 -808
  814. package/tests/utils/fileLoader.ts +0 -46
  815. package/tsconfig.json +0 -29
  816. package/types/ObjectParamAPI.ts +0 -3996
  817. package/types/ObservableAPI.ts +0 -2853
  818. package/types/PromiseAPI.ts +0 -1573
  819. package/util.ts +0 -37
package/apis/UserApi.ts DELETED
@@ -1,2916 +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 { CreateUserMetadataRequest } from '../models/CreateUserMetadataRequest';
19
- import { CreateUserTokenRequest } from '../models/CreateUserTokenRequest';
20
- import { CreateUserTokenResponse } from '../models/CreateUserTokenResponse';
21
- import { GetChannelInvitationPreferenceResponse } from '../models/GetChannelInvitationPreferenceResponse';
22
- import { LeaveMyGroupChannelsRequest } from '../models/LeaveMyGroupChannelsRequest';
23
- import { ListMyGroupChannelsResponse } from '../models/ListMyGroupChannelsResponse';
24
- import { ListRegistrationOrDeviceTokensResponse } from '../models/ListRegistrationOrDeviceTokensResponse';
25
- import { ListUsersResponse } from '../models/ListUsersResponse';
26
- import { MarkAllMessagesAsReadRequest } from '../models/MarkAllMessagesAsReadRequest';
27
- import { MarkChannelMessagesAsReadRequest } from '../models/MarkChannelMessagesAsReadRequest';
28
- import { RemoveARegistrationOrDeviceTokenResponse } from '../models/RemoveARegistrationOrDeviceTokenResponse';
29
- import { RemoveAllRegistrationOrDeviceTokenResponse } from '../models/RemoveAllRegistrationOrDeviceTokenResponse';
30
- import { SendbirdUser } from '../models/SendbirdUser';
31
- import { UpdateAUserRequest } from '../models/UpdateAUserRequest';
32
- import { UpdateChannelInvitationPreferenceRequest } from '../models/UpdateChannelInvitationPreferenceRequest';
33
- import { UpdateChannelInvitationPreferenceResponse } from '../models/UpdateChannelInvitationPreferenceResponse';
34
- import { UpdateCountPreferenceOfAChannelRequest } from '../models/UpdateCountPreferenceOfAChannelRequest';
35
- import { UpdateCountPreferenceOfChannelByUrlResponse } from '../models/UpdateCountPreferenceOfChannelByUrlResponse';
36
- import { UpdatePushPreferencesForAChannelRequest } from '../models/UpdatePushPreferencesForAChannelRequest';
37
- import { UpdatePushPreferencesForAChannelResponse } from '../models/UpdatePushPreferencesForAChannelResponse';
38
- import { UpdatePushPreferencesRequest } from '../models/UpdatePushPreferencesRequest';
39
- import { UpdatePushPreferencesResponse } from '../models/UpdatePushPreferencesResponse';
40
- import { UpdateSpecificUserMetadataRequest } from '../models/UpdateSpecificUserMetadataRequest';
41
- import { UpdateUserMetadataRequest } from '../models/UpdateUserMetadataRequest';
42
- import { ViewCountPreferenceOfAChannelResponse } from '../models/ViewCountPreferenceOfAChannelResponse';
43
- import { ViewNumberOfChannelsWithUnreadMessagesResponse } from '../models/ViewNumberOfChannelsWithUnreadMessagesResponse';
44
- import { ViewNumberOfUnreadMessagesResponse } from '../models/ViewNumberOfUnreadMessagesResponse';
45
- import { ViewPushPreferencesForAChannelResponse } from '../models/ViewPushPreferencesForAChannelResponse';
46
- import { ViewPushPreferencesResponse } from '../models/ViewPushPreferencesResponse';
47
-
48
- /**
49
- * no description
50
- */
51
- export class UserApiRequestFactory extends BaseAPIRequestFactory {
52
-
53
- /**
54
- * ## 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 ----------------------------
55
- * Add a registration or device token
56
- * @param userId (Required)
57
- * @param tokenType (Required)
58
- * @param apiToken
59
- * @param addARegistrationOrDeviceTokenRequest
60
- */
61
- public async addARegistrationOrDeviceToken(userId: string, tokenType: 'gcm' | 'huawei' | 'apns', apiToken?: string, addARegistrationOrDeviceTokenRequest?: AddARegistrationOrDeviceTokenRequest, _options?: Configuration): Promise<RequestContext> {
62
- let _config = _options || this.configuration;
63
-
64
- // verify required parameter 'userId' is not null or undefined
65
- if (userId === null || userId === undefined) {
66
- throw new RequiredError("UserApi", "addARegistrationOrDeviceToken", "userId");
67
- }
68
-
69
-
70
- // verify required parameter 'tokenType' is not null or undefined
71
- if (tokenType === null || tokenType === undefined) {
72
- throw new RequiredError("UserApi", "addARegistrationOrDeviceToken", "tokenType");
73
- }
74
-
75
-
76
-
77
-
78
- // Path Params
79
- const localVarPath = '/v3/users/{user_id}/push/{token_type}'
80
- .replace('{' + 'user_id' + '}', encodeURIComponent(String(userId)))
81
- .replace('{' + 'token_type' + '}', encodeURIComponent(String(tokenType)));
82
-
83
- // Make Request Context
84
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST);
85
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
86
-
87
- // Header Params
88
- requestContext.setHeaderParam("api-token", ObjectSerializer.serialize(apiToken, "string", ""));
89
-
90
-
91
- // Body Params
92
- const contentType = ObjectSerializer.getPreferredMediaType([
93
- "application/json"
94
- ]);
95
- requestContext.setHeaderParam("Content-Type", contentType);
96
- const serializedBody = ObjectSerializer.stringify(
97
- ObjectSerializer.serialize(addARegistrationOrDeviceTokenRequest, "AddARegistrationOrDeviceTokenRequest", ""),
98
- contentType
99
- );
100
- requestContext.setBody(serializedBody);
101
-
102
-
103
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
104
- if (defaultAuth?.applySecurityAuthentication) {
105
- await defaultAuth?.applySecurityAuthentication(requestContext);
106
- }
107
-
108
- return requestContext;
109
- }
110
-
111
- /**
112
- * ## 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
113
- * Choose a push notification content template
114
- * @param userId (Required)
115
- * @param apiToken
116
- * @param chooseAPushNotificationContentTemplateRequest
117
- */
118
- public async chooseAPushNotificationContentTemplate(userId: string, apiToken?: string, chooseAPushNotificationContentTemplateRequest?: ChooseAPushNotificationContentTemplateRequest, _options?: Configuration): Promise<RequestContext> {
119
- let _config = _options || this.configuration;
120
-
121
- // verify required parameter 'userId' is not null or undefined
122
- if (userId === null || userId === undefined) {
123
- throw new RequiredError("UserApi", "chooseAPushNotificationContentTemplate", "userId");
124
- }
125
-
126
-
127
-
128
-
129
- // Path Params
130
- const localVarPath = '/v3/users/{user_id}/push/template'
131
- .replace('{' + 'user_id' + '}', encodeURIComponent(String(userId)));
132
-
133
- // Make Request Context
134
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PUT);
135
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
136
-
137
- // Header Params
138
- requestContext.setHeaderParam("api-token", ObjectSerializer.serialize(apiToken, "string", ""));
139
-
140
-
141
- // Body Params
142
- const contentType = ObjectSerializer.getPreferredMediaType([
143
- "application/json"
144
- ]);
145
- requestContext.setHeaderParam("Content-Type", contentType);
146
- const serializedBody = ObjectSerializer.stringify(
147
- ObjectSerializer.serialize(chooseAPushNotificationContentTemplateRequest, "ChooseAPushNotificationContentTemplateRequest", ""),
148
- contentType
149
- );
150
- requestContext.setBody(serializedBody);
151
-
152
-
153
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
154
- if (defaultAuth?.applySecurityAuthentication) {
155
- await defaultAuth?.applySecurityAuthentication(requestContext);
156
- }
157
-
158
- return requestContext;
159
- }
160
-
161
- /**
162
- * ## 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
163
- * Create a user
164
- * @param apiToken
165
- * @param createAUserRequest
166
- */
167
- public async createAUser(apiToken?: string, createAUserRequest?: CreateAUserRequest, _options?: Configuration): Promise<RequestContext> {
168
- let _config = _options || this.configuration;
169
-
170
-
171
-
172
- // Path Params
173
- const localVarPath = '/v3/users';
174
-
175
- // Make Request Context
176
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST);
177
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
178
-
179
- // Header Params
180
- requestContext.setHeaderParam("api-token", ObjectSerializer.serialize(apiToken, "string", ""));
181
-
182
-
183
- // Body Params
184
- const contentType = ObjectSerializer.getPreferredMediaType([
185
- "application/json"
186
- ]);
187
- requestContext.setHeaderParam("Content-Type", contentType);
188
- const serializedBody = ObjectSerializer.stringify(
189
- ObjectSerializer.serialize(createAUserRequest, "CreateAUserRequest", ""),
190
- contentType
191
- );
192
- requestContext.setBody(serializedBody);
193
-
194
-
195
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
196
- if (defaultAuth?.applySecurityAuthentication) {
197
- await defaultAuth?.applySecurityAuthentication(requestContext);
198
- }
199
-
200
- return requestContext;
201
- }
202
-
203
- /**
204
- * ## Create metadata When creating new items of the user metadata. https://sendbird.com/docs/chat/platform-api/v3/user/managing-metadata/user-create-metadata
205
- * Create user metadata
206
- * @param userId (Required)
207
- * @param apiToken
208
- * @param createUserMetadataRequest
209
- */
210
- public async createUserMetadata(userId: string, apiToken?: string, createUserMetadataRequest?: CreateUserMetadataRequest, _options?: Configuration): Promise<RequestContext> {
211
- let _config = _options || this.configuration;
212
-
213
- // verify required parameter 'userId' is not null or undefined
214
- if (userId === null || userId === undefined) {
215
- throw new RequiredError("UserApi", "createUserMetadata", "userId");
216
- }
217
-
218
-
219
-
220
-
221
- // Path Params
222
- const localVarPath = '/v3/users/{user_id}/metadata'
223
- .replace('{' + 'user_id' + '}', encodeURIComponent(String(userId)));
224
-
225
- // Make Request Context
226
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST);
227
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
228
-
229
- // Header Params
230
- requestContext.setHeaderParam("api-token", ObjectSerializer.serialize(apiToken, "string", ""));
231
-
232
-
233
- // Body Params
234
- const contentType = ObjectSerializer.getPreferredMediaType([
235
- "application/json"
236
- ]);
237
- requestContext.setHeaderParam("Content-Type", contentType);
238
- const serializedBody = ObjectSerializer.stringify(
239
- ObjectSerializer.serialize(createUserMetadataRequest, "CreateUserMetadataRequest", ""),
240
- contentType
241
- );
242
- requestContext.setBody(serializedBody);
243
-
244
-
245
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
246
- if (defaultAuth?.applySecurityAuthentication) {
247
- await defaultAuth?.applySecurityAuthentication(requestContext);
248
- }
249
-
250
- return requestContext;
251
- }
252
-
253
- /**
254
- * ## 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
255
- * Create user token
256
- * @param userId (Required)
257
- * @param apiToken
258
- * @param createUserTokenRequest
259
- */
260
- public async createUserToken(userId: string, apiToken?: string, createUserTokenRequest?: CreateUserTokenRequest, _options?: Configuration): Promise<RequestContext> {
261
- let _config = _options || this.configuration;
262
-
263
- // verify required parameter 'userId' is not null or undefined
264
- if (userId === null || userId === undefined) {
265
- throw new RequiredError("UserApi", "createUserToken", "userId");
266
- }
267
-
268
-
269
-
270
-
271
- // Path Params
272
- const localVarPath = '/v3/users/{user_id}/token'
273
- .replace('{' + 'user_id' + '}', encodeURIComponent(String(userId)));
274
-
275
- // Make Request Context
276
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST);
277
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
278
-
279
- // Header Params
280
- requestContext.setHeaderParam("api-token", ObjectSerializer.serialize(apiToken, "string", ""));
281
-
282
-
283
- // Body Params
284
- const contentType = ObjectSerializer.getPreferredMediaType([
285
- "application/json"
286
- ]);
287
- requestContext.setHeaderParam("Content-Type", contentType);
288
- const serializedBody = ObjectSerializer.stringify(
289
- ObjectSerializer.serialize(createUserTokenRequest, "CreateUserTokenRequest", ""),
290
- contentType
291
- );
292
- requestContext.setBody(serializedBody);
293
-
294
-
295
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
296
- if (defaultAuth?.applySecurityAuthentication) {
297
- await defaultAuth?.applySecurityAuthentication(requestContext);
298
- }
299
-
300
- return requestContext;
301
- }
302
-
303
- /**
304
- * ## 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)
305
- * Delete a user
306
- * @param userId (Required)
307
- * @param apiToken
308
- */
309
- public async deleteAUser(userId: string, apiToken?: string, _options?: Configuration): Promise<RequestContext> {
310
- let _config = _options || this.configuration;
311
-
312
- // verify required parameter 'userId' is not null or undefined
313
- if (userId === null || userId === undefined) {
314
- throw new RequiredError("UserApi", "deleteAUser", "userId");
315
- }
316
-
317
-
318
-
319
- // Path Params
320
- const localVarPath = '/v3/users/{user_id}'
321
- .replace('{' + 'user_id' + '}', encodeURIComponent(String(userId)));
322
-
323
- // Make Request Context
324
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.DELETE);
325
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
326
-
327
- // Header Params
328
- requestContext.setHeaderParam("api-token", ObjectSerializer.serialize(apiToken, "string", ""));
329
-
330
-
331
-
332
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
333
- if (defaultAuth?.applySecurityAuthentication) {
334
- await defaultAuth?.applySecurityAuthentication(requestContext);
335
- }
336
-
337
- return requestContext;
338
- }
339
-
340
- /**
341
- * ## Delete metadata https://sendbird.com/docs/chat/platform-api/v3/user/managing-metadata/user-delete-metadata
342
- * Delete user metadata
343
- * @param userId (Required)
344
- * @param key
345
- * @param apiToken
346
- */
347
- public async deleteSpecificUserMetadata(userId: string, key: string, apiToken?: string, _options?: Configuration): Promise<RequestContext> {
348
- let _config = _options || this.configuration;
349
-
350
- // verify required parameter 'userId' is not null or undefined
351
- if (userId === null || userId === undefined) {
352
- throw new RequiredError("UserApi", "deleteSpecificUserMetadata", "userId");
353
- }
354
-
355
-
356
- // verify required parameter 'key' is not null or undefined
357
- if (key === null || key === undefined) {
358
- throw new RequiredError("UserApi", "deleteSpecificUserMetadata", "key");
359
- }
360
-
361
-
362
-
363
- // Path Params
364
- const localVarPath = '/v3/users/{user_id}/metadata/{key}'
365
- .replace('{' + 'user_id' + '}', encodeURIComponent(String(userId)))
366
- .replace('{' + 'key' + '}', encodeURIComponent(String(key)));
367
-
368
- // Make Request Context
369
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.DELETE);
370
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
371
-
372
- // Header Params
373
- requestContext.setHeaderParam("api-token", ObjectSerializer.serialize(apiToken, "string", ""));
374
-
375
-
376
-
377
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
378
- if (defaultAuth?.applySecurityAuthentication) {
379
- await defaultAuth?.applySecurityAuthentication(requestContext);
380
- }
381
-
382
- return requestContext;
383
- }
384
-
385
- /**
386
- * ## Delete metadata You can delete a specific or all metadata of a user. Metadata stores additional user information such as their preference settings. https://sendbird.com/docs/chat/platform-api/v3/user/managing-metadata/user-delete-metadata
387
- * Delete user metadata
388
- * @param userId (Required)
389
- * @param apiToken
390
- */
391
- public async deleteUserAllMetadata(userId: string, apiToken?: string, _options?: Configuration): Promise<RequestContext> {
392
- let _config = _options || this.configuration;
393
-
394
- // verify required parameter 'userId' is not null or undefined
395
- if (userId === null || userId === undefined) {
396
- throw new RequiredError("UserApi", "deleteUserAllMetadata", "userId");
397
- }
398
-
399
-
400
-
401
- // Path Params
402
- const localVarPath = '/v3/users/{user_id}/metadata'
403
- .replace('{' + 'user_id' + '}', encodeURIComponent(String(userId)));
404
-
405
- // Make Request Context
406
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.DELETE);
407
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
408
-
409
- // Header Params
410
- requestContext.setHeaderParam("api-token", ObjectSerializer.serialize(apiToken, "string", ""));
411
-
412
-
413
-
414
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
415
- if (defaultAuth?.applySecurityAuthentication) {
416
- await defaultAuth?.applySecurityAuthentication(requestContext);
417
- }
418
-
419
- return requestContext;
420
- }
421
-
422
- /**
423
- * ## 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)
424
- * Get channel invitation preference
425
- * @param userId (Required)
426
- * @param apiToken
427
- */
428
- public async getChannelInvitationPreference(userId: string, apiToken?: string, _options?: Configuration): Promise<RequestContext> {
429
- let _config = _options || this.configuration;
430
-
431
- // verify required parameter 'userId' is not null or undefined
432
- if (userId === null || userId === undefined) {
433
- throw new RequiredError("UserApi", "getChannelInvitationPreference", "userId");
434
- }
435
-
436
-
437
-
438
- // Path Params
439
- const localVarPath = '/v3/users/{user_id}/channel_invitation_preference'
440
- .replace('{' + 'user_id' + '}', encodeURIComponent(String(userId)));
441
-
442
- // Make Request Context
443
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
444
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
445
-
446
- // Header Params
447
- requestContext.setHeaderParam("api-token", ObjectSerializer.serialize(apiToken, "string", ""));
448
-
449
-
450
-
451
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
452
- if (defaultAuth?.applySecurityAuthentication) {
453
- await defaultAuth?.applySecurityAuthentication(requestContext);
454
- }
455
-
456
- return requestContext;
457
- }
458
-
459
- /**
460
- * ## 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.
461
- * Leave my group channels
462
- * @param userId (Required)
463
- * @param apiToken
464
- * @param leaveMyGroupChannelsRequest
465
- */
466
- public async leaveMyGroupChannels(userId: string, apiToken?: string, leaveMyGroupChannelsRequest?: LeaveMyGroupChannelsRequest, _options?: Configuration): Promise<RequestContext> {
467
- let _config = _options || this.configuration;
468
-
469
- // verify required parameter 'userId' is not null or undefined
470
- if (userId === null || userId === undefined) {
471
- throw new RequiredError("UserApi", "leaveMyGroupChannels", "userId");
472
- }
473
-
474
-
475
-
476
-
477
- // Path Params
478
- const localVarPath = '/v3/users/{user_id}/my_group_channels/leave'
479
- .replace('{' + 'user_id' + '}', encodeURIComponent(String(userId)));
480
-
481
- // Make Request Context
482
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PUT);
483
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
484
-
485
- // Header Params
486
- requestContext.setHeaderParam("api-token", ObjectSerializer.serialize(apiToken, "string", ""));
487
-
488
-
489
- // Body Params
490
- const contentType = ObjectSerializer.getPreferredMediaType([
491
- "application/json"
492
- ]);
493
- requestContext.setHeaderParam("Content-Type", contentType);
494
- const serializedBody = ObjectSerializer.stringify(
495
- ObjectSerializer.serialize(leaveMyGroupChannelsRequest, "LeaveMyGroupChannelsRequest", ""),
496
- contentType
497
- );
498
- requestContext.setBody(serializedBody);
499
-
500
-
501
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
502
- if (defaultAuth?.applySecurityAuthentication) {
503
- await defaultAuth?.applySecurityAuthentication(requestContext);
504
- }
505
-
506
- return requestContext;
507
- }
508
-
509
- /**
510
- * ## 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.
511
- * List my group channels
512
- * @param userId (Required)
513
- * @param apiToken
514
- * @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.
515
- * @param limit Specifies the number of results to return per page. Acceptable values are 1 to 100, inclusive. (Default: 10)
516
- * @param distinctMode
517
- * @param publicMode
518
- * @param superMode
519
- * @param createdAfter Restricts the search scope to only retrieve group channels which have been created after the specified time, in Unix milliseconds format.
520
- * @param createdBefore Restricts the search scope to only retrieve group channels which have been created before the specified time, in Unix milliseconds format.
521
- * @param showEmpty
522
- * @param showMember
523
- * @param showDeliveryReceipt
524
- * @param showReadReceipt
525
- * @param showMetadata
526
- * @param showFrozen
527
- * @param order
528
- * @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.
529
- * @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.
530
- * @param customTypeStartswith Searches for group channels with the custom type which starts with the specified value. URL encoding the value is recommended.
531
- * @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.
532
- * @param name Specifies one or more group channel names.
533
- * @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.
534
- * @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.
535
- * @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.
536
- * @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.
537
- * @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)
538
- * @param membersNickname Searches for group channels with members whose nicknames match the specified value. URL encoding the value is recommended.
539
- * @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.
540
- * @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.
541
- * @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.
542
- * @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)
543
- * @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.
544
- * @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.
545
- * @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.
546
- * @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.
547
- * @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.
548
- * @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.
549
- * @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.
550
- * @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.
551
- * @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.
552
- * @param includeSortedMetaarrayInLastMessage Determines whether to include the sorted_metaarray as one of the last_message’s properties in the response.
553
- * @param hiddenMode Restricts the search scope to group channels that match a specific hidden_status and operating behavior
554
- * @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)
555
- * @param memberStateFilter
556
- */
557
- 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> {
558
- let _config = _options || this.configuration;
559
-
560
- // verify required parameter 'userId' is not null or undefined
561
- if (userId === null || userId === undefined) {
562
- throw new RequiredError("UserApi", "listMyGroupChannels", "userId");
563
- }
564
-
565
-
566
- // verify required parameter 'apiToken' is not null or undefined
567
- if (apiToken === null || apiToken === undefined) {
568
- throw new RequiredError("UserApi", "listMyGroupChannels", "apiToken");
569
- }
570
-
571
-
572
-
573
-
574
-
575
-
576
-
577
-
578
-
579
-
580
-
581
-
582
-
583
-
584
-
585
-
586
-
587
-
588
-
589
-
590
-
591
-
592
-
593
-
594
-
595
-
596
-
597
-
598
-
599
-
600
-
601
-
602
-
603
-
604
-
605
-
606
-
607
-
608
-
609
-
610
-
611
-
612
-
613
-
614
- // Path Params
615
- const localVarPath = '/v3/users/{user_id}/my_group_channels'
616
- .replace('{' + 'user_id' + '}', encodeURIComponent(String(userId)));
617
-
618
- // Make Request Context
619
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
620
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
621
-
622
- // Query Params
623
- if (token !== undefined) {
624
- requestContext.setQueryParam("token", ObjectSerializer.serialize(token, "string", ""));
625
- }
626
-
627
- // Query Params
628
- if (limit !== undefined) {
629
- requestContext.setQueryParam("limit", ObjectSerializer.serialize(limit, "number", ""));
630
- }
631
-
632
- // Query Params
633
- if (distinctMode !== undefined) {
634
- requestContext.setQueryParam("distinct_mode", ObjectSerializer.serialize(distinctMode, "'all' | 'distinct' | 'nondistinct'", ""));
635
- }
636
-
637
- // Query Params
638
- if (publicMode !== undefined) {
639
- requestContext.setQueryParam("public_mode", ObjectSerializer.serialize(publicMode, "'all' | 'private' | 'public'", ""));
640
- }
641
-
642
- // Query Params
643
- if (superMode !== undefined) {
644
- requestContext.setQueryParam("super_mode", ObjectSerializer.serialize(superMode, "'all' | 'super' | 'nonsuper'", ""));
645
- }
646
-
647
- // Query Params
648
- if (createdAfter !== undefined) {
649
- requestContext.setQueryParam("created_after", ObjectSerializer.serialize(createdAfter, "number", "int64"));
650
- }
651
-
652
- // Query Params
653
- if (createdBefore !== undefined) {
654
- requestContext.setQueryParam("created_before", ObjectSerializer.serialize(createdBefore, "number", "int64"));
655
- }
656
-
657
- // Query Params
658
- if (showEmpty !== undefined) {
659
- requestContext.setQueryParam("show_empty", ObjectSerializer.serialize(showEmpty, "boolean", ""));
660
- }
661
-
662
- // Query Params
663
- if (showMember !== undefined) {
664
- requestContext.setQueryParam("show_member", ObjectSerializer.serialize(showMember, "boolean", ""));
665
- }
666
-
667
- // Query Params
668
- if (showDeliveryReceipt !== undefined) {
669
- requestContext.setQueryParam("show_delivery_receipt", ObjectSerializer.serialize(showDeliveryReceipt, "boolean", ""));
670
- }
671
-
672
- // Query Params
673
- if (showReadReceipt !== undefined) {
674
- requestContext.setQueryParam("show_read_receipt", ObjectSerializer.serialize(showReadReceipt, "boolean", ""));
675
- }
676
-
677
- // Query Params
678
- if (showMetadata !== undefined) {
679
- requestContext.setQueryParam("show_metadata", ObjectSerializer.serialize(showMetadata, "boolean", ""));
680
- }
681
-
682
- // Query Params
683
- if (showFrozen !== undefined) {
684
- requestContext.setQueryParam("show_frozen", ObjectSerializer.serialize(showFrozen, "boolean", ""));
685
- }
686
-
687
- // Query Params
688
- if (order !== undefined) {
689
- requestContext.setQueryParam("order", ObjectSerializer.serialize(order, "'chronological' | 'latest_last_message' | 'channel_name_alphabetical' | 'metadata_value_alphabetical'", ""));
690
- }
691
-
692
- // Query Params
693
- if (metadataOrderKey !== undefined) {
694
- requestContext.setQueryParam("metadata_order_key", ObjectSerializer.serialize(metadataOrderKey, "string", ""));
695
- }
696
-
697
- // Query Params
698
- if (customTypes !== undefined) {
699
- requestContext.setQueryParam("custom_types", ObjectSerializer.serialize(customTypes, "string", ""));
700
- }
701
-
702
- // Query Params
703
- if (customTypeStartswith !== undefined) {
704
- requestContext.setQueryParam("custom_type_startswith", ObjectSerializer.serialize(customTypeStartswith, "string", ""));
705
- }
706
-
707
- // Query Params
708
- if (channelUrls !== undefined) {
709
- requestContext.setQueryParam("channel_urls", ObjectSerializer.serialize(channelUrls, "string", ""));
710
- }
711
-
712
- // Query Params
713
- if (name !== undefined) {
714
- requestContext.setQueryParam("name", ObjectSerializer.serialize(name, "string", ""));
715
- }
716
-
717
- // Query Params
718
- if (nameContains !== undefined) {
719
- requestContext.setQueryParam("name_contains", ObjectSerializer.serialize(nameContains, "string", ""));
720
- }
721
-
722
- // Query Params
723
- if (nameStartswith !== undefined) {
724
- requestContext.setQueryParam("name_startswith", ObjectSerializer.serialize(nameStartswith, "string", ""));
725
- }
726
-
727
- // Query Params
728
- if (membersExactlyIn !== undefined) {
729
- requestContext.setQueryParam("members_exactly_in", ObjectSerializer.serialize(membersExactlyIn, "string", ""));
730
- }
731
-
732
- // Query Params
733
- if (membersIncludeIn !== undefined) {
734
- requestContext.setQueryParam("members_include_in", ObjectSerializer.serialize(membersIncludeIn, "string", ""));
735
- }
736
-
737
- // Query Params
738
- if (queryType !== undefined) {
739
- requestContext.setQueryParam("query_type", ObjectSerializer.serialize(queryType, "string", ""));
740
- }
741
-
742
- // Query Params
743
- if (membersNickname !== undefined) {
744
- requestContext.setQueryParam("members_nickname", ObjectSerializer.serialize(membersNickname, "string", ""));
745
- }
746
-
747
- // Query Params
748
- if (membersNicknameContains !== undefined) {
749
- requestContext.setQueryParam("members_nickname_contains", ObjectSerializer.serialize(membersNicknameContains, "string", ""));
750
- }
751
-
752
- // Query Params
753
- if (membersNicknameStartswith !== undefined) {
754
- requestContext.setQueryParam("members_nickname_startswith", ObjectSerializer.serialize(membersNicknameStartswith, "string", ""));
755
- }
756
-
757
- // Query Params
758
- if (searchQuery !== undefined) {
759
- requestContext.setQueryParam("search_query", ObjectSerializer.serialize(searchQuery, "string", ""));
760
- }
761
-
762
- // Query Params
763
- if (searchFields !== undefined) {
764
- requestContext.setQueryParam("search_fields", ObjectSerializer.serialize(searchFields, "string", ""));
765
- }
766
-
767
- // Query Params
768
- if (metadataKey !== undefined) {
769
- requestContext.setQueryParam("metadata_key", ObjectSerializer.serialize(metadataKey, "string", ""));
770
- }
771
-
772
- // Query Params
773
- if (metadataValues !== undefined) {
774
- requestContext.setQueryParam("metadata_values", ObjectSerializer.serialize(metadataValues, "string", ""));
775
- }
776
-
777
- // Query Params
778
- if (metadataValueStartswith !== undefined) {
779
- requestContext.setQueryParam("metadata_value_startswith", ObjectSerializer.serialize(metadataValueStartswith, "string", ""));
780
- }
781
-
782
- // Query Params
783
- if (metacounterKey !== undefined) {
784
- requestContext.setQueryParam("metacounter_key", ObjectSerializer.serialize(metacounterKey, "string", ""));
785
- }
786
-
787
- // Query Params
788
- if (metacounterValues !== undefined) {
789
- requestContext.setQueryParam("metacounter_values", ObjectSerializer.serialize(metacounterValues, "string", ""));
790
- }
791
-
792
- // Query Params
793
- if (metacounterValueGt !== undefined) {
794
- requestContext.setQueryParam("metacounter_value_gt", ObjectSerializer.serialize(metacounterValueGt, "string", ""));
795
- }
796
-
797
- // Query Params
798
- if (metacounterValueGte !== undefined) {
799
- requestContext.setQueryParam("metacounter_value_gte", ObjectSerializer.serialize(metacounterValueGte, "string", ""));
800
- }
801
-
802
- // Query Params
803
- if (metacounterValueLt !== undefined) {
804
- requestContext.setQueryParam("metacounter_value_lt", ObjectSerializer.serialize(metacounterValueLt, "string", ""));
805
- }
806
-
807
- // Query Params
808
- if (metacounterValueLte !== undefined) {
809
- requestContext.setQueryParam("metacounter_value_lte", ObjectSerializer.serialize(metacounterValueLte, "string", ""));
810
- }
811
-
812
- // Query Params
813
- if (includeSortedMetaarrayInLastMessage !== undefined) {
814
- requestContext.setQueryParam("include_sorted_metaarray_in_last_message", ObjectSerializer.serialize(includeSortedMetaarrayInLastMessage, "boolean", ""));
815
- }
816
-
817
- // Query Params
818
- if (hiddenMode !== undefined) {
819
- requestContext.setQueryParam("hidden_mode", ObjectSerializer.serialize(hiddenMode, "'unhidden_only' | 'hidden_only' | 'hidden_allow_auto_unhide' | 'hidden_prevent_auto_unhide' | 'all'", ""));
820
- }
821
-
822
- // Query Params
823
- if (unreadFilter !== undefined) {
824
- requestContext.setQueryParam("unread_filter", ObjectSerializer.serialize(unreadFilter, "'all' | 'unread_message'", ""));
825
- }
826
-
827
- // Query Params
828
- if (memberStateFilter !== undefined) {
829
- requestContext.setQueryParam("member_state_filter", ObjectSerializer.serialize(memberStateFilter, "'all' | 'invited_only' | 'joined_only' | 'invited_by_friend' | 'invited_by_non_friend'", ""));
830
- }
831
-
832
- // Header Params
833
- requestContext.setHeaderParam("api-token", ObjectSerializer.serialize(apiToken, "string", ""));
834
-
835
-
836
-
837
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
838
- if (defaultAuth?.applySecurityAuthentication) {
839
- await defaultAuth?.applySecurityAuthentication(requestContext);
840
- }
841
-
842
- return requestContext;
843
- }
844
-
845
- /**
846
- * ## 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
847
- * List registration or device tokens
848
- * @param userId (Required)
849
- * @param tokenType (Required)
850
- * @param apiToken
851
- */
852
- public async listRegistrationOrDeviceTokens(userId: string, tokenType: 'gcm' | 'huawei' | 'apns', apiToken?: string, _options?: Configuration): Promise<RequestContext> {
853
- let _config = _options || this.configuration;
854
-
855
- // verify required parameter 'userId' is not null or undefined
856
- if (userId === null || userId === undefined) {
857
- throw new RequiredError("UserApi", "listRegistrationOrDeviceTokens", "userId");
858
- }
859
-
860
-
861
- // verify required parameter 'tokenType' is not null or undefined
862
- if (tokenType === null || tokenType === undefined) {
863
- throw new RequiredError("UserApi", "listRegistrationOrDeviceTokens", "tokenType");
864
- }
865
-
866
-
867
-
868
- // Path Params
869
- const localVarPath = '/v3/users/{user_id}/push/{token_type}'
870
- .replace('{' + 'user_id' + '}', encodeURIComponent(String(userId)))
871
- .replace('{' + 'token_type' + '}', encodeURIComponent(String(tokenType)));
872
-
873
- // Make Request Context
874
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
875
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
876
-
877
- // Header Params
878
- requestContext.setHeaderParam("api-token", ObjectSerializer.serialize(apiToken, "string", ""));
879
-
880
-
881
-
882
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
883
- if (defaultAuth?.applySecurityAuthentication) {
884
- await defaultAuth?.applySecurityAuthentication(requestContext);
885
- }
886
-
887
- return requestContext;
888
- }
889
-
890
- /**
891
- * ## 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
892
- * List users
893
- * @param token
894
- * @param limit
895
- * @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;)
896
- * @param showBot Determines whether to include bots in the list. (Default: true)
897
- * @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.
898
- * @param nickname
899
- * @param nicknameStartswith
900
- * @param metadatakey
901
- * @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.
902
- * @param apiToken
903
- */
904
- 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> {
905
- let _config = _options || this.configuration;
906
-
907
-
908
-
909
-
910
-
911
-
912
-
913
-
914
-
915
-
916
-
917
- // Path Params
918
- const localVarPath = '/v3/users';
919
-
920
- // Make Request Context
921
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
922
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
923
-
924
- // Query Params
925
- if (token !== undefined) {
926
- requestContext.setQueryParam("token", ObjectSerializer.serialize(token, "string", ""));
927
- }
928
-
929
- // Query Params
930
- if (limit !== undefined) {
931
- requestContext.setQueryParam("limit", ObjectSerializer.serialize(limit, "number", ""));
932
- }
933
-
934
- // Query Params
935
- if (activeMode !== undefined) {
936
- requestContext.setQueryParam("active_mode", ObjectSerializer.serialize(activeMode, "'activated' | 'deactivated' | 'all'", ""));
937
- }
938
-
939
- // Query Params
940
- if (showBot !== undefined) {
941
- requestContext.setQueryParam("show_bot", ObjectSerializer.serialize(showBot, "boolean", ""));
942
- }
943
-
944
- // Query Params
945
- if (userIds !== undefined) {
946
- requestContext.setQueryParam("user_ids", ObjectSerializer.serialize(userIds, "string", ""));
947
- }
948
-
949
- // Query Params
950
- if (nickname !== undefined) {
951
- requestContext.setQueryParam("nickname", ObjectSerializer.serialize(nickname, "string", ""));
952
- }
953
-
954
- // Query Params
955
- if (nicknameStartswith !== undefined) {
956
- requestContext.setQueryParam("nickname_startswith", ObjectSerializer.serialize(nicknameStartswith, "string", ""));
957
- }
958
-
959
- // Query Params
960
- if (metadatakey !== undefined) {
961
- requestContext.setQueryParam("metadatakey", ObjectSerializer.serialize(metadatakey, "string", ""));
962
- }
963
-
964
- // Query Params
965
- if (metadatavaluesIn !== undefined) {
966
- requestContext.setQueryParam("metadatavalues_in", ObjectSerializer.serialize(metadatavaluesIn, "string", ""));
967
- }
968
-
969
- // Header Params
970
- requestContext.setHeaderParam("api-token", ObjectSerializer.serialize(apiToken, "string", ""));
971
-
972
-
973
-
974
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
975
- if (defaultAuth?.applySecurityAuthentication) {
976
- await defaultAuth?.applySecurityAuthentication(requestContext);
977
- }
978
-
979
- return requestContext;
980
- }
981
-
982
- /**
983
- * ## 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
984
- * Mark all messages as read
985
- * @param userId (Required)
986
- * @param apiToken
987
- * @param markAllMessagesAsReadRequest
988
- */
989
- public async markAllMessagesAsRead(userId: string, apiToken?: string, markAllMessagesAsReadRequest?: MarkAllMessagesAsReadRequest, _options?: Configuration): Promise<RequestContext> {
990
- let _config = _options || this.configuration;
991
-
992
- // verify required parameter 'userId' is not null or undefined
993
- if (userId === null || userId === undefined) {
994
- throw new RequiredError("UserApi", "markAllMessagesAsRead", "userId");
995
- }
996
-
997
-
998
-
999
-
1000
- // Path Params
1001
- const localVarPath = '/v3/users/{user_id}/mark_as_read_all'
1002
- .replace('{' + 'user_id' + '}', encodeURIComponent(String(userId)));
1003
-
1004
- // Make Request Context
1005
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PUT);
1006
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1007
-
1008
- // Header Params
1009
- requestContext.setHeaderParam("api-token", ObjectSerializer.serialize(apiToken, "string", ""));
1010
-
1011
-
1012
- // Body Params
1013
- const contentType = ObjectSerializer.getPreferredMediaType([
1014
- "application/json"
1015
- ]);
1016
- requestContext.setHeaderParam("Content-Type", contentType);
1017
- const serializedBody = ObjectSerializer.stringify(
1018
- ObjectSerializer.serialize(markAllMessagesAsReadRequest, "MarkAllMessagesAsReadRequest", ""),
1019
- contentType
1020
- );
1021
- requestContext.setBody(serializedBody);
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
- * ## 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
1034
- * Remove a registration or device token - When unregistering a specific token
1035
- * @param userId (Required)
1036
- * @param tokenType (Required)
1037
- * @param token (Required)
1038
- * @param apiToken
1039
- */
1040
- public async removeARegistrationOrDeviceToken(userId: string, tokenType: 'gcm' | 'huawei' | 'apns', token: string, apiToken?: string, _options?: Configuration): Promise<RequestContext> {
1041
- let _config = _options || this.configuration;
1042
-
1043
- // verify required parameter 'userId' is not null or undefined
1044
- if (userId === null || userId === undefined) {
1045
- throw new RequiredError("UserApi", "removeARegistrationOrDeviceToken", "userId");
1046
- }
1047
-
1048
-
1049
- // verify required parameter 'tokenType' is not null or undefined
1050
- if (tokenType === null || tokenType === undefined) {
1051
- throw new RequiredError("UserApi", "removeARegistrationOrDeviceToken", "tokenType");
1052
- }
1053
-
1054
-
1055
- // verify required parameter 'token' is not null or undefined
1056
- if (token === null || token === undefined) {
1057
- throw new RequiredError("UserApi", "removeARegistrationOrDeviceToken", "token");
1058
- }
1059
-
1060
-
1061
-
1062
- // Path Params
1063
- const localVarPath = '/v3/users/{user_id}/push/{token_type}/{token}'
1064
- .replace('{' + 'user_id' + '}', encodeURIComponent(String(userId)))
1065
- .replace('{' + 'token_type' + '}', encodeURIComponent(String(tokenType)))
1066
- .replace('{' + 'token' + '}', encodeURIComponent(String(token)));
1067
-
1068
- // Make Request Context
1069
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.DELETE);
1070
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1071
-
1072
- // Header Params
1073
- requestContext.setHeaderParam("api-token", ObjectSerializer.serialize(apiToken, "string", ""));
1074
-
1075
-
1076
-
1077
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
1078
- if (defaultAuth?.applySecurityAuthentication) {
1079
- await defaultAuth?.applySecurityAuthentication(requestContext);
1080
- }
1081
-
1082
- return requestContext;
1083
- }
1084
-
1085
- /**
1086
- * ## 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
1087
- * Remove a registration or device token from an owner
1088
- * @param tokenType (Required)
1089
- * @param token (Required)
1090
- * @param apiToken
1091
- */
1092
- public async removeARegistrationOrDeviceTokenFromAnOwner(tokenType: string, token: string, apiToken?: string, _options?: Configuration): Promise<RequestContext> {
1093
- let _config = _options || this.configuration;
1094
-
1095
- // verify required parameter 'tokenType' is not null or undefined
1096
- if (tokenType === null || tokenType === undefined) {
1097
- throw new RequiredError("UserApi", "removeARegistrationOrDeviceTokenFromAnOwner", "tokenType");
1098
- }
1099
-
1100
-
1101
- // verify required parameter 'token' is not null or undefined
1102
- if (token === null || token === undefined) {
1103
- throw new RequiredError("UserApi", "removeARegistrationOrDeviceTokenFromAnOwner", "token");
1104
- }
1105
-
1106
-
1107
-
1108
- // Path Params
1109
- const localVarPath = '/v3/push/device_tokens/{token_type}/{token}'
1110
- .replace('{' + 'token_type' + '}', encodeURIComponent(String(tokenType)))
1111
- .replace('{' + 'token' + '}', encodeURIComponent(String(token)));
1112
-
1113
- // Make Request Context
1114
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.DELETE);
1115
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1116
-
1117
- // Header Params
1118
- requestContext.setHeaderParam("api-token", ObjectSerializer.serialize(apiToken, "string", ""));
1119
-
1120
-
1121
-
1122
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
1123
- if (defaultAuth?.applySecurityAuthentication) {
1124
- await defaultAuth?.applySecurityAuthentication(requestContext);
1125
- }
1126
-
1127
- return requestContext;
1128
- }
1129
-
1130
- /**
1131
- * ## 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
1132
- * Remove a registration or device token - When unregistering all device tokens
1133
- * @param userId (Required)
1134
- * @param apiToken
1135
- */
1136
- public async removeAllRegistrationOrDeviceToken(userId: string, apiToken?: string, _options?: Configuration): Promise<RequestContext> {
1137
- let _config = _options || this.configuration;
1138
-
1139
- // verify required parameter 'userId' is not null or undefined
1140
- if (userId === null || userId === undefined) {
1141
- throw new RequiredError("UserApi", "removeAllRegistrationOrDeviceToken", "userId");
1142
- }
1143
-
1144
-
1145
-
1146
- // Path Params
1147
- const localVarPath = '/v3/users/{user_id}/push'
1148
- .replace('{' + 'user_id' + '}', encodeURIComponent(String(userId)));
1149
-
1150
- // Make Request Context
1151
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.DELETE);
1152
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1153
-
1154
- // Header Params
1155
- requestContext.setHeaderParam("api-token", ObjectSerializer.serialize(apiToken, "string", ""));
1156
-
1157
-
1158
-
1159
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
1160
- if (defaultAuth?.applySecurityAuthentication) {
1161
- await defaultAuth?.applySecurityAuthentication(requestContext);
1162
- }
1163
-
1164
- return requestContext;
1165
- }
1166
-
1167
- /**
1168
- * ## 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)
1169
- * Reset push preferences
1170
- * @param userId (Required)
1171
- * @param apiToken
1172
- */
1173
- public async resetPushPreferences(userId: string, apiToken?: string, _options?: Configuration): Promise<RequestContext> {
1174
- let _config = _options || this.configuration;
1175
-
1176
- // verify required parameter 'userId' is not null or undefined
1177
- if (userId === null || userId === undefined) {
1178
- throw new RequiredError("UserApi", "resetPushPreferences", "userId");
1179
- }
1180
-
1181
-
1182
-
1183
- // Path Params
1184
- const localVarPath = '/v3/users/{user_id}/push_preference'
1185
- .replace('{' + 'user_id' + '}', encodeURIComponent(String(userId)));
1186
-
1187
- // Make Request Context
1188
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.DELETE);
1189
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1190
-
1191
- // Header Params
1192
- requestContext.setHeaderParam("api-token", ObjectSerializer.serialize(apiToken, "string", ""));
1193
-
1194
-
1195
-
1196
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
1197
- if (defaultAuth?.applySecurityAuthentication) {
1198
- await defaultAuth?.applySecurityAuthentication(requestContext);
1199
- }
1200
-
1201
- return requestContext;
1202
- }
1203
-
1204
- /**
1205
- * ## 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)
1206
- * Update a user
1207
- * @param userId (Required)
1208
- * @param apiToken
1209
- * @param updateAUserRequest
1210
- */
1211
- public async updateAUser(userId: string, apiToken?: string, updateAUserRequest?: UpdateAUserRequest, _options?: Configuration): Promise<RequestContext> {
1212
- let _config = _options || this.configuration;
1213
-
1214
- // verify required parameter 'userId' is not null or undefined
1215
- if (userId === null || userId === undefined) {
1216
- throw new RequiredError("UserApi", "updateAUser", "userId");
1217
- }
1218
-
1219
-
1220
-
1221
-
1222
- // Path Params
1223
- const localVarPath = '/v3/users/{user_id}'
1224
- .replace('{' + 'user_id' + '}', encodeURIComponent(String(userId)));
1225
-
1226
- // Make Request Context
1227
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PUT);
1228
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1229
-
1230
- // Header Params
1231
- requestContext.setHeaderParam("api-token", ObjectSerializer.serialize(apiToken, "string", ""));
1232
-
1233
-
1234
- // Body Params
1235
- const contentType = ObjectSerializer.getPreferredMediaType([
1236
- "application/json"
1237
- ]);
1238
- requestContext.setHeaderParam("Content-Type", contentType);
1239
- const serializedBody = ObjectSerializer.stringify(
1240
- ObjectSerializer.serialize(updateAUserRequest, "UpdateAUserRequest", ""),
1241
- contentType
1242
- );
1243
- requestContext.setBody(serializedBody);
1244
-
1245
-
1246
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
1247
- if (defaultAuth?.applySecurityAuthentication) {
1248
- await defaultAuth?.applySecurityAuthentication(requestContext);
1249
- }
1250
-
1251
- return requestContext;
1252
- }
1253
-
1254
- /**
1255
- * ## 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
1256
- * Update channel invitation preference
1257
- * @param userId (Required)
1258
- * @param apiToken
1259
- * @param updateChannelInvitationPreferenceRequest
1260
- */
1261
- public async updateChannelInvitationPreference(userId: string, apiToken?: string, updateChannelInvitationPreferenceRequest?: UpdateChannelInvitationPreferenceRequest, _options?: Configuration): Promise<RequestContext> {
1262
- let _config = _options || this.configuration;
1263
-
1264
- // verify required parameter 'userId' is not null or undefined
1265
- if (userId === null || userId === undefined) {
1266
- throw new RequiredError("UserApi", "updateChannelInvitationPreference", "userId");
1267
- }
1268
-
1269
-
1270
-
1271
-
1272
- // Path Params
1273
- const localVarPath = '/v3/users/{user_id}/channel_invitation_preference'
1274
- .replace('{' + 'user_id' + '}', encodeURIComponent(String(userId)));
1275
-
1276
- // Make Request Context
1277
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PUT);
1278
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1279
-
1280
- // Header Params
1281
- requestContext.setHeaderParam("api-token", ObjectSerializer.serialize(apiToken, "string", ""));
1282
-
1283
-
1284
- // Body Params
1285
- const contentType = ObjectSerializer.getPreferredMediaType([
1286
- "application/json"
1287
- ]);
1288
- requestContext.setHeaderParam("Content-Type", contentType);
1289
- const serializedBody = ObjectSerializer.stringify(
1290
- ObjectSerializer.serialize(updateChannelInvitationPreferenceRequest, "UpdateChannelInvitationPreferenceRequest", ""),
1291
- contentType
1292
- );
1293
- requestContext.setBody(serializedBody);
1294
-
1295
-
1296
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
1297
- if (defaultAuth?.applySecurityAuthentication) {
1298
- await defaultAuth?.applySecurityAuthentication(requestContext);
1299
- }
1300
-
1301
- return requestContext;
1302
- }
1303
-
1304
- /**
1305
- * ## 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
1306
- * Update count preference of a channel
1307
- * @param userId (Required)
1308
- * @param channelUrl (Required)
1309
- * @param apiToken
1310
- * @param updateCountPreferenceOfAChannelRequest
1311
- */
1312
- public async updateCountPreferenceOfAChannel(userId: string, channelUrl: string, apiToken?: string, updateCountPreferenceOfAChannelRequest?: UpdateCountPreferenceOfAChannelRequest, _options?: Configuration): Promise<RequestContext> {
1313
- let _config = _options || this.configuration;
1314
-
1315
- // verify required parameter 'userId' is not null or undefined
1316
- if (userId === null || userId === undefined) {
1317
- throw new RequiredError("UserApi", "updateCountPreferenceOfAChannel", "userId");
1318
- }
1319
-
1320
-
1321
- // verify required parameter 'channelUrl' is not null or undefined
1322
- if (channelUrl === null || channelUrl === undefined) {
1323
- throw new RequiredError("UserApi", "updateCountPreferenceOfAChannel", "channelUrl");
1324
- }
1325
-
1326
-
1327
-
1328
-
1329
- // Path Params
1330
- const localVarPath = '/v3/users/{user_id}/count_preference/{channel_url}'
1331
- .replace('{' + 'user_id' + '}', encodeURIComponent(String(userId)))
1332
- .replace('{' + 'channel_url' + '}', encodeURIComponent(String(channelUrl)));
1333
-
1334
- // Make Request Context
1335
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PUT);
1336
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1337
-
1338
- // Header Params
1339
- requestContext.setHeaderParam("api-token", ObjectSerializer.serialize(apiToken, "string", ""));
1340
-
1341
-
1342
- // Body Params
1343
- const contentType = ObjectSerializer.getPreferredMediaType([
1344
- "application/json"
1345
- ]);
1346
- requestContext.setHeaderParam("Content-Type", contentType);
1347
- const serializedBody = ObjectSerializer.stringify(
1348
- ObjectSerializer.serialize(updateCountPreferenceOfAChannelRequest, "UpdateCountPreferenceOfAChannelRequest", ""),
1349
- contentType
1350
- );
1351
- requestContext.setBody(serializedBody);
1352
-
1353
-
1354
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
1355
- if (defaultAuth?.applySecurityAuthentication) {
1356
- await defaultAuth?.applySecurityAuthentication(requestContext);
1357
- }
1358
-
1359
- return requestContext;
1360
- }
1361
-
1362
- /**
1363
- * ## 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)
1364
- * Update push preferences
1365
- * @param userId (Required)
1366
- * @param apiToken
1367
- * @param updatePushPreferencesRequest
1368
- */
1369
- public async updatePushPreferences(userId: string, apiToken?: string, updatePushPreferencesRequest?: UpdatePushPreferencesRequest, _options?: Configuration): Promise<RequestContext> {
1370
- let _config = _options || this.configuration;
1371
-
1372
- // verify required parameter 'userId' is not null or undefined
1373
- if (userId === null || userId === undefined) {
1374
- throw new RequiredError("UserApi", "updatePushPreferences", "userId");
1375
- }
1376
-
1377
-
1378
-
1379
-
1380
- // Path Params
1381
- const localVarPath = '/v3/users/{user_id}/push_preference'
1382
- .replace('{' + 'user_id' + '}', encodeURIComponent(String(userId)));
1383
-
1384
- // Make Request Context
1385
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PUT);
1386
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1387
-
1388
- // Header Params
1389
- requestContext.setHeaderParam("api-token", ObjectSerializer.serialize(apiToken, "string", ""));
1390
-
1391
-
1392
- // Body Params
1393
- const contentType = ObjectSerializer.getPreferredMediaType([
1394
- "application/json"
1395
- ]);
1396
- requestContext.setHeaderParam("Content-Type", contentType);
1397
- const serializedBody = ObjectSerializer.stringify(
1398
- ObjectSerializer.serialize(updatePushPreferencesRequest, "UpdatePushPreferencesRequest", ""),
1399
- contentType
1400
- );
1401
- requestContext.setBody(serializedBody);
1402
-
1403
-
1404
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
1405
- if (defaultAuth?.applySecurityAuthentication) {
1406
- await defaultAuth?.applySecurityAuthentication(requestContext);
1407
- }
1408
-
1409
- return requestContext;
1410
- }
1411
-
1412
- /**
1413
- * ## 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)
1414
- * Update push preferences for a channel
1415
- * @param userId (Required)
1416
- * @param channelUrl (Required)
1417
- * @param apiToken
1418
- * @param updatePushPreferencesForAChannelRequest
1419
- */
1420
- public async updatePushPreferencesForAChannel(userId: string, channelUrl: string, apiToken?: string, updatePushPreferencesForAChannelRequest?: UpdatePushPreferencesForAChannelRequest, _options?: Configuration): Promise<RequestContext> {
1421
- let _config = _options || this.configuration;
1422
-
1423
- // verify required parameter 'userId' is not null or undefined
1424
- if (userId === null || userId === undefined) {
1425
- throw new RequiredError("UserApi", "updatePushPreferencesForAChannel", "userId");
1426
- }
1427
-
1428
-
1429
- // verify required parameter 'channelUrl' is not null or undefined
1430
- if (channelUrl === null || channelUrl === undefined) {
1431
- throw new RequiredError("UserApi", "updatePushPreferencesForAChannel", "channelUrl");
1432
- }
1433
-
1434
-
1435
-
1436
-
1437
- // Path Params
1438
- const localVarPath = '/v3/users/{user_id}/push_preference/{channel_url}'
1439
- .replace('{' + 'user_id' + '}', encodeURIComponent(String(userId)))
1440
- .replace('{' + 'channel_url' + '}', encodeURIComponent(String(channelUrl)));
1441
-
1442
- // Make Request Context
1443
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PUT);
1444
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1445
-
1446
- // Header Params
1447
- requestContext.setHeaderParam("api-token", ObjectSerializer.serialize(apiToken, "string", ""));
1448
-
1449
-
1450
- // Body Params
1451
- const contentType = ObjectSerializer.getPreferredMediaType([
1452
- "application/json"
1453
- ]);
1454
- requestContext.setHeaderParam("Content-Type", contentType);
1455
- const serializedBody = ObjectSerializer.stringify(
1456
- ObjectSerializer.serialize(updatePushPreferencesForAChannelRequest, "UpdatePushPreferencesForAChannelRequest", ""),
1457
- contentType
1458
- );
1459
- requestContext.setBody(serializedBody);
1460
-
1461
-
1462
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
1463
- if (defaultAuth?.applySecurityAuthentication) {
1464
- await defaultAuth?.applySecurityAuthentication(requestContext);
1465
- }
1466
-
1467
- return requestContext;
1468
- }
1469
-
1470
- /**
1471
- * ## Update metadata https://sendbird.com/docs/chat/platform-api/v3/user/managing-metadata/user-update-metadata
1472
- * Update specific user metadata
1473
- * @param userId (Required)
1474
- * @param key
1475
- * @param apiToken
1476
- * @param updateSpecificUserMetadataRequest
1477
- */
1478
- public async updateSpecificUserMetadata(userId: string, key: string, apiToken?: string, updateSpecificUserMetadataRequest?: UpdateSpecificUserMetadataRequest, _options?: Configuration): Promise<RequestContext> {
1479
- let _config = _options || this.configuration;
1480
-
1481
- // verify required parameter 'userId' is not null or undefined
1482
- if (userId === null || userId === undefined) {
1483
- throw new RequiredError("UserApi", "updateSpecificUserMetadata", "userId");
1484
- }
1485
-
1486
-
1487
- // verify required parameter 'key' is not null or undefined
1488
- if (key === null || key === undefined) {
1489
- throw new RequiredError("UserApi", "updateSpecificUserMetadata", "key");
1490
- }
1491
-
1492
-
1493
-
1494
-
1495
- // Path Params
1496
- const localVarPath = '/v3/users/{user_id}/metadata/{key}'
1497
- .replace('{' + 'user_id' + '}', encodeURIComponent(String(userId)))
1498
- .replace('{' + 'key' + '}', encodeURIComponent(String(key)));
1499
-
1500
- // Make Request Context
1501
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PUT);
1502
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1503
-
1504
- // Header Params
1505
- requestContext.setHeaderParam("api-token", ObjectSerializer.serialize(apiToken, "string", ""));
1506
-
1507
-
1508
- // Body Params
1509
- const contentType = ObjectSerializer.getPreferredMediaType([
1510
- "application/json"
1511
- ]);
1512
- requestContext.setHeaderParam("Content-Type", contentType);
1513
- const serializedBody = ObjectSerializer.stringify(
1514
- ObjectSerializer.serialize(updateSpecificUserMetadataRequest, "UpdateSpecificUserMetadataRequest", ""),
1515
- contentType
1516
- );
1517
- requestContext.setBody(serializedBody);
1518
-
1519
-
1520
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
1521
- if (defaultAuth?.applySecurityAuthentication) {
1522
- await defaultAuth?.applySecurityAuthentication(requestContext);
1523
- }
1524
-
1525
- return requestContext;
1526
- }
1527
-
1528
- /**
1529
- * ## Update metadata When updating existing items of the user metadata by their keys or adding new items to the metadata https://sendbird.com/docs/chat/platform-api/v3/user/managing-metadata/user-update-metadata
1530
- * Update user metadata
1531
- * @param userId (Required)
1532
- * @param apiToken
1533
- * @param updateUserMetadataRequest
1534
- */
1535
- public async updateUserMetadata(userId: string, apiToken?: string, updateUserMetadataRequest?: UpdateUserMetadataRequest, _options?: Configuration): Promise<RequestContext> {
1536
- let _config = _options || this.configuration;
1537
-
1538
- // verify required parameter 'userId' is not null or undefined
1539
- if (userId === null || userId === undefined) {
1540
- throw new RequiredError("UserApi", "updateUserMetadata", "userId");
1541
- }
1542
-
1543
-
1544
-
1545
-
1546
- // Path Params
1547
- const localVarPath = '/v3/users/{user_id}/metadata'
1548
- .replace('{' + 'user_id' + '}', encodeURIComponent(String(userId)));
1549
-
1550
- // Make Request Context
1551
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PUT);
1552
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1553
-
1554
- // Header Params
1555
- requestContext.setHeaderParam("api-token", ObjectSerializer.serialize(apiToken, "string", ""));
1556
-
1557
-
1558
- // Body Params
1559
- const contentType = ObjectSerializer.getPreferredMediaType([
1560
- "application/json"
1561
- ]);
1562
- requestContext.setHeaderParam("Content-Type", contentType);
1563
- const serializedBody = ObjectSerializer.stringify(
1564
- ObjectSerializer.serialize(updateUserMetadataRequest, "UpdateUserMetadataRequest", ""),
1565
- contentType
1566
- );
1567
- requestContext.setBody(serializedBody);
1568
-
1569
-
1570
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
1571
- if (defaultAuth?.applySecurityAuthentication) {
1572
- await defaultAuth?.applySecurityAuthentication(requestContext);
1573
- }
1574
-
1575
- return requestContext;
1576
- }
1577
-
1578
- /**
1579
- * ## 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.
1580
- * View a user
1581
- * @param userId (Required)
1582
- * @param includeUnreadCount
1583
- * @param customTypes
1584
- * @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;)
1585
- * @param apiToken
1586
- */
1587
- public async viewAUser(userId: string, includeUnreadCount?: boolean, customTypes?: string, superMode?: 'all' | 'super' | 'nonsuper', apiToken?: string, _options?: Configuration): Promise<RequestContext> {
1588
- let _config = _options || this.configuration;
1589
-
1590
- // verify required parameter 'userId' is not null or undefined
1591
- if (userId === null || userId === undefined) {
1592
- throw new RequiredError("UserApi", "viewAUser", "userId");
1593
- }
1594
-
1595
-
1596
-
1597
-
1598
-
1599
-
1600
- // Path Params
1601
- const localVarPath = '/v3/users/{user_id}'
1602
- .replace('{' + 'user_id' + '}', encodeURIComponent(String(userId)));
1603
-
1604
- // Make Request Context
1605
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
1606
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1607
-
1608
- // Query Params
1609
- if (includeUnreadCount !== undefined) {
1610
- requestContext.setQueryParam("include_unread_count", ObjectSerializer.serialize(includeUnreadCount, "boolean", ""));
1611
- }
1612
-
1613
- // Query Params
1614
- if (customTypes !== undefined) {
1615
- requestContext.setQueryParam("custom_types", ObjectSerializer.serialize(customTypes, "string", ""));
1616
- }
1617
-
1618
- // Query Params
1619
- if (superMode !== undefined) {
1620
- requestContext.setQueryParam("super_mode", ObjectSerializer.serialize(superMode, "'all' | 'super' | 'nonsuper'", ""));
1621
- }
1622
-
1623
- // Header Params
1624
- requestContext.setHeaderParam("api-token", ObjectSerializer.serialize(apiToken, "string", ""));
1625
-
1626
-
1627
-
1628
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
1629
- if (defaultAuth?.applySecurityAuthentication) {
1630
- await defaultAuth?.applySecurityAuthentication(requestContext);
1631
- }
1632
-
1633
- return requestContext;
1634
- }
1635
-
1636
- /**
1637
- * ## 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
1638
- * View count preference of a channel
1639
- * @param userId (Required)
1640
- * @param channelUrl (Required)
1641
- * @param apiToken
1642
- */
1643
- public async viewCountPreferenceOfAChannel(userId: string, channelUrl: string, apiToken?: string, _options?: Configuration): Promise<RequestContext> {
1644
- let _config = _options || this.configuration;
1645
-
1646
- // verify required parameter 'userId' is not null or undefined
1647
- if (userId === null || userId === undefined) {
1648
- throw new RequiredError("UserApi", "viewCountPreferenceOfAChannel", "userId");
1649
- }
1650
-
1651
-
1652
- // verify required parameter 'channelUrl' is not null or undefined
1653
- if (channelUrl === null || channelUrl === undefined) {
1654
- throw new RequiredError("UserApi", "viewCountPreferenceOfAChannel", "channelUrl");
1655
- }
1656
-
1657
-
1658
-
1659
- // Path Params
1660
- const localVarPath = '/v3/users/{user_id}/count_preference/{channel_url}'
1661
- .replace('{' + 'user_id' + '}', encodeURIComponent(String(userId)))
1662
- .replace('{' + 'channel_url' + '}', encodeURIComponent(String(channelUrl)));
1663
-
1664
- // Make Request Context
1665
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
1666
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1667
-
1668
- // Header Params
1669
- requestContext.setHeaderParam("api-token", ObjectSerializer.serialize(apiToken, "string", ""));
1670
-
1671
-
1672
-
1673
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
1674
- if (defaultAuth?.applySecurityAuthentication) {
1675
- await defaultAuth?.applySecurityAuthentication(requestContext);
1676
- }
1677
-
1678
- return requestContext;
1679
- }
1680
-
1681
- /**
1682
- * ## 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
1683
- * View number of channels with unread messages
1684
- * @param userId (Required)
1685
- * @param customTypes
1686
- * @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)
1687
- * @param apiToken
1688
- */
1689
- public async viewNumberOfChannelsWithUnreadMessages(userId: string, customTypes?: string, superMode?: 'all' | 'super' | 'nonsuper', apiToken?: string, _options?: Configuration): Promise<RequestContext> {
1690
- let _config = _options || this.configuration;
1691
-
1692
- // verify required parameter 'userId' is not null or undefined
1693
- if (userId === null || userId === undefined) {
1694
- throw new RequiredError("UserApi", "viewNumberOfChannelsWithUnreadMessages", "userId");
1695
- }
1696
-
1697
-
1698
-
1699
-
1700
-
1701
- // Path Params
1702
- const localVarPath = '/v3/users/{user_id}/unread_channel_count'
1703
- .replace('{' + 'user_id' + '}', encodeURIComponent(String(userId)));
1704
-
1705
- // Make Request Context
1706
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
1707
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1708
-
1709
- // Query Params
1710
- if (customTypes !== undefined) {
1711
- requestContext.setQueryParam("custom_types", ObjectSerializer.serialize(customTypes, "string", ""));
1712
- }
1713
-
1714
- // Query Params
1715
- if (superMode !== undefined) {
1716
- requestContext.setQueryParam("super_mode", ObjectSerializer.serialize(superMode, "'all' | 'super' | 'nonsuper'", ""));
1717
- }
1718
-
1719
- // Header Params
1720
- requestContext.setHeaderParam("api-token", ObjectSerializer.serialize(apiToken, "string", ""));
1721
-
1722
-
1723
-
1724
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
1725
- if (defaultAuth?.applySecurityAuthentication) {
1726
- await defaultAuth?.applySecurityAuthentication(requestContext);
1727
- }
1728
-
1729
- return requestContext;
1730
- }
1731
-
1732
- /**
1733
- * ## 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.
1734
- * View number of unread messages
1735
- * @param userId (Required)
1736
- * @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.
1737
- * @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;)
1738
- * @param apiToken
1739
- */
1740
- public async viewNumberOfUnreadMessages(userId: string, customTypes?: string, superMode?: string, apiToken?: string, _options?: Configuration): Promise<RequestContext> {
1741
- let _config = _options || this.configuration;
1742
-
1743
- // verify required parameter 'userId' is not null or undefined
1744
- if (userId === null || userId === undefined) {
1745
- throw new RequiredError("UserApi", "viewNumberOfUnreadMessages", "userId");
1746
- }
1747
-
1748
-
1749
-
1750
-
1751
-
1752
- // Path Params
1753
- const localVarPath = '/v3/users/{user_id}/unread_message_count'
1754
- .replace('{' + 'user_id' + '}', encodeURIComponent(String(userId)));
1755
-
1756
- // Make Request Context
1757
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
1758
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1759
-
1760
- // Query Params
1761
- if (customTypes !== undefined) {
1762
- requestContext.setQueryParam("custom_types", ObjectSerializer.serialize(customTypes, "string", ""));
1763
- }
1764
-
1765
- // Query Params
1766
- if (superMode !== undefined) {
1767
- requestContext.setQueryParam("super_mode", ObjectSerializer.serialize(superMode, "string", ""));
1768
- }
1769
-
1770
- // Header Params
1771
- requestContext.setHeaderParam("api-token", ObjectSerializer.serialize(apiToken, "string", ""));
1772
-
1773
-
1774
-
1775
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
1776
- if (defaultAuth?.applySecurityAuthentication) {
1777
- await defaultAuth?.applySecurityAuthentication(requestContext);
1778
- }
1779
-
1780
- return requestContext;
1781
- }
1782
-
1783
- /**
1784
- * ## 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)
1785
- * View push preferences
1786
- * @param userId (Required)
1787
- * @param apiToken
1788
- */
1789
- public async viewPushPreferences(userId: string, apiToken?: string, _options?: Configuration): Promise<RequestContext> {
1790
- let _config = _options || this.configuration;
1791
-
1792
- // verify required parameter 'userId' is not null or undefined
1793
- if (userId === null || userId === undefined) {
1794
- throw new RequiredError("UserApi", "viewPushPreferences", "userId");
1795
- }
1796
-
1797
-
1798
-
1799
- // Path Params
1800
- const localVarPath = '/v3/users/{user_id}/push_preference'
1801
- .replace('{' + 'user_id' + '}', encodeURIComponent(String(userId)));
1802
-
1803
- // Make Request Context
1804
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
1805
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1806
-
1807
- // Header Params
1808
- requestContext.setHeaderParam("api-token", ObjectSerializer.serialize(apiToken, "string", ""));
1809
-
1810
-
1811
-
1812
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
1813
- if (defaultAuth?.applySecurityAuthentication) {
1814
- await defaultAuth?.applySecurityAuthentication(requestContext);
1815
- }
1816
-
1817
- return requestContext;
1818
- }
1819
-
1820
- /**
1821
- * ## 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)
1822
- * View push preferences for a channel
1823
- * @param userId (Required)
1824
- * @param channelUrl (Required)
1825
- * @param apiToken
1826
- */
1827
- public async viewPushPreferencesForAChannel(userId: string, channelUrl: string, apiToken?: string, _options?: Configuration): Promise<RequestContext> {
1828
- let _config = _options || this.configuration;
1829
-
1830
- // verify required parameter 'userId' is not null or undefined
1831
- if (userId === null || userId === undefined) {
1832
- throw new RequiredError("UserApi", "viewPushPreferencesForAChannel", "userId");
1833
- }
1834
-
1835
-
1836
- // verify required parameter 'channelUrl' is not null or undefined
1837
- if (channelUrl === null || channelUrl === undefined) {
1838
- throw new RequiredError("UserApi", "viewPushPreferencesForAChannel", "channelUrl");
1839
- }
1840
-
1841
-
1842
-
1843
- // Path Params
1844
- const localVarPath = '/v3/users/{user_id}/push_preference/{channel_url}'
1845
- .replace('{' + 'user_id' + '}', encodeURIComponent(String(userId)))
1846
- .replace('{' + 'channel_url' + '}', encodeURIComponent(String(channelUrl)));
1847
-
1848
- // Make Request Context
1849
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
1850
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1851
-
1852
- // Header Params
1853
- requestContext.setHeaderParam("api-token", ObjectSerializer.serialize(apiToken, "string", ""));
1854
-
1855
-
1856
-
1857
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
1858
- if (defaultAuth?.applySecurityAuthentication) {
1859
- await defaultAuth?.applySecurityAuthentication(requestContext);
1860
- }
1861
-
1862
- return requestContext;
1863
- }
1864
-
1865
- /**
1866
- * ## Get metadata https://sendbird.com/docs/chat/platform-api/v3/user/managing-metadata/user-get-metadata
1867
- * Get specific user metadata
1868
- * @param userId (Required)
1869
- * @param key
1870
- * @param apiToken
1871
- */
1872
- public async viewSpecificUserMetadata(userId: string, key: string, apiToken?: string, _options?: Configuration): Promise<RequestContext> {
1873
- let _config = _options || this.configuration;
1874
-
1875
- // verify required parameter 'userId' is not null or undefined
1876
- if (userId === null || userId === undefined) {
1877
- throw new RequiredError("UserApi", "viewSpecificUserMetadata", "userId");
1878
- }
1879
-
1880
-
1881
- // verify required parameter 'key' is not null or undefined
1882
- if (key === null || key === undefined) {
1883
- throw new RequiredError("UserApi", "viewSpecificUserMetadata", "key");
1884
- }
1885
-
1886
-
1887
-
1888
- // Path Params
1889
- const localVarPath = '/v3/users/{user_id}/metadata/{key}'
1890
- .replace('{' + 'user_id' + '}', encodeURIComponent(String(userId)))
1891
- .replace('{' + 'key' + '}', encodeURIComponent(String(key)));
1892
-
1893
- // Make Request Context
1894
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
1895
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1896
-
1897
- // Header Params
1898
- requestContext.setHeaderParam("api-token", ObjectSerializer.serialize(apiToken, "string", ""));
1899
-
1900
-
1901
-
1902
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
1903
- if (defaultAuth?.applySecurityAuthentication) {
1904
- await defaultAuth?.applySecurityAuthentication(requestContext);
1905
- }
1906
-
1907
- return requestContext;
1908
- }
1909
-
1910
- /**
1911
- * ## 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 ----------------------------
1912
- * View who owns a registration or device token
1913
- * @param tokenType (Required)
1914
- * @param token (Required)
1915
- * @param apiToken
1916
- */
1917
- public async viewWhoOwnsARegistrationOrDeviceToken(tokenType: string, token: string, apiToken?: string, _options?: Configuration): Promise<RequestContext> {
1918
- let _config = _options || this.configuration;
1919
-
1920
- // verify required parameter 'tokenType' is not null or undefined
1921
- if (tokenType === null || tokenType === undefined) {
1922
- throw new RequiredError("UserApi", "viewWhoOwnsARegistrationOrDeviceToken", "tokenType");
1923
- }
1924
-
1925
-
1926
- // verify required parameter 'token' is not null or undefined
1927
- if (token === null || token === undefined) {
1928
- throw new RequiredError("UserApi", "viewWhoOwnsARegistrationOrDeviceToken", "token");
1929
- }
1930
-
1931
-
1932
-
1933
- // Path Params
1934
- const localVarPath = '/v3/push/device_tokens/{token_type}/{token}'
1935
- .replace('{' + 'token_type' + '}', encodeURIComponent(String(tokenType)))
1936
- .replace('{' + 'token' + '}', encodeURIComponent(String(token)));
1937
-
1938
- // Make Request Context
1939
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
1940
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1941
-
1942
- // Header Params
1943
- requestContext.setHeaderParam("api-token", ObjectSerializer.serialize(apiToken, "string", ""));
1944
-
1945
-
1946
-
1947
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
1948
- if (defaultAuth?.applySecurityAuthentication) {
1949
- await defaultAuth?.applySecurityAuthentication(requestContext);
1950
- }
1951
-
1952
- return requestContext;
1953
- }
1954
-
1955
- }
1956
-
1957
- export class UserApiResponseProcessor {
1958
-
1959
- /**
1960
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
1961
- * to the expected objects
1962
- *
1963
- * @params response Response returned by the server for a request to addARegistrationOrDeviceToken
1964
- * @throws ApiException if the response code was not in [200, 299]
1965
- */
1966
- public async addARegistrationOrDeviceToken(response: ResponseContext): Promise<AddARegistrationOrDeviceTokenResponse > {
1967
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
1968
- if (isCodeInRange("200", response.httpStatusCode)) {
1969
- const body: AddARegistrationOrDeviceTokenResponse = ObjectSerializer.deserialize(
1970
- ObjectSerializer.parse(await response.body.text(), contentType),
1971
- "AddARegistrationOrDeviceTokenResponse", ""
1972
- ) as AddARegistrationOrDeviceTokenResponse;
1973
- return body;
1974
- }
1975
-
1976
- // Work around for missing responses in specification, e.g. for petstore.yaml
1977
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
1978
- const body: AddARegistrationOrDeviceTokenResponse = ObjectSerializer.deserialize(
1979
- ObjectSerializer.parse(await response.body.text(), contentType),
1980
- "AddARegistrationOrDeviceTokenResponse", ""
1981
- ) as AddARegistrationOrDeviceTokenResponse;
1982
- return body;
1983
- }
1984
-
1985
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
1986
- }
1987
-
1988
- /**
1989
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
1990
- * to the expected objects
1991
- *
1992
- * @params response Response returned by the server for a request to chooseAPushNotificationContentTemplate
1993
- * @throws ApiException if the response code was not in [200, 299]
1994
- */
1995
- public async chooseAPushNotificationContentTemplate(response: ResponseContext): Promise<ChooseAPushNotificationContentTemplateResponse > {
1996
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
1997
- if (isCodeInRange("200", response.httpStatusCode)) {
1998
- const body: ChooseAPushNotificationContentTemplateResponse = ObjectSerializer.deserialize(
1999
- ObjectSerializer.parse(await response.body.text(), contentType),
2000
- "ChooseAPushNotificationContentTemplateResponse", ""
2001
- ) as ChooseAPushNotificationContentTemplateResponse;
2002
- return body;
2003
- }
2004
-
2005
- // Work around for missing responses in specification, e.g. for petstore.yaml
2006
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2007
- const body: ChooseAPushNotificationContentTemplateResponse = ObjectSerializer.deserialize(
2008
- ObjectSerializer.parse(await response.body.text(), contentType),
2009
- "ChooseAPushNotificationContentTemplateResponse", ""
2010
- ) as ChooseAPushNotificationContentTemplateResponse;
2011
- return body;
2012
- }
2013
-
2014
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
2015
- }
2016
-
2017
- /**
2018
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
2019
- * to the expected objects
2020
- *
2021
- * @params response Response returned by the server for a request to createAUser
2022
- * @throws ApiException if the response code was not in [200, 299]
2023
- */
2024
- public async createAUser(response: ResponseContext): Promise<SendbirdUser > {
2025
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2026
- if (isCodeInRange("200", response.httpStatusCode)) {
2027
- const body: SendbirdUser = ObjectSerializer.deserialize(
2028
- ObjectSerializer.parse(await response.body.text(), contentType),
2029
- "SendbirdUser", ""
2030
- ) as SendbirdUser;
2031
- return body;
2032
- }
2033
-
2034
- // Work around for missing responses in specification, e.g. for petstore.yaml
2035
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2036
- const body: SendbirdUser = ObjectSerializer.deserialize(
2037
- ObjectSerializer.parse(await response.body.text(), contentType),
2038
- "SendbirdUser", ""
2039
- ) as SendbirdUser;
2040
- return body;
2041
- }
2042
-
2043
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
2044
- }
2045
-
2046
- /**
2047
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
2048
- * to the expected objects
2049
- *
2050
- * @params response Response returned by the server for a request to createUserMetadata
2051
- * @throws ApiException if the response code was not in [200, 299]
2052
- */
2053
- public async createUserMetadata(response: ResponseContext): Promise<any > {
2054
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2055
- if (isCodeInRange("200", response.httpStatusCode)) {
2056
- const body: any = ObjectSerializer.deserialize(
2057
- ObjectSerializer.parse(await response.body.text(), contentType),
2058
- "any", ""
2059
- ) as any;
2060
- return body;
2061
- }
2062
-
2063
- // Work around for missing responses in specification, e.g. for petstore.yaml
2064
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2065
- const body: any = ObjectSerializer.deserialize(
2066
- ObjectSerializer.parse(await response.body.text(), contentType),
2067
- "any", ""
2068
- ) as any;
2069
- return body;
2070
- }
2071
-
2072
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
2073
- }
2074
-
2075
- /**
2076
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
2077
- * to the expected objects
2078
- *
2079
- * @params response Response returned by the server for a request to createUserToken
2080
- * @throws ApiException if the response code was not in [200, 299]
2081
- */
2082
- public async createUserToken(response: ResponseContext): Promise<CreateUserTokenResponse > {
2083
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2084
- if (isCodeInRange("200", response.httpStatusCode)) {
2085
- const body: CreateUserTokenResponse = ObjectSerializer.deserialize(
2086
- ObjectSerializer.parse(await response.body.text(), contentType),
2087
- "CreateUserTokenResponse", ""
2088
- ) as CreateUserTokenResponse;
2089
- return body;
2090
- }
2091
-
2092
- // Work around for missing responses in specification, e.g. for petstore.yaml
2093
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2094
- const body: CreateUserTokenResponse = ObjectSerializer.deserialize(
2095
- ObjectSerializer.parse(await response.body.text(), contentType),
2096
- "CreateUserTokenResponse", ""
2097
- ) as CreateUserTokenResponse;
2098
- return body;
2099
- }
2100
-
2101
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
2102
- }
2103
-
2104
- /**
2105
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
2106
- * to the expected objects
2107
- *
2108
- * @params response Response returned by the server for a request to deleteAUser
2109
- * @throws ApiException if the response code was not in [200, 299]
2110
- */
2111
- public async deleteAUser(response: ResponseContext): Promise<any > {
2112
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2113
- if (isCodeInRange("200", response.httpStatusCode)) {
2114
- const body: any = ObjectSerializer.deserialize(
2115
- ObjectSerializer.parse(await response.body.text(), contentType),
2116
- "any", ""
2117
- ) as any;
2118
- return body;
2119
- }
2120
-
2121
- // Work around for missing responses in specification, e.g. for petstore.yaml
2122
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2123
- const body: any = ObjectSerializer.deserialize(
2124
- ObjectSerializer.parse(await response.body.text(), contentType),
2125
- "any", ""
2126
- ) as any;
2127
- return body;
2128
- }
2129
-
2130
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
2131
- }
2132
-
2133
- /**
2134
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
2135
- * to the expected objects
2136
- *
2137
- * @params response Response returned by the server for a request to deleteSpecificUserMetadata
2138
- * @throws ApiException if the response code was not in [200, 299]
2139
- */
2140
- public async deleteSpecificUserMetadata(response: ResponseContext): Promise<any > {
2141
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2142
- if (isCodeInRange("200", response.httpStatusCode)) {
2143
- const body: any = ObjectSerializer.deserialize(
2144
- ObjectSerializer.parse(await response.body.text(), contentType),
2145
- "any", ""
2146
- ) as any;
2147
- return body;
2148
- }
2149
-
2150
- // Work around for missing responses in specification, e.g. for petstore.yaml
2151
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2152
- const body: any = ObjectSerializer.deserialize(
2153
- ObjectSerializer.parse(await response.body.text(), contentType),
2154
- "any", ""
2155
- ) as any;
2156
- return body;
2157
- }
2158
-
2159
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
2160
- }
2161
-
2162
- /**
2163
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
2164
- * to the expected objects
2165
- *
2166
- * @params response Response returned by the server for a request to deleteUserAllMetadata
2167
- * @throws ApiException if the response code was not in [200, 299]
2168
- */
2169
- public async deleteUserAllMetadata(response: ResponseContext): Promise<any > {
2170
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2171
- if (isCodeInRange("200", response.httpStatusCode)) {
2172
- const body: any = ObjectSerializer.deserialize(
2173
- ObjectSerializer.parse(await response.body.text(), contentType),
2174
- "any", ""
2175
- ) as any;
2176
- return body;
2177
- }
2178
-
2179
- // Work around for missing responses in specification, e.g. for petstore.yaml
2180
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2181
- const body: any = ObjectSerializer.deserialize(
2182
- ObjectSerializer.parse(await response.body.text(), contentType),
2183
- "any", ""
2184
- ) as any;
2185
- return body;
2186
- }
2187
-
2188
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
2189
- }
2190
-
2191
- /**
2192
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
2193
- * to the expected objects
2194
- *
2195
- * @params response Response returned by the server for a request to getChannelInvitationPreference
2196
- * @throws ApiException if the response code was not in [200, 299]
2197
- */
2198
- public async getChannelInvitationPreference(response: ResponseContext): Promise<GetChannelInvitationPreferenceResponse > {
2199
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2200
- if (isCodeInRange("200", response.httpStatusCode)) {
2201
- const body: GetChannelInvitationPreferenceResponse = ObjectSerializer.deserialize(
2202
- ObjectSerializer.parse(await response.body.text(), contentType),
2203
- "GetChannelInvitationPreferenceResponse", ""
2204
- ) as GetChannelInvitationPreferenceResponse;
2205
- return body;
2206
- }
2207
-
2208
- // Work around for missing responses in specification, e.g. for petstore.yaml
2209
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2210
- const body: GetChannelInvitationPreferenceResponse = ObjectSerializer.deserialize(
2211
- ObjectSerializer.parse(await response.body.text(), contentType),
2212
- "GetChannelInvitationPreferenceResponse", ""
2213
- ) as GetChannelInvitationPreferenceResponse;
2214
- return body;
2215
- }
2216
-
2217
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
2218
- }
2219
-
2220
- /**
2221
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
2222
- * to the expected objects
2223
- *
2224
- * @params response Response returned by the server for a request to leaveMyGroupChannels
2225
- * @throws ApiException if the response code was not in [200, 299]
2226
- */
2227
- public async leaveMyGroupChannels(response: ResponseContext): Promise<any > {
2228
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2229
- if (isCodeInRange("200", response.httpStatusCode)) {
2230
- const body: any = ObjectSerializer.deserialize(
2231
- ObjectSerializer.parse(await response.body.text(), contentType),
2232
- "any", ""
2233
- ) as any;
2234
- return body;
2235
- }
2236
-
2237
- // Work around for missing responses in specification, e.g. for petstore.yaml
2238
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2239
- const body: any = ObjectSerializer.deserialize(
2240
- ObjectSerializer.parse(await response.body.text(), contentType),
2241
- "any", ""
2242
- ) as any;
2243
- return body;
2244
- }
2245
-
2246
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
2247
- }
2248
-
2249
- /**
2250
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
2251
- * to the expected objects
2252
- *
2253
- * @params response Response returned by the server for a request to listMyGroupChannels
2254
- * @throws ApiException if the response code was not in [200, 299]
2255
- */
2256
- public async listMyGroupChannels(response: ResponseContext): Promise<ListMyGroupChannelsResponse > {
2257
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2258
- if (isCodeInRange("200", response.httpStatusCode)) {
2259
- const body: ListMyGroupChannelsResponse = ObjectSerializer.deserialize(
2260
- ObjectSerializer.parse(await response.body.text(), contentType),
2261
- "ListMyGroupChannelsResponse", ""
2262
- ) as ListMyGroupChannelsResponse;
2263
- return body;
2264
- }
2265
-
2266
- // Work around for missing responses in specification, e.g. for petstore.yaml
2267
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2268
- const body: ListMyGroupChannelsResponse = ObjectSerializer.deserialize(
2269
- ObjectSerializer.parse(await response.body.text(), contentType),
2270
- "ListMyGroupChannelsResponse", ""
2271
- ) as ListMyGroupChannelsResponse;
2272
- return body;
2273
- }
2274
-
2275
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
2276
- }
2277
-
2278
- /**
2279
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
2280
- * to the expected objects
2281
- *
2282
- * @params response Response returned by the server for a request to listRegistrationOrDeviceTokens
2283
- * @throws ApiException if the response code was not in [200, 299]
2284
- */
2285
- public async listRegistrationOrDeviceTokens(response: ResponseContext): Promise<ListRegistrationOrDeviceTokensResponse > {
2286
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2287
- if (isCodeInRange("200", response.httpStatusCode)) {
2288
- const body: ListRegistrationOrDeviceTokensResponse = ObjectSerializer.deserialize(
2289
- ObjectSerializer.parse(await response.body.text(), contentType),
2290
- "ListRegistrationOrDeviceTokensResponse", ""
2291
- ) as ListRegistrationOrDeviceTokensResponse;
2292
- return body;
2293
- }
2294
-
2295
- // Work around for missing responses in specification, e.g. for petstore.yaml
2296
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2297
- const body: ListRegistrationOrDeviceTokensResponse = ObjectSerializer.deserialize(
2298
- ObjectSerializer.parse(await response.body.text(), contentType),
2299
- "ListRegistrationOrDeviceTokensResponse", ""
2300
- ) as ListRegistrationOrDeviceTokensResponse;
2301
- return body;
2302
- }
2303
-
2304
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
2305
- }
2306
-
2307
- /**
2308
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
2309
- * to the expected objects
2310
- *
2311
- * @params response Response returned by the server for a request to listUsers
2312
- * @throws ApiException if the response code was not in [200, 299]
2313
- */
2314
- public async listUsers(response: ResponseContext): Promise<ListUsersResponse > {
2315
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2316
- if (isCodeInRange("200", response.httpStatusCode)) {
2317
- const body: ListUsersResponse = ObjectSerializer.deserialize(
2318
- ObjectSerializer.parse(await response.body.text(), contentType),
2319
- "ListUsersResponse", ""
2320
- ) as ListUsersResponse;
2321
- return body;
2322
- }
2323
-
2324
- // Work around for missing responses in specification, e.g. for petstore.yaml
2325
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2326
- const body: ListUsersResponse = ObjectSerializer.deserialize(
2327
- ObjectSerializer.parse(await response.body.text(), contentType),
2328
- "ListUsersResponse", ""
2329
- ) as ListUsersResponse;
2330
- return body;
2331
- }
2332
-
2333
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
2334
- }
2335
-
2336
- /**
2337
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
2338
- * to the expected objects
2339
- *
2340
- * @params response Response returned by the server for a request to markAllMessagesAsRead
2341
- * @throws ApiException if the response code was not in [200, 299]
2342
- */
2343
- public async markAllMessagesAsRead(response: ResponseContext): Promise<any > {
2344
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2345
- if (isCodeInRange("200", response.httpStatusCode)) {
2346
- const body: any = ObjectSerializer.deserialize(
2347
- ObjectSerializer.parse(await response.body.text(), contentType),
2348
- "any", ""
2349
- ) as any;
2350
- return body;
2351
- }
2352
-
2353
- // Work around for missing responses in specification, e.g. for petstore.yaml
2354
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2355
- const body: any = ObjectSerializer.deserialize(
2356
- ObjectSerializer.parse(await response.body.text(), contentType),
2357
- "any", ""
2358
- ) as any;
2359
- return body;
2360
- }
2361
-
2362
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
2363
- }
2364
-
2365
- /**
2366
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
2367
- * to the expected objects
2368
- *
2369
- * @params response Response returned by the server for a request to removeARegistrationOrDeviceToken
2370
- * @throws ApiException if the response code was not in [200, 299]
2371
- */
2372
- public async removeARegistrationOrDeviceToken(response: ResponseContext): Promise<RemoveARegistrationOrDeviceTokenResponse > {
2373
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2374
- if (isCodeInRange("200", response.httpStatusCode)) {
2375
- const body: RemoveARegistrationOrDeviceTokenResponse = ObjectSerializer.deserialize(
2376
- ObjectSerializer.parse(await response.body.text(), contentType),
2377
- "RemoveARegistrationOrDeviceTokenResponse", ""
2378
- ) as RemoveARegistrationOrDeviceTokenResponse;
2379
- return body;
2380
- }
2381
-
2382
- // Work around for missing responses in specification, e.g. for petstore.yaml
2383
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2384
- const body: RemoveARegistrationOrDeviceTokenResponse = ObjectSerializer.deserialize(
2385
- ObjectSerializer.parse(await response.body.text(), contentType),
2386
- "RemoveARegistrationOrDeviceTokenResponse", ""
2387
- ) as RemoveARegistrationOrDeviceTokenResponse;
2388
- return body;
2389
- }
2390
-
2391
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
2392
- }
2393
-
2394
- /**
2395
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
2396
- * to the expected objects
2397
- *
2398
- * @params response Response returned by the server for a request to removeARegistrationOrDeviceTokenFromAnOwner
2399
- * @throws ApiException if the response code was not in [200, 299]
2400
- */
2401
- public async removeARegistrationOrDeviceTokenFromAnOwner(response: ResponseContext): Promise<Array<MarkChannelMessagesAsReadRequest> > {
2402
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2403
- if (isCodeInRange("200", response.httpStatusCode)) {
2404
- const body: Array<MarkChannelMessagesAsReadRequest> = ObjectSerializer.deserialize(
2405
- ObjectSerializer.parse(await response.body.text(), contentType),
2406
- "Array<MarkChannelMessagesAsReadRequest>", ""
2407
- ) as Array<MarkChannelMessagesAsReadRequest>;
2408
- return body;
2409
- }
2410
-
2411
- // Work around for missing responses in specification, e.g. for petstore.yaml
2412
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2413
- const body: Array<MarkChannelMessagesAsReadRequest> = ObjectSerializer.deserialize(
2414
- ObjectSerializer.parse(await response.body.text(), contentType),
2415
- "Array<MarkChannelMessagesAsReadRequest>", ""
2416
- ) as Array<MarkChannelMessagesAsReadRequest>;
2417
- return body;
2418
- }
2419
-
2420
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
2421
- }
2422
-
2423
- /**
2424
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
2425
- * to the expected objects
2426
- *
2427
- * @params response Response returned by the server for a request to removeAllRegistrationOrDeviceToken
2428
- * @throws ApiException if the response code was not in [200, 299]
2429
- */
2430
- public async removeAllRegistrationOrDeviceToken(response: ResponseContext): Promise<RemoveAllRegistrationOrDeviceTokenResponse > {
2431
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2432
- if (isCodeInRange("200", response.httpStatusCode)) {
2433
- const body: RemoveAllRegistrationOrDeviceTokenResponse = ObjectSerializer.deserialize(
2434
- ObjectSerializer.parse(await response.body.text(), contentType),
2435
- "RemoveAllRegistrationOrDeviceTokenResponse", ""
2436
- ) as RemoveAllRegistrationOrDeviceTokenResponse;
2437
- return body;
2438
- }
2439
-
2440
- // Work around for missing responses in specification, e.g. for petstore.yaml
2441
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2442
- const body: RemoveAllRegistrationOrDeviceTokenResponse = ObjectSerializer.deserialize(
2443
- ObjectSerializer.parse(await response.body.text(), contentType),
2444
- "RemoveAllRegistrationOrDeviceTokenResponse", ""
2445
- ) as RemoveAllRegistrationOrDeviceTokenResponse;
2446
- return body;
2447
- }
2448
-
2449
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
2450
- }
2451
-
2452
- /**
2453
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
2454
- * to the expected objects
2455
- *
2456
- * @params response Response returned by the server for a request to resetPushPreferences
2457
- * @throws ApiException if the response code was not in [200, 299]
2458
- */
2459
- public async resetPushPreferences(response: ResponseContext): Promise<any > {
2460
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2461
- if (isCodeInRange("200", response.httpStatusCode)) {
2462
- const body: any = ObjectSerializer.deserialize(
2463
- ObjectSerializer.parse(await response.body.text(), contentType),
2464
- "any", ""
2465
- ) as any;
2466
- return body;
2467
- }
2468
-
2469
- // Work around for missing responses in specification, e.g. for petstore.yaml
2470
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2471
- const body: any = ObjectSerializer.deserialize(
2472
- ObjectSerializer.parse(await response.body.text(), contentType),
2473
- "any", ""
2474
- ) as any;
2475
- return body;
2476
- }
2477
-
2478
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
2479
- }
2480
-
2481
- /**
2482
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
2483
- * to the expected objects
2484
- *
2485
- * @params response Response returned by the server for a request to updateAUser
2486
- * @throws ApiException if the response code was not in [200, 299]
2487
- */
2488
- public async updateAUser(response: ResponseContext): Promise<SendbirdUser > {
2489
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2490
- if (isCodeInRange("200", response.httpStatusCode)) {
2491
- const body: SendbirdUser = ObjectSerializer.deserialize(
2492
- ObjectSerializer.parse(await response.body.text(), contentType),
2493
- "SendbirdUser", ""
2494
- ) as SendbirdUser;
2495
- return body;
2496
- }
2497
-
2498
- // Work around for missing responses in specification, e.g. for petstore.yaml
2499
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2500
- const body: SendbirdUser = ObjectSerializer.deserialize(
2501
- ObjectSerializer.parse(await response.body.text(), contentType),
2502
- "SendbirdUser", ""
2503
- ) as SendbirdUser;
2504
- return body;
2505
- }
2506
-
2507
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
2508
- }
2509
-
2510
- /**
2511
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
2512
- * to the expected objects
2513
- *
2514
- * @params response Response returned by the server for a request to updateChannelInvitationPreference
2515
- * @throws ApiException if the response code was not in [200, 299]
2516
- */
2517
- public async updateChannelInvitationPreference(response: ResponseContext): Promise<UpdateChannelInvitationPreferenceResponse > {
2518
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2519
- if (isCodeInRange("200", response.httpStatusCode)) {
2520
- const body: UpdateChannelInvitationPreferenceResponse = ObjectSerializer.deserialize(
2521
- ObjectSerializer.parse(await response.body.text(), contentType),
2522
- "UpdateChannelInvitationPreferenceResponse", ""
2523
- ) as UpdateChannelInvitationPreferenceResponse;
2524
- return body;
2525
- }
2526
-
2527
- // Work around for missing responses in specification, e.g. for petstore.yaml
2528
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2529
- const body: UpdateChannelInvitationPreferenceResponse = ObjectSerializer.deserialize(
2530
- ObjectSerializer.parse(await response.body.text(), contentType),
2531
- "UpdateChannelInvitationPreferenceResponse", ""
2532
- ) as UpdateChannelInvitationPreferenceResponse;
2533
- return body;
2534
- }
2535
-
2536
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
2537
- }
2538
-
2539
- /**
2540
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
2541
- * to the expected objects
2542
- *
2543
- * @params response Response returned by the server for a request to updateCountPreferenceOfAChannel
2544
- * @throws ApiException if the response code was not in [200, 299]
2545
- */
2546
- public async updateCountPreferenceOfAChannel(response: ResponseContext): Promise<UpdateCountPreferenceOfChannelByUrlResponse > {
2547
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2548
- if (isCodeInRange("200", response.httpStatusCode)) {
2549
- const body: UpdateCountPreferenceOfChannelByUrlResponse = ObjectSerializer.deserialize(
2550
- ObjectSerializer.parse(await response.body.text(), contentType),
2551
- "UpdateCountPreferenceOfChannelByUrlResponse", ""
2552
- ) as UpdateCountPreferenceOfChannelByUrlResponse;
2553
- return body;
2554
- }
2555
-
2556
- // Work around for missing responses in specification, e.g. for petstore.yaml
2557
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2558
- const body: UpdateCountPreferenceOfChannelByUrlResponse = ObjectSerializer.deserialize(
2559
- ObjectSerializer.parse(await response.body.text(), contentType),
2560
- "UpdateCountPreferenceOfChannelByUrlResponse", ""
2561
- ) as UpdateCountPreferenceOfChannelByUrlResponse;
2562
- return body;
2563
- }
2564
-
2565
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
2566
- }
2567
-
2568
- /**
2569
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
2570
- * to the expected objects
2571
- *
2572
- * @params response Response returned by the server for a request to updatePushPreferences
2573
- * @throws ApiException if the response code was not in [200, 299]
2574
- */
2575
- public async updatePushPreferences(response: ResponseContext): Promise<UpdatePushPreferencesResponse > {
2576
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2577
- if (isCodeInRange("200", response.httpStatusCode)) {
2578
- const body: UpdatePushPreferencesResponse = ObjectSerializer.deserialize(
2579
- ObjectSerializer.parse(await response.body.text(), contentType),
2580
- "UpdatePushPreferencesResponse", ""
2581
- ) as UpdatePushPreferencesResponse;
2582
- return body;
2583
- }
2584
-
2585
- // Work around for missing responses in specification, e.g. for petstore.yaml
2586
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2587
- const body: UpdatePushPreferencesResponse = ObjectSerializer.deserialize(
2588
- ObjectSerializer.parse(await response.body.text(), contentType),
2589
- "UpdatePushPreferencesResponse", ""
2590
- ) as UpdatePushPreferencesResponse;
2591
- return body;
2592
- }
2593
-
2594
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
2595
- }
2596
-
2597
- /**
2598
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
2599
- * to the expected objects
2600
- *
2601
- * @params response Response returned by the server for a request to updatePushPreferencesForAChannel
2602
- * @throws ApiException if the response code was not in [200, 299]
2603
- */
2604
- public async updatePushPreferencesForAChannel(response: ResponseContext): Promise<UpdatePushPreferencesForAChannelResponse > {
2605
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2606
- if (isCodeInRange("200", response.httpStatusCode)) {
2607
- const body: UpdatePushPreferencesForAChannelResponse = ObjectSerializer.deserialize(
2608
- ObjectSerializer.parse(await response.body.text(), contentType),
2609
- "UpdatePushPreferencesForAChannelResponse", ""
2610
- ) as UpdatePushPreferencesForAChannelResponse;
2611
- return body;
2612
- }
2613
-
2614
- // Work around for missing responses in specification, e.g. for petstore.yaml
2615
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2616
- const body: UpdatePushPreferencesForAChannelResponse = ObjectSerializer.deserialize(
2617
- ObjectSerializer.parse(await response.body.text(), contentType),
2618
- "UpdatePushPreferencesForAChannelResponse", ""
2619
- ) as UpdatePushPreferencesForAChannelResponse;
2620
- return body;
2621
- }
2622
-
2623
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
2624
- }
2625
-
2626
- /**
2627
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
2628
- * to the expected objects
2629
- *
2630
- * @params response Response returned by the server for a request to updateSpecificUserMetadata
2631
- * @throws ApiException if the response code was not in [200, 299]
2632
- */
2633
- public async updateSpecificUserMetadata(response: ResponseContext): Promise<any > {
2634
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2635
- if (isCodeInRange("200", response.httpStatusCode)) {
2636
- const body: any = ObjectSerializer.deserialize(
2637
- ObjectSerializer.parse(await response.body.text(), contentType),
2638
- "any", ""
2639
- ) as any;
2640
- return body;
2641
- }
2642
-
2643
- // Work around for missing responses in specification, e.g. for petstore.yaml
2644
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2645
- const body: any = ObjectSerializer.deserialize(
2646
- ObjectSerializer.parse(await response.body.text(), contentType),
2647
- "any", ""
2648
- ) as any;
2649
- return body;
2650
- }
2651
-
2652
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
2653
- }
2654
-
2655
- /**
2656
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
2657
- * to the expected objects
2658
- *
2659
- * @params response Response returned by the server for a request to updateUserMetadata
2660
- * @throws ApiException if the response code was not in [200, 299]
2661
- */
2662
- public async updateUserMetadata(response: ResponseContext): Promise<any > {
2663
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2664
- if (isCodeInRange("200", response.httpStatusCode)) {
2665
- const body: any = ObjectSerializer.deserialize(
2666
- ObjectSerializer.parse(await response.body.text(), contentType),
2667
- "any", ""
2668
- ) as any;
2669
- return body;
2670
- }
2671
-
2672
- // Work around for missing responses in specification, e.g. for petstore.yaml
2673
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2674
- const body: any = ObjectSerializer.deserialize(
2675
- ObjectSerializer.parse(await response.body.text(), contentType),
2676
- "any", ""
2677
- ) as any;
2678
- return body;
2679
- }
2680
-
2681
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
2682
- }
2683
-
2684
- /**
2685
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
2686
- * to the expected objects
2687
- *
2688
- * @params response Response returned by the server for a request to viewAUser
2689
- * @throws ApiException if the response code was not in [200, 299]
2690
- */
2691
- public async viewAUser(response: ResponseContext): Promise<SendbirdUser > {
2692
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2693
- if (isCodeInRange("200", response.httpStatusCode)) {
2694
- const body: SendbirdUser = ObjectSerializer.deserialize(
2695
- ObjectSerializer.parse(await response.body.text(), contentType),
2696
- "SendbirdUser", ""
2697
- ) as SendbirdUser;
2698
- return body;
2699
- }
2700
-
2701
- // Work around for missing responses in specification, e.g. for petstore.yaml
2702
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2703
- const body: SendbirdUser = ObjectSerializer.deserialize(
2704
- ObjectSerializer.parse(await response.body.text(), contentType),
2705
- "SendbirdUser", ""
2706
- ) as SendbirdUser;
2707
- return body;
2708
- }
2709
-
2710
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
2711
- }
2712
-
2713
- /**
2714
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
2715
- * to the expected objects
2716
- *
2717
- * @params response Response returned by the server for a request to viewCountPreferenceOfAChannel
2718
- * @throws ApiException if the response code was not in [200, 299]
2719
- */
2720
- public async viewCountPreferenceOfAChannel(response: ResponseContext): Promise<ViewCountPreferenceOfAChannelResponse > {
2721
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2722
- if (isCodeInRange("200", response.httpStatusCode)) {
2723
- const body: ViewCountPreferenceOfAChannelResponse = ObjectSerializer.deserialize(
2724
- ObjectSerializer.parse(await response.body.text(), contentType),
2725
- "ViewCountPreferenceOfAChannelResponse", ""
2726
- ) as ViewCountPreferenceOfAChannelResponse;
2727
- return body;
2728
- }
2729
-
2730
- // Work around for missing responses in specification, e.g. for petstore.yaml
2731
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2732
- const body: ViewCountPreferenceOfAChannelResponse = ObjectSerializer.deserialize(
2733
- ObjectSerializer.parse(await response.body.text(), contentType),
2734
- "ViewCountPreferenceOfAChannelResponse", ""
2735
- ) as ViewCountPreferenceOfAChannelResponse;
2736
- return body;
2737
- }
2738
-
2739
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
2740
- }
2741
-
2742
- /**
2743
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
2744
- * to the expected objects
2745
- *
2746
- * @params response Response returned by the server for a request to viewNumberOfChannelsWithUnreadMessages
2747
- * @throws ApiException if the response code was not in [200, 299]
2748
- */
2749
- public async viewNumberOfChannelsWithUnreadMessages(response: ResponseContext): Promise<ViewNumberOfChannelsWithUnreadMessagesResponse > {
2750
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2751
- if (isCodeInRange("200", response.httpStatusCode)) {
2752
- const body: ViewNumberOfChannelsWithUnreadMessagesResponse = ObjectSerializer.deserialize(
2753
- ObjectSerializer.parse(await response.body.text(), contentType),
2754
- "ViewNumberOfChannelsWithUnreadMessagesResponse", ""
2755
- ) as ViewNumberOfChannelsWithUnreadMessagesResponse;
2756
- return body;
2757
- }
2758
-
2759
- // Work around for missing responses in specification, e.g. for petstore.yaml
2760
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2761
- const body: ViewNumberOfChannelsWithUnreadMessagesResponse = ObjectSerializer.deserialize(
2762
- ObjectSerializer.parse(await response.body.text(), contentType),
2763
- "ViewNumberOfChannelsWithUnreadMessagesResponse", ""
2764
- ) as ViewNumberOfChannelsWithUnreadMessagesResponse;
2765
- return body;
2766
- }
2767
-
2768
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
2769
- }
2770
-
2771
- /**
2772
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
2773
- * to the expected objects
2774
- *
2775
- * @params response Response returned by the server for a request to viewNumberOfUnreadMessages
2776
- * @throws ApiException if the response code was not in [200, 299]
2777
- */
2778
- public async viewNumberOfUnreadMessages(response: ResponseContext): Promise<ViewNumberOfUnreadMessagesResponse > {
2779
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2780
- if (isCodeInRange("200", response.httpStatusCode)) {
2781
- const body: ViewNumberOfUnreadMessagesResponse = ObjectSerializer.deserialize(
2782
- ObjectSerializer.parse(await response.body.text(), contentType),
2783
- "ViewNumberOfUnreadMessagesResponse", ""
2784
- ) as ViewNumberOfUnreadMessagesResponse;
2785
- return body;
2786
- }
2787
-
2788
- // Work around for missing responses in specification, e.g. for petstore.yaml
2789
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2790
- const body: ViewNumberOfUnreadMessagesResponse = ObjectSerializer.deserialize(
2791
- ObjectSerializer.parse(await response.body.text(), contentType),
2792
- "ViewNumberOfUnreadMessagesResponse", ""
2793
- ) as ViewNumberOfUnreadMessagesResponse;
2794
- return body;
2795
- }
2796
-
2797
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
2798
- }
2799
-
2800
- /**
2801
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
2802
- * to the expected objects
2803
- *
2804
- * @params response Response returned by the server for a request to viewPushPreferences
2805
- * @throws ApiException if the response code was not in [200, 299]
2806
- */
2807
- public async viewPushPreferences(response: ResponseContext): Promise<ViewPushPreferencesResponse > {
2808
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2809
- if (isCodeInRange("200", response.httpStatusCode)) {
2810
- const body: ViewPushPreferencesResponse = ObjectSerializer.deserialize(
2811
- ObjectSerializer.parse(await response.body.text(), contentType),
2812
- "ViewPushPreferencesResponse", ""
2813
- ) as ViewPushPreferencesResponse;
2814
- return body;
2815
- }
2816
-
2817
- // Work around for missing responses in specification, e.g. for petstore.yaml
2818
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2819
- const body: ViewPushPreferencesResponse = ObjectSerializer.deserialize(
2820
- ObjectSerializer.parse(await response.body.text(), contentType),
2821
- "ViewPushPreferencesResponse", ""
2822
- ) as ViewPushPreferencesResponse;
2823
- return body;
2824
- }
2825
-
2826
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
2827
- }
2828
-
2829
- /**
2830
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
2831
- * to the expected objects
2832
- *
2833
- * @params response Response returned by the server for a request to viewPushPreferencesForAChannel
2834
- * @throws ApiException if the response code was not in [200, 299]
2835
- */
2836
- public async viewPushPreferencesForAChannel(response: ResponseContext): Promise<ViewPushPreferencesForAChannelResponse > {
2837
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2838
- if (isCodeInRange("200", response.httpStatusCode)) {
2839
- const body: ViewPushPreferencesForAChannelResponse = ObjectSerializer.deserialize(
2840
- ObjectSerializer.parse(await response.body.text(), contentType),
2841
- "ViewPushPreferencesForAChannelResponse", ""
2842
- ) as ViewPushPreferencesForAChannelResponse;
2843
- return body;
2844
- }
2845
-
2846
- // Work around for missing responses in specification, e.g. for petstore.yaml
2847
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2848
- const body: ViewPushPreferencesForAChannelResponse = ObjectSerializer.deserialize(
2849
- ObjectSerializer.parse(await response.body.text(), contentType),
2850
- "ViewPushPreferencesForAChannelResponse", ""
2851
- ) as ViewPushPreferencesForAChannelResponse;
2852
- return body;
2853
- }
2854
-
2855
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
2856
- }
2857
-
2858
- /**
2859
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
2860
- * to the expected objects
2861
- *
2862
- * @params response Response returned by the server for a request to viewSpecificUserMetadata
2863
- * @throws ApiException if the response code was not in [200, 299]
2864
- */
2865
- public async viewSpecificUserMetadata(response: ResponseContext): Promise<any > {
2866
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2867
- if (isCodeInRange("200", response.httpStatusCode)) {
2868
- const body: any = ObjectSerializer.deserialize(
2869
- ObjectSerializer.parse(await response.body.text(), contentType),
2870
- "any", ""
2871
- ) as any;
2872
- return body;
2873
- }
2874
-
2875
- // Work around for missing responses in specification, e.g. for petstore.yaml
2876
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2877
- const body: any = ObjectSerializer.deserialize(
2878
- ObjectSerializer.parse(await response.body.text(), contentType),
2879
- "any", ""
2880
- ) as any;
2881
- return body;
2882
- }
2883
-
2884
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
2885
- }
2886
-
2887
- /**
2888
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
2889
- * to the expected objects
2890
- *
2891
- * @params response Response returned by the server for a request to viewWhoOwnsARegistrationOrDeviceToken
2892
- * @throws ApiException if the response code was not in [200, 299]
2893
- */
2894
- public async viewWhoOwnsARegistrationOrDeviceToken(response: ResponseContext): Promise<Array<MarkChannelMessagesAsReadRequest> > {
2895
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2896
- if (isCodeInRange("200", response.httpStatusCode)) {
2897
- const body: Array<MarkChannelMessagesAsReadRequest> = ObjectSerializer.deserialize(
2898
- ObjectSerializer.parse(await response.body.text(), contentType),
2899
- "Array<MarkChannelMessagesAsReadRequest>", ""
2900
- ) as Array<MarkChannelMessagesAsReadRequest>;
2901
- return body;
2902
- }
2903
-
2904
- // Work around for missing responses in specification, e.g. for petstore.yaml
2905
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2906
- const body: Array<MarkChannelMessagesAsReadRequest> = ObjectSerializer.deserialize(
2907
- ObjectSerializer.parse(await response.body.text(), contentType),
2908
- "Array<MarkChannelMessagesAsReadRequest>", ""
2909
- ) as Array<MarkChannelMessagesAsReadRequest>;
2910
- return body;
2911
- }
2912
-
2913
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
2914
- }
2915
-
2916
- }