entity-client 1.0.22 → 1.0.23
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/EntityAppServerApi.d.ts +48 -32
- package/dist/EntityServerApi.d.ts +24 -16
- package/dist/client/base.d.ts +5 -2
- package/dist/client/base.js +1 -1
- package/dist/client/base.js.map +3 -3
- package/dist/client/request.d.ts +2 -0
- package/dist/client/request.js +1 -1
- package/dist/client/request.js.map +3 -3
- package/dist/index.js +1 -1
- package/dist/index.js.map +3 -3
- package/dist/mixins/app/plugins/alimtalk.d.ts +3 -2
- package/dist/mixins/app/plugins/friendtalk.d.ts +3 -2
- package/dist/mixins/app/plugins/holidays.d.ts +3 -2
- package/dist/mixins/app/plugins/identity.d.ts +3 -2
- package/dist/mixins/app/plugins/llm.d.ts +3 -2
- package/dist/mixins/app/plugins/ocr.d.ts +3 -2
- package/dist/mixins/app/plugins/pg.d.ts +3 -2
- package/dist/mixins/app/plugins/push.d.ts +3 -2
- package/dist/mixins/app/plugins/sms.d.ts +3 -2
- package/dist/mixins/app/plugins/taxinvoice.d.ts +3 -2
- package/dist/mixins/app/routes/account.d.ts +3 -2
- package/dist/mixins/app/routes/board.d.ts +3 -2
- package/dist/mixins/app/routes/email-verify.d.ts +3 -2
- package/dist/mixins/app/routes/oauth.d.ts +3 -2
- package/dist/mixins/app/routes/password-reset.d.ts +3 -2
- package/dist/mixins/app/routes/two-factor.d.ts +3 -2
- package/dist/mixins/server/admin.d.ts +3 -2
- package/dist/mixins/server/auth.d.ts +4 -2
- package/dist/mixins/server/auth.js +1 -1
- package/dist/mixins/server/auth.js.map +3 -3
- package/dist/mixins/server/entity.d.ts +3 -2
- package/dist/mixins/server/file.d.ts +3 -2
- package/dist/mixins/server/push.d.ts +3 -2
- package/dist/mixins/server/smtp.d.ts +3 -2
- package/dist/mixins/server/transaction.d.ts +3 -2
- package/dist/mixins/server/utils.d.ts +3 -2
- package/dist/react.js +1 -1
- package/dist/react.js.map +3 -3
- package/dist/types.d.ts +0 -1
- package/package.json +1 -1
|
@@ -19,6 +19,7 @@ export declare function AlimtalkMixin<TBase extends GConstructor<EntityServerCli
|
|
|
19
19
|
csrfHeaderName: string;
|
|
20
20
|
csrfCookieName: string;
|
|
21
21
|
csrfRefresher: (() => Promise<void>) | null;
|
|
22
|
+
requestAbortControllers: Map<string, AbortController>;
|
|
22
23
|
activeTxId: string | null;
|
|
23
24
|
keepSession: boolean;
|
|
24
25
|
refreshBuffer: number;
|
|
@@ -31,7 +32,6 @@ export declare function AlimtalkMixin<TBase extends GConstructor<EntityServerCli
|
|
|
31
32
|
healthTickPromise: Promise<unknown> | null;
|
|
32
33
|
realtimeEnabled: boolean;
|
|
33
34
|
realtimePath: string;
|
|
34
|
-
realtimeAutoConnect: boolean;
|
|
35
35
|
realtimeAutoReconnect: boolean;
|
|
36
36
|
realtimeReconnectDelayMs: number;
|
|
37
37
|
realtimeStatus: import("../../../types.js").RealtimeConnectionStatus;
|
|
@@ -44,6 +44,7 @@ export declare function AlimtalkMixin<TBase extends GConstructor<EntityServerCli
|
|
|
44
44
|
realtimeEventListeners: Map<string, Set<import("../../../types.js").RealtimeMessageListener>>;
|
|
45
45
|
configure(options: Partial<import("../../../types.js").EntityServerClientOptions>): void;
|
|
46
46
|
setToken(token: string): void;
|
|
47
|
+
setAccessTokenFromResponse(token: string): void;
|
|
47
48
|
setAnonymousPacketToken(token: string): void;
|
|
48
49
|
setApiKey(apiKey: string): void;
|
|
49
50
|
setHmacSecret(secret: string): void;
|
|
@@ -60,7 +61,7 @@ export declare function AlimtalkMixin<TBase extends GConstructor<EntityServerCli
|
|
|
60
61
|
sendRealtime(message: import("../../../types.js").RealtimeEnvelope | Record<string, unknown>): boolean;
|
|
61
62
|
subscribeRealtime(subscriptions: string[]): boolean;
|
|
62
63
|
unsubscribeRealtime(subscriptions: string[]): boolean;
|
|
63
|
-
startHealthTick(intervalMs?: number): void;
|
|
64
|
+
startHealthTick(intervalMs?: number, runImmediately?: boolean): void;
|
|
64
65
|
stopHealthTick(): void;
|
|
65
66
|
scheduleKeepSession(refreshToken: string, expiresIn: number, refreshFn: (rt: string) => Promise<{
|
|
66
67
|
access_token: string;
|
|
@@ -13,6 +13,7 @@ export declare function FriendtalkMixin<TBase extends GConstructor<EntityServerC
|
|
|
13
13
|
csrfHeaderName: string;
|
|
14
14
|
csrfCookieName: string;
|
|
15
15
|
csrfRefresher: (() => Promise<void>) | null;
|
|
16
|
+
requestAbortControllers: Map<string, AbortController>;
|
|
16
17
|
activeTxId: string | null;
|
|
17
18
|
keepSession: boolean;
|
|
18
19
|
refreshBuffer: number;
|
|
@@ -25,7 +26,6 @@ export declare function FriendtalkMixin<TBase extends GConstructor<EntityServerC
|
|
|
25
26
|
healthTickPromise: Promise<unknown> | null;
|
|
26
27
|
realtimeEnabled: boolean;
|
|
27
28
|
realtimePath: string;
|
|
28
|
-
realtimeAutoConnect: boolean;
|
|
29
29
|
realtimeAutoReconnect: boolean;
|
|
30
30
|
realtimeReconnectDelayMs: number;
|
|
31
31
|
realtimeStatus: import("../../../types.js").RealtimeConnectionStatus;
|
|
@@ -38,6 +38,7 @@ export declare function FriendtalkMixin<TBase extends GConstructor<EntityServerC
|
|
|
38
38
|
realtimeEventListeners: Map<string, Set<import("../../../types.js").RealtimeMessageListener>>;
|
|
39
39
|
configure(options: Partial<import("../../../types.js").EntityServerClientOptions>): void;
|
|
40
40
|
setToken(token: string): void;
|
|
41
|
+
setAccessTokenFromResponse(token: string): void;
|
|
41
42
|
setAnonymousPacketToken(token: string): void;
|
|
42
43
|
setApiKey(apiKey: string): void;
|
|
43
44
|
setHmacSecret(secret: string): void;
|
|
@@ -54,7 +55,7 @@ export declare function FriendtalkMixin<TBase extends GConstructor<EntityServerC
|
|
|
54
55
|
sendRealtime(message: import("../../../types.js").RealtimeEnvelope | Record<string, unknown>): boolean;
|
|
55
56
|
subscribeRealtime(subscriptions: string[]): boolean;
|
|
56
57
|
unsubscribeRealtime(subscriptions: string[]): boolean;
|
|
57
|
-
startHealthTick(intervalMs?: number): void;
|
|
58
|
+
startHealthTick(intervalMs?: number, runImmediately?: boolean): void;
|
|
58
59
|
stopHealthTick(): void;
|
|
59
60
|
scheduleKeepSession(refreshToken: string, expiresIn: number, refreshFn: (rt: string) => Promise<{
|
|
60
61
|
access_token: string;
|
|
@@ -21,6 +21,7 @@ export declare function HolidaysMixin<TBase extends GConstructor<EntityServerCli
|
|
|
21
21
|
csrfHeaderName: string;
|
|
22
22
|
csrfCookieName: string;
|
|
23
23
|
csrfRefresher: (() => Promise<void>) | null;
|
|
24
|
+
requestAbortControllers: Map<string, AbortController>;
|
|
24
25
|
activeTxId: string | null;
|
|
25
26
|
keepSession: boolean;
|
|
26
27
|
refreshBuffer: number;
|
|
@@ -33,7 +34,6 @@ export declare function HolidaysMixin<TBase extends GConstructor<EntityServerCli
|
|
|
33
34
|
healthTickPromise: Promise<unknown> | null;
|
|
34
35
|
realtimeEnabled: boolean;
|
|
35
36
|
realtimePath: string;
|
|
36
|
-
realtimeAutoConnect: boolean;
|
|
37
37
|
realtimeAutoReconnect: boolean;
|
|
38
38
|
realtimeReconnectDelayMs: number;
|
|
39
39
|
realtimeStatus: import("../../../types.js").RealtimeConnectionStatus;
|
|
@@ -46,6 +46,7 @@ export declare function HolidaysMixin<TBase extends GConstructor<EntityServerCli
|
|
|
46
46
|
realtimeEventListeners: Map<string, Set<import("../../../types.js").RealtimeMessageListener>>;
|
|
47
47
|
configure(options: Partial<import("../../../types.js").EntityServerClientOptions>): void;
|
|
48
48
|
setToken(token: string): void;
|
|
49
|
+
setAccessTokenFromResponse(token: string): void;
|
|
49
50
|
setAnonymousPacketToken(token: string): void;
|
|
50
51
|
setApiKey(apiKey: string): void;
|
|
51
52
|
setHmacSecret(secret: string): void;
|
|
@@ -62,7 +63,7 @@ export declare function HolidaysMixin<TBase extends GConstructor<EntityServerCli
|
|
|
62
63
|
sendRealtime(message: import("../../../types.js").RealtimeEnvelope | Record<string, unknown>): boolean;
|
|
63
64
|
subscribeRealtime(subscriptions: string[]): boolean;
|
|
64
65
|
unsubscribeRealtime(subscriptions: string[]): boolean;
|
|
65
|
-
startHealthTick(intervalMs?: number): void;
|
|
66
|
+
startHealthTick(intervalMs?: number, runImmediately?: boolean): void;
|
|
66
67
|
stopHealthTick(): void;
|
|
67
68
|
scheduleKeepSession(refreshToken: string, expiresIn: number, refreshFn: (rt: string) => Promise<{
|
|
68
69
|
access_token: string;
|
|
@@ -19,6 +19,7 @@ export declare function IdentityMixin<TBase extends GConstructor<EntityServerCli
|
|
|
19
19
|
csrfHeaderName: string;
|
|
20
20
|
csrfCookieName: string;
|
|
21
21
|
csrfRefresher: (() => Promise<void>) | null;
|
|
22
|
+
requestAbortControllers: Map<string, AbortController>;
|
|
22
23
|
activeTxId: string | null;
|
|
23
24
|
keepSession: boolean;
|
|
24
25
|
refreshBuffer: number;
|
|
@@ -31,7 +32,6 @@ export declare function IdentityMixin<TBase extends GConstructor<EntityServerCli
|
|
|
31
32
|
healthTickPromise: Promise<unknown> | null;
|
|
32
33
|
realtimeEnabled: boolean;
|
|
33
34
|
realtimePath: string;
|
|
34
|
-
realtimeAutoConnect: boolean;
|
|
35
35
|
realtimeAutoReconnect: boolean;
|
|
36
36
|
realtimeReconnectDelayMs: number;
|
|
37
37
|
realtimeStatus: import("../../../types.js").RealtimeConnectionStatus;
|
|
@@ -44,6 +44,7 @@ export declare function IdentityMixin<TBase extends GConstructor<EntityServerCli
|
|
|
44
44
|
realtimeEventListeners: Map<string, Set<import("../../../types.js").RealtimeMessageListener>>;
|
|
45
45
|
configure(options: Partial<import("../../../types.js").EntityServerClientOptions>): void;
|
|
46
46
|
setToken(token: string): void;
|
|
47
|
+
setAccessTokenFromResponse(token: string): void;
|
|
47
48
|
setAnonymousPacketToken(token: string): void;
|
|
48
49
|
setApiKey(apiKey: string): void;
|
|
49
50
|
setHmacSecret(secret: string): void;
|
|
@@ -60,7 +61,7 @@ export declare function IdentityMixin<TBase extends GConstructor<EntityServerCli
|
|
|
60
61
|
sendRealtime(message: import("../../../types.js").RealtimeEnvelope | Record<string, unknown>): boolean;
|
|
61
62
|
subscribeRealtime(subscriptions: string[]): boolean;
|
|
62
63
|
unsubscribeRealtime(subscriptions: string[]): boolean;
|
|
63
|
-
startHealthTick(intervalMs?: number): void;
|
|
64
|
+
startHealthTick(intervalMs?: number, runImmediately?: boolean): void;
|
|
64
65
|
stopHealthTick(): void;
|
|
65
66
|
scheduleKeepSession(refreshToken: string, expiresIn: number, refreshFn: (rt: string) => Promise<{
|
|
66
67
|
access_token: string;
|
|
@@ -81,6 +81,7 @@ export declare function LlmMixin<TBase extends GConstructor<EntityServerClientBa
|
|
|
81
81
|
csrfHeaderName: string;
|
|
82
82
|
csrfCookieName: string;
|
|
83
83
|
csrfRefresher: (() => Promise<void>) | null;
|
|
84
|
+
requestAbortControllers: Map<string, AbortController>;
|
|
84
85
|
activeTxId: string | null;
|
|
85
86
|
keepSession: boolean;
|
|
86
87
|
refreshBuffer: number;
|
|
@@ -93,7 +94,6 @@ export declare function LlmMixin<TBase extends GConstructor<EntityServerClientBa
|
|
|
93
94
|
healthTickPromise: Promise<unknown> | null;
|
|
94
95
|
realtimeEnabled: boolean;
|
|
95
96
|
realtimePath: string;
|
|
96
|
-
realtimeAutoConnect: boolean;
|
|
97
97
|
realtimeAutoReconnect: boolean;
|
|
98
98
|
realtimeReconnectDelayMs: number;
|
|
99
99
|
realtimeStatus: import("../../../types.js").RealtimeConnectionStatus;
|
|
@@ -106,6 +106,7 @@ export declare function LlmMixin<TBase extends GConstructor<EntityServerClientBa
|
|
|
106
106
|
realtimeEventListeners: Map<string, Set<import("../../../types.js").RealtimeMessageListener>>;
|
|
107
107
|
configure(options: Partial<import("../../../types.js").EntityServerClientOptions>): void;
|
|
108
108
|
setToken(token: string): void;
|
|
109
|
+
setAccessTokenFromResponse(token: string): void;
|
|
109
110
|
setAnonymousPacketToken(token: string): void;
|
|
110
111
|
setApiKey(apiKey: string): void;
|
|
111
112
|
setHmacSecret(secret: string): void;
|
|
@@ -122,7 +123,7 @@ export declare function LlmMixin<TBase extends GConstructor<EntityServerClientBa
|
|
|
122
123
|
sendRealtime(message: import("../../../types.js").RealtimeEnvelope | Record<string, unknown>): boolean;
|
|
123
124
|
subscribeRealtime(subscriptions: string[]): boolean;
|
|
124
125
|
unsubscribeRealtime(subscriptions: string[]): boolean;
|
|
125
|
-
startHealthTick(intervalMs?: number): void;
|
|
126
|
+
startHealthTick(intervalMs?: number, runImmediately?: boolean): void;
|
|
126
127
|
stopHealthTick(): void;
|
|
127
128
|
scheduleKeepSession(refreshToken: string, expiresIn: number, refreshFn: (rt: string) => Promise<{
|
|
128
129
|
access_token: string;
|
|
@@ -27,6 +27,7 @@ export declare function OcrMixin<TBase extends GConstructor<EntityServerClientBa
|
|
|
27
27
|
csrfHeaderName: string;
|
|
28
28
|
csrfCookieName: string;
|
|
29
29
|
csrfRefresher: (() => Promise<void>) | null;
|
|
30
|
+
requestAbortControllers: Map<string, AbortController>;
|
|
30
31
|
activeTxId: string | null;
|
|
31
32
|
keepSession: boolean;
|
|
32
33
|
refreshBuffer: number;
|
|
@@ -39,7 +40,6 @@ export declare function OcrMixin<TBase extends GConstructor<EntityServerClientBa
|
|
|
39
40
|
healthTickPromise: Promise<unknown> | null;
|
|
40
41
|
realtimeEnabled: boolean;
|
|
41
42
|
realtimePath: string;
|
|
42
|
-
realtimeAutoConnect: boolean;
|
|
43
43
|
realtimeAutoReconnect: boolean;
|
|
44
44
|
realtimeReconnectDelayMs: number;
|
|
45
45
|
realtimeStatus: import("../../../types.js").RealtimeConnectionStatus;
|
|
@@ -52,6 +52,7 @@ export declare function OcrMixin<TBase extends GConstructor<EntityServerClientBa
|
|
|
52
52
|
realtimeEventListeners: Map<string, Set<import("../../../types.js").RealtimeMessageListener>>;
|
|
53
53
|
configure(options: Partial<import("../../../types.js").EntityServerClientOptions>): void;
|
|
54
54
|
setToken(token: string): void;
|
|
55
|
+
setAccessTokenFromResponse(token: string): void;
|
|
55
56
|
setAnonymousPacketToken(token: string): void;
|
|
56
57
|
setApiKey(apiKey: string): void;
|
|
57
58
|
setHmacSecret(secret: string): void;
|
|
@@ -68,7 +69,7 @@ export declare function OcrMixin<TBase extends GConstructor<EntityServerClientBa
|
|
|
68
69
|
sendRealtime(message: import("../../../types.js").RealtimeEnvelope | Record<string, unknown>): boolean;
|
|
69
70
|
subscribeRealtime(subscriptions: string[]): boolean;
|
|
70
71
|
unsubscribeRealtime(subscriptions: string[]): boolean;
|
|
71
|
-
startHealthTick(intervalMs?: number): void;
|
|
72
|
+
startHealthTick(intervalMs?: number, runImmediately?: boolean): void;
|
|
72
73
|
stopHealthTick(): void;
|
|
73
74
|
scheduleKeepSession(refreshToken: string, expiresIn: number, refreshFn: (rt: string) => Promise<{
|
|
74
75
|
access_token: string;
|
|
@@ -25,6 +25,7 @@ export declare function PgMixin<TBase extends GConstructor<EntityServerClientBas
|
|
|
25
25
|
csrfHeaderName: string;
|
|
26
26
|
csrfCookieName: string;
|
|
27
27
|
csrfRefresher: (() => Promise<void>) | null;
|
|
28
|
+
requestAbortControllers: Map<string, AbortController>;
|
|
28
29
|
activeTxId: string | null;
|
|
29
30
|
keepSession: boolean;
|
|
30
31
|
refreshBuffer: number;
|
|
@@ -37,7 +38,6 @@ export declare function PgMixin<TBase extends GConstructor<EntityServerClientBas
|
|
|
37
38
|
healthTickPromise: Promise<unknown> | null;
|
|
38
39
|
realtimeEnabled: boolean;
|
|
39
40
|
realtimePath: string;
|
|
40
|
-
realtimeAutoConnect: boolean;
|
|
41
41
|
realtimeAutoReconnect: boolean;
|
|
42
42
|
realtimeReconnectDelayMs: number;
|
|
43
43
|
realtimeStatus: import("../../../types.js").RealtimeConnectionStatus;
|
|
@@ -50,6 +50,7 @@ export declare function PgMixin<TBase extends GConstructor<EntityServerClientBas
|
|
|
50
50
|
realtimeEventListeners: Map<string, Set<import("../../../types.js").RealtimeMessageListener>>;
|
|
51
51
|
configure(options: Partial<import("../../../types.js").EntityServerClientOptions>): void;
|
|
52
52
|
setToken(token: string): void;
|
|
53
|
+
setAccessTokenFromResponse(token: string): void;
|
|
53
54
|
setAnonymousPacketToken(token: string): void;
|
|
54
55
|
setApiKey(apiKey: string): void;
|
|
55
56
|
setHmacSecret(secret: string): void;
|
|
@@ -66,7 +67,7 @@ export declare function PgMixin<TBase extends GConstructor<EntityServerClientBas
|
|
|
66
67
|
sendRealtime(message: import("../../../types.js").RealtimeEnvelope | Record<string, unknown>): boolean;
|
|
67
68
|
subscribeRealtime(subscriptions: string[]): boolean;
|
|
68
69
|
unsubscribeRealtime(subscriptions: string[]): boolean;
|
|
69
|
-
startHealthTick(intervalMs?: number): void;
|
|
70
|
+
startHealthTick(intervalMs?: number, runImmediately?: boolean): void;
|
|
70
71
|
stopHealthTick(): void;
|
|
71
72
|
scheduleKeepSession(refreshToken: string, expiresIn: number, refreshFn: (rt: string) => Promise<{
|
|
72
73
|
access_token: string;
|
|
@@ -21,6 +21,7 @@ export declare function AppPushMixin<TBase extends GConstructor<EntityServerClie
|
|
|
21
21
|
csrfHeaderName: string;
|
|
22
22
|
csrfCookieName: string;
|
|
23
23
|
csrfRefresher: (() => Promise<void>) | null;
|
|
24
|
+
requestAbortControllers: Map<string, AbortController>;
|
|
24
25
|
activeTxId: string | null;
|
|
25
26
|
keepSession: boolean;
|
|
26
27
|
refreshBuffer: number;
|
|
@@ -33,7 +34,6 @@ export declare function AppPushMixin<TBase extends GConstructor<EntityServerClie
|
|
|
33
34
|
healthTickPromise: Promise<unknown> | null;
|
|
34
35
|
realtimeEnabled: boolean;
|
|
35
36
|
realtimePath: string;
|
|
36
|
-
realtimeAutoConnect: boolean;
|
|
37
37
|
realtimeAutoReconnect: boolean;
|
|
38
38
|
realtimeReconnectDelayMs: number;
|
|
39
39
|
realtimeStatus: import("../../../types.js").RealtimeConnectionStatus;
|
|
@@ -46,6 +46,7 @@ export declare function AppPushMixin<TBase extends GConstructor<EntityServerClie
|
|
|
46
46
|
realtimeEventListeners: Map<string, Set<import("../../../types.js").RealtimeMessageListener>>;
|
|
47
47
|
configure(options: Partial<import("../../../types.js").EntityServerClientOptions>): void;
|
|
48
48
|
setToken(token: string): void;
|
|
49
|
+
setAccessTokenFromResponse(token: string): void;
|
|
49
50
|
setAnonymousPacketToken(token: string): void;
|
|
50
51
|
setApiKey(apiKey: string): void;
|
|
51
52
|
setHmacSecret(secret: string): void;
|
|
@@ -62,7 +63,7 @@ export declare function AppPushMixin<TBase extends GConstructor<EntityServerClie
|
|
|
62
63
|
sendRealtime(message: import("../../../types.js").RealtimeEnvelope | Record<string, unknown>): boolean;
|
|
63
64
|
subscribeRealtime(subscriptions: string[]): boolean;
|
|
64
65
|
unsubscribeRealtime(subscriptions: string[]): boolean;
|
|
65
|
-
startHealthTick(intervalMs?: number): void;
|
|
66
|
+
startHealthTick(intervalMs?: number, runImmediately?: boolean): void;
|
|
66
67
|
stopHealthTick(): void;
|
|
67
68
|
scheduleKeepSession(refreshToken: string, expiresIn: number, refreshFn: (rt: string) => Promise<{
|
|
68
69
|
access_token: string;
|
|
@@ -19,6 +19,7 @@ export declare function SmsMixin<TBase extends GConstructor<EntityServerClientBa
|
|
|
19
19
|
csrfHeaderName: string;
|
|
20
20
|
csrfCookieName: string;
|
|
21
21
|
csrfRefresher: (() => Promise<void>) | null;
|
|
22
|
+
requestAbortControllers: Map<string, AbortController>;
|
|
22
23
|
activeTxId: string | null;
|
|
23
24
|
keepSession: boolean;
|
|
24
25
|
refreshBuffer: number;
|
|
@@ -31,7 +32,6 @@ export declare function SmsMixin<TBase extends GConstructor<EntityServerClientBa
|
|
|
31
32
|
healthTickPromise: Promise<unknown> | null;
|
|
32
33
|
realtimeEnabled: boolean;
|
|
33
34
|
realtimePath: string;
|
|
34
|
-
realtimeAutoConnect: boolean;
|
|
35
35
|
realtimeAutoReconnect: boolean;
|
|
36
36
|
realtimeReconnectDelayMs: number;
|
|
37
37
|
realtimeStatus: import("../../../types.js").RealtimeConnectionStatus;
|
|
@@ -44,6 +44,7 @@ export declare function SmsMixin<TBase extends GConstructor<EntityServerClientBa
|
|
|
44
44
|
realtimeEventListeners: Map<string, Set<import("../../../types.js").RealtimeMessageListener>>;
|
|
45
45
|
configure(options: Partial<import("../../../types.js").EntityServerClientOptions>): void;
|
|
46
46
|
setToken(token: string): void;
|
|
47
|
+
setAccessTokenFromResponse(token: string): void;
|
|
47
48
|
setAnonymousPacketToken(token: string): void;
|
|
48
49
|
setApiKey(apiKey: string): void;
|
|
49
50
|
setHmacSecret(secret: string): void;
|
|
@@ -60,7 +61,7 @@ export declare function SmsMixin<TBase extends GConstructor<EntityServerClientBa
|
|
|
60
61
|
sendRealtime(message: import("../../../types.js").RealtimeEnvelope | Record<string, unknown>): boolean;
|
|
61
62
|
subscribeRealtime(subscriptions: string[]): boolean;
|
|
62
63
|
unsubscribeRealtime(subscriptions: string[]): boolean;
|
|
63
|
-
startHealthTick(intervalMs?: number): void;
|
|
64
|
+
startHealthTick(intervalMs?: number, runImmediately?: boolean): void;
|
|
64
65
|
stopHealthTick(): void;
|
|
65
66
|
scheduleKeepSession(refreshToken: string, expiresIn: number, refreshFn: (rt: string) => Promise<{
|
|
66
67
|
access_token: string;
|
|
@@ -23,6 +23,7 @@ export declare function TaxinvoiceMixin<TBase extends GConstructor<EntityServerC
|
|
|
23
23
|
csrfHeaderName: string;
|
|
24
24
|
csrfCookieName: string;
|
|
25
25
|
csrfRefresher: (() => Promise<void>) | null;
|
|
26
|
+
requestAbortControllers: Map<string, AbortController>;
|
|
26
27
|
activeTxId: string | null;
|
|
27
28
|
keepSession: boolean;
|
|
28
29
|
refreshBuffer: number;
|
|
@@ -35,7 +36,6 @@ export declare function TaxinvoiceMixin<TBase extends GConstructor<EntityServerC
|
|
|
35
36
|
healthTickPromise: Promise<unknown> | null;
|
|
36
37
|
realtimeEnabled: boolean;
|
|
37
38
|
realtimePath: string;
|
|
38
|
-
realtimeAutoConnect: boolean;
|
|
39
39
|
realtimeAutoReconnect: boolean;
|
|
40
40
|
realtimeReconnectDelayMs: number;
|
|
41
41
|
realtimeStatus: import("../../../types.js").RealtimeConnectionStatus;
|
|
@@ -48,6 +48,7 @@ export declare function TaxinvoiceMixin<TBase extends GConstructor<EntityServerC
|
|
|
48
48
|
realtimeEventListeners: Map<string, Set<import("../../../types.js").RealtimeMessageListener>>;
|
|
49
49
|
configure(options: Partial<import("../../../types.js").EntityServerClientOptions>): void;
|
|
50
50
|
setToken(token: string): void;
|
|
51
|
+
setAccessTokenFromResponse(token: string): void;
|
|
51
52
|
setAnonymousPacketToken(token: string): void;
|
|
52
53
|
setApiKey(apiKey: string): void;
|
|
53
54
|
setHmacSecret(secret: string): void;
|
|
@@ -64,7 +65,7 @@ export declare function TaxinvoiceMixin<TBase extends GConstructor<EntityServerC
|
|
|
64
65
|
sendRealtime(message: import("../../../types.js").RealtimeEnvelope | Record<string, unknown>): boolean;
|
|
65
66
|
subscribeRealtime(subscriptions: string[]): boolean;
|
|
66
67
|
unsubscribeRealtime(subscriptions: string[]): boolean;
|
|
67
|
-
startHealthTick(intervalMs?: number): void;
|
|
68
|
+
startHealthTick(intervalMs?: number, runImmediately?: boolean): void;
|
|
68
69
|
stopHealthTick(): void;
|
|
69
70
|
scheduleKeepSession(refreshToken: string, expiresIn: number, refreshFn: (rt: string) => Promise<{
|
|
70
71
|
access_token: string;
|
|
@@ -21,6 +21,7 @@ export declare function AccountAppMixin<TBase extends GConstructor<EntityServerC
|
|
|
21
21
|
csrfHeaderName: string;
|
|
22
22
|
csrfCookieName: string;
|
|
23
23
|
csrfRefresher: (() => Promise<void>) | null;
|
|
24
|
+
requestAbortControllers: Map<string, AbortController>;
|
|
24
25
|
activeTxId: string | null;
|
|
25
26
|
keepSession: boolean;
|
|
26
27
|
refreshBuffer: number;
|
|
@@ -33,7 +34,6 @@ export declare function AccountAppMixin<TBase extends GConstructor<EntityServerC
|
|
|
33
34
|
healthTickPromise: Promise<unknown> | null;
|
|
34
35
|
realtimeEnabled: boolean;
|
|
35
36
|
realtimePath: string;
|
|
36
|
-
realtimeAutoConnect: boolean;
|
|
37
37
|
realtimeAutoReconnect: boolean;
|
|
38
38
|
realtimeReconnectDelayMs: number;
|
|
39
39
|
realtimeStatus: import("../../../types.js").RealtimeConnectionStatus;
|
|
@@ -46,6 +46,7 @@ export declare function AccountAppMixin<TBase extends GConstructor<EntityServerC
|
|
|
46
46
|
realtimeEventListeners: Map<string, Set<import("../../../types.js").RealtimeMessageListener>>;
|
|
47
47
|
configure(options: Partial<import("../../../types.js").EntityServerClientOptions>): void;
|
|
48
48
|
setToken(token: string): void;
|
|
49
|
+
setAccessTokenFromResponse(token: string): void;
|
|
49
50
|
setAnonymousPacketToken(token: string): void;
|
|
50
51
|
setApiKey(apiKey: string): void;
|
|
51
52
|
setHmacSecret(secret: string): void;
|
|
@@ -62,7 +63,7 @@ export declare function AccountAppMixin<TBase extends GConstructor<EntityServerC
|
|
|
62
63
|
sendRealtime(message: import("../../../types.js").RealtimeEnvelope | Record<string, unknown>): boolean;
|
|
63
64
|
subscribeRealtime(subscriptions: string[]): boolean;
|
|
64
65
|
unsubscribeRealtime(subscriptions: string[]): boolean;
|
|
65
|
-
startHealthTick(intervalMs?: number): void;
|
|
66
|
+
startHealthTick(intervalMs?: number, runImmediately?: boolean): void;
|
|
66
67
|
stopHealthTick(): void;
|
|
67
68
|
scheduleKeepSession(refreshToken: string, expiresIn: number, refreshFn: (rt: string) => Promise<{
|
|
68
69
|
access_token: string;
|
|
@@ -44,6 +44,7 @@ export declare function BoardMixin<TBase extends GConstructor<EntityServerClient
|
|
|
44
44
|
csrfHeaderName: string;
|
|
45
45
|
csrfCookieName: string;
|
|
46
46
|
csrfRefresher: (() => Promise<void>) | null;
|
|
47
|
+
requestAbortControllers: Map<string, AbortController>;
|
|
47
48
|
activeTxId: string | null;
|
|
48
49
|
keepSession: boolean;
|
|
49
50
|
refreshBuffer: number;
|
|
@@ -56,7 +57,6 @@ export declare function BoardMixin<TBase extends GConstructor<EntityServerClient
|
|
|
56
57
|
healthTickPromise: Promise<unknown> | null;
|
|
57
58
|
realtimeEnabled: boolean;
|
|
58
59
|
realtimePath: string;
|
|
59
|
-
realtimeAutoConnect: boolean;
|
|
60
60
|
realtimeAutoReconnect: boolean;
|
|
61
61
|
realtimeReconnectDelayMs: number;
|
|
62
62
|
realtimeStatus: import("../../../types.js").RealtimeConnectionStatus;
|
|
@@ -69,6 +69,7 @@ export declare function BoardMixin<TBase extends GConstructor<EntityServerClient
|
|
|
69
69
|
realtimeEventListeners: Map<string, Set<import("../../../types.js").RealtimeMessageListener>>;
|
|
70
70
|
configure(options: Partial<import("../../../types.js").EntityServerClientOptions>): void;
|
|
71
71
|
setToken(token: string): void;
|
|
72
|
+
setAccessTokenFromResponse(token: string): void;
|
|
72
73
|
setAnonymousPacketToken(token: string): void;
|
|
73
74
|
setApiKey(apiKey: string): void;
|
|
74
75
|
setHmacSecret(secret: string): void;
|
|
@@ -85,7 +86,7 @@ export declare function BoardMixin<TBase extends GConstructor<EntityServerClient
|
|
|
85
86
|
sendRealtime(message: import("../../../types.js").RealtimeEnvelope | Record<string, unknown>): boolean;
|
|
86
87
|
subscribeRealtime(subscriptions: string[]): boolean;
|
|
87
88
|
unsubscribeRealtime(subscriptions: string[]): boolean;
|
|
88
|
-
startHealthTick(intervalMs?: number): void;
|
|
89
|
+
startHealthTick(intervalMs?: number, runImmediately?: boolean): void;
|
|
89
90
|
stopHealthTick(): void;
|
|
90
91
|
scheduleKeepSession(refreshToken: string, expiresIn: number, refreshFn: (rt: string) => Promise<{
|
|
91
92
|
access_token: string;
|
|
@@ -16,6 +16,7 @@ export declare function EmailVerifyMixin<TBase extends GConstructor<EntityServer
|
|
|
16
16
|
csrfHeaderName: string;
|
|
17
17
|
csrfCookieName: string;
|
|
18
18
|
csrfRefresher: (() => Promise<void>) | null;
|
|
19
|
+
requestAbortControllers: Map<string, AbortController>;
|
|
19
20
|
activeTxId: string | null;
|
|
20
21
|
keepSession: boolean;
|
|
21
22
|
refreshBuffer: number;
|
|
@@ -28,7 +29,6 @@ export declare function EmailVerifyMixin<TBase extends GConstructor<EntityServer
|
|
|
28
29
|
healthTickPromise: Promise<unknown> | null;
|
|
29
30
|
realtimeEnabled: boolean;
|
|
30
31
|
realtimePath: string;
|
|
31
|
-
realtimeAutoConnect: boolean;
|
|
32
32
|
realtimeAutoReconnect: boolean;
|
|
33
33
|
realtimeReconnectDelayMs: number;
|
|
34
34
|
realtimeStatus: import("../../../types.js").RealtimeConnectionStatus;
|
|
@@ -41,6 +41,7 @@ export declare function EmailVerifyMixin<TBase extends GConstructor<EntityServer
|
|
|
41
41
|
realtimeEventListeners: Map<string, Set<import("../../../types.js").RealtimeMessageListener>>;
|
|
42
42
|
configure(options: Partial<import("../../../types.js").EntityServerClientOptions>): void;
|
|
43
43
|
setToken(token: string): void;
|
|
44
|
+
setAccessTokenFromResponse(token: string): void;
|
|
44
45
|
setAnonymousPacketToken(token: string): void;
|
|
45
46
|
setApiKey(apiKey: string): void;
|
|
46
47
|
setHmacSecret(secret: string): void;
|
|
@@ -57,7 +58,7 @@ export declare function EmailVerifyMixin<TBase extends GConstructor<EntityServer
|
|
|
57
58
|
sendRealtime(message: import("../../../types.js").RealtimeEnvelope | Record<string, unknown>): boolean;
|
|
58
59
|
subscribeRealtime(subscriptions: string[]): boolean;
|
|
59
60
|
unsubscribeRealtime(subscriptions: string[]): boolean;
|
|
60
|
-
startHealthTick(intervalMs?: number): void;
|
|
61
|
+
startHealthTick(intervalMs?: number, runImmediately?: boolean): void;
|
|
61
62
|
stopHealthTick(): void;
|
|
62
63
|
scheduleKeepSession(refreshToken: string, expiresIn: number, refreshFn: (rt: string) => Promise<{
|
|
63
64
|
access_token: string;
|
|
@@ -17,6 +17,7 @@ export declare function OAuthMixin<TBase extends GConstructor<EntityServerClient
|
|
|
17
17
|
csrfHeaderName: string;
|
|
18
18
|
csrfCookieName: string;
|
|
19
19
|
csrfRefresher: (() => Promise<void>) | null;
|
|
20
|
+
requestAbortControllers: Map<string, AbortController>;
|
|
20
21
|
activeTxId: string | null;
|
|
21
22
|
keepSession: boolean;
|
|
22
23
|
refreshBuffer: number;
|
|
@@ -29,7 +30,6 @@ export declare function OAuthMixin<TBase extends GConstructor<EntityServerClient
|
|
|
29
30
|
healthTickPromise: Promise<unknown> | null;
|
|
30
31
|
realtimeEnabled: boolean;
|
|
31
32
|
realtimePath: string;
|
|
32
|
-
realtimeAutoConnect: boolean;
|
|
33
33
|
realtimeAutoReconnect: boolean;
|
|
34
34
|
realtimeReconnectDelayMs: number;
|
|
35
35
|
realtimeStatus: import("../../../types.js").RealtimeConnectionStatus;
|
|
@@ -42,6 +42,7 @@ export declare function OAuthMixin<TBase extends GConstructor<EntityServerClient
|
|
|
42
42
|
realtimeEventListeners: Map<string, Set<import("../../../types.js").RealtimeMessageListener>>;
|
|
43
43
|
configure(options: Partial<import("../../../types.js").EntityServerClientOptions>): void;
|
|
44
44
|
setToken(token: string): void;
|
|
45
|
+
setAccessTokenFromResponse(token: string): void;
|
|
45
46
|
setAnonymousPacketToken(token: string): void;
|
|
46
47
|
setApiKey(apiKey: string): void;
|
|
47
48
|
setHmacSecret(secret: string): void;
|
|
@@ -58,7 +59,7 @@ export declare function OAuthMixin<TBase extends GConstructor<EntityServerClient
|
|
|
58
59
|
sendRealtime(message: import("../../../types.js").RealtimeEnvelope | Record<string, unknown>): boolean;
|
|
59
60
|
subscribeRealtime(subscriptions: string[]): boolean;
|
|
60
61
|
unsubscribeRealtime(subscriptions: string[]): boolean;
|
|
61
|
-
startHealthTick(intervalMs?: number): void;
|
|
62
|
+
startHealthTick(intervalMs?: number, runImmediately?: boolean): void;
|
|
62
63
|
stopHealthTick(): void;
|
|
63
64
|
scheduleKeepSession(refreshToken: string, expiresIn: number, refreshFn: (rt: string) => Promise<{
|
|
64
65
|
access_token: string;
|
|
@@ -16,6 +16,7 @@ export declare function PasswordResetMixin<TBase extends GConstructor<EntityServ
|
|
|
16
16
|
csrfHeaderName: string;
|
|
17
17
|
csrfCookieName: string;
|
|
18
18
|
csrfRefresher: (() => Promise<void>) | null;
|
|
19
|
+
requestAbortControllers: Map<string, AbortController>;
|
|
19
20
|
activeTxId: string | null;
|
|
20
21
|
keepSession: boolean;
|
|
21
22
|
refreshBuffer: number;
|
|
@@ -28,7 +29,6 @@ export declare function PasswordResetMixin<TBase extends GConstructor<EntityServ
|
|
|
28
29
|
healthTickPromise: Promise<unknown> | null;
|
|
29
30
|
realtimeEnabled: boolean;
|
|
30
31
|
realtimePath: string;
|
|
31
|
-
realtimeAutoConnect: boolean;
|
|
32
32
|
realtimeAutoReconnect: boolean;
|
|
33
33
|
realtimeReconnectDelayMs: number;
|
|
34
34
|
realtimeStatus: import("../../../types.js").RealtimeConnectionStatus;
|
|
@@ -41,6 +41,7 @@ export declare function PasswordResetMixin<TBase extends GConstructor<EntityServ
|
|
|
41
41
|
realtimeEventListeners: Map<string, Set<import("../../../types.js").RealtimeMessageListener>>;
|
|
42
42
|
configure(options: Partial<import("../../../types.js").EntityServerClientOptions>): void;
|
|
43
43
|
setToken(token: string): void;
|
|
44
|
+
setAccessTokenFromResponse(token: string): void;
|
|
44
45
|
setAnonymousPacketToken(token: string): void;
|
|
45
46
|
setApiKey(apiKey: string): void;
|
|
46
47
|
setHmacSecret(secret: string): void;
|
|
@@ -57,7 +58,7 @@ export declare function PasswordResetMixin<TBase extends GConstructor<EntityServ
|
|
|
57
58
|
sendRealtime(message: import("../../../types.js").RealtimeEnvelope | Record<string, unknown>): boolean;
|
|
58
59
|
subscribeRealtime(subscriptions: string[]): boolean;
|
|
59
60
|
unsubscribeRealtime(subscriptions: string[]): boolean;
|
|
60
|
-
startHealthTick(intervalMs?: number): void;
|
|
61
|
+
startHealthTick(intervalMs?: number, runImmediately?: boolean): void;
|
|
61
62
|
stopHealthTick(): void;
|
|
62
63
|
scheduleKeepSession(refreshToken: string, expiresIn: number, refreshFn: (rt: string) => Promise<{
|
|
63
64
|
access_token: string;
|
|
@@ -18,6 +18,7 @@ export declare function TwoFactorMixin<TBase extends GConstructor<EntityServerCl
|
|
|
18
18
|
csrfHeaderName: string;
|
|
19
19
|
csrfCookieName: string;
|
|
20
20
|
csrfRefresher: (() => Promise<void>) | null;
|
|
21
|
+
requestAbortControllers: Map<string, AbortController>;
|
|
21
22
|
activeTxId: string | null;
|
|
22
23
|
keepSession: boolean;
|
|
23
24
|
refreshBuffer: number;
|
|
@@ -30,7 +31,6 @@ export declare function TwoFactorMixin<TBase extends GConstructor<EntityServerCl
|
|
|
30
31
|
healthTickPromise: Promise<unknown> | null;
|
|
31
32
|
realtimeEnabled: boolean;
|
|
32
33
|
realtimePath: string;
|
|
33
|
-
realtimeAutoConnect: boolean;
|
|
34
34
|
realtimeAutoReconnect: boolean;
|
|
35
35
|
realtimeReconnectDelayMs: number;
|
|
36
36
|
realtimeStatus: import("../../../types.js").RealtimeConnectionStatus;
|
|
@@ -43,6 +43,7 @@ export declare function TwoFactorMixin<TBase extends GConstructor<EntityServerCl
|
|
|
43
43
|
realtimeEventListeners: Map<string, Set<import("../../../types.js").RealtimeMessageListener>>;
|
|
44
44
|
configure(options: Partial<import("../../../types.js").EntityServerClientOptions>): void;
|
|
45
45
|
setToken(token: string): void;
|
|
46
|
+
setAccessTokenFromResponse(token: string): void;
|
|
46
47
|
setAnonymousPacketToken(token: string): void;
|
|
47
48
|
setApiKey(apiKey: string): void;
|
|
48
49
|
setHmacSecret(secret: string): void;
|
|
@@ -59,7 +60,7 @@ export declare function TwoFactorMixin<TBase extends GConstructor<EntityServerCl
|
|
|
59
60
|
sendRealtime(message: import("../../../types.js").RealtimeEnvelope | Record<string, unknown>): boolean;
|
|
60
61
|
subscribeRealtime(subscriptions: string[]): boolean;
|
|
61
62
|
unsubscribeRealtime(subscriptions: string[]): boolean;
|
|
62
|
-
startHealthTick(intervalMs?: number): void;
|
|
63
|
+
startHealthTick(intervalMs?: number, runImmediately?: boolean): void;
|
|
63
64
|
stopHealthTick(): void;
|
|
64
65
|
scheduleKeepSession(refreshToken: string, expiresIn: number, refreshFn: (rt: string) => Promise<{
|
|
65
66
|
access_token: string;
|
|
@@ -62,6 +62,7 @@ export declare function AdminMixin<TBase extends GConstructor<EntityServerClient
|
|
|
62
62
|
csrfHeaderName: string;
|
|
63
63
|
csrfCookieName: string;
|
|
64
64
|
csrfRefresher: (() => Promise<void>) | null;
|
|
65
|
+
requestAbortControllers: Map<string, AbortController>;
|
|
65
66
|
activeTxId: string | null;
|
|
66
67
|
keepSession: boolean;
|
|
67
68
|
refreshBuffer: number;
|
|
@@ -74,7 +75,6 @@ export declare function AdminMixin<TBase extends GConstructor<EntityServerClient
|
|
|
74
75
|
healthTickPromise: Promise<unknown> | null;
|
|
75
76
|
realtimeEnabled: boolean;
|
|
76
77
|
realtimePath: string;
|
|
77
|
-
realtimeAutoConnect: boolean;
|
|
78
78
|
realtimeAutoReconnect: boolean;
|
|
79
79
|
realtimeReconnectDelayMs: number;
|
|
80
80
|
realtimeStatus: import("../../types.js").RealtimeConnectionStatus;
|
|
@@ -87,6 +87,7 @@ export declare function AdminMixin<TBase extends GConstructor<EntityServerClient
|
|
|
87
87
|
realtimeEventListeners: Map<string, Set<import("../../types.js").RealtimeMessageListener>>;
|
|
88
88
|
configure(options: Partial<import("../../types.js").EntityServerClientOptions>): void;
|
|
89
89
|
setToken(token: string): void;
|
|
90
|
+
setAccessTokenFromResponse(token: string): void;
|
|
90
91
|
setAnonymousPacketToken(token: string): void;
|
|
91
92
|
setApiKey(apiKey: string): void;
|
|
92
93
|
setHmacSecret(secret: string): void;
|
|
@@ -103,7 +104,7 @@ export declare function AdminMixin<TBase extends GConstructor<EntityServerClient
|
|
|
103
104
|
sendRealtime(message: import("../../types.js").RealtimeEnvelope | Record<string, unknown>): boolean;
|
|
104
105
|
subscribeRealtime(subscriptions: string[]): boolean;
|
|
105
106
|
unsubscribeRealtime(subscriptions: string[]): boolean;
|
|
106
|
-
startHealthTick(intervalMs?: number): void;
|
|
107
|
+
startHealthTick(intervalMs?: number, runImmediately?: boolean): void;
|
|
107
108
|
stopHealthTick(): void;
|
|
108
109
|
scheduleKeepSession(refreshToken: string, expiresIn: number, refreshFn: (rt: string) => Promise<{
|
|
109
110
|
access_token: string;
|
|
@@ -36,6 +36,8 @@ export declare function AuthMixin<TBase extends GConstructor<EntityServerClientB
|
|
|
36
36
|
authBootstrapPromise: Promise<void> | null;
|
|
37
37
|
authBootstrapToken: string;
|
|
38
38
|
authBootstrapAnonymousCompleted: boolean;
|
|
39
|
+
/** 응답 헤더 access token 갱신 시 bootstrap 기준 토큰도 함께 맞춘다. */
|
|
40
|
+
setAccessTokenFromResponse(token: string): void;
|
|
39
41
|
csrfRefresher: () => Promise<void>;
|
|
40
42
|
/**
|
|
41
43
|
* 서버 헬스 체크를 수행하고 패킷 암호화 활성 여부를 자동으로 감지합니다.
|
|
@@ -96,6 +98,7 @@ export declare function AuthMixin<TBase extends GConstructor<EntityServerClientB
|
|
|
96
98
|
csrfEnabled: boolean;
|
|
97
99
|
csrfHeaderName: string;
|
|
98
100
|
csrfCookieName: string;
|
|
101
|
+
requestAbortControllers: Map<string, AbortController>;
|
|
99
102
|
activeTxId: string | null;
|
|
100
103
|
keepSession: boolean;
|
|
101
104
|
refreshBuffer: number;
|
|
@@ -108,7 +111,6 @@ export declare function AuthMixin<TBase extends GConstructor<EntityServerClientB
|
|
|
108
111
|
healthTickPromise: Promise<unknown> | null;
|
|
109
112
|
realtimeEnabled: boolean;
|
|
110
113
|
realtimePath: string;
|
|
111
|
-
realtimeAutoConnect: boolean;
|
|
112
114
|
realtimeAutoReconnect: boolean;
|
|
113
115
|
realtimeReconnectDelayMs: number;
|
|
114
116
|
realtimeStatus: import("../../types.js").RealtimeConnectionStatus;
|
|
@@ -137,7 +139,7 @@ export declare function AuthMixin<TBase extends GConstructor<EntityServerClientB
|
|
|
137
139
|
sendRealtime(message: import("../../types.js").RealtimeEnvelope | Record<string, unknown>): boolean;
|
|
138
140
|
subscribeRealtime(subscriptions: string[]): boolean;
|
|
139
141
|
unsubscribeRealtime(subscriptions: string[]): boolean;
|
|
140
|
-
startHealthTick(intervalMs?: number): void;
|
|
142
|
+
startHealthTick(intervalMs?: number, runImmediately?: boolean): void;
|
|
141
143
|
stopHealthTick(): void;
|
|
142
144
|
scheduleKeepSession(refreshToken: string, expiresIn: number, refreshFn: (rt: string) => Promise<{
|
|
143
145
|
access_token: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{entityRequest as
|
|
1
|
+
import{entityRequest as u}from"../../client/request.js";function h(o){return o.ok===!0&&o.requires_2fa!==!0&&typeof o.data=="object"&&o.data!==null&&"access_token"in o.data}function d(o){return class extends o{authBootstrapPromise=null;authBootstrapToken="";authBootstrapAnonymousCompleted=!1;setAccessTokenFromResponse(e){super.setAccessTokenFromResponse(e),this.authBootstrapToken=e,this.authBootstrapAnonymousCompleted=!1}csrfRefresher=()=>this.checkHealth(this.keepSession).then(()=>{});async checkHealth(e=!1){try{const t=this.token,s={};e&&(s["X-Session-Bootstrap"]="1");const i=await fetch(`${this.baseUrl}/v1/health`,{signal:AbortSignal.timeout(3e3),credentials:"include",headers:s}),r=await i.json(),n=i.headers.get("X-Access-Token");n&&(this.token=n,e&&n!==t&&this.onTokenRefreshed?.(n,0));const a=this.readCookie("anon_token");return r.packet_encryption===!0&&a&&(this.anonymousPacketToken=a,this.encryptRequests=!0),this.applyCsrfHealth(),this.onHealthChange?.(!0),e&&r.authenticated===!1&&t&&(this.disconnectRealtime("session_expired"),this.onSessionExpired?.(new Error("Session expired"))),r}catch(t){throw this.onHealthChange?.(!1),t}}readCookie(e){if(typeof document>"u")return null;const t=document.cookie.split(";").map(s=>s.trim()).find(s=>s.startsWith(`${e}=`));if(!t)return null;try{return decodeURIComponent(t.slice(e.length+1))}catch{return t.slice(e.length+1)}}async ensurePublicAuthBootstrap(){if(typeof document>"u"||this.apiKey&&this.hmacSecret)return;const e=!!this.anonymousPacketToken||!!this.readCookie("anon_token"),t=!!this.readCookie(this.csrfCookieName);e&&t&&this.csrfEnabled||await this.checkHealth(!1)}async ensureAuthenticatedRequestBootstrap(){if(!(typeof document>"u")&&!(this.apiKey&&this.hmacSecret)){if(this.token){if(this.authBootstrapToken===this.token)return}else if(this.authBootstrapAnonymousCompleted)return;return this.authBootstrapPromise?this.authBootstrapPromise:(this.authBootstrapPromise=this.checkHealth(!0).then(()=>{this.token?this.authBootstrapToken=this.token:this.authBootstrapAnonymousCompleted=!0}).finally(()=>{this.authBootstrapPromise=null}),this.authBootstrapPromise)}}async prepareRequest(e){await super.prepareRequest(e),e&&await this.ensureAuthenticatedRequestBootstrap()}async login(e,t){await this.ensurePublicAuthBootstrap();const s=await u(this.reqOpts,"POST","/v1/auth/login",{email:e,passwd:t},!1,{},{requireOkShape:!1,allowStatuses:[403]});return h(s)&&(this.token=s.data.access_token,this.applyCsrfHealth(),this.keepSession&&this.healthTickTimer===null&&this.startHealthTick()),s}async tokenRefresh(){const e=await this.request("POST","/v1/auth/token_refresh",void 0,!1);return this.token=e.data.access_token,this.applyCsrfHealth(),e.data}async refreshToken(e){if(!e)return this.tokenRefresh();const t=await this.request("POST","/v1/auth/refresh",{refresh_token:e},!1);return this.token=t.data.access_token,this.applyCsrfHealth(),t.data}async logout(e){this.stopKeepSession(),this.stopHealthTick(),this.disconnectRealtime("logout");const t=await this.request("POST","/v1/auth/logout",e?{refresh_token:e}:void 0,!1);return this.token="",this.applyCsrfHealth(),t}me(){return this.request("GET","/v1/auth/me")}withdraw(e){return this.request("POST","/v1/auth/withdraw",e?{passwd:e}:{})}}}export{d as AuthMixin,h as isAuthLoginSuccessResponse};
|
|
2
2
|
//# sourceMappingURL=auth.js.map
|