mezon-js 2.7.64 → 2.7.66

Sign up to get free protection for your applications and to get access to all the features.
package/api.gen.ts CHANGED
@@ -343,6 +343,8 @@ export interface ApiChannelDescription {
343
343
  //creator ID.
344
344
  creator_id?: string;
345
345
  //
346
+ last_pin_message?: string;
347
+ //
346
348
  last_seen_message?: ApiChannelMessageHeader;
347
349
  //
348
350
  last_sent_message?: ApiChannelMessageHeader;
package/client.ts CHANGED
@@ -96,7 +96,8 @@ import {
96
96
  ApiChangeChannelPrivateRequest,
97
97
  ApiClanEmojiList,
98
98
  ApiClanEmojiCreateRequest,
99
- ApiChannelVoiceList
99
+ ApiChannelVoiceList,
100
+ MezonUpdateClanEmojiByIdBody
100
101
  } from "./api.gen";
101
102
 
102
103
  import { Session } from "./session";
@@ -2258,4 +2259,28 @@ async createClanEmoji(session: Session, request: ApiClanEmojiCreateRequest) {
2258
2259
  });
2259
2260
  }
2260
2261
 
2262
+ //**update clan emoji by id */
2263
+ async updateClanEmojiById(session :Session,id:string,request: MezonUpdateClanEmojiByIdBody) {
2264
+ if (this.autoRefreshSession && session.refresh_token &&
2265
+ session.isexpired((Date.now() + this.expiredTimespanMs)/1000)) {
2266
+ await this.sessionRefresh(session);
2267
+ }
2268
+
2269
+ return this.apiClient.updateClanEmojiById(session.token,id,request).then((response: any) => {
2270
+ return response !== undefined;
2271
+ });
2272
+ }
2273
+
2274
+ //**delete clan emoji by id */
2275
+ async deleteByIdClanEmoji(session:Session,id:string) {
2276
+ if (this.autoRefreshSession && session.refresh_token &&
2277
+ session.isexpired((Date.now() + this.expiredTimespanMs)/1000)) {
2278
+ await this.sessionRefresh(session);
2279
+ }
2280
+
2281
+ return this.apiClient.deleteByIdClanEmoji(session.token,id).then((response: any) => {
2282
+ return response !== undefined;
2283
+ });
2284
+ }
2285
+
2261
2286
  };
package/dist/api.gen.d.ts CHANGED
@@ -197,6 +197,7 @@ export interface ApiChannelDescription {
197
197
  clan_id?: string;
198
198
  count_mess_unread?: number;
199
199
  creator_id?: string;
200
+ last_pin_message?: string;
200
201
  last_seen_message?: ApiChannelMessageHeader;
201
202
  last_sent_message?: ApiChannelMessageHeader;
202
203
  meeting_code?: 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, ApiRoleList, ApiPermissionList, ApiRoleUserList, ApiRole, ApiCreateRoleRequest, ApiAddRoleChannelDescRequest, ApiCreateCategoryDescRequest, ApiUpdateCategoryDescRequest, ApiDeleteStorageObjectsRequest, ApiEvent, ApiReadStorageObjectsRequest, ApiStorageObjectAcks, ApiUpdateAccountRequest, ApiAccountApple, ApiLinkSteamRequest, ApiClanDescProfile, ApiClanProfile, ApiChannelUserList, ApiClanUserList, ApiLinkInviteUserRequest, ApiUpdateEventRequest, ApiLinkInviteUser, ApiInviteUserRes, ApiUploadAttachmentRequest, ApiUploadAttachment, ApiMessageReaction, ApiMessageMention, ApiMessageAttachment, ApiMessageRef, ApiChannelMessageHeader, ApiVoiceChannelUserList, ApiChannelAttachmentList, ApiCreateEventRequest, ApiEventManagement, ApiEventList, ApiDeleteEventRequest, ApiNotificationChannelCategoySettingsList, ApiNotificationSetting, ApiSetDefaultNotificationRequest, ApiNotificationUserChannel, ApiSetNotificationRequest, ApiNotifiReactMessage, ApiSetMuteNotificationRequest, ApiSearchMessageRequest, ApiSearchMessageResponse, ApiPinMessageRequest, ApiPinMessagesList, ApiCreateWebhookRequest, ApiWebhookResponse, ApiDeleteChannelDescRequest, ApiChangeChannelPrivateRequest, ApiClanEmojiList, ApiClanEmojiCreateRequest, ApiChannelVoiceList } from "./api.gen";
16
+ import { ApiAccount, ApiAccountCustom, ApiAccountDevice, ApiAccountEmail, ApiAccountFacebook, ApiAccountFacebookInstantGame, ApiAccountGoogle, ApiAccountGameCenter, ApiAccountSteam, ApiChannelDescList, ApiChannelDescription, ApiCreateChannelDescRequest, ApiDeleteRoleRequest, ApiClanDescList, ApiCreateClanDescRequest, ApiClanDesc, ApiCategoryDesc, ApiCategoryDescList, ApiRoleList, ApiPermissionList, ApiRoleUserList, ApiRole, ApiCreateRoleRequest, ApiAddRoleChannelDescRequest, ApiCreateCategoryDescRequest, ApiUpdateCategoryDescRequest, ApiDeleteStorageObjectsRequest, ApiEvent, ApiReadStorageObjectsRequest, ApiStorageObjectAcks, ApiUpdateAccountRequest, ApiAccountApple, ApiLinkSteamRequest, ApiClanDescProfile, ApiClanProfile, ApiChannelUserList, ApiClanUserList, ApiLinkInviteUserRequest, ApiUpdateEventRequest, ApiLinkInviteUser, ApiInviteUserRes, ApiUploadAttachmentRequest, ApiUploadAttachment, ApiMessageReaction, ApiMessageMention, ApiMessageAttachment, ApiMessageRef, ApiChannelMessageHeader, ApiVoiceChannelUserList, ApiChannelAttachmentList, ApiCreateEventRequest, ApiEventManagement, ApiEventList, ApiDeleteEventRequest, ApiNotificationChannelCategoySettingsList, ApiNotificationSetting, ApiSetDefaultNotificationRequest, ApiNotificationUserChannel, ApiSetNotificationRequest, ApiNotifiReactMessage, ApiSetMuteNotificationRequest, ApiSearchMessageRequest, ApiSearchMessageResponse, ApiPinMessageRequest, ApiPinMessagesList, ApiCreateWebhookRequest, ApiWebhookResponse, ApiDeleteChannelDescRequest, ApiChangeChannelPrivateRequest, ApiClanEmojiList, ApiClanEmojiCreateRequest, ApiChannelVoiceList, MezonUpdateClanEmojiByIdBody } from "./api.gen";
17
17
  import { Session } from "./session";
18
18
  import { Socket } from "./socket";
19
19
  import { WebSocketAdapter } from "./web_socket_adapter";
@@ -582,4 +582,6 @@ export declare class Client {
582
582
  listClanEmoji(session: Session, clan_id: string): Promise<ApiClanEmojiList>;
583
583
  /** create clan emoji */
584
584
  createClanEmoji(session: Session, request: ApiClanEmojiCreateRequest): Promise<boolean>;
585
+ updateClanEmojiById(session: Session, id: string, request: MezonUpdateClanEmojiByIdBody): Promise<boolean>;
586
+ deleteByIdClanEmoji(session: Session, id: string): Promise<boolean>;
585
587
  }
@@ -6469,4 +6469,26 @@ var Client = class {
6469
6469
  });
6470
6470
  });
6471
6471
  }
6472
+ //**update clan emoji by id */
6473
+ updateClanEmojiById(session, id, request) {
6474
+ return __async(this, null, function* () {
6475
+ if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
6476
+ yield this.sessionRefresh(session);
6477
+ }
6478
+ return this.apiClient.updateClanEmojiById(session.token, id, request).then((response) => {
6479
+ return response !== void 0;
6480
+ });
6481
+ });
6482
+ }
6483
+ //**delete clan emoji by id */
6484
+ deleteByIdClanEmoji(session, id) {
6485
+ return __async(this, null, function* () {
6486
+ if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
6487
+ yield this.sessionRefresh(session);
6488
+ }
6489
+ return this.apiClient.deleteByIdClanEmoji(session.token, id).then((response) => {
6490
+ return response !== void 0;
6491
+ });
6492
+ });
6493
+ }
6472
6494
  };
@@ -6440,6 +6440,28 @@ var Client = class {
6440
6440
  });
6441
6441
  });
6442
6442
  }
6443
+ //**update clan emoji by id */
6444
+ updateClanEmojiById(session, id, request) {
6445
+ return __async(this, null, function* () {
6446
+ if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
6447
+ yield this.sessionRefresh(session);
6448
+ }
6449
+ return this.apiClient.updateClanEmojiById(session.token, id, request).then((response) => {
6450
+ return response !== void 0;
6451
+ });
6452
+ });
6453
+ }
6454
+ //**delete clan emoji by id */
6455
+ deleteByIdClanEmoji(session, id) {
6456
+ return __async(this, null, function* () {
6457
+ if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
6458
+ yield this.sessionRefresh(session);
6459
+ }
6460
+ return this.apiClient.deleteByIdClanEmoji(session.token, id).then((response) => {
6461
+ return response !== void 0;
6462
+ });
6463
+ });
6464
+ }
6443
6465
  };
6444
6466
  export {
6445
6467
  ChannelStreamMode,
package/dist/socket.d.ts CHANGED
@@ -27,6 +27,8 @@ export interface Presence {
27
27
  username: string;
28
28
  /** The node the user is connected to. */
29
29
  node: string;
30
+ /** The status of the user */
31
+ status: string;
30
32
  }
31
33
  /** A response from a channel join operation. */
32
34
  export interface Channel {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mezon-js",
3
- "version": "2.7.64",
3
+ "version": "2.7.66",
4
4
  "scripts": {
5
5
  "build": "npx tsc && npx rollup -c --bundleConfigAsCjs && node build.mjs"
6
6
  },
package/socket.ts CHANGED
@@ -34,6 +34,8 @@ export interface Presence {
34
34
  username: string;
35
35
  /** The node the user is connected to. */
36
36
  node: string;
37
+ /** The status of the user */
38
+ status: string;
37
39
  }
38
40
 
39
41
  /** A response from a channel join operation. */