mezon-js 2.13.46 → 2.13.47
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/dist/mezon-js.cjs.js +5 -5
- package/dist/mezon-js.esm.mjs +5 -5
- package/dist/session.d.ts +3 -5
- package/package.json +1 -1
- package/session.ts +4 -6
package/dist/mezon-js.cjs.js
CHANGED
|
@@ -7207,14 +7207,14 @@ var MezonApi = class {
|
|
|
7207
7207
|
|
|
7208
7208
|
// session.ts
|
|
7209
7209
|
var Session = class _Session {
|
|
7210
|
-
constructor(token, refresh_token, created,
|
|
7210
|
+
constructor(token, refresh_token, created, api_url, id_token, is_remember) {
|
|
7211
7211
|
this.created = created;
|
|
7212
|
-
this.
|
|
7213
|
-
this.
|
|
7212
|
+
this.api_url = api_url;
|
|
7213
|
+
this.id_token = id_token;
|
|
7214
7214
|
this.token = token;
|
|
7215
7215
|
this.refresh_token = refresh_token;
|
|
7216
|
-
this.id_token =
|
|
7217
|
-
this.api_url =
|
|
7216
|
+
this.id_token = id_token;
|
|
7217
|
+
this.api_url = api_url;
|
|
7218
7218
|
this.created_at = Math.floor((/* @__PURE__ */ new Date()).getTime() / 1e3);
|
|
7219
7219
|
this.is_remember = is_remember;
|
|
7220
7220
|
this.update(token, refresh_token, is_remember);
|
package/dist/mezon-js.esm.mjs
CHANGED
|
@@ -7173,14 +7173,14 @@ var MezonApi = class {
|
|
|
7173
7173
|
|
|
7174
7174
|
// session.ts
|
|
7175
7175
|
var Session = class _Session {
|
|
7176
|
-
constructor(token, refresh_token, created,
|
|
7176
|
+
constructor(token, refresh_token, created, api_url, id_token, is_remember) {
|
|
7177
7177
|
this.created = created;
|
|
7178
|
-
this.
|
|
7179
|
-
this.
|
|
7178
|
+
this.api_url = api_url;
|
|
7179
|
+
this.id_token = id_token;
|
|
7180
7180
|
this.token = token;
|
|
7181
7181
|
this.refresh_token = refresh_token;
|
|
7182
|
-
this.id_token =
|
|
7183
|
-
this.api_url =
|
|
7182
|
+
this.id_token = id_token;
|
|
7183
|
+
this.api_url = api_url;
|
|
7184
7184
|
this.created_at = Math.floor((/* @__PURE__ */ new Date()).getTime() / 1e3);
|
|
7185
7185
|
this.is_remember = is_remember;
|
|
7186
7186
|
this.update(token, refresh_token, is_remember);
|
package/dist/session.d.ts
CHANGED
|
@@ -42,12 +42,10 @@ export interface ISession {
|
|
|
42
42
|
}
|
|
43
43
|
export declare class Session implements ISession {
|
|
44
44
|
readonly created: boolean;
|
|
45
|
-
readonly apiurl: string;
|
|
46
|
-
readonly idtoken: string;
|
|
47
|
-
token: string;
|
|
48
|
-
readonly created_at: number;
|
|
49
45
|
readonly api_url: string;
|
|
50
46
|
readonly id_token: string;
|
|
47
|
+
token: string;
|
|
48
|
+
readonly created_at: number;
|
|
51
49
|
expires_at?: number;
|
|
52
50
|
refresh_expires_at?: number;
|
|
53
51
|
refresh_token: string;
|
|
@@ -55,7 +53,7 @@ export declare class Session implements ISession {
|
|
|
55
53
|
user_id?: string;
|
|
56
54
|
vars?: object;
|
|
57
55
|
is_remember?: boolean;
|
|
58
|
-
constructor(token: string, refresh_token: string, created: boolean,
|
|
56
|
+
constructor(token: string, refresh_token: string, created: boolean, api_url: string, id_token: string, is_remember: boolean);
|
|
59
57
|
isexpired(currenttime: number): boolean;
|
|
60
58
|
isrefreshexpired(currenttime: number): boolean;
|
|
61
59
|
update(token: string, refreshToken: string, isRemember: boolean): void;
|
package/package.json
CHANGED
package/session.ts
CHANGED
|
@@ -50,8 +50,6 @@ export class Session implements ISession {
|
|
|
50
50
|
|
|
51
51
|
token : string;
|
|
52
52
|
readonly created_at: number;
|
|
53
|
-
readonly api_url: string;
|
|
54
|
-
readonly id_token: string;
|
|
55
53
|
expires_at?: number;
|
|
56
54
|
refresh_expires_at?: number;
|
|
57
55
|
refresh_token: string;
|
|
@@ -64,13 +62,13 @@ export class Session implements ISession {
|
|
|
64
62
|
token: string,
|
|
65
63
|
refresh_token: string,
|
|
66
64
|
readonly created: boolean,
|
|
67
|
-
readonly
|
|
68
|
-
readonly
|
|
65
|
+
readonly api_url: string,
|
|
66
|
+
readonly id_token: string,
|
|
69
67
|
is_remember: boolean) {
|
|
70
68
|
this.token = token;
|
|
71
69
|
this.refresh_token = refresh_token;
|
|
72
|
-
this.id_token =
|
|
73
|
-
this.api_url =
|
|
70
|
+
this.id_token = id_token;
|
|
71
|
+
this.api_url = api_url;
|
|
74
72
|
this.created_at = Math.floor(new Date().getTime() / 1000);
|
|
75
73
|
this.is_remember = is_remember;
|
|
76
74
|
this.update(token, refresh_token, is_remember);
|