mezon-js 2.13.78 → 2.13.80
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 +3279 -2482
- package/dist/client.d.ts +163 -349
- package/dist/gateway.api.d.ts +33 -0
- package/dist/index.d.ts +2 -4
- package/dist/{api.gen.d.ts → mezon-js/api.gen.d.ts} +1 -0
- package/dist/mezon-js/client.d.ts +347 -0
- package/dist/mezon-js/gateway.api.d.ts +33 -0
- package/dist/mezon-js/index.d.ts +23 -0
- package/dist/mezon-js/session.d.ts +61 -0
- package/dist/mezon-js/socket.d.ts +1212 -0
- package/dist/mezon-js/types/index.d.ts +2212 -0
- package/dist/mezon-js/utils.d.ts +6 -0
- package/dist/mezon-js/web_socket_adapter.d.ts +83 -0
- package/dist/mezon-js.cjs.js +9038 -21145
- package/dist/mezon-js.esm.mjs +9038 -21145
- package/dist/mezon-js.esm.mjs.map +1 -0
- package/dist/session.d.ts +11 -11
- package/dist/socket.d.ts +385 -386
- package/dist/types/index.d.ts +2212 -0
- package/dist/utils.d.ts +2 -0
- package/dist/webrpc/index.d.ts +3 -0
- package/gateway.api.ts +577 -0
- package/index.ts +2 -5
- package/package.json +3 -2
- package/rollup.config.js +64 -30
- package/session.ts +22 -22
- package/socket.ts +921 -846
- package/types/index.ts +3883 -0
- package/utils.ts +107 -47
- package/api/api.ts +0 -39185
- package/api.gen.ts +0 -11777
- package/google/protobuf/struct.ts +0 -554
- package/google/protobuf/timestamp.ts +0 -223
- package/google/protobuf/wrappers.ts +0 -670
- /package/dist/{api → mezon-js/api}/api.d.ts +0 -0
- /package/dist/{google → mezon-js/google}/protobuf/struct.d.ts +0 -0
- /package/dist/{google → mezon-js/google}/protobuf/timestamp.d.ts +0 -0
- /package/dist/{google → mezon-js/google}/protobuf/wrappers.d.ts +0 -0
package/dist/session.d.ts
CHANGED
|
@@ -21,17 +21,17 @@ export interface ISession {
|
|
|
21
21
|
/** If the user account for this session was just created. */
|
|
22
22
|
created: boolean;
|
|
23
23
|
/** The UNIX timestamp when this session was created. */
|
|
24
|
-
readonly
|
|
24
|
+
readonly createdAt: number;
|
|
25
25
|
/** The UNIX timestamp when this session will expire. */
|
|
26
26
|
expires_at?: number;
|
|
27
27
|
/** The UNIX timestamp when the refresh token will expire. */
|
|
28
28
|
refresh_expires_at?: number;
|
|
29
29
|
/** Refresh token that can be used for session token renewal. */
|
|
30
|
-
|
|
30
|
+
refreshToken: string;
|
|
31
31
|
/** The username of the user who owns this session. */
|
|
32
32
|
username?: string;
|
|
33
33
|
/** The ID of the user who owns this session. */
|
|
34
|
-
|
|
34
|
+
userId?: string;
|
|
35
35
|
/** Any custom properties associated with this session. */
|
|
36
36
|
vars?: object;
|
|
37
37
|
/** Validate token */
|
|
@@ -42,20 +42,20 @@ export interface ISession {
|
|
|
42
42
|
}
|
|
43
43
|
export declare class Session implements ISession {
|
|
44
44
|
readonly created: boolean;
|
|
45
|
-
readonly
|
|
46
|
-
readonly
|
|
45
|
+
readonly apiUrl: string;
|
|
46
|
+
readonly idToken: string;
|
|
47
47
|
token: string;
|
|
48
|
-
readonly
|
|
48
|
+
readonly createdAt: number;
|
|
49
49
|
expires_at?: number;
|
|
50
50
|
refresh_expires_at?: number;
|
|
51
|
-
|
|
51
|
+
refreshToken: string;
|
|
52
52
|
username?: string;
|
|
53
|
-
|
|
53
|
+
userId?: string;
|
|
54
54
|
vars?: object;
|
|
55
|
-
|
|
56
|
-
constructor(token: string,
|
|
55
|
+
isRemember?: boolean;
|
|
56
|
+
constructor(token: string, refreshToken: string, created: boolean, apiUrl: string, idToken: string, isRemember: boolean);
|
|
57
57
|
isexpired(currenttime: number): boolean;
|
|
58
58
|
isrefreshexpired(currenttime: number): boolean;
|
|
59
59
|
update(token: string, refreshToken: string, isRemember: boolean): void;
|
|
60
|
-
static restore(token: string, refreshToken: string,
|
|
60
|
+
static restore(token: string, refreshToken: string, apiUrl: string, isRemember: boolean): Session;
|
|
61
61
|
}
|