mezon-js 2.13.7 → 2.13.8
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/api.gen.ts +1 -1
- package/client.ts +6 -113
- package/dist/client.d.ts +3 -104
- package/dist/mezon-js.cjs.js +2 -1
- package/dist/mezon-js.esm.mjs +2 -1
- package/package.json +1 -1
package/api.gen.ts
CHANGED
package/client.ts
CHANGED
@@ -174,6 +174,8 @@ import {
|
|
174
174
|
ApiStoreWalletKeyRequest,
|
175
175
|
ApiLinkAccountConfirmRequest,
|
176
176
|
ApiLinkAccountMezon,
|
177
|
+
ApiUser,
|
178
|
+
ApiFriend,
|
177
179
|
} from "./api.gen";
|
178
180
|
|
179
181
|
import { Session } from "./session";
|
@@ -309,124 +311,16 @@ export interface ChannelMessageList {
|
|
309
311
|
prev_cursor?: string;
|
310
312
|
}
|
311
313
|
|
312
|
-
/** A user in the system. */
|
313
|
-
export interface User {
|
314
|
-
/** A URL for an avatar image. */
|
315
|
-
avatar_url?: string;
|
316
|
-
/** The UNIX time when the user was created. */
|
317
|
-
create_time?: string;
|
318
|
-
/** The display name of the user. */
|
319
|
-
display_name?: string;
|
320
|
-
/** Number of related edges to this user. */
|
321
|
-
edge_count?: number;
|
322
|
-
/** The id of the user's account. */
|
323
|
-
id?: string;
|
324
|
-
/** The language expected to be a tag which follows the BCP-47 spec. */
|
325
|
-
lang_tag?: string;
|
326
|
-
/** The location set by the user. */
|
327
|
-
location?: string;
|
328
|
-
/** Additional information stored as a JSON object. */
|
329
|
-
metadata?: { status?: string; user_status?: string };
|
330
|
-
/** Indicates whether the user is currently online. */
|
331
|
-
online?: boolean;
|
332
|
-
/** The timezone set by the user. */
|
333
|
-
timezone?: string;
|
334
|
-
/** The UNIX time when the user was last updated. */
|
335
|
-
update_time?: string;
|
336
|
-
/** The username of the user's account. */
|
337
|
-
username?: string;
|
338
|
-
//
|
339
|
-
is_mobile?: boolean;
|
340
|
-
}
|
341
|
-
|
342
314
|
/** A collection of zero or more users. */
|
343
315
|
export interface Users {
|
344
316
|
/** The User objects. */
|
345
|
-
users?: Array<
|
346
|
-
}
|
347
|
-
|
348
|
-
/** A friend of a user. */
|
349
|
-
export interface Friend {
|
350
|
-
/** The friend status. */
|
351
|
-
state?: number;
|
352
|
-
/** The user object. */
|
353
|
-
user?: User;
|
354
|
-
//Source ID
|
355
|
-
source_id?: string;
|
317
|
+
users?: Array<ApiUser>;
|
356
318
|
}
|
357
319
|
|
358
320
|
/** A collection of zero or more friends of the user. */
|
359
321
|
export interface Friends {
|
360
322
|
/** The Friend objects. */
|
361
|
-
friends?: Array<
|
362
|
-
/** Cursor for the next page of results, if any. */
|
363
|
-
cursor?: string;
|
364
|
-
}
|
365
|
-
|
366
|
-
/** A user-role pair representing the user's role in a group. */
|
367
|
-
export interface GroupUser {
|
368
|
-
/** The user. */
|
369
|
-
user?: User;
|
370
|
-
/** Their role within the group. */
|
371
|
-
state?: number;
|
372
|
-
}
|
373
|
-
|
374
|
-
/** A list of users belonging to a group along with their role in it. */
|
375
|
-
export interface GroupUserList {
|
376
|
-
/** The user-role pairs. */
|
377
|
-
group_users?: Array<GroupUser>;
|
378
|
-
/** Cursor for the next page of results, if any. */
|
379
|
-
cursor?: string;
|
380
|
-
}
|
381
|
-
|
382
|
-
/** A group in the server. */
|
383
|
-
export interface Group {
|
384
|
-
/** A URL for an avatar image. */
|
385
|
-
avatar_url?: string;
|
386
|
-
/** The UNIX time when the group was created. */
|
387
|
-
create_time?: string;
|
388
|
-
/** The id of the user who created the group. */
|
389
|
-
creator_id?: string;
|
390
|
-
/** A description for the group. */
|
391
|
-
description?: string;
|
392
|
-
/** The current count of all members in the group. */
|
393
|
-
edge_count?: number;
|
394
|
-
/** The id of a group. */
|
395
|
-
id?: string;
|
396
|
-
/** The language expected to be a tag which follows the BCP-47 spec. */
|
397
|
-
lang_tag?: string;
|
398
|
-
/** The maximum number of members allowed. */
|
399
|
-
max_count?: number;
|
400
|
-
/** Additional information stored as a JSON object. */
|
401
|
-
metadata?: {};
|
402
|
-
/** The unique name of the group. */
|
403
|
-
name?: string;
|
404
|
-
/** Anyone can join open groups, otherwise only admins can accept members. */
|
405
|
-
open?: boolean;
|
406
|
-
/** The UNIX time when the group was last updated. */
|
407
|
-
update_time?: string;
|
408
|
-
}
|
409
|
-
|
410
|
-
/** One or more groups returned from a listing operation. */
|
411
|
-
export interface GroupList {
|
412
|
-
/** A cursor used to get the next page. */
|
413
|
-
cursor?: string;
|
414
|
-
/** One or more groups. */
|
415
|
-
groups?: Array<Group>;
|
416
|
-
}
|
417
|
-
|
418
|
-
/** A group-role pair representing the user's groups and their role in each. */
|
419
|
-
export interface UserGroup {
|
420
|
-
/** The group. */
|
421
|
-
group?: Group;
|
422
|
-
/** The user's role within the group. */
|
423
|
-
state?: number;
|
424
|
-
}
|
425
|
-
|
426
|
-
/** A list of groups belonging to a user along with their role in it. */
|
427
|
-
export interface UserGroupList {
|
428
|
-
/** The group-role pairs. */
|
429
|
-
user_groups?: Array<UserGroup>;
|
323
|
+
friends?: Array<ApiFriend>;
|
430
324
|
/** Cursor for the next page of results, if any. */
|
431
325
|
cursor?: string;
|
432
326
|
}
|
@@ -1911,9 +1805,8 @@ export class Client {
|
|
1911
1805
|
update_time: f.user!.update_time,
|
1912
1806
|
username: f.user!.username,
|
1913
1807
|
is_mobile: f.user?.is_mobile,
|
1914
|
-
|
1915
|
-
|
1916
|
-
: undefined,
|
1808
|
+
user_status: f.user!.user_status,
|
1809
|
+
status: f.user!.status
|
1917
1810
|
},
|
1918
1811
|
state: f.state,
|
1919
1812
|
source_id: f.source_id,
|
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, ApiAccountMezon, 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, ApiMessageReaction, ApiMessageMention, ApiMessageAttachment, ApiMessageRef, ApiChannelMessageHeader, ApiVoiceChannelUserList, ApiChannelAttachmentList, ApiCreateEventRequest, ApiEventManagement, ApiEventList, ApiDeleteEventRequest, ApiSetDefaultNotificationRequest, ApiSetNotificationRequest, ApiSetMuteNotificationRequest, ApiSearchMessageRequest, ApiSearchMessageResponse, ApiPinMessageRequest, ApiPinMessagesList, ApiDeleteChannelDescRequest, ApiChangeChannelPrivateRequest, ApiClanEmojiCreateRequest, MezonUpdateClanEmojiByIdBody, ApiWebhookCreateRequest, ApiWebhookListResponse, MezonUpdateWebhookByIdBody, ApiWebhookGenerateResponse, ApiCheckDuplicateClanNameResponse, ApiClanStickerAddRequest, MezonUpdateClanStickerByIdBody, MezonChangeChannelCategoryBody, ApiUpdateRoleChannelRequest, ApiAddAppRequest, ApiAppList, ApiApp, MezonUpdateAppBody, ApiSystemMessagesList, ApiSystemMessage, ApiSystemMessageRequest, MezonUpdateSystemMessageBody, ApiUpdateCategoryOrderRequest, ApiGiveCoffeeEvent, ApiListStreamingChannelsResponse, ApiStreamingChannelUserList, ApiRegisterStreamingChannelRequest, ApiRoleList, ApiListChannelAppsResponse, ApiNotificationChannelCategorySettingList, ApiNotificationUserChannel, ApiNotificationSetting, ApiNotifiReactMessage, ApiHashtagDmList, 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, ApiWalletLedgerList, ApiSdTopicList, ApiSdTopicRequest, ApiSdTopic, MezonUpdateEventBody, ApiTransactionDetail, MezonapiCreateRoomChannelApps, ApiGenerateMeetTokenRequest, ApiGenerateMeetTokenResponse, ApiMezonOauthClientList, ApiMezonOauthClient, ApiCreateHashChannelAppsResponse, ApiEmojiRecentList, ApiUserEventRequest, ApiUpdateRoleOrderRequest, ApiGenerateMezonMeetResponse, ApiGenerateMeetTokenExternalResponse, ApiUpdateClanOrderRequest, ApiMessage2InboxRequest, ApiListClanDiscover, ApiClanDiscoverRequest, ApiQuickMenuAccessList, ApiQuickMenuAccessRequest, ApiUnlockedItemRequest, ApiForSaleItemList, ApiUnlockedItemResponse, ApiIsFollowerResponse, ApiIsFollowerRequest, ApiTransferOwnershipRequest, ApiMeetParticipantRequest, ApiStoreWalletKeyRequest, ApiLinkAccountConfirmRequest, ApiLinkAccountMezon } from "./api.gen";
|
16
|
+
import { ApiAccount, ApiAccountMezon, 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, ApiMessageReaction, ApiMessageMention, ApiMessageAttachment, ApiMessageRef, ApiChannelMessageHeader, ApiVoiceChannelUserList, ApiChannelAttachmentList, ApiCreateEventRequest, ApiEventManagement, ApiEventList, ApiDeleteEventRequest, ApiSetDefaultNotificationRequest, ApiSetNotificationRequest, ApiSetMuteNotificationRequest, ApiSearchMessageRequest, ApiSearchMessageResponse, ApiPinMessageRequest, ApiPinMessagesList, ApiDeleteChannelDescRequest, ApiChangeChannelPrivateRequest, ApiClanEmojiCreateRequest, MezonUpdateClanEmojiByIdBody, ApiWebhookCreateRequest, ApiWebhookListResponse, MezonUpdateWebhookByIdBody, ApiWebhookGenerateResponse, ApiCheckDuplicateClanNameResponse, ApiClanStickerAddRequest, MezonUpdateClanStickerByIdBody, MezonChangeChannelCategoryBody, ApiUpdateRoleChannelRequest, ApiAddAppRequest, ApiAppList, ApiApp, MezonUpdateAppBody, ApiSystemMessagesList, ApiSystemMessage, ApiSystemMessageRequest, MezonUpdateSystemMessageBody, ApiUpdateCategoryOrderRequest, ApiGiveCoffeeEvent, ApiListStreamingChannelsResponse, ApiStreamingChannelUserList, ApiRegisterStreamingChannelRequest, ApiRoleList, ApiListChannelAppsResponse, ApiNotificationChannelCategorySettingList, ApiNotificationUserChannel, ApiNotificationSetting, ApiNotifiReactMessage, ApiHashtagDmList, 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, ApiWalletLedgerList, ApiSdTopicList, ApiSdTopicRequest, ApiSdTopic, MezonUpdateEventBody, ApiTransactionDetail, MezonapiCreateRoomChannelApps, ApiGenerateMeetTokenRequest, ApiGenerateMeetTokenResponse, ApiMezonOauthClientList, ApiMezonOauthClient, ApiCreateHashChannelAppsResponse, ApiEmojiRecentList, ApiUserEventRequest, ApiUpdateRoleOrderRequest, ApiGenerateMezonMeetResponse, ApiGenerateMeetTokenExternalResponse, ApiUpdateClanOrderRequest, ApiMessage2InboxRequest, ApiListClanDiscover, ApiClanDiscoverRequest, ApiQuickMenuAccessList, ApiQuickMenuAccessRequest, ApiUnlockedItemRequest, ApiForSaleItemList, ApiUnlockedItemResponse, ApiIsFollowerResponse, ApiIsFollowerRequest, ApiTransferOwnershipRequest, ApiMeetParticipantRequest, ApiStoreWalletKeyRequest, ApiLinkAccountConfirmRequest, ApiLinkAccountMezon, ApiUser, ApiFriend } from "./api.gen";
|
17
17
|
import { Session } from "./session";
|
18
18
|
import { Socket } from "./socket";
|
19
19
|
import { WebSocketAdapter } from "./web_socket_adapter";
|
@@ -105,116 +105,15 @@ export interface ChannelMessageList {
|
|
105
105
|
/** The cursor to send when retrieving the previous page, if any. */
|
106
106
|
prev_cursor?: string;
|
107
107
|
}
|
108
|
-
/** A user in the system. */
|
109
|
-
export interface User {
|
110
|
-
/** A URL for an avatar image. */
|
111
|
-
avatar_url?: string;
|
112
|
-
/** The UNIX time when the user was created. */
|
113
|
-
create_time?: string;
|
114
|
-
/** The display name of the user. */
|
115
|
-
display_name?: string;
|
116
|
-
/** Number of related edges to this user. */
|
117
|
-
edge_count?: number;
|
118
|
-
/** The id of the user's account. */
|
119
|
-
id?: string;
|
120
|
-
/** The language expected to be a tag which follows the BCP-47 spec. */
|
121
|
-
lang_tag?: string;
|
122
|
-
/** The location set by the user. */
|
123
|
-
location?: string;
|
124
|
-
/** Additional information stored as a JSON object. */
|
125
|
-
metadata?: {
|
126
|
-
status?: string;
|
127
|
-
user_status?: string;
|
128
|
-
};
|
129
|
-
/** Indicates whether the user is currently online. */
|
130
|
-
online?: boolean;
|
131
|
-
/** The timezone set by the user. */
|
132
|
-
timezone?: string;
|
133
|
-
/** The UNIX time when the user was last updated. */
|
134
|
-
update_time?: string;
|
135
|
-
/** The username of the user's account. */
|
136
|
-
username?: string;
|
137
|
-
is_mobile?: boolean;
|
138
|
-
}
|
139
108
|
/** A collection of zero or more users. */
|
140
109
|
export interface Users {
|
141
110
|
/** The User objects. */
|
142
|
-
users?: Array<
|
143
|
-
}
|
144
|
-
/** A friend of a user. */
|
145
|
-
export interface Friend {
|
146
|
-
/** The friend status. */
|
147
|
-
state?: number;
|
148
|
-
/** The user object. */
|
149
|
-
user?: User;
|
150
|
-
source_id?: string;
|
111
|
+
users?: Array<ApiUser>;
|
151
112
|
}
|
152
113
|
/** A collection of zero or more friends of the user. */
|
153
114
|
export interface Friends {
|
154
115
|
/** The Friend objects. */
|
155
|
-
friends?: Array<
|
156
|
-
/** Cursor for the next page of results, if any. */
|
157
|
-
cursor?: string;
|
158
|
-
}
|
159
|
-
/** A user-role pair representing the user's role in a group. */
|
160
|
-
export interface GroupUser {
|
161
|
-
/** The user. */
|
162
|
-
user?: User;
|
163
|
-
/** Their role within the group. */
|
164
|
-
state?: number;
|
165
|
-
}
|
166
|
-
/** A list of users belonging to a group along with their role in it. */
|
167
|
-
export interface GroupUserList {
|
168
|
-
/** The user-role pairs. */
|
169
|
-
group_users?: Array<GroupUser>;
|
170
|
-
/** Cursor for the next page of results, if any. */
|
171
|
-
cursor?: string;
|
172
|
-
}
|
173
|
-
/** A group in the server. */
|
174
|
-
export interface Group {
|
175
|
-
/** A URL for an avatar image. */
|
176
|
-
avatar_url?: string;
|
177
|
-
/** The UNIX time when the group was created. */
|
178
|
-
create_time?: string;
|
179
|
-
/** The id of the user who created the group. */
|
180
|
-
creator_id?: string;
|
181
|
-
/** A description for the group. */
|
182
|
-
description?: string;
|
183
|
-
/** The current count of all members in the group. */
|
184
|
-
edge_count?: number;
|
185
|
-
/** The id of a group. */
|
186
|
-
id?: string;
|
187
|
-
/** The language expected to be a tag which follows the BCP-47 spec. */
|
188
|
-
lang_tag?: string;
|
189
|
-
/** The maximum number of members allowed. */
|
190
|
-
max_count?: number;
|
191
|
-
/** Additional information stored as a JSON object. */
|
192
|
-
metadata?: {};
|
193
|
-
/** The unique name of the group. */
|
194
|
-
name?: string;
|
195
|
-
/** Anyone can join open groups, otherwise only admins can accept members. */
|
196
|
-
open?: boolean;
|
197
|
-
/** The UNIX time when the group was last updated. */
|
198
|
-
update_time?: string;
|
199
|
-
}
|
200
|
-
/** One or more groups returned from a listing operation. */
|
201
|
-
export interface GroupList {
|
202
|
-
/** A cursor used to get the next page. */
|
203
|
-
cursor?: string;
|
204
|
-
/** One or more groups. */
|
205
|
-
groups?: Array<Group>;
|
206
|
-
}
|
207
|
-
/** A group-role pair representing the user's groups and their role in each. */
|
208
|
-
export interface UserGroup {
|
209
|
-
/** The group. */
|
210
|
-
group?: Group;
|
211
|
-
/** The user's role within the group. */
|
212
|
-
state?: number;
|
213
|
-
}
|
214
|
-
/** A list of groups belonging to a user along with their role in it. */
|
215
|
-
export interface UserGroupList {
|
216
|
-
/** The group-role pairs. */
|
217
|
-
user_groups?: Array<UserGroup>;
|
116
|
+
friends?: Array<ApiFriend>;
|
218
117
|
/** Cursor for the next page of results, if any. */
|
219
118
|
cursor?: string;
|
220
119
|
}
|
package/dist/mezon-js.cjs.js
CHANGED
@@ -9172,7 +9172,8 @@ var Client = class {
|
|
9172
9172
|
update_time: f.user.update_time,
|
9173
9173
|
username: f.user.username,
|
9174
9174
|
is_mobile: (_a = f.user) == null ? void 0 : _a.is_mobile,
|
9175
|
-
|
9175
|
+
user_status: f.user.user_status,
|
9176
|
+
status: f.user.status
|
9176
9177
|
},
|
9177
9178
|
state: f.state,
|
9178
9179
|
source_id: f.source_id
|
package/dist/mezon-js.esm.mjs
CHANGED
@@ -9138,7 +9138,8 @@ var Client = class {
|
|
9138
9138
|
update_time: f.user.update_time,
|
9139
9139
|
username: f.user.username,
|
9140
9140
|
is_mobile: (_a = f.user) == null ? void 0 : _a.is_mobile,
|
9141
|
-
|
9141
|
+
user_status: f.user.user_status,
|
9142
|
+
status: f.user.status
|
9142
9143
|
},
|
9143
9144
|
state: f.state,
|
9144
9145
|
source_id: f.source_id
|