mezon-js 2.12.8 → 2.12.9
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 +5 -0
- package/dist/client.d.ts +2 -0
- package/dist/mezon-js.cjs.js +4 -0
- package/dist/mezon-js.esm.mjs +4 -0
- package/package.json +1 -1
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. */
|
package/dist/mezon-js.cjs.js
CHANGED
@@ -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 = {
|
package/dist/mezon-js.esm.mjs
CHANGED
@@ -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 = {
|