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