mezon-js 2.13.42 → 2.13.44
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 +3 -0
- package/client.ts +0 -10
- package/dist/api.gen.d.ts +2 -0
- package/dist/client.d.ts +0 -6
- package/dist/mezon-js.cjs.js +0 -9
- package/dist/mezon-js.esm.mjs +0 -9
- package/package.json +1 -1
package/api.gen.ts
CHANGED
|
@@ -24,6 +24,8 @@ export interface ChannelUserListChannelUser {
|
|
|
24
24
|
added_by?: string;
|
|
25
25
|
// is banned
|
|
26
26
|
is_banned?: boolean;
|
|
27
|
+
// expired time
|
|
28
|
+
expired_ban_time?: number;
|
|
27
29
|
}
|
|
28
30
|
|
|
29
31
|
/** */
|
|
@@ -2291,6 +2293,7 @@ export interface ApiRole {
|
|
|
2291
2293
|
export interface ApiIsBannedResponse {
|
|
2292
2294
|
//
|
|
2293
2295
|
is_banned?: boolean;
|
|
2296
|
+
expired_ban_time?: number;
|
|
2294
2297
|
}
|
|
2295
2298
|
|
|
2296
2299
|
/** A list of role description, usually a result of a list operation. */
|
package/client.ts
CHANGED
|
@@ -471,15 +471,6 @@ export class Client {
|
|
|
471
471
|
this.apiClient = new MezonApi(serverkey, timeout, basePath);
|
|
472
472
|
}
|
|
473
473
|
|
|
474
|
-
/**
|
|
475
|
-
* Called when a token refresh is initiated.
|
|
476
|
-
* This is a placeholder method that subclasses or instances can override
|
|
477
|
-
* to perform actions before or after the refresh logic.
|
|
478
|
-
*/
|
|
479
|
-
onRefreshSession(session: ApiSession): void {
|
|
480
|
-
console.log(`Token refresh occurred. Token: ${session.token}`);
|
|
481
|
-
}
|
|
482
|
-
|
|
483
474
|
/** check session isexpired */
|
|
484
475
|
isexpired(session: Session): boolean {
|
|
485
476
|
return session.isexpired(Date.now() / 1000)
|
|
@@ -2119,7 +2110,6 @@ export class Client {
|
|
|
2119
2110
|
}
|
|
2120
2111
|
);
|
|
2121
2112
|
session.update(apiSession.token!, apiSession.refresh_token!, apiSession.is_remember || false);
|
|
2122
|
-
this.onRefreshSession(apiSession);
|
|
2123
2113
|
resolve(session);
|
|
2124
2114
|
} catch (error) {
|
|
2125
2115
|
console.error("Session refresh failed:", error);
|
package/dist/api.gen.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export interface ChannelUserListChannelUser {
|
|
|
9
9
|
user_id?: string;
|
|
10
10
|
added_by?: string;
|
|
11
11
|
is_banned?: boolean;
|
|
12
|
+
expired_ban_time?: number;
|
|
12
13
|
}
|
|
13
14
|
/** */
|
|
14
15
|
export interface ApiBannedUser {
|
|
@@ -1310,6 +1311,7 @@ export interface ApiRole {
|
|
|
1310
1311
|
/** */
|
|
1311
1312
|
export interface ApiIsBannedResponse {
|
|
1312
1313
|
is_banned?: boolean;
|
|
1314
|
+
expired_ban_time?: number;
|
|
1313
1315
|
}
|
|
1314
1316
|
/** A list of role description, usually a result of a list operation. */
|
|
1315
1317
|
export interface ApiRoleList {
|
package/dist/client.d.ts
CHANGED
|
@@ -230,12 +230,6 @@ export declare class Client {
|
|
|
230
230
|
port: string;
|
|
231
231
|
useSSL: boolean;
|
|
232
232
|
constructor(serverkey?: string, host?: string, port?: string, useSSL?: boolean, timeout?: number, autoRefreshSession?: boolean);
|
|
233
|
-
/**
|
|
234
|
-
* Called when a token refresh is initiated.
|
|
235
|
-
* This is a placeholder method that subclasses or instances can override
|
|
236
|
-
* to perform actions before or after the refresh logic.
|
|
237
|
-
*/
|
|
238
|
-
onRefreshSession(session: ApiSession): void;
|
|
239
233
|
/** check session isexpired */
|
|
240
234
|
isexpired(session: Session): boolean;
|
|
241
235
|
/** Authenticate a user with a custom id against the server. */
|
package/dist/mezon-js.cjs.js
CHANGED
|
@@ -8546,14 +8546,6 @@ var Client = class {
|
|
|
8546
8546
|
const basePath = `${scheme}${host}:${port}`;
|
|
8547
8547
|
this.apiClient = new MezonApi(serverkey, timeout, basePath);
|
|
8548
8548
|
}
|
|
8549
|
-
/**
|
|
8550
|
-
* Called when a token refresh is initiated.
|
|
8551
|
-
* This is a placeholder method that subclasses or instances can override
|
|
8552
|
-
* to perform actions before or after the refresh logic.
|
|
8553
|
-
*/
|
|
8554
|
-
onRefreshSession(session) {
|
|
8555
|
-
console.log(`Token refresh occurred. Token: ${session.token}`);
|
|
8556
|
-
}
|
|
8557
8549
|
/** check session isexpired */
|
|
8558
8550
|
isexpired(session) {
|
|
8559
8551
|
return session.isexpired(Date.now() / 1e3);
|
|
@@ -9581,7 +9573,6 @@ var Client = class {
|
|
|
9581
9573
|
}
|
|
9582
9574
|
);
|
|
9583
9575
|
session.update(apiSession.token, apiSession.refresh_token, apiSession.is_remember || false);
|
|
9584
|
-
this.onRefreshSession(apiSession);
|
|
9585
9576
|
resolve(session);
|
|
9586
9577
|
} catch (error) {
|
|
9587
9578
|
console.error("Session refresh failed:", error);
|
package/dist/mezon-js.esm.mjs
CHANGED
|
@@ -8512,14 +8512,6 @@ var Client = class {
|
|
|
8512
8512
|
const basePath = `${scheme}${host}:${port}`;
|
|
8513
8513
|
this.apiClient = new MezonApi(serverkey, timeout, basePath);
|
|
8514
8514
|
}
|
|
8515
|
-
/**
|
|
8516
|
-
* Called when a token refresh is initiated.
|
|
8517
|
-
* This is a placeholder method that subclasses or instances can override
|
|
8518
|
-
* to perform actions before or after the refresh logic.
|
|
8519
|
-
*/
|
|
8520
|
-
onRefreshSession(session) {
|
|
8521
|
-
console.log(`Token refresh occurred. Token: ${session.token}`);
|
|
8522
|
-
}
|
|
8523
8515
|
/** check session isexpired */
|
|
8524
8516
|
isexpired(session) {
|
|
8525
8517
|
return session.isexpired(Date.now() / 1e3);
|
|
@@ -9547,7 +9539,6 @@ var Client = class {
|
|
|
9547
9539
|
}
|
|
9548
9540
|
);
|
|
9549
9541
|
session.update(apiSession.token, apiSession.refresh_token, apiSession.is_remember || false);
|
|
9550
|
-
this.onRefreshSession(apiSession);
|
|
9551
9542
|
resolve(session);
|
|
9552
9543
|
} catch (error) {
|
|
9553
9544
|
console.error("Session refresh failed:", error);
|