mezon-js 2.13.43 → 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 +1 -0
- package/client.ts +0 -10
- 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
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/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);
|