mezon-js 2.9.42 → 2.9.45

Sign up to get free protection for your applications and to get access to all the features.
package/api.gen.ts CHANGED
@@ -560,6 +560,10 @@ export interface ApiChannelCanvasDetailResponse {
560
560
 
561
561
  /** */
562
562
  export interface ApiChannelCanvasItem {
563
+ //
564
+ content?: string;
565
+ //
566
+ creator_id?: string;
563
567
  //
564
568
  id?: string;
565
569
  //
@@ -2111,6 +2115,8 @@ export interface ApiUser {
2111
2115
  //The id of the user's account.
2112
2116
  id?: string;
2113
2117
  //
2118
+ is_mobile?: boolean;
2119
+ //
2114
2120
  join_time?: string;
2115
2121
  //The language expected to be a tag which follows the BCP-47 spec.
2116
2122
  lang_tag?: string;
package/client.ts CHANGED
@@ -125,6 +125,7 @@ import {
125
125
  ApiEditChannelCanvasRequest,
126
126
  ApiChannelSettingListResponse,
127
127
  ApiAddFavoriteChannelResponse,
128
+ ApiRegistFcmDeviceTokenResponse,
128
129
  } from "./api.gen";
129
130
 
130
131
  import { Session } from "./session";
@@ -1635,6 +1636,7 @@ export class Client {
1635
1636
  lang_tag: gu.user!.lang_tag,
1636
1637
  location: gu.user!.location,
1637
1638
  online: gu.user!.online,
1639
+ is_mobile: gu.user?.is_mobile,
1638
1640
  steam_id: gu.user!.steam_id,
1639
1641
  timezone: gu.user!.timezone,
1640
1642
  update_time: gu.user!.update_time,
@@ -1838,7 +1840,7 @@ export class Client {
1838
1840
  tokenId: string,
1839
1841
  deviceId: string,
1840
1842
  platform: string
1841
- ): Promise<boolean> {
1843
+ ): Promise<ApiRegistFcmDeviceTokenResponse> {
1842
1844
  if (
1843
1845
  this.autoRefreshSession &&
1844
1846
  session.refresh_token &&
@@ -1850,7 +1852,7 @@ export class Client {
1850
1852
  return this.apiClient
1851
1853
  .registFCMDeviceToken(session.token, tokenId, deviceId, platform)
1852
1854
  .then((response: any) => {
1853
- return response !== undefined;
1855
+ return Promise.resolve(response);
1854
1856
  });
1855
1857
  }
1856
1858
 
package/dist/api.gen.d.ts CHANGED
@@ -331,6 +331,8 @@ export interface ApiChannelCanvasDetailResponse {
331
331
  }
332
332
  /** */
333
333
  export interface ApiChannelCanvasItem {
334
+ content?: string;
335
+ creator_id?: string;
334
336
  id?: string;
335
337
  is_default?: boolean;
336
338
  title?: string;
@@ -1226,6 +1228,7 @@ export interface ApiUser {
1226
1228
  gamecenter_id?: string;
1227
1229
  google_id?: string;
1228
1230
  id?: string;
1231
+ is_mobile?: boolean;
1229
1232
  join_time?: string;
1230
1233
  lang_tag?: string;
1231
1234
  location?: string;
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, ApiAccountCustom, ApiAccountDevice, ApiAccountEmail, ApiAccountFacebook, ApiAccountFacebookInstantGame, ApiAccountGoogle, ApiAccountGameCenter, ApiAccountSteam, ApiChannelDescList, ApiChannelDescription, ApiCreateChannelDescRequest, ApiDeleteRoleRequest, ApiClanDescList, ApiCreateClanDescRequest, ApiClanDesc, ApiCategoryDesc, ApiCategoryDescList, ApiPermissionList, ApiRoleUserList, ApiRole, ApiCreateRoleRequest, ApiAddRoleChannelDescRequest, ApiCreateCategoryDescRequest, ApiUpdateCategoryDescRequest, ApiEvent, ApiUpdateAccountRequest, ApiAccountApple, ApiLinkSteamRequest, ApiClanDescProfile, ApiClanProfile, ApiChannelUserList, ApiClanUserList, ApiLinkInviteUserRequest, ApiUpdateEventRequest, 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, ApiEditChannelCanvasRequest, ApiChannelSettingListResponse, ApiAddFavoriteChannelResponse } from "./api.gen";
16
+ import { ApiAccount, ApiAccountCustom, ApiAccountDevice, ApiAccountEmail, ApiAccountFacebook, ApiAccountFacebookInstantGame, ApiAccountGoogle, ApiAccountGameCenter, ApiAccountSteam, ApiChannelDescList, ApiChannelDescription, ApiCreateChannelDescRequest, ApiDeleteRoleRequest, ApiClanDescList, ApiCreateClanDescRequest, ApiClanDesc, ApiCategoryDesc, ApiCategoryDescList, ApiPermissionList, ApiRoleUserList, ApiRole, ApiCreateRoleRequest, ApiAddRoleChannelDescRequest, ApiCreateCategoryDescRequest, ApiUpdateCategoryDescRequest, ApiEvent, ApiUpdateAccountRequest, ApiAccountApple, ApiLinkSteamRequest, ApiClanDescProfile, ApiClanProfile, ApiChannelUserList, ApiClanUserList, ApiLinkInviteUserRequest, ApiUpdateEventRequest, 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, ApiEditChannelCanvasRequest, ApiChannelSettingListResponse, ApiAddFavoriteChannelResponse, ApiRegistFcmDeviceTokenResponse } from "./api.gen";
17
17
  import { Session } from "./session";
18
18
  import { Socket } from "./socket";
19
19
  import { WebSocketAdapter } from "./web_socket_adapter";
@@ -427,7 +427,7 @@ export declare class Client {
427
427
  listRolePermissions(session: Session, roleId: string): Promise<ApiPermissionList>;
428
428
  /** List user roles */
429
429
  listRoleUsers(session: Session, roleId: string, limit?: number, cursor?: string): Promise<ApiRoleUserList>;
430
- registFCMDeviceToken(session: Session, tokenId: string, deviceId: string, platform: string): Promise<boolean>;
430
+ registFCMDeviceToken(session: Session, tokenId: string, deviceId: string, platform: string): Promise<ApiRegistFcmDeviceTokenResponse>;
431
431
  /** Get a clan desc profile */
432
432
  getClanDescProfile(session: Session, clanId: string): Promise<ApiClanDescProfile>;
433
433
  getUserProfileOnClan(session: Session, clanId: string): Promise<ApiClanProfile>;
@@ -7431,6 +7431,7 @@ var Client = class {
7431
7431
  return Promise.resolve(result);
7432
7432
  }
7433
7433
  response.clan_users.forEach((gu) => {
7434
+ var _a;
7434
7435
  result.clan_users.push({
7435
7436
  user: {
7436
7437
  avatar_url: gu.user.avatar_url,
@@ -7444,6 +7445,7 @@ var Client = class {
7444
7445
  lang_tag: gu.user.lang_tag,
7445
7446
  location: gu.user.location,
7446
7447
  online: gu.user.online,
7448
+ is_mobile: (_a = gu.user) == null ? void 0 : _a.is_mobile,
7447
7449
  steam_id: gu.user.steam_id,
7448
7450
  timezone: gu.user.timezone,
7449
7451
  update_time: gu.user.update_time,
@@ -7573,7 +7575,7 @@ var Client = class {
7573
7575
  yield this.sessionRefresh(session);
7574
7576
  }
7575
7577
  return this.apiClient.registFCMDeviceToken(session.token, tokenId, deviceId, platform).then((response) => {
7576
- return response !== void 0;
7578
+ return Promise.resolve(response);
7577
7579
  });
7578
7580
  });
7579
7581
  }
@@ -7402,6 +7402,7 @@ var Client = class {
7402
7402
  return Promise.resolve(result);
7403
7403
  }
7404
7404
  response.clan_users.forEach((gu) => {
7405
+ var _a;
7405
7406
  result.clan_users.push({
7406
7407
  user: {
7407
7408
  avatar_url: gu.user.avatar_url,
@@ -7415,6 +7416,7 @@ var Client = class {
7415
7416
  lang_tag: gu.user.lang_tag,
7416
7417
  location: gu.user.location,
7417
7418
  online: gu.user.online,
7419
+ is_mobile: (_a = gu.user) == null ? void 0 : _a.is_mobile,
7418
7420
  steam_id: gu.user.steam_id,
7419
7421
  timezone: gu.user.timezone,
7420
7422
  update_time: gu.user.update_time,
@@ -7544,7 +7546,7 @@ var Client = class {
7544
7546
  yield this.sessionRefresh(session);
7545
7547
  }
7546
7548
  return this.apiClient.registFCMDeviceToken(session.token, tokenId, deviceId, platform).then((response) => {
7547
- return response !== void 0;
7549
+ return Promise.resolve(response);
7548
7550
  });
7549
7551
  });
7550
7552
  }
package/dist/socket.d.ts CHANGED
@@ -92,6 +92,8 @@ export interface UserProfileRedis {
92
92
  custom_status: string;
93
93
  /** create time */
94
94
  create_time_second: number;
95
+ /** online */
96
+ online: boolean;
95
97
  }
96
98
  /** UserChannelAddedEvent */
97
99
  export interface UserChannelAddedEvent {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mezon-js",
3
3
 
4
- "version": "2.9.42",
4
+ "version": "2.9.45",
5
5
 
6
6
  "scripts": {
7
7
  "build": "npx tsc && npx rollup -c --bundleConfigAsCjs && node build.mjs"
package/socket.ts CHANGED
@@ -114,6 +114,8 @@ export interface UserProfileRedis {
114
114
  custom_status: string;
115
115
  /** create time */
116
116
  create_time_second: number;
117
+ /** online */
118
+ online: boolean;
117
119
  }
118
120
 
119
121
  /** UserChannelAddedEvent */