mezon-js 2.14.95 → 2.14.97

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/dist/api.d.ts CHANGED
@@ -78,6 +78,53 @@ export interface ApiChannelTimeline {
78
78
  export interface ApiListChannelTimelineResponse {
79
79
  events?: Array<ApiChannelTimeline>;
80
80
  }
81
+ export interface ApiCreatePollRequest {
82
+ channel_id?: string;
83
+ clan_id?: string;
84
+ question?: string;
85
+ answers?: string[];
86
+ expire_hours?: number;
87
+ type?: number;
88
+ }
89
+ export interface ApiPollAnswer {
90
+ index?: number;
91
+ label?: string;
92
+ }
93
+ export interface ApiPollVoterDetail {
94
+ answer_index?: number;
95
+ user_ids?: string[];
96
+ }
97
+ export interface ApiCreatePollResponse {
98
+ poll_id?: string;
99
+ message_id?: string;
100
+ question?: string;
101
+ answers?: ApiPollAnswer[];
102
+ answer_counts?: number[];
103
+ exp?: string;
104
+ is_closed?: boolean;
105
+ creator_id?: string;
106
+ type?: number;
107
+ total_votes?: number;
108
+ }
109
+ export interface ApiGetPollRequest {
110
+ poll_id?: string;
111
+ message_id?: string;
112
+ channel_id?: string;
113
+ }
114
+ export interface ApiVotePollRequest {
115
+ poll_id?: string;
116
+ message_id?: string;
117
+ channel_id?: string;
118
+ answer_indices?: number[];
119
+ }
120
+ export interface ApiClosePollRequest {
121
+ poll_id?: string;
122
+ message_id?: string;
123
+ channel_id?: string;
124
+ }
125
+ export interface ApiGetPollResponse extends ApiCreatePollResponse {
126
+ voter_details?: ApiPollVoterDetail[];
127
+ }
81
128
  /** A single user-role pair. */
82
129
  export interface ChannelUserListChannelUser {
83
130
  clan_avatar?: string;
@@ -1255,7 +1302,7 @@ export interface ApiNotificationUserChannel {
1255
1302
  active?: number;
1256
1303
  id?: string;
1257
1304
  notification_setting_type?: number;
1258
- time_mute?: string;
1305
+ time_mute?: number;
1259
1306
  channel_id?: string;
1260
1307
  }
1261
1308
  /** */
@@ -2505,4 +2552,12 @@ export declare class MezonApi {
2505
2552
  disconnectAgent(bearerToken: string, roomName?: string, channelId?: string, options?: {}): Promise<any>;
2506
2553
  listMutedChannel(bearerToken: string, clanId: string, options?: {}): Promise<ApiMutedChannelList>;
2507
2554
  channelMessageReact(bearerToken: string, clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string, emoji_id: string, emoji: string, count: number, message_sender_id: string, action_delete: boolean, topic_id?: string, emoji_recent_id?: string, sender_name?: string): Promise<ChannelMessageAck>;
2555
+ /** Create a poll in a channel. */
2556
+ createPoll(bearerToken: string, body: ApiCreatePollRequest, options?: {}): Promise<ApiCreatePollResponse>;
2557
+ /** Vote on a poll. */
2558
+ votePoll(bearerToken: string, body: ApiVotePollRequest, options?: {}): Promise<any>;
2559
+ /** Close a poll (creator only). */
2560
+ closePoll(bearerToken: string, body: ApiClosePollRequest, options?: {}): Promise<any>;
2561
+ /** Get poll details. */
2562
+ getPoll(bearerToken: string, body: ApiGetPollRequest, options?: {}): Promise<ApiGetPollResponse>;
2508
2563
  }
package/dist/client.d.ts CHANGED
@@ -13,7 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import { ApiAccount, ApiAccountEmail, ApiChannelDescList, ApiChannelDescription, ApiCreateChannelDescRequest, ApiDeleteRoleRequest, ApiClanDescList, ApiCreateClanDescRequest, ApiClanDesc, ApiCategoryDesc, ApiCategoryDescList, ApiPermissionList, ApiRoleUserList, ApiRole, ApiCreateRoleRequest, ApiAddRoleChannelDescRequest, ApiCreateCategoryDescRequest, ApiUpdateCategoryDescRequest, ApiEvent, ApiNotificationList, ApiUpdateAccountRequest, ApiSession, ApiClanProfile, ApiChannelUserList, ApiClanUserList, ApiLinkInviteUserRequest, ApiLinkInviteUser, ApiInviteUserRes, ApiUploadAttachmentRequest, ApiUploadAttachment, ApiChannelMessageHeader, ApiVoiceChannelUserList, ApiChannelAttachmentList, ApiCreateEventRequest, ApiEventManagement, ApiEventList, ApiDeleteEventRequest, ApiSetDefaultNotificationRequest, ApiSetNotificationRequest, ApiSetMuteRequest, ApiSearchMessageRequest, ApiSearchMessageResponse, ApiPinMessageRequest, ApiPinMessagesList, ApiDeleteChannelDescRequest, ApiChangeChannelPrivateRequest, ApiClanEmojiCreateRequest, MezonUpdateClanEmojiByIdBody, ApiWebhookCreateRequest, ApiWebhookListResponse, MezonUpdateWebhookByIdBody, ApiWebhookGenerateResponse, ApiClanStickerAddRequest, MezonUpdateClanStickerByIdBody, MezonChangeChannelCategoryBody, ApiUpdateRoleChannelRequest, ApiAddAppRequest, ApiAppList, ApiApp, MezonUpdateAppBody, ApiSystemMessagesList, ApiSystemMessage, ApiSystemMessageRequest, MezonUpdateSystemMessageBody, ApiUpdateCategoryOrderRequest, ApiGiveCoffeeEvent, ApiStreamingChannelUserList, ApiRegisterStreamingChannelRequest, ApiRoleList, ApiListChannelAppsResponse, ApiNotificationChannelCategorySettingList, ApiNotificationUserChannel, ApiNotificationSetting, ApiNotifiReactMessage, ApiEmojiListedResponse, ApiStickerListedResponse, ApiAllUsersAddChannelResponse, ApiRoleListEventResponse, ApiAllUserClans, ApiUserPermissionInChannelListResponse, ApiPermissionRoleChannelListEventResponse, ApiMarkAsReadRequest, ApiChannelCanvasListResponse, ApiEditChannelCanvasRequest, ApiChannelSettingListResponse, ApiAddFavoriteChannelResponse, ApiRegistFcmDeviceTokenResponse, ApiListUserActivity, ApiCreateActivityRequest, ApiLoginIDResponse, ApiLoginRequest, ApiConfirmLoginRequest, ApiUserActivity, ApiChanEncryptionMethod, ApiGetPubKeysResponse, ApiPubKey, ApiGetKeyServerResp, MezonapiListAuditLog, ApiTokenSentEvent, MezonDeleteWebhookByIdBody, ApiListOnboardingResponse, ApiCreateOnboardingRequest, MezonUpdateOnboardingBody, ApiOnboardingItem, ApiGenerateClanWebhookRequest, ApiGenerateClanWebhookResponse, ApiListClanWebhookResponse, MezonUpdateClanWebhookByIdBody, MezonUpdateClanDescBody, ApiUserStatusUpdate, ApiUserStatus, ApiListOnboardingStepResponse, MezonUpdateOnboardingStepByClanIdBody, ApiSdTopicList, ApiSdTopicRequest, ApiSdTopic, MezonUpdateEventBody, MezonapiCreateRoomChannelApps, ApiGenerateMeetTokenRequest, ApiGenerateMeetTokenResponse, ApiMezonOauthClientList, ApiMezonOauthClient, ApiCreateHashChannelAppsResponse, ApiEmojiRecentList, ApiUserEventRequest, ApiUpdateRoleOrderRequest, ApiGenerateMezonMeetResponse, ApiGenerateMeetTokenExternalResponse, ApiUpdateClanOrderRequest, ApiMessage2InboxRequest, ApiListClanDiscover, ApiClanDiscoverRequest, ApiQuickMenuAccessList, ApiQuickMenuAccessRequest, ApiForSaleItemList, ApiIsFollowerResponse, ApiIsFollowerRequest, ApiTransferOwnershipRequest, ApiMeetParticipantRequest, ApiLinkAccountConfirmRequest, ApiLinkAccountMezon, ApiUser, ApiFriend, ApiListClanUnreadMsgIndicatorResponse, ApiAddFriendsResponse, ApiUpdateUsernameRequest, ApiBannedUserList, ApiIsBannedResponse, ChannelMessage, ApiMessageMention, ApiMessageAttachment, ApiMessageRef, ApiListChannelTimelineRequest, ApiListChannelTimelineResponse, ApiCreateChannelTimelineRequest, ApiCreateChannelTimelineResponse, ApiUpdateChannelTimelineRequest, ApiUpdateChannelTimelineResponse, ApiDetailChannelTimelineRequest, ApiDetailChannelTimelineResponse, ApiMutedChannelList } from "./api";
16
+ import { ApiAccount, ApiAccountEmail, ApiChannelDescList, ApiChannelDescription, ApiCreateChannelDescRequest, ApiDeleteRoleRequest, ApiClanDescList, ApiCreateClanDescRequest, ApiClanDesc, ApiCategoryDesc, ApiCategoryDescList, ApiPermissionList, ApiRoleUserList, ApiRole, ApiCreateRoleRequest, ApiAddRoleChannelDescRequest, ApiCreateCategoryDescRequest, ApiUpdateCategoryDescRequest, ApiEvent, ApiNotificationList, ApiUpdateAccountRequest, ApiSession, ApiClanProfile, ApiChannelUserList, ApiClanUserList, ApiLinkInviteUserRequest, ApiLinkInviteUser, ApiInviteUserRes, ApiUploadAttachmentRequest, ApiUploadAttachment, ApiChannelMessageHeader, ApiVoiceChannelUserList, ApiChannelAttachmentList, ApiCreateEventRequest, ApiEventManagement, ApiEventList, ApiDeleteEventRequest, ApiSetDefaultNotificationRequest, ApiSetNotificationRequest, ApiSetMuteRequest, ApiSearchMessageRequest, ApiSearchMessageResponse, ApiPinMessageRequest, ApiPinMessagesList, ApiDeleteChannelDescRequest, ApiChangeChannelPrivateRequest, ApiClanEmojiCreateRequest, MezonUpdateClanEmojiByIdBody, ApiWebhookCreateRequest, ApiWebhookListResponse, MezonUpdateWebhookByIdBody, ApiWebhookGenerateResponse, ApiClanStickerAddRequest, MezonUpdateClanStickerByIdBody, MezonChangeChannelCategoryBody, ApiUpdateRoleChannelRequest, ApiAddAppRequest, ApiAppList, ApiApp, MezonUpdateAppBody, ApiSystemMessagesList, ApiSystemMessage, ApiSystemMessageRequest, MezonUpdateSystemMessageBody, ApiUpdateCategoryOrderRequest, ApiGiveCoffeeEvent, ApiStreamingChannelUserList, ApiRegisterStreamingChannelRequest, ApiRoleList, ApiListChannelAppsResponse, ApiNotificationChannelCategorySettingList, ApiNotificationUserChannel, ApiNotificationSetting, ApiNotifiReactMessage, ApiEmojiListedResponse, ApiStickerListedResponse, ApiAllUsersAddChannelResponse, ApiRoleListEventResponse, ApiAllUserClans, ApiCreatePollRequest, ApiCreatePollResponse, ApiGetPollRequest, ApiGetPollResponse, ApiVotePollRequest, ApiClosePollRequest, ApiUserPermissionInChannelListResponse, ApiPermissionRoleChannelListEventResponse, ApiMarkAsReadRequest, ApiChannelCanvasListResponse, ApiEditChannelCanvasRequest, ApiChannelSettingListResponse, ApiAddFavoriteChannelResponse, ApiRegistFcmDeviceTokenResponse, ApiListUserActivity, ApiCreateActivityRequest, ApiLoginIDResponse, ApiLoginRequest, ApiConfirmLoginRequest, ApiUserActivity, ApiChanEncryptionMethod, ApiGetPubKeysResponse, ApiPubKey, ApiGetKeyServerResp, MezonapiListAuditLog, ApiTokenSentEvent, MezonDeleteWebhookByIdBody, ApiListOnboardingResponse, ApiCreateOnboardingRequest, MezonUpdateOnboardingBody, ApiOnboardingItem, ApiGenerateClanWebhookRequest, ApiGenerateClanWebhookResponse, ApiListClanWebhookResponse, MezonUpdateClanWebhookByIdBody, MezonUpdateClanDescBody, ApiUserStatusUpdate, ApiUserStatus, ApiListOnboardingStepResponse, MezonUpdateOnboardingStepByClanIdBody, ApiSdTopicList, ApiSdTopicRequest, ApiSdTopic, MezonUpdateEventBody, MezonapiCreateRoomChannelApps, ApiGenerateMeetTokenRequest, ApiGenerateMeetTokenResponse, ApiMezonOauthClientList, ApiMezonOauthClient, ApiCreateHashChannelAppsResponse, ApiEmojiRecentList, ApiUserEventRequest, ApiUpdateRoleOrderRequest, ApiGenerateMezonMeetResponse, ApiGenerateMeetTokenExternalResponse, ApiUpdateClanOrderRequest, ApiMessage2InboxRequest, ApiListClanDiscover, ApiClanDiscoverRequest, ApiQuickMenuAccessList, ApiQuickMenuAccessRequest, ApiForSaleItemList, ApiIsFollowerResponse, ApiIsFollowerRequest, ApiTransferOwnershipRequest, ApiMeetParticipantRequest, ApiLinkAccountConfirmRequest, ApiLinkAccountMezon, ApiUser, ApiFriend, ApiListClanUnreadMsgIndicatorResponse, ApiAddFriendsResponse, ApiUpdateUsernameRequest, ApiBannedUserList, ApiIsBannedResponse, ChannelMessage, ApiMessageMention, ApiMessageAttachment, ApiMessageRef, ApiListChannelTimelineRequest, ApiListChannelTimelineResponse, ApiCreateChannelTimelineRequest, ApiCreateChannelTimelineResponse, ApiUpdateChannelTimelineRequest, ApiUpdateChannelTimelineResponse, ApiDetailChannelTimelineRequest, ApiDetailChannelTimelineResponse, ApiMutedChannelList } from "./api";
17
17
  import { Session } from "./session";
18
18
  import { Socket, ChannelMessageAck } from "./socket";
19
19
  import { WebSocketAdapter } from "mezon-js-protobuf";
@@ -502,4 +502,12 @@ export declare class Client {
502
502
  disconnectAgent(session: Session, roomName?: string, channelId?: string): Promise<any>;
503
503
  listMutedChannel(session: Session, clanId: string): Promise<ApiMutedChannelList>;
504
504
  channelMessageReact(session: Session, clanId: string, channelId: string, mode: number, isPublic: boolean, messageId: string, emojiId: string, emoji: string, count: number, messageSenderId: string, actionDelete: boolean, topicId?: string, emojiRecentId?: string, senderName?: string): Promise<ChannelMessageAck>;
505
+ /** Create a poll in a channel. */
506
+ createPoll(session: Session, request: ApiCreatePollRequest): Promise<ApiCreatePollResponse>;
507
+ /** Vote on a poll. */
508
+ votePoll(session: Session, request: ApiVotePollRequest): Promise<any>;
509
+ /** Close a poll (creator only). */
510
+ closePoll(session: Session, request: ApiClosePollRequest): Promise<any>;
511
+ /** Get poll details. */
512
+ getPoll(session: Session, request: ApiGetPollRequest): Promise<ApiGetPollResponse>;
505
513
  }