mezon-js 2.12.8 → 2.12.10

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/client.ts CHANGED
@@ -584,6 +584,11 @@ export class Client {
584
584
  this.apiClient = new MezonApi(serverkey, timeout, basePath);
585
585
  }
586
586
 
587
+ /** check session isexpired */
588
+ isexpired(session: Session): boolean {
589
+ return session.isexpired(Date.now() / 1000)
590
+ }
591
+
587
592
  /** Authenticate a user with a custom id against the server. */
588
593
  authenticateMezon(
589
594
  token: string,
package/dist/client.d.ts CHANGED
@@ -352,6 +352,8 @@ export declare class Client {
352
352
  port: string;
353
353
  useSSL: boolean;
354
354
  constructor(serverkey?: string, host?: string, port?: string, useSSL?: boolean, timeout?: number, autoRefreshSession?: boolean);
355
+ /** check session isexpired */
356
+ isexpired(session: Session): boolean;
355
357
  /** Authenticate a user with a custom id against the server. */
356
358
  authenticateMezon(token: string, create?: boolean, username?: string, isRemember?: boolean, vars?: Record<string, string>, options?: any): Promise<Session>;
357
359
  /** Authenticate a user with an email+password against the server. */
@@ -7893,6 +7893,10 @@ var Client = class {
7893
7893
  const basePath = `${scheme}${host}:${port}`;
7894
7894
  this.apiClient = new MezonApi(serverkey, timeout, basePath);
7895
7895
  }
7896
+ /** check session isexpired */
7897
+ isexpired(session) {
7898
+ return session.isexpired(Date.now() / 1e3);
7899
+ }
7896
7900
  /** Authenticate a user with a custom id against the server. */
7897
7901
  authenticateMezon(token, create, username, isRemember, vars = {}, options = {}) {
7898
7902
  const request = {
@@ -7859,6 +7859,10 @@ var Client = class {
7859
7859
  const basePath = `${scheme}${host}:${port}`;
7860
7860
  this.apiClient = new MezonApi(serverkey, timeout, basePath);
7861
7861
  }
7862
+ /** check session isexpired */
7863
+ isexpired(session) {
7864
+ return session.isexpired(Date.now() / 1e3);
7865
+ }
7862
7866
  /** Authenticate a user with a custom id against the server. */
7863
7867
  authenticateMezon(token, create, username, isRemember, vars = {}, options = {}) {
7864
7868
  const request = {
package/dist/socket.d.ts CHANGED
@@ -139,6 +139,7 @@ export interface UserChannelRemovedEvent {
139
139
  user_ids: string[];
140
140
  channel_type: number;
141
141
  clan_id: string;
142
+ badge_counts: number[];
142
143
  }
143
144
  export interface UserClanRemovedEvent {
144
145
  clan_id: string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mezon-js",
3
3
 
4
- "version": "2.12.8",
4
+ "version": "2.12.10",
5
5
 
6
6
  "scripts": {
7
7
  "build": "npx tsc && npx rollup -c --bundleConfigAsCjs && node build.mjs"
package/socket.ts CHANGED
@@ -204,6 +204,8 @@ export interface UserChannelRemovedEvent {
204
204
  channel_type: number;
205
205
  // the clan id
206
206
  clan_id: string;
207
+ // badge_count
208
+ badge_counts: number[];
207
209
  }
208
210
 
209
211
  export interface UserClanRemovedEvent {