entity-client 1.0.22 → 1.0.24
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 +64 -32
- package/dist/EntityServerApi.d.ts +32 -16
- package/dist/client/base.d.ts +7 -2
- package/dist/client/base.js +1 -1
- package/dist/client/base.js.map +3 -3
- package/dist/client/request.d.ts +7 -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 +4 -2
- package/dist/mixins/app/plugins/friendtalk.d.ts +4 -2
- package/dist/mixins/app/plugins/holidays.d.ts +4 -2
- package/dist/mixins/app/plugins/identity.d.ts +4 -2
- package/dist/mixins/app/plugins/llm.d.ts +4 -2
- package/dist/mixins/app/plugins/ocr.d.ts +4 -2
- package/dist/mixins/app/plugins/pg.d.ts +4 -2
- package/dist/mixins/app/plugins/push.d.ts +4 -2
- package/dist/mixins/app/plugins/sms.d.ts +4 -2
- package/dist/mixins/app/plugins/taxinvoice.d.ts +4 -2
- package/dist/mixins/app/routes/account.d.ts +4 -2
- package/dist/mixins/app/routes/board.d.ts +4 -2
- package/dist/mixins/app/routes/email-verify.d.ts +4 -2
- package/dist/mixins/app/routes/oauth.d.ts +4 -2
- package/dist/mixins/app/routes/password-reset.d.ts +4 -2
- package/dist/mixins/app/routes/two-factor.d.ts +4 -2
- package/dist/mixins/server/admin.d.ts +4 -2
- package/dist/mixins/server/auth.d.ts +5 -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 +4 -2
- package/dist/mixins/server/file.d.ts +4 -2
- package/dist/mixins/server/push.d.ts +4 -2
- package/dist/mixins/server/smtp.d.ts +4 -2
- package/dist/mixins/server/transaction.d.ts +4 -2
- package/dist/mixins/server/utils.d.ts +4 -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,8 @@ 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;
|
|
48
|
+
syncRealtimeWithToken(): void;
|
|
47
49
|
setAnonymousPacketToken(token: string): void;
|
|
48
50
|
setApiKey(apiKey: string): void;
|
|
49
51
|
setHmacSecret(secret: string): void;
|
|
@@ -60,7 +62,7 @@ export declare function AlimtalkMixin<TBase extends GConstructor<EntityServerCli
|
|
|
60
62
|
sendRealtime(message: import("../../../types.js").RealtimeEnvelope | Record<string, unknown>): boolean;
|
|
61
63
|
subscribeRealtime(subscriptions: string[]): boolean;
|
|
62
64
|
unsubscribeRealtime(subscriptions: string[]): boolean;
|
|
63
|
-
startHealthTick(intervalMs?: number): void;
|
|
65
|
+
startHealthTick(intervalMs?: number, runImmediately?: boolean): void;
|
|
64
66
|
stopHealthTick(): void;
|
|
65
67
|
scheduleKeepSession(refreshToken: string, expiresIn: number, refreshFn: (rt: string) => Promise<{
|
|
66
68
|
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,8 @@ 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;
|
|
42
|
+
syncRealtimeWithToken(): void;
|
|
41
43
|
setAnonymousPacketToken(token: string): void;
|
|
42
44
|
setApiKey(apiKey: string): void;
|
|
43
45
|
setHmacSecret(secret: string): void;
|
|
@@ -54,7 +56,7 @@ export declare function FriendtalkMixin<TBase extends GConstructor<EntityServerC
|
|
|
54
56
|
sendRealtime(message: import("../../../types.js").RealtimeEnvelope | Record<string, unknown>): boolean;
|
|
55
57
|
subscribeRealtime(subscriptions: string[]): boolean;
|
|
56
58
|
unsubscribeRealtime(subscriptions: string[]): boolean;
|
|
57
|
-
startHealthTick(intervalMs?: number): void;
|
|
59
|
+
startHealthTick(intervalMs?: number, runImmediately?: boolean): void;
|
|
58
60
|
stopHealthTick(): void;
|
|
59
61
|
scheduleKeepSession(refreshToken: string, expiresIn: number, refreshFn: (rt: string) => Promise<{
|
|
60
62
|
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,8 @@ 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;
|
|
50
|
+
syncRealtimeWithToken(): void;
|
|
49
51
|
setAnonymousPacketToken(token: string): void;
|
|
50
52
|
setApiKey(apiKey: string): void;
|
|
51
53
|
setHmacSecret(secret: string): void;
|
|
@@ -62,7 +64,7 @@ export declare function HolidaysMixin<TBase extends GConstructor<EntityServerCli
|
|
|
62
64
|
sendRealtime(message: import("../../../types.js").RealtimeEnvelope | Record<string, unknown>): boolean;
|
|
63
65
|
subscribeRealtime(subscriptions: string[]): boolean;
|
|
64
66
|
unsubscribeRealtime(subscriptions: string[]): boolean;
|
|
65
|
-
startHealthTick(intervalMs?: number): void;
|
|
67
|
+
startHealthTick(intervalMs?: number, runImmediately?: boolean): void;
|
|
66
68
|
stopHealthTick(): void;
|
|
67
69
|
scheduleKeepSession(refreshToken: string, expiresIn: number, refreshFn: (rt: string) => Promise<{
|
|
68
70
|
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,8 @@ 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;
|
|
48
|
+
syncRealtimeWithToken(): void;
|
|
47
49
|
setAnonymousPacketToken(token: string): void;
|
|
48
50
|
setApiKey(apiKey: string): void;
|
|
49
51
|
setHmacSecret(secret: string): void;
|
|
@@ -60,7 +62,7 @@ export declare function IdentityMixin<TBase extends GConstructor<EntityServerCli
|
|
|
60
62
|
sendRealtime(message: import("../../../types.js").RealtimeEnvelope | Record<string, unknown>): boolean;
|
|
61
63
|
subscribeRealtime(subscriptions: string[]): boolean;
|
|
62
64
|
unsubscribeRealtime(subscriptions: string[]): boolean;
|
|
63
|
-
startHealthTick(intervalMs?: number): void;
|
|
65
|
+
startHealthTick(intervalMs?: number, runImmediately?: boolean): void;
|
|
64
66
|
stopHealthTick(): void;
|
|
65
67
|
scheduleKeepSession(refreshToken: string, expiresIn: number, refreshFn: (rt: string) => Promise<{
|
|
66
68
|
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,8 @@ 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;
|
|
110
|
+
syncRealtimeWithToken(): void;
|
|
109
111
|
setAnonymousPacketToken(token: string): void;
|
|
110
112
|
setApiKey(apiKey: string): void;
|
|
111
113
|
setHmacSecret(secret: string): void;
|
|
@@ -122,7 +124,7 @@ export declare function LlmMixin<TBase extends GConstructor<EntityServerClientBa
|
|
|
122
124
|
sendRealtime(message: import("../../../types.js").RealtimeEnvelope | Record<string, unknown>): boolean;
|
|
123
125
|
subscribeRealtime(subscriptions: string[]): boolean;
|
|
124
126
|
unsubscribeRealtime(subscriptions: string[]): boolean;
|
|
125
|
-
startHealthTick(intervalMs?: number): void;
|
|
127
|
+
startHealthTick(intervalMs?: number, runImmediately?: boolean): void;
|
|
126
128
|
stopHealthTick(): void;
|
|
127
129
|
scheduleKeepSession(refreshToken: string, expiresIn: number, refreshFn: (rt: string) => Promise<{
|
|
128
130
|
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,8 @@ 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;
|
|
56
|
+
syncRealtimeWithToken(): void;
|
|
55
57
|
setAnonymousPacketToken(token: string): void;
|
|
56
58
|
setApiKey(apiKey: string): void;
|
|
57
59
|
setHmacSecret(secret: string): void;
|
|
@@ -68,7 +70,7 @@ export declare function OcrMixin<TBase extends GConstructor<EntityServerClientBa
|
|
|
68
70
|
sendRealtime(message: import("../../../types.js").RealtimeEnvelope | Record<string, unknown>): boolean;
|
|
69
71
|
subscribeRealtime(subscriptions: string[]): boolean;
|
|
70
72
|
unsubscribeRealtime(subscriptions: string[]): boolean;
|
|
71
|
-
startHealthTick(intervalMs?: number): void;
|
|
73
|
+
startHealthTick(intervalMs?: number, runImmediately?: boolean): void;
|
|
72
74
|
stopHealthTick(): void;
|
|
73
75
|
scheduleKeepSession(refreshToken: string, expiresIn: number, refreshFn: (rt: string) => Promise<{
|
|
74
76
|
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,8 @@ 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;
|
|
54
|
+
syncRealtimeWithToken(): void;
|
|
53
55
|
setAnonymousPacketToken(token: string): void;
|
|
54
56
|
setApiKey(apiKey: string): void;
|
|
55
57
|
setHmacSecret(secret: string): void;
|
|
@@ -66,7 +68,7 @@ export declare function PgMixin<TBase extends GConstructor<EntityServerClientBas
|
|
|
66
68
|
sendRealtime(message: import("../../../types.js").RealtimeEnvelope | Record<string, unknown>): boolean;
|
|
67
69
|
subscribeRealtime(subscriptions: string[]): boolean;
|
|
68
70
|
unsubscribeRealtime(subscriptions: string[]): boolean;
|
|
69
|
-
startHealthTick(intervalMs?: number): void;
|
|
71
|
+
startHealthTick(intervalMs?: number, runImmediately?: boolean): void;
|
|
70
72
|
stopHealthTick(): void;
|
|
71
73
|
scheduleKeepSession(refreshToken: string, expiresIn: number, refreshFn: (rt: string) => Promise<{
|
|
72
74
|
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,8 @@ 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;
|
|
50
|
+
syncRealtimeWithToken(): void;
|
|
49
51
|
setAnonymousPacketToken(token: string): void;
|
|
50
52
|
setApiKey(apiKey: string): void;
|
|
51
53
|
setHmacSecret(secret: string): void;
|
|
@@ -62,7 +64,7 @@ export declare function AppPushMixin<TBase extends GConstructor<EntityServerClie
|
|
|
62
64
|
sendRealtime(message: import("../../../types.js").RealtimeEnvelope | Record<string, unknown>): boolean;
|
|
63
65
|
subscribeRealtime(subscriptions: string[]): boolean;
|
|
64
66
|
unsubscribeRealtime(subscriptions: string[]): boolean;
|
|
65
|
-
startHealthTick(intervalMs?: number): void;
|
|
67
|
+
startHealthTick(intervalMs?: number, runImmediately?: boolean): void;
|
|
66
68
|
stopHealthTick(): void;
|
|
67
69
|
scheduleKeepSession(refreshToken: string, expiresIn: number, refreshFn: (rt: string) => Promise<{
|
|
68
70
|
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,8 @@ 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;
|
|
48
|
+
syncRealtimeWithToken(): void;
|
|
47
49
|
setAnonymousPacketToken(token: string): void;
|
|
48
50
|
setApiKey(apiKey: string): void;
|
|
49
51
|
setHmacSecret(secret: string): void;
|
|
@@ -60,7 +62,7 @@ export declare function SmsMixin<TBase extends GConstructor<EntityServerClientBa
|
|
|
60
62
|
sendRealtime(message: import("../../../types.js").RealtimeEnvelope | Record<string, unknown>): boolean;
|
|
61
63
|
subscribeRealtime(subscriptions: string[]): boolean;
|
|
62
64
|
unsubscribeRealtime(subscriptions: string[]): boolean;
|
|
63
|
-
startHealthTick(intervalMs?: number): void;
|
|
65
|
+
startHealthTick(intervalMs?: number, runImmediately?: boolean): void;
|
|
64
66
|
stopHealthTick(): void;
|
|
65
67
|
scheduleKeepSession(refreshToken: string, expiresIn: number, refreshFn: (rt: string) => Promise<{
|
|
66
68
|
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,8 @@ 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;
|
|
52
|
+
syncRealtimeWithToken(): void;
|
|
51
53
|
setAnonymousPacketToken(token: string): void;
|
|
52
54
|
setApiKey(apiKey: string): void;
|
|
53
55
|
setHmacSecret(secret: string): void;
|
|
@@ -64,7 +66,7 @@ export declare function TaxinvoiceMixin<TBase extends GConstructor<EntityServerC
|
|
|
64
66
|
sendRealtime(message: import("../../../types.js").RealtimeEnvelope | Record<string, unknown>): boolean;
|
|
65
67
|
subscribeRealtime(subscriptions: string[]): boolean;
|
|
66
68
|
unsubscribeRealtime(subscriptions: string[]): boolean;
|
|
67
|
-
startHealthTick(intervalMs?: number): void;
|
|
69
|
+
startHealthTick(intervalMs?: number, runImmediately?: boolean): void;
|
|
68
70
|
stopHealthTick(): void;
|
|
69
71
|
scheduleKeepSession(refreshToken: string, expiresIn: number, refreshFn: (rt: string) => Promise<{
|
|
70
72
|
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,8 @@ 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;
|
|
50
|
+
syncRealtimeWithToken(): void;
|
|
49
51
|
setAnonymousPacketToken(token: string): void;
|
|
50
52
|
setApiKey(apiKey: string): void;
|
|
51
53
|
setHmacSecret(secret: string): void;
|
|
@@ -62,7 +64,7 @@ export declare function AccountAppMixin<TBase extends GConstructor<EntityServerC
|
|
|
62
64
|
sendRealtime(message: import("../../../types.js").RealtimeEnvelope | Record<string, unknown>): boolean;
|
|
63
65
|
subscribeRealtime(subscriptions: string[]): boolean;
|
|
64
66
|
unsubscribeRealtime(subscriptions: string[]): boolean;
|
|
65
|
-
startHealthTick(intervalMs?: number): void;
|
|
67
|
+
startHealthTick(intervalMs?: number, runImmediately?: boolean): void;
|
|
66
68
|
stopHealthTick(): void;
|
|
67
69
|
scheduleKeepSession(refreshToken: string, expiresIn: number, refreshFn: (rt: string) => Promise<{
|
|
68
70
|
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,8 @@ 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;
|
|
73
|
+
syncRealtimeWithToken(): void;
|
|
72
74
|
setAnonymousPacketToken(token: string): void;
|
|
73
75
|
setApiKey(apiKey: string): void;
|
|
74
76
|
setHmacSecret(secret: string): void;
|
|
@@ -85,7 +87,7 @@ export declare function BoardMixin<TBase extends GConstructor<EntityServerClient
|
|
|
85
87
|
sendRealtime(message: import("../../../types.js").RealtimeEnvelope | Record<string, unknown>): boolean;
|
|
86
88
|
subscribeRealtime(subscriptions: string[]): boolean;
|
|
87
89
|
unsubscribeRealtime(subscriptions: string[]): boolean;
|
|
88
|
-
startHealthTick(intervalMs?: number): void;
|
|
90
|
+
startHealthTick(intervalMs?: number, runImmediately?: boolean): void;
|
|
89
91
|
stopHealthTick(): void;
|
|
90
92
|
scheduleKeepSession(refreshToken: string, expiresIn: number, refreshFn: (rt: string) => Promise<{
|
|
91
93
|
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,8 @@ 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;
|
|
45
|
+
syncRealtimeWithToken(): void;
|
|
44
46
|
setAnonymousPacketToken(token: string): void;
|
|
45
47
|
setApiKey(apiKey: string): void;
|
|
46
48
|
setHmacSecret(secret: string): void;
|
|
@@ -57,7 +59,7 @@ export declare function EmailVerifyMixin<TBase extends GConstructor<EntityServer
|
|
|
57
59
|
sendRealtime(message: import("../../../types.js").RealtimeEnvelope | Record<string, unknown>): boolean;
|
|
58
60
|
subscribeRealtime(subscriptions: string[]): boolean;
|
|
59
61
|
unsubscribeRealtime(subscriptions: string[]): boolean;
|
|
60
|
-
startHealthTick(intervalMs?: number): void;
|
|
62
|
+
startHealthTick(intervalMs?: number, runImmediately?: boolean): void;
|
|
61
63
|
stopHealthTick(): void;
|
|
62
64
|
scheduleKeepSession(refreshToken: string, expiresIn: number, refreshFn: (rt: string) => Promise<{
|
|
63
65
|
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,8 @@ 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;
|
|
46
|
+
syncRealtimeWithToken(): void;
|
|
45
47
|
setAnonymousPacketToken(token: string): void;
|
|
46
48
|
setApiKey(apiKey: string): void;
|
|
47
49
|
setHmacSecret(secret: string): void;
|
|
@@ -58,7 +60,7 @@ export declare function OAuthMixin<TBase extends GConstructor<EntityServerClient
|
|
|
58
60
|
sendRealtime(message: import("../../../types.js").RealtimeEnvelope | Record<string, unknown>): boolean;
|
|
59
61
|
subscribeRealtime(subscriptions: string[]): boolean;
|
|
60
62
|
unsubscribeRealtime(subscriptions: string[]): boolean;
|
|
61
|
-
startHealthTick(intervalMs?: number): void;
|
|
63
|
+
startHealthTick(intervalMs?: number, runImmediately?: boolean): void;
|
|
62
64
|
stopHealthTick(): void;
|
|
63
65
|
scheduleKeepSession(refreshToken: string, expiresIn: number, refreshFn: (rt: string) => Promise<{
|
|
64
66
|
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,8 @@ 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;
|
|
45
|
+
syncRealtimeWithToken(): void;
|
|
44
46
|
setAnonymousPacketToken(token: string): void;
|
|
45
47
|
setApiKey(apiKey: string): void;
|
|
46
48
|
setHmacSecret(secret: string): void;
|
|
@@ -57,7 +59,7 @@ export declare function PasswordResetMixin<TBase extends GConstructor<EntityServ
|
|
|
57
59
|
sendRealtime(message: import("../../../types.js").RealtimeEnvelope | Record<string, unknown>): boolean;
|
|
58
60
|
subscribeRealtime(subscriptions: string[]): boolean;
|
|
59
61
|
unsubscribeRealtime(subscriptions: string[]): boolean;
|
|
60
|
-
startHealthTick(intervalMs?: number): void;
|
|
62
|
+
startHealthTick(intervalMs?: number, runImmediately?: boolean): void;
|
|
61
63
|
stopHealthTick(): void;
|
|
62
64
|
scheduleKeepSession(refreshToken: string, expiresIn: number, refreshFn: (rt: string) => Promise<{
|
|
63
65
|
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,8 @@ 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;
|
|
47
|
+
syncRealtimeWithToken(): void;
|
|
46
48
|
setAnonymousPacketToken(token: string): void;
|
|
47
49
|
setApiKey(apiKey: string): void;
|
|
48
50
|
setHmacSecret(secret: string): void;
|
|
@@ -59,7 +61,7 @@ export declare function TwoFactorMixin<TBase extends GConstructor<EntityServerCl
|
|
|
59
61
|
sendRealtime(message: import("../../../types.js").RealtimeEnvelope | Record<string, unknown>): boolean;
|
|
60
62
|
subscribeRealtime(subscriptions: string[]): boolean;
|
|
61
63
|
unsubscribeRealtime(subscriptions: string[]): boolean;
|
|
62
|
-
startHealthTick(intervalMs?: number): void;
|
|
64
|
+
startHealthTick(intervalMs?: number, runImmediately?: boolean): void;
|
|
63
65
|
stopHealthTick(): void;
|
|
64
66
|
scheduleKeepSession(refreshToken: string, expiresIn: number, refreshFn: (rt: string) => Promise<{
|
|
65
67
|
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,8 @@ 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;
|
|
91
|
+
syncRealtimeWithToken(): void;
|
|
90
92
|
setAnonymousPacketToken(token: string): void;
|
|
91
93
|
setApiKey(apiKey: string): void;
|
|
92
94
|
setHmacSecret(secret: string): void;
|
|
@@ -103,7 +105,7 @@ export declare function AdminMixin<TBase extends GConstructor<EntityServerClient
|
|
|
103
105
|
sendRealtime(message: import("../../types.js").RealtimeEnvelope | Record<string, unknown>): boolean;
|
|
104
106
|
subscribeRealtime(subscriptions: string[]): boolean;
|
|
105
107
|
unsubscribeRealtime(subscriptions: string[]): boolean;
|
|
106
|
-
startHealthTick(intervalMs?: number): void;
|
|
108
|
+
startHealthTick(intervalMs?: number, runImmediately?: boolean): void;
|
|
107
109
|
stopHealthTick(): void;
|
|
108
110
|
scheduleKeepSession(refreshToken: string, expiresIn: number, refreshFn: (rt: string) => Promise<{
|
|
109
111
|
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;
|
|
@@ -121,6 +123,7 @@ export declare function AuthMixin<TBase extends GConstructor<EntityServerClientB
|
|
|
121
123
|
realtimeEventListeners: Map<string, Set<import("../../types.js").RealtimeMessageListener>>;
|
|
122
124
|
configure(options: Partial<import("../../types.js").EntityServerClientOptions>): void;
|
|
123
125
|
setToken(token: string): void;
|
|
126
|
+
syncRealtimeWithToken(): void;
|
|
124
127
|
setAnonymousPacketToken(token: string): void;
|
|
125
128
|
setApiKey(apiKey: string): void;
|
|
126
129
|
setHmacSecret(secret: string): void;
|
|
@@ -137,7 +140,7 @@ export declare function AuthMixin<TBase extends GConstructor<EntityServerClientB
|
|
|
137
140
|
sendRealtime(message: import("../../types.js").RealtimeEnvelope | Record<string, unknown>): boolean;
|
|
138
141
|
subscribeRealtime(subscriptions: string[]): boolean;
|
|
139
142
|
unsubscribeRealtime(subscriptions: string[]): boolean;
|
|
140
|
-
startHealthTick(intervalMs?: number): void;
|
|
143
|
+
startHealthTick(intervalMs?: number, runImmediately?: boolean): void;
|
|
141
144
|
stopHealthTick(): void;
|
|
142
145
|
scheduleKeepSession(refreshToken: string, expiresIn: number, refreshFn: (rt: string) => Promise<{
|
|
143
146
|
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
|