entity-client 1.0.15 → 1.0.17
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/README.md +362 -362
- package/dist/EntityAppServerApi.d.ts +384 -416
- package/dist/EntityAppServerApi.js.map +1 -1
- package/dist/EntityServerApi.d.ts +204 -216
- package/dist/EntityServerApi.js.map +1 -1
- package/dist/client/base.d.ts +27 -40
- package/dist/client/base.js +1 -1
- package/dist/client/base.js.map +3 -3
- package/dist/client/hmac.js.map +1 -1
- package/dist/client/packet.js.map +1 -1
- package/dist/client/request.js.map +1 -1
- package/dist/client/utils.js.map +1 -1
- package/dist/hooks/useEntityAppServer.js.map +1 -1
- package/dist/hooks/useEntityClient.js.map +1 -1
- package/dist/hooks/useEntityServer.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +3 -3
- package/dist/mixins/app/index.js.map +1 -1
- package/dist/mixins/app/plugins/alimtalk.d.ts +24 -26
- package/dist/mixins/app/plugins/alimtalk.js.map +1 -1
- package/dist/mixins/app/plugins/friendtalk.d.ts +24 -26
- package/dist/mixins/app/plugins/friendtalk.js.map +1 -1
- package/dist/mixins/app/plugins/holidays.d.ts +24 -26
- package/dist/mixins/app/plugins/holidays.js.map +1 -1
- package/dist/mixins/app/plugins/identity.d.ts +24 -26
- package/dist/mixins/app/plugins/identity.js.map +1 -1
- package/dist/mixins/app/plugins/index.js.map +1 -1
- package/dist/mixins/app/plugins/llm.d.ts +24 -26
- package/dist/mixins/app/plugins/llm.js.map +1 -1
- package/dist/mixins/app/plugins/ocr.d.ts +24 -26
- package/dist/mixins/app/plugins/ocr.js.map +1 -1
- package/dist/mixins/app/plugins/pg.d.ts +24 -26
- package/dist/mixins/app/plugins/pg.js.map +1 -1
- package/dist/mixins/app/plugins/push.d.ts +24 -26
- package/dist/mixins/app/plugins/push.js.map +1 -1
- package/dist/mixins/app/plugins/sms.d.ts +24 -26
- package/dist/mixins/app/plugins/sms.js.map +1 -1
- package/dist/mixins/app/plugins/taxinvoice.d.ts +24 -26
- package/dist/mixins/app/plugins/taxinvoice.js.map +1 -1
- package/dist/mixins/app/routes/account.d.ts +24 -26
- package/dist/mixins/app/routes/account.js.map +1 -1
- package/dist/mixins/app/routes/board.d.ts +24 -26
- package/dist/mixins/app/routes/board.js.map +2 -2
- package/dist/mixins/app/routes/email-verify.d.ts +24 -26
- package/dist/mixins/app/routes/email-verify.js.map +1 -1
- package/dist/mixins/app/routes/oauth.d.ts +24 -26
- package/dist/mixins/app/routes/oauth.js.map +1 -1
- package/dist/mixins/app/routes/password-reset.d.ts +24 -26
- package/dist/mixins/app/routes/password-reset.js.map +1 -1
- package/dist/mixins/app/routes/two-factor.d.ts +24 -26
- package/dist/mixins/app/routes/two-factor.js.map +1 -1
- package/dist/mixins/server/admin.d.ts +30 -32
- package/dist/mixins/server/admin.js +1 -1
- package/dist/mixins/server/admin.js.map +2 -2
- package/dist/mixins/server/auth.d.ts +30 -28
- package/dist/mixins/server/auth.js +1 -1
- package/dist/mixins/server/auth.js.map +3 -3
- package/dist/mixins/server/entity.d.ts +24 -26
- package/dist/mixins/server/entity.js +1 -1
- package/dist/mixins/server/entity.js.map +2 -2
- package/dist/mixins/server/file.d.ts +24 -26
- package/dist/mixins/server/file.js +1 -1
- package/dist/mixins/server/file.js.map +2 -2
- package/dist/mixins/server/index.js.map +1 -1
- package/dist/mixins/server/push.d.ts +24 -26
- package/dist/mixins/server/push.js.map +1 -1
- package/dist/mixins/server/smtp.d.ts +24 -26
- package/dist/mixins/server/smtp.js +1 -1
- package/dist/mixins/server/smtp.js.map +2 -2
- package/dist/mixins/server/transaction.d.ts +24 -26
- package/dist/mixins/server/transaction.js +1 -1
- package/dist/mixins/server/transaction.js.map +2 -2
- package/dist/mixins/server/utils.d.ts +24 -26
- package/dist/mixins/server/utils.js +1 -1
- package/dist/mixins/server/utils.js.map +2 -2
- package/dist/packet.js.map +1 -1
- package/dist/react.js +1 -1
- package/dist/react.js.map +3 -3
- package/dist/types.d.ts +1 -1
- package/package.json +57 -57
|
@@ -14,30 +14,30 @@ declare const EntityAppServerApi_base: {
|
|
|
14
14
|
csrfEnabled: boolean;
|
|
15
15
|
csrfHeaderName: string;
|
|
16
16
|
csrfCookieName: string;
|
|
17
|
-
|
|
17
|
+
csrfRefresher: (() => Promise<void>) | null;
|
|
18
18
|
activeTxId: string | null;
|
|
19
19
|
keepSession: boolean;
|
|
20
20
|
refreshBuffer: number;
|
|
21
21
|
onTokenRefreshed?: (accessToken: string, expiresIn: number) => void;
|
|
22
22
|
onSessionExpired?: (error: Error) => void;
|
|
23
23
|
onHealthChange?: (online: boolean) => void;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
sessionRefreshToken: string | null;
|
|
25
|
+
refreshTimer: ReturnType<typeof setTimeout> | null;
|
|
26
|
+
healthTickTimer: ReturnType<typeof setInterval> | null;
|
|
27
|
+
healthTickPromise: Promise<unknown> | null;
|
|
28
28
|
realtimeEnabled: boolean;
|
|
29
29
|
realtimePath: string;
|
|
30
30
|
realtimeAutoConnect: boolean;
|
|
31
31
|
realtimeAutoReconnect: boolean;
|
|
32
32
|
realtimeReconnectDelayMs: number;
|
|
33
33
|
realtimeStatus: import("./types.js").RealtimeConnectionStatus;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
34
|
+
realtimeSocket: WebSocket | null;
|
|
35
|
+
realtimeConnectPromise: Promise<void> | null;
|
|
36
|
+
realtimeReconnectTimer: ReturnType<typeof setTimeout> | null;
|
|
37
|
+
realtimeShouldReconnect: boolean;
|
|
38
|
+
realtimeMessageListeners: Set<import("./types.js").RealtimeMessageListener>;
|
|
39
|
+
realtimeStatusListeners: Set<import("./types.js").RealtimeStatusListener>;
|
|
40
|
+
realtimeEventListeners: Map<string, Set<import("./types.js").RealtimeMessageListener>>;
|
|
41
41
|
configure(options: Partial<import("./types.js").EntityServerClientOptions>): void;
|
|
42
42
|
setToken(token: string): void;
|
|
43
43
|
setAnonymousPacketToken(token: string): void;
|
|
@@ -58,21 +58,22 @@ declare const EntityAppServerApi_base: {
|
|
|
58
58
|
unsubscribeRealtime(subscriptions: string[]): boolean;
|
|
59
59
|
startHealthTick(intervalMs?: number): void;
|
|
60
60
|
stopHealthTick(): void;
|
|
61
|
-
|
|
61
|
+
scheduleKeepSession(refreshToken: string, expiresIn: number, refreshFn: (rt: string) => Promise<{
|
|
62
62
|
access_token: string;
|
|
63
63
|
expires_in: number;
|
|
64
64
|
}>): void;
|
|
65
|
-
|
|
65
|
+
clearRefreshTimer(): void;
|
|
66
66
|
stopKeepSession(): void;
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
67
|
+
applyRealtimeOptions(options?: boolean | import("./types.js").RealtimeClientOptions): void;
|
|
68
|
+
buildRealtimeUrl(): string;
|
|
69
|
+
handleRealtimeMessage(payload: unknown): void;
|
|
70
|
+
scheduleRealtimeReconnect(reason: string): void;
|
|
71
|
+
clearRealtimeReconnectTimer(): void;
|
|
72
|
+
setRealtimeStatus(status: import("./types.js").RealtimeConnectionStatus, reason?: string, error?: Error): void;
|
|
73
|
+
applyCsrfHealth(): void;
|
|
74
74
|
readRequestBody<T = Record<string, unknown>>(body: ArrayBuffer | Uint8Array | string | T | null | undefined, contentType?: string, requireEncrypted?: boolean): T;
|
|
75
|
-
get
|
|
75
|
+
get reqOpts(): import("./client/request.js").RequestOptions;
|
|
76
|
+
prepareRequest(_withAuth: boolean): Promise<void>;
|
|
76
77
|
get http(): {
|
|
77
78
|
get<T>(path: string, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
78
79
|
post<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
@@ -80,13 +81,10 @@ declare const EntityAppServerApi_base: {
|
|
|
80
81
|
patch<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
81
82
|
delete<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
82
83
|
};
|
|
84
|
+
request<T>(method: string, path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
83
85
|
requestBinary(method: string, path: string, body?: unknown, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
84
86
|
requestForm<T>(method: string, path: string, form: FormData, withAuth?: boolean): Promise<T>;
|
|
85
87
|
requestFormBinary(method: string, path: string, form: FormData, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
86
|
-
_request<T>(method: string, path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
87
|
-
_requestBinary(method: string, path: string, body?: unknown, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
88
|
-
_requestForm<T>(method: string, path: string, form: FormData, withAuth?: boolean): Promise<T>;
|
|
89
|
-
_requestFormBinary(method: string, path: string, form: FormData, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
90
88
|
};
|
|
91
89
|
} & {
|
|
92
90
|
new (...args: any[]): {
|
|
@@ -100,30 +98,30 @@ declare const EntityAppServerApi_base: {
|
|
|
100
98
|
csrfEnabled: boolean;
|
|
101
99
|
csrfHeaderName: string;
|
|
102
100
|
csrfCookieName: string;
|
|
103
|
-
|
|
101
|
+
csrfRefresher: (() => Promise<void>) | null;
|
|
104
102
|
activeTxId: string | null;
|
|
105
103
|
keepSession: boolean;
|
|
106
104
|
refreshBuffer: number;
|
|
107
105
|
onTokenRefreshed?: (accessToken: string, expiresIn: number) => void;
|
|
108
106
|
onSessionExpired?: (error: Error) => void;
|
|
109
107
|
onHealthChange?: (online: boolean) => void;
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
108
|
+
sessionRefreshToken: string | null;
|
|
109
|
+
refreshTimer: ReturnType<typeof setTimeout> | null;
|
|
110
|
+
healthTickTimer: ReturnType<typeof setInterval> | null;
|
|
111
|
+
healthTickPromise: Promise<unknown> | null;
|
|
114
112
|
realtimeEnabled: boolean;
|
|
115
113
|
realtimePath: string;
|
|
116
114
|
realtimeAutoConnect: boolean;
|
|
117
115
|
realtimeAutoReconnect: boolean;
|
|
118
116
|
realtimeReconnectDelayMs: number;
|
|
119
117
|
realtimeStatus: import("./types.js").RealtimeConnectionStatus;
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
118
|
+
realtimeSocket: WebSocket | null;
|
|
119
|
+
realtimeConnectPromise: Promise<void> | null;
|
|
120
|
+
realtimeReconnectTimer: ReturnType<typeof setTimeout> | null;
|
|
121
|
+
realtimeShouldReconnect: boolean;
|
|
122
|
+
realtimeMessageListeners: Set<import("./types.js").RealtimeMessageListener>;
|
|
123
|
+
realtimeStatusListeners: Set<import("./types.js").RealtimeStatusListener>;
|
|
124
|
+
realtimeEventListeners: Map<string, Set<import("./types.js").RealtimeMessageListener>>;
|
|
127
125
|
configure(options: Partial<import("./types.js").EntityServerClientOptions>): void;
|
|
128
126
|
setToken(token: string): void;
|
|
129
127
|
setAnonymousPacketToken(token: string): void;
|
|
@@ -144,21 +142,22 @@ declare const EntityAppServerApi_base: {
|
|
|
144
142
|
unsubscribeRealtime(subscriptions: string[]): boolean;
|
|
145
143
|
startHealthTick(intervalMs?: number): void;
|
|
146
144
|
stopHealthTick(): void;
|
|
147
|
-
|
|
145
|
+
scheduleKeepSession(refreshToken: string, expiresIn: number, refreshFn: (rt: string) => Promise<{
|
|
148
146
|
access_token: string;
|
|
149
147
|
expires_in: number;
|
|
150
148
|
}>): void;
|
|
151
|
-
|
|
149
|
+
clearRefreshTimer(): void;
|
|
152
150
|
stopKeepSession(): void;
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
151
|
+
applyRealtimeOptions(options?: boolean | import("./types.js").RealtimeClientOptions): void;
|
|
152
|
+
buildRealtimeUrl(): string;
|
|
153
|
+
handleRealtimeMessage(payload: unknown): void;
|
|
154
|
+
scheduleRealtimeReconnect(reason: string): void;
|
|
155
|
+
clearRealtimeReconnectTimer(): void;
|
|
156
|
+
setRealtimeStatus(status: import("./types.js").RealtimeConnectionStatus, reason?: string, error?: Error): void;
|
|
157
|
+
applyCsrfHealth(): void;
|
|
160
158
|
readRequestBody<T = Record<string, unknown>>(body: ArrayBuffer | Uint8Array | string | T | null | undefined, contentType?: string, requireEncrypted?: boolean): T;
|
|
161
|
-
get
|
|
159
|
+
get reqOpts(): import("./client/request.js").RequestOptions;
|
|
160
|
+
prepareRequest(_withAuth: boolean): Promise<void>;
|
|
162
161
|
get http(): {
|
|
163
162
|
get<T>(path: string, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
164
163
|
post<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
@@ -166,13 +165,10 @@ declare const EntityAppServerApi_base: {
|
|
|
166
165
|
patch<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
167
166
|
delete<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
168
167
|
};
|
|
168
|
+
request<T>(method: string, path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
169
169
|
requestBinary(method: string, path: string, body?: unknown, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
170
170
|
requestForm<T>(method: string, path: string, form: FormData, withAuth?: boolean): Promise<T>;
|
|
171
171
|
requestFormBinary(method: string, path: string, form: FormData, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
172
|
-
_request<T>(method: string, path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
173
|
-
_requestBinary(method: string, path: string, body?: unknown, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
174
|
-
_requestForm<T>(method: string, path: string, form: FormData, withAuth?: boolean): Promise<T>;
|
|
175
|
-
_requestFormBinary(method: string, path: string, form: FormData, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
176
172
|
};
|
|
177
173
|
} & {
|
|
178
174
|
new (...args: any[]): {
|
|
@@ -189,30 +185,30 @@ declare const EntityAppServerApi_base: {
|
|
|
189
185
|
csrfEnabled: boolean;
|
|
190
186
|
csrfHeaderName: string;
|
|
191
187
|
csrfCookieName: string;
|
|
192
|
-
|
|
188
|
+
csrfRefresher: (() => Promise<void>) | null;
|
|
193
189
|
activeTxId: string | null;
|
|
194
190
|
keepSession: boolean;
|
|
195
191
|
refreshBuffer: number;
|
|
196
192
|
onTokenRefreshed?: (accessToken: string, expiresIn: number) => void;
|
|
197
193
|
onSessionExpired?: (error: Error) => void;
|
|
198
194
|
onHealthChange?: (online: boolean) => void;
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
195
|
+
sessionRefreshToken: string | null;
|
|
196
|
+
refreshTimer: ReturnType<typeof setTimeout> | null;
|
|
197
|
+
healthTickTimer: ReturnType<typeof setInterval> | null;
|
|
198
|
+
healthTickPromise: Promise<unknown> | null;
|
|
203
199
|
realtimeEnabled: boolean;
|
|
204
200
|
realtimePath: string;
|
|
205
201
|
realtimeAutoConnect: boolean;
|
|
206
202
|
realtimeAutoReconnect: boolean;
|
|
207
203
|
realtimeReconnectDelayMs: number;
|
|
208
204
|
realtimeStatus: import("./types.js").RealtimeConnectionStatus;
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
205
|
+
realtimeSocket: WebSocket | null;
|
|
206
|
+
realtimeConnectPromise: Promise<void> | null;
|
|
207
|
+
realtimeReconnectTimer: ReturnType<typeof setTimeout> | null;
|
|
208
|
+
realtimeShouldReconnect: boolean;
|
|
209
|
+
realtimeMessageListeners: Set<import("./types.js").RealtimeMessageListener>;
|
|
210
|
+
realtimeStatusListeners: Set<import("./types.js").RealtimeStatusListener>;
|
|
211
|
+
realtimeEventListeners: Map<string, Set<import("./types.js").RealtimeMessageListener>>;
|
|
216
212
|
configure(options: Partial<import("./types.js").EntityServerClientOptions>): void;
|
|
217
213
|
setToken(token: string): void;
|
|
218
214
|
setAnonymousPacketToken(token: string): void;
|
|
@@ -233,21 +229,22 @@ declare const EntityAppServerApi_base: {
|
|
|
233
229
|
unsubscribeRealtime(subscriptions: string[]): boolean;
|
|
234
230
|
startHealthTick(intervalMs?: number): void;
|
|
235
231
|
stopHealthTick(): void;
|
|
236
|
-
|
|
232
|
+
scheduleKeepSession(refreshToken: string, expiresIn: number, refreshFn: (rt: string) => Promise<{
|
|
237
233
|
access_token: string;
|
|
238
234
|
expires_in: number;
|
|
239
235
|
}>): void;
|
|
240
|
-
|
|
236
|
+
clearRefreshTimer(): void;
|
|
241
237
|
stopKeepSession(): void;
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
238
|
+
applyRealtimeOptions(options?: boolean | import("./types.js").RealtimeClientOptions): void;
|
|
239
|
+
buildRealtimeUrl(): string;
|
|
240
|
+
handleRealtimeMessage(payload: unknown): void;
|
|
241
|
+
scheduleRealtimeReconnect(reason: string): void;
|
|
242
|
+
clearRealtimeReconnectTimer(): void;
|
|
243
|
+
setRealtimeStatus(status: import("./types.js").RealtimeConnectionStatus, reason?: string, error?: Error): void;
|
|
244
|
+
applyCsrfHealth(): void;
|
|
249
245
|
readRequestBody<T = Record<string, unknown>>(body: ArrayBuffer | Uint8Array | string | T | null | undefined, contentType?: string, requireEncrypted?: boolean): T;
|
|
250
|
-
get
|
|
246
|
+
get reqOpts(): import("./client/request.js").RequestOptions;
|
|
247
|
+
prepareRequest(_withAuth: boolean): Promise<void>;
|
|
251
248
|
get http(): {
|
|
252
249
|
get<T>(path: string, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
253
250
|
post<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
@@ -255,13 +252,10 @@ declare const EntityAppServerApi_base: {
|
|
|
255
252
|
patch<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
256
253
|
delete<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
257
254
|
};
|
|
255
|
+
request<T>(method: string, path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
258
256
|
requestBinary(method: string, path: string, body?: unknown, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
259
257
|
requestForm<T>(method: string, path: string, form: FormData, withAuth?: boolean): Promise<T>;
|
|
260
258
|
requestFormBinary(method: string, path: string, form: FormData, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
261
|
-
_request<T>(method: string, path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
262
|
-
_requestBinary(method: string, path: string, body?: unknown, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
263
|
-
_requestForm<T>(method: string, path: string, form: FormData, withAuth?: boolean): Promise<T>;
|
|
264
|
-
_requestFormBinary(method: string, path: string, form: FormData, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
265
259
|
};
|
|
266
260
|
} & {
|
|
267
261
|
new (...args: any[]): {
|
|
@@ -279,30 +273,30 @@ declare const EntityAppServerApi_base: {
|
|
|
279
273
|
csrfEnabled: boolean;
|
|
280
274
|
csrfHeaderName: string;
|
|
281
275
|
csrfCookieName: string;
|
|
282
|
-
|
|
276
|
+
csrfRefresher: (() => Promise<void>) | null;
|
|
283
277
|
activeTxId: string | null;
|
|
284
278
|
keepSession: boolean;
|
|
285
279
|
refreshBuffer: number;
|
|
286
280
|
onTokenRefreshed?: (accessToken: string, expiresIn: number) => void;
|
|
287
281
|
onSessionExpired?: (error: Error) => void;
|
|
288
282
|
onHealthChange?: (online: boolean) => void;
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
283
|
+
sessionRefreshToken: string | null;
|
|
284
|
+
refreshTimer: ReturnType<typeof setTimeout> | null;
|
|
285
|
+
healthTickTimer: ReturnType<typeof setInterval> | null;
|
|
286
|
+
healthTickPromise: Promise<unknown> | null;
|
|
293
287
|
realtimeEnabled: boolean;
|
|
294
288
|
realtimePath: string;
|
|
295
289
|
realtimeAutoConnect: boolean;
|
|
296
290
|
realtimeAutoReconnect: boolean;
|
|
297
291
|
realtimeReconnectDelayMs: number;
|
|
298
292
|
realtimeStatus: import("./types.js").RealtimeConnectionStatus;
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
293
|
+
realtimeSocket: WebSocket | null;
|
|
294
|
+
realtimeConnectPromise: Promise<void> | null;
|
|
295
|
+
realtimeReconnectTimer: ReturnType<typeof setTimeout> | null;
|
|
296
|
+
realtimeShouldReconnect: boolean;
|
|
297
|
+
realtimeMessageListeners: Set<import("./types.js").RealtimeMessageListener>;
|
|
298
|
+
realtimeStatusListeners: Set<import("./types.js").RealtimeStatusListener>;
|
|
299
|
+
realtimeEventListeners: Map<string, Set<import("./types.js").RealtimeMessageListener>>;
|
|
306
300
|
configure(options: Partial<import("./types.js").EntityServerClientOptions>): void;
|
|
307
301
|
setToken(token: string): void;
|
|
308
302
|
setAnonymousPacketToken(token: string): void;
|
|
@@ -323,21 +317,22 @@ declare const EntityAppServerApi_base: {
|
|
|
323
317
|
unsubscribeRealtime(subscriptions: string[]): boolean;
|
|
324
318
|
startHealthTick(intervalMs?: number): void;
|
|
325
319
|
stopHealthTick(): void;
|
|
326
|
-
|
|
320
|
+
scheduleKeepSession(refreshToken: string, expiresIn: number, refreshFn: (rt: string) => Promise<{
|
|
327
321
|
access_token: string;
|
|
328
322
|
expires_in: number;
|
|
329
323
|
}>): void;
|
|
330
|
-
|
|
324
|
+
clearRefreshTimer(): void;
|
|
331
325
|
stopKeepSession(): void;
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
326
|
+
applyRealtimeOptions(options?: boolean | import("./types.js").RealtimeClientOptions): void;
|
|
327
|
+
buildRealtimeUrl(): string;
|
|
328
|
+
handleRealtimeMessage(payload: unknown): void;
|
|
329
|
+
scheduleRealtimeReconnect(reason: string): void;
|
|
330
|
+
clearRealtimeReconnectTimer(): void;
|
|
331
|
+
setRealtimeStatus(status: import("./types.js").RealtimeConnectionStatus, reason?: string, error?: Error): void;
|
|
332
|
+
applyCsrfHealth(): void;
|
|
339
333
|
readRequestBody<T = Record<string, unknown>>(body: ArrayBuffer | Uint8Array | string | T | null | undefined, contentType?: string, requireEncrypted?: boolean): T;
|
|
340
|
-
get
|
|
334
|
+
get reqOpts(): import("./client/request.js").RequestOptions;
|
|
335
|
+
prepareRequest(_withAuth: boolean): Promise<void>;
|
|
341
336
|
get http(): {
|
|
342
337
|
get<T>(path: string, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
343
338
|
post<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
@@ -345,13 +340,10 @@ declare const EntityAppServerApi_base: {
|
|
|
345
340
|
patch<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
346
341
|
delete<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
347
342
|
};
|
|
343
|
+
request<T>(method: string, path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
348
344
|
requestBinary(method: string, path: string, body?: unknown, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
349
345
|
requestForm<T>(method: string, path: string, form: FormData, withAuth?: boolean): Promise<T>;
|
|
350
346
|
requestFormBinary(method: string, path: string, form: FormData, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
351
|
-
_request<T>(method: string, path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
352
|
-
_requestBinary(method: string, path: string, body?: unknown, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
353
|
-
_requestForm<T>(method: string, path: string, form: FormData, withAuth?: boolean): Promise<T>;
|
|
354
|
-
_requestFormBinary(method: string, path: string, form: FormData, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
355
347
|
};
|
|
356
348
|
} & {
|
|
357
349
|
new (...args: any[]): {
|
|
@@ -371,30 +363,30 @@ declare const EntityAppServerApi_base: {
|
|
|
371
363
|
csrfEnabled: boolean;
|
|
372
364
|
csrfHeaderName: string;
|
|
373
365
|
csrfCookieName: string;
|
|
374
|
-
|
|
366
|
+
csrfRefresher: (() => Promise<void>) | null;
|
|
375
367
|
activeTxId: string | null;
|
|
376
368
|
keepSession: boolean;
|
|
377
369
|
refreshBuffer: number;
|
|
378
370
|
onTokenRefreshed?: (accessToken: string, expiresIn: number) => void;
|
|
379
371
|
onSessionExpired?: (error: Error) => void;
|
|
380
372
|
onHealthChange?: (online: boolean) => void;
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
373
|
+
sessionRefreshToken: string | null;
|
|
374
|
+
refreshTimer: ReturnType<typeof setTimeout> | null;
|
|
375
|
+
healthTickTimer: ReturnType<typeof setInterval> | null;
|
|
376
|
+
healthTickPromise: Promise<unknown> | null;
|
|
385
377
|
realtimeEnabled: boolean;
|
|
386
378
|
realtimePath: string;
|
|
387
379
|
realtimeAutoConnect: boolean;
|
|
388
380
|
realtimeAutoReconnect: boolean;
|
|
389
381
|
realtimeReconnectDelayMs: number;
|
|
390
382
|
realtimeStatus: import("./types.js").RealtimeConnectionStatus;
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
383
|
+
realtimeSocket: WebSocket | null;
|
|
384
|
+
realtimeConnectPromise: Promise<void> | null;
|
|
385
|
+
realtimeReconnectTimer: ReturnType<typeof setTimeout> | null;
|
|
386
|
+
realtimeShouldReconnect: boolean;
|
|
387
|
+
realtimeMessageListeners: Set<import("./types.js").RealtimeMessageListener>;
|
|
388
|
+
realtimeStatusListeners: Set<import("./types.js").RealtimeStatusListener>;
|
|
389
|
+
realtimeEventListeners: Map<string, Set<import("./types.js").RealtimeMessageListener>>;
|
|
398
390
|
configure(options: Partial<import("./types.js").EntityServerClientOptions>): void;
|
|
399
391
|
setToken(token: string): void;
|
|
400
392
|
setAnonymousPacketToken(token: string): void;
|
|
@@ -415,21 +407,22 @@ declare const EntityAppServerApi_base: {
|
|
|
415
407
|
unsubscribeRealtime(subscriptions: string[]): boolean;
|
|
416
408
|
startHealthTick(intervalMs?: number): void;
|
|
417
409
|
stopHealthTick(): void;
|
|
418
|
-
|
|
410
|
+
scheduleKeepSession(refreshToken: string, expiresIn: number, refreshFn: (rt: string) => Promise<{
|
|
419
411
|
access_token: string;
|
|
420
412
|
expires_in: number;
|
|
421
413
|
}>): void;
|
|
422
|
-
|
|
414
|
+
clearRefreshTimer(): void;
|
|
423
415
|
stopKeepSession(): void;
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
416
|
+
applyRealtimeOptions(options?: boolean | import("./types.js").RealtimeClientOptions): void;
|
|
417
|
+
buildRealtimeUrl(): string;
|
|
418
|
+
handleRealtimeMessage(payload: unknown): void;
|
|
419
|
+
scheduleRealtimeReconnect(reason: string): void;
|
|
420
|
+
clearRealtimeReconnectTimer(): void;
|
|
421
|
+
setRealtimeStatus(status: import("./types.js").RealtimeConnectionStatus, reason?: string, error?: Error): void;
|
|
422
|
+
applyCsrfHealth(): void;
|
|
431
423
|
readRequestBody<T = Record<string, unknown>>(body: ArrayBuffer | Uint8Array | string | T | null | undefined, contentType?: string, requireEncrypted?: boolean): T;
|
|
432
|
-
get
|
|
424
|
+
get reqOpts(): import("./client/request.js").RequestOptions;
|
|
425
|
+
prepareRequest(_withAuth: boolean): Promise<void>;
|
|
433
426
|
get http(): {
|
|
434
427
|
get<T>(path: string, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
435
428
|
post<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
@@ -437,13 +430,10 @@ declare const EntityAppServerApi_base: {
|
|
|
437
430
|
patch<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
438
431
|
delete<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
439
432
|
};
|
|
433
|
+
request<T>(method: string, path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
440
434
|
requestBinary(method: string, path: string, body?: unknown, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
441
435
|
requestForm<T>(method: string, path: string, form: FormData, withAuth?: boolean): Promise<T>;
|
|
442
436
|
requestFormBinary(method: string, path: string, form: FormData, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
443
|
-
_request<T>(method: string, path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
444
|
-
_requestBinary(method: string, path: string, body?: unknown, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
445
|
-
_requestForm<T>(method: string, path: string, form: FormData, withAuth?: boolean): Promise<T>;
|
|
446
|
-
_requestFormBinary(method: string, path: string, form: FormData, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
447
437
|
};
|
|
448
438
|
} & {
|
|
449
439
|
new (...args: any[]): {
|
|
@@ -462,30 +452,30 @@ declare const EntityAppServerApi_base: {
|
|
|
462
452
|
csrfEnabled: boolean;
|
|
463
453
|
csrfHeaderName: string;
|
|
464
454
|
csrfCookieName: string;
|
|
465
|
-
|
|
455
|
+
csrfRefresher: (() => Promise<void>) | null;
|
|
466
456
|
activeTxId: string | null;
|
|
467
457
|
keepSession: boolean;
|
|
468
458
|
refreshBuffer: number;
|
|
469
459
|
onTokenRefreshed?: (accessToken: string, expiresIn: number) => void;
|
|
470
460
|
onSessionExpired?: (error: Error) => void;
|
|
471
461
|
onHealthChange?: (online: boolean) => void;
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
462
|
+
sessionRefreshToken: string | null;
|
|
463
|
+
refreshTimer: ReturnType<typeof setTimeout> | null;
|
|
464
|
+
healthTickTimer: ReturnType<typeof setInterval> | null;
|
|
465
|
+
healthTickPromise: Promise<unknown> | null;
|
|
476
466
|
realtimeEnabled: boolean;
|
|
477
467
|
realtimePath: string;
|
|
478
468
|
realtimeAutoConnect: boolean;
|
|
479
469
|
realtimeAutoReconnect: boolean;
|
|
480
470
|
realtimeReconnectDelayMs: number;
|
|
481
471
|
realtimeStatus: import("./types.js").RealtimeConnectionStatus;
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
472
|
+
realtimeSocket: WebSocket | null;
|
|
473
|
+
realtimeConnectPromise: Promise<void> | null;
|
|
474
|
+
realtimeReconnectTimer: ReturnType<typeof setTimeout> | null;
|
|
475
|
+
realtimeShouldReconnect: boolean;
|
|
476
|
+
realtimeMessageListeners: Set<import("./types.js").RealtimeMessageListener>;
|
|
477
|
+
realtimeStatusListeners: Set<import("./types.js").RealtimeStatusListener>;
|
|
478
|
+
realtimeEventListeners: Map<string, Set<import("./types.js").RealtimeMessageListener>>;
|
|
489
479
|
configure(options: Partial<import("./types.js").EntityServerClientOptions>): void;
|
|
490
480
|
setToken(token: string): void;
|
|
491
481
|
setAnonymousPacketToken(token: string): void;
|
|
@@ -506,21 +496,22 @@ declare const EntityAppServerApi_base: {
|
|
|
506
496
|
unsubscribeRealtime(subscriptions: string[]): boolean;
|
|
507
497
|
startHealthTick(intervalMs?: number): void;
|
|
508
498
|
stopHealthTick(): void;
|
|
509
|
-
|
|
499
|
+
scheduleKeepSession(refreshToken: string, expiresIn: number, refreshFn: (rt: string) => Promise<{
|
|
510
500
|
access_token: string;
|
|
511
501
|
expires_in: number;
|
|
512
502
|
}>): void;
|
|
513
|
-
|
|
503
|
+
clearRefreshTimer(): void;
|
|
514
504
|
stopKeepSession(): void;
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
505
|
+
applyRealtimeOptions(options?: boolean | import("./types.js").RealtimeClientOptions): void;
|
|
506
|
+
buildRealtimeUrl(): string;
|
|
507
|
+
handleRealtimeMessage(payload: unknown): void;
|
|
508
|
+
scheduleRealtimeReconnect(reason: string): void;
|
|
509
|
+
clearRealtimeReconnectTimer(): void;
|
|
510
|
+
setRealtimeStatus(status: import("./types.js").RealtimeConnectionStatus, reason?: string, error?: Error): void;
|
|
511
|
+
applyCsrfHealth(): void;
|
|
522
512
|
readRequestBody<T = Record<string, unknown>>(body: ArrayBuffer | Uint8Array | string | T | null | undefined, contentType?: string, requireEncrypted?: boolean): T;
|
|
523
|
-
get
|
|
513
|
+
get reqOpts(): import("./client/request.js").RequestOptions;
|
|
514
|
+
prepareRequest(_withAuth: boolean): Promise<void>;
|
|
524
515
|
get http(): {
|
|
525
516
|
get<T>(path: string, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
526
517
|
post<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
@@ -528,13 +519,10 @@ declare const EntityAppServerApi_base: {
|
|
|
528
519
|
patch<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
529
520
|
delete<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
530
521
|
};
|
|
522
|
+
request<T>(method: string, path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
531
523
|
requestBinary(method: string, path: string, body?: unknown, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
532
524
|
requestForm<T>(method: string, path: string, form: FormData, withAuth?: boolean): Promise<T>;
|
|
533
525
|
requestFormBinary(method: string, path: string, form: FormData, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
534
|
-
_request<T>(method: string, path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
535
|
-
_requestBinary(method: string, path: string, body?: unknown, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
536
|
-
_requestForm<T>(method: string, path: string, form: FormData, withAuth?: boolean): Promise<T>;
|
|
537
|
-
_requestFormBinary(method: string, path: string, form: FormData, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
538
526
|
};
|
|
539
527
|
} & {
|
|
540
528
|
new (...args: any[]): {
|
|
@@ -555,30 +543,30 @@ declare const EntityAppServerApi_base: {
|
|
|
555
543
|
csrfEnabled: boolean;
|
|
556
544
|
csrfHeaderName: string;
|
|
557
545
|
csrfCookieName: string;
|
|
558
|
-
|
|
546
|
+
csrfRefresher: (() => Promise<void>) | null;
|
|
559
547
|
activeTxId: string | null;
|
|
560
548
|
keepSession: boolean;
|
|
561
549
|
refreshBuffer: number;
|
|
562
550
|
onTokenRefreshed?: (accessToken: string, expiresIn: number) => void;
|
|
563
551
|
onSessionExpired?: (error: Error) => void;
|
|
564
552
|
onHealthChange?: (online: boolean) => void;
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
553
|
+
sessionRefreshToken: string | null;
|
|
554
|
+
refreshTimer: ReturnType<typeof setTimeout> | null;
|
|
555
|
+
healthTickTimer: ReturnType<typeof setInterval> | null;
|
|
556
|
+
healthTickPromise: Promise<unknown> | null;
|
|
569
557
|
realtimeEnabled: boolean;
|
|
570
558
|
realtimePath: string;
|
|
571
559
|
realtimeAutoConnect: boolean;
|
|
572
560
|
realtimeAutoReconnect: boolean;
|
|
573
561
|
realtimeReconnectDelayMs: number;
|
|
574
562
|
realtimeStatus: import("./types.js").RealtimeConnectionStatus;
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
563
|
+
realtimeSocket: WebSocket | null;
|
|
564
|
+
realtimeConnectPromise: Promise<void> | null;
|
|
565
|
+
realtimeReconnectTimer: ReturnType<typeof setTimeout> | null;
|
|
566
|
+
realtimeShouldReconnect: boolean;
|
|
567
|
+
realtimeMessageListeners: Set<import("./types.js").RealtimeMessageListener>;
|
|
568
|
+
realtimeStatusListeners: Set<import("./types.js").RealtimeStatusListener>;
|
|
569
|
+
realtimeEventListeners: Map<string, Set<import("./types.js").RealtimeMessageListener>>;
|
|
582
570
|
configure(options: Partial<import("./types.js").EntityServerClientOptions>): void;
|
|
583
571
|
setToken(token: string): void;
|
|
584
572
|
setAnonymousPacketToken(token: string): void;
|
|
@@ -599,21 +587,22 @@ declare const EntityAppServerApi_base: {
|
|
|
599
587
|
unsubscribeRealtime(subscriptions: string[]): boolean;
|
|
600
588
|
startHealthTick(intervalMs?: number): void;
|
|
601
589
|
stopHealthTick(): void;
|
|
602
|
-
|
|
590
|
+
scheduleKeepSession(refreshToken: string, expiresIn: number, refreshFn: (rt: string) => Promise<{
|
|
603
591
|
access_token: string;
|
|
604
592
|
expires_in: number;
|
|
605
593
|
}>): void;
|
|
606
|
-
|
|
594
|
+
clearRefreshTimer(): void;
|
|
607
595
|
stopKeepSession(): void;
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
596
|
+
applyRealtimeOptions(options?: boolean | import("./types.js").RealtimeClientOptions): void;
|
|
597
|
+
buildRealtimeUrl(): string;
|
|
598
|
+
handleRealtimeMessage(payload: unknown): void;
|
|
599
|
+
scheduleRealtimeReconnect(reason: string): void;
|
|
600
|
+
clearRealtimeReconnectTimer(): void;
|
|
601
|
+
setRealtimeStatus(status: import("./types.js").RealtimeConnectionStatus, reason?: string, error?: Error): void;
|
|
602
|
+
applyCsrfHealth(): void;
|
|
615
603
|
readRequestBody<T = Record<string, unknown>>(body: ArrayBuffer | Uint8Array | string | T | null | undefined, contentType?: string, requireEncrypted?: boolean): T;
|
|
616
|
-
get
|
|
604
|
+
get reqOpts(): import("./client/request.js").RequestOptions;
|
|
605
|
+
prepareRequest(_withAuth: boolean): Promise<void>;
|
|
617
606
|
get http(): {
|
|
618
607
|
get<T>(path: string, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
619
608
|
post<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
@@ -621,13 +610,10 @@ declare const EntityAppServerApi_base: {
|
|
|
621
610
|
patch<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
622
611
|
delete<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
623
612
|
};
|
|
613
|
+
request<T>(method: string, path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
624
614
|
requestBinary(method: string, path: string, body?: unknown, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
625
615
|
requestForm<T>(method: string, path: string, form: FormData, withAuth?: boolean): Promise<T>;
|
|
626
616
|
requestFormBinary(method: string, path: string, form: FormData, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
627
|
-
_request<T>(method: string, path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
628
|
-
_requestBinary(method: string, path: string, body?: unknown, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
629
|
-
_requestForm<T>(method: string, path: string, form: FormData, withAuth?: boolean): Promise<T>;
|
|
630
|
-
_requestFormBinary(method: string, path: string, form: FormData, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
631
617
|
};
|
|
632
618
|
} & {
|
|
633
619
|
new (...args: any[]): {
|
|
@@ -675,30 +661,30 @@ declare const EntityAppServerApi_base: {
|
|
|
675
661
|
csrfEnabled: boolean;
|
|
676
662
|
csrfHeaderName: string;
|
|
677
663
|
csrfCookieName: string;
|
|
678
|
-
|
|
664
|
+
csrfRefresher: (() => Promise<void>) | null;
|
|
679
665
|
activeTxId: string | null;
|
|
680
666
|
keepSession: boolean;
|
|
681
667
|
refreshBuffer: number;
|
|
682
668
|
onTokenRefreshed?: (accessToken: string, expiresIn: number) => void;
|
|
683
669
|
onSessionExpired?: (error: Error) => void;
|
|
684
670
|
onHealthChange?: (online: boolean) => void;
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
671
|
+
sessionRefreshToken: string | null;
|
|
672
|
+
refreshTimer: ReturnType<typeof setTimeout> | null;
|
|
673
|
+
healthTickTimer: ReturnType<typeof setInterval> | null;
|
|
674
|
+
healthTickPromise: Promise<unknown> | null;
|
|
689
675
|
realtimeEnabled: boolean;
|
|
690
676
|
realtimePath: string;
|
|
691
677
|
realtimeAutoConnect: boolean;
|
|
692
678
|
realtimeAutoReconnect: boolean;
|
|
693
679
|
realtimeReconnectDelayMs: number;
|
|
694
680
|
realtimeStatus: import("./types.js").RealtimeConnectionStatus;
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
681
|
+
realtimeSocket: WebSocket | null;
|
|
682
|
+
realtimeConnectPromise: Promise<void> | null;
|
|
683
|
+
realtimeReconnectTimer: ReturnType<typeof setTimeout> | null;
|
|
684
|
+
realtimeShouldReconnect: boolean;
|
|
685
|
+
realtimeMessageListeners: Set<import("./types.js").RealtimeMessageListener>;
|
|
686
|
+
realtimeStatusListeners: Set<import("./types.js").RealtimeStatusListener>;
|
|
687
|
+
realtimeEventListeners: Map<string, Set<import("./types.js").RealtimeMessageListener>>;
|
|
702
688
|
configure(options: Partial<import("./types.js").EntityServerClientOptions>): void;
|
|
703
689
|
setToken(token: string): void;
|
|
704
690
|
setAnonymousPacketToken(token: string): void;
|
|
@@ -719,21 +705,22 @@ declare const EntityAppServerApi_base: {
|
|
|
719
705
|
unsubscribeRealtime(subscriptions: string[]): boolean;
|
|
720
706
|
startHealthTick(intervalMs?: number): void;
|
|
721
707
|
stopHealthTick(): void;
|
|
722
|
-
|
|
708
|
+
scheduleKeepSession(refreshToken: string, expiresIn: number, refreshFn: (rt: string) => Promise<{
|
|
723
709
|
access_token: string;
|
|
724
710
|
expires_in: number;
|
|
725
711
|
}>): void;
|
|
726
|
-
|
|
712
|
+
clearRefreshTimer(): void;
|
|
727
713
|
stopKeepSession(): void;
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
714
|
+
applyRealtimeOptions(options?: boolean | import("./types.js").RealtimeClientOptions): void;
|
|
715
|
+
buildRealtimeUrl(): string;
|
|
716
|
+
handleRealtimeMessage(payload: unknown): void;
|
|
717
|
+
scheduleRealtimeReconnect(reason: string): void;
|
|
718
|
+
clearRealtimeReconnectTimer(): void;
|
|
719
|
+
setRealtimeStatus(status: import("./types.js").RealtimeConnectionStatus, reason?: string, error?: Error): void;
|
|
720
|
+
applyCsrfHealth(): void;
|
|
735
721
|
readRequestBody<T = Record<string, unknown>>(body: ArrayBuffer | Uint8Array | string | T | null | undefined, contentType?: string, requireEncrypted?: boolean): T;
|
|
736
|
-
get
|
|
722
|
+
get reqOpts(): import("./client/request.js").RequestOptions;
|
|
723
|
+
prepareRequest(_withAuth: boolean): Promise<void>;
|
|
737
724
|
get http(): {
|
|
738
725
|
get<T>(path: string, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
739
726
|
post<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
@@ -741,13 +728,10 @@ declare const EntityAppServerApi_base: {
|
|
|
741
728
|
patch<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
742
729
|
delete<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
743
730
|
};
|
|
731
|
+
request<T>(method: string, path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
744
732
|
requestBinary(method: string, path: string, body?: unknown, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
745
733
|
requestForm<T>(method: string, path: string, form: FormData, withAuth?: boolean): Promise<T>;
|
|
746
734
|
requestFormBinary(method: string, path: string, form: FormData, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
747
|
-
_request<T>(method: string, path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
748
|
-
_requestBinary(method: string, path: string, body?: unknown, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
749
|
-
_requestForm<T>(method: string, path: string, form: FormData, withAuth?: boolean): Promise<T>;
|
|
750
|
-
_requestFormBinary(method: string, path: string, form: FormData, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
751
735
|
};
|
|
752
736
|
} & {
|
|
753
737
|
new (...args: any[]): {
|
|
@@ -764,30 +748,30 @@ declare const EntityAppServerApi_base: {
|
|
|
764
748
|
csrfEnabled: boolean;
|
|
765
749
|
csrfHeaderName: string;
|
|
766
750
|
csrfCookieName: string;
|
|
767
|
-
|
|
751
|
+
csrfRefresher: (() => Promise<void>) | null;
|
|
768
752
|
activeTxId: string | null;
|
|
769
753
|
keepSession: boolean;
|
|
770
754
|
refreshBuffer: number;
|
|
771
755
|
onTokenRefreshed?: (accessToken: string, expiresIn: number) => void;
|
|
772
756
|
onSessionExpired?: (error: Error) => void;
|
|
773
757
|
onHealthChange?: (online: boolean) => void;
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
758
|
+
sessionRefreshToken: string | null;
|
|
759
|
+
refreshTimer: ReturnType<typeof setTimeout> | null;
|
|
760
|
+
healthTickTimer: ReturnType<typeof setInterval> | null;
|
|
761
|
+
healthTickPromise: Promise<unknown> | null;
|
|
778
762
|
realtimeEnabled: boolean;
|
|
779
763
|
realtimePath: string;
|
|
780
764
|
realtimeAutoConnect: boolean;
|
|
781
765
|
realtimeAutoReconnect: boolean;
|
|
782
766
|
realtimeReconnectDelayMs: number;
|
|
783
767
|
realtimeStatus: import("./types.js").RealtimeConnectionStatus;
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
768
|
+
realtimeSocket: WebSocket | null;
|
|
769
|
+
realtimeConnectPromise: Promise<void> | null;
|
|
770
|
+
realtimeReconnectTimer: ReturnType<typeof setTimeout> | null;
|
|
771
|
+
realtimeShouldReconnect: boolean;
|
|
772
|
+
realtimeMessageListeners: Set<import("./types.js").RealtimeMessageListener>;
|
|
773
|
+
realtimeStatusListeners: Set<import("./types.js").RealtimeStatusListener>;
|
|
774
|
+
realtimeEventListeners: Map<string, Set<import("./types.js").RealtimeMessageListener>>;
|
|
791
775
|
configure(options: Partial<import("./types.js").EntityServerClientOptions>): void;
|
|
792
776
|
setToken(token: string): void;
|
|
793
777
|
setAnonymousPacketToken(token: string): void;
|
|
@@ -808,21 +792,22 @@ declare const EntityAppServerApi_base: {
|
|
|
808
792
|
unsubscribeRealtime(subscriptions: string[]): boolean;
|
|
809
793
|
startHealthTick(intervalMs?: number): void;
|
|
810
794
|
stopHealthTick(): void;
|
|
811
|
-
|
|
795
|
+
scheduleKeepSession(refreshToken: string, expiresIn: number, refreshFn: (rt: string) => Promise<{
|
|
812
796
|
access_token: string;
|
|
813
797
|
expires_in: number;
|
|
814
798
|
}>): void;
|
|
815
|
-
|
|
799
|
+
clearRefreshTimer(): void;
|
|
816
800
|
stopKeepSession(): void;
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
801
|
+
applyRealtimeOptions(options?: boolean | import("./types.js").RealtimeClientOptions): void;
|
|
802
|
+
buildRealtimeUrl(): string;
|
|
803
|
+
handleRealtimeMessage(payload: unknown): void;
|
|
804
|
+
scheduleRealtimeReconnect(reason: string): void;
|
|
805
|
+
clearRealtimeReconnectTimer(): void;
|
|
806
|
+
setRealtimeStatus(status: import("./types.js").RealtimeConnectionStatus, reason?: string, error?: Error): void;
|
|
807
|
+
applyCsrfHealth(): void;
|
|
824
808
|
readRequestBody<T = Record<string, unknown>>(body: ArrayBuffer | Uint8Array | string | T | null | undefined, contentType?: string, requireEncrypted?: boolean): T;
|
|
825
|
-
get
|
|
809
|
+
get reqOpts(): import("./client/request.js").RequestOptions;
|
|
810
|
+
prepareRequest(_withAuth: boolean): Promise<void>;
|
|
826
811
|
get http(): {
|
|
827
812
|
get<T>(path: string, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
828
813
|
post<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
@@ -830,13 +815,10 @@ declare const EntityAppServerApi_base: {
|
|
|
830
815
|
patch<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
831
816
|
delete<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
832
817
|
};
|
|
818
|
+
request<T>(method: string, path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
833
819
|
requestBinary(method: string, path: string, body?: unknown, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
834
820
|
requestForm<T>(method: string, path: string, form: FormData, withAuth?: boolean): Promise<T>;
|
|
835
821
|
requestFormBinary(method: string, path: string, form: FormData, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
836
|
-
_request<T>(method: string, path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
837
|
-
_requestBinary(method: string, path: string, body?: unknown, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
838
|
-
_requestForm<T>(method: string, path: string, form: FormData, withAuth?: boolean): Promise<T>;
|
|
839
|
-
_requestFormBinary(method: string, path: string, form: FormData, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
840
822
|
};
|
|
841
823
|
} & {
|
|
842
824
|
new (...args: any[]): {
|
|
@@ -856,30 +838,30 @@ declare const EntityAppServerApi_base: {
|
|
|
856
838
|
csrfEnabled: boolean;
|
|
857
839
|
csrfHeaderName: string;
|
|
858
840
|
csrfCookieName: string;
|
|
859
|
-
|
|
841
|
+
csrfRefresher: (() => Promise<void>) | null;
|
|
860
842
|
activeTxId: string | null;
|
|
861
843
|
keepSession: boolean;
|
|
862
844
|
refreshBuffer: number;
|
|
863
845
|
onTokenRefreshed?: (accessToken: string, expiresIn: number) => void;
|
|
864
846
|
onSessionExpired?: (error: Error) => void;
|
|
865
847
|
onHealthChange?: (online: boolean) => void;
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
848
|
+
sessionRefreshToken: string | null;
|
|
849
|
+
refreshTimer: ReturnType<typeof setTimeout> | null;
|
|
850
|
+
healthTickTimer: ReturnType<typeof setInterval> | null;
|
|
851
|
+
healthTickPromise: Promise<unknown> | null;
|
|
870
852
|
realtimeEnabled: boolean;
|
|
871
853
|
realtimePath: string;
|
|
872
854
|
realtimeAutoConnect: boolean;
|
|
873
855
|
realtimeAutoReconnect: boolean;
|
|
874
856
|
realtimeReconnectDelayMs: number;
|
|
875
857
|
realtimeStatus: import("./types.js").RealtimeConnectionStatus;
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
858
|
+
realtimeSocket: WebSocket | null;
|
|
859
|
+
realtimeConnectPromise: Promise<void> | null;
|
|
860
|
+
realtimeReconnectTimer: ReturnType<typeof setTimeout> | null;
|
|
861
|
+
realtimeShouldReconnect: boolean;
|
|
862
|
+
realtimeMessageListeners: Set<import("./types.js").RealtimeMessageListener>;
|
|
863
|
+
realtimeStatusListeners: Set<import("./types.js").RealtimeStatusListener>;
|
|
864
|
+
realtimeEventListeners: Map<string, Set<import("./types.js").RealtimeMessageListener>>;
|
|
883
865
|
configure(options: Partial<import("./types.js").EntityServerClientOptions>): void;
|
|
884
866
|
setToken(token: string): void;
|
|
885
867
|
setAnonymousPacketToken(token: string): void;
|
|
@@ -900,21 +882,22 @@ declare const EntityAppServerApi_base: {
|
|
|
900
882
|
unsubscribeRealtime(subscriptions: string[]): boolean;
|
|
901
883
|
startHealthTick(intervalMs?: number): void;
|
|
902
884
|
stopHealthTick(): void;
|
|
903
|
-
|
|
885
|
+
scheduleKeepSession(refreshToken: string, expiresIn: number, refreshFn: (rt: string) => Promise<{
|
|
904
886
|
access_token: string;
|
|
905
887
|
expires_in: number;
|
|
906
888
|
}>): void;
|
|
907
|
-
|
|
889
|
+
clearRefreshTimer(): void;
|
|
908
890
|
stopKeepSession(): void;
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
891
|
+
applyRealtimeOptions(options?: boolean | import("./types.js").RealtimeClientOptions): void;
|
|
892
|
+
buildRealtimeUrl(): string;
|
|
893
|
+
handleRealtimeMessage(payload: unknown): void;
|
|
894
|
+
scheduleRealtimeReconnect(reason: string): void;
|
|
895
|
+
clearRealtimeReconnectTimer(): void;
|
|
896
|
+
setRealtimeStatus(status: import("./types.js").RealtimeConnectionStatus, reason?: string, error?: Error): void;
|
|
897
|
+
applyCsrfHealth(): void;
|
|
916
898
|
readRequestBody<T = Record<string, unknown>>(body: ArrayBuffer | Uint8Array | string | T | null | undefined, contentType?: string, requireEncrypted?: boolean): T;
|
|
917
|
-
get
|
|
899
|
+
get reqOpts(): import("./client/request.js").RequestOptions;
|
|
900
|
+
prepareRequest(_withAuth: boolean): Promise<void>;
|
|
918
901
|
get http(): {
|
|
919
902
|
get<T>(path: string, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
920
903
|
post<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
@@ -922,13 +905,10 @@ declare const EntityAppServerApi_base: {
|
|
|
922
905
|
patch<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
923
906
|
delete<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
924
907
|
};
|
|
908
|
+
request<T>(method: string, path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
925
909
|
requestBinary(method: string, path: string, body?: unknown, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
926
910
|
requestForm<T>(method: string, path: string, form: FormData, withAuth?: boolean): Promise<T>;
|
|
927
911
|
requestFormBinary(method: string, path: string, form: FormData, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
928
|
-
_request<T>(method: string, path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
929
|
-
_requestBinary(method: string, path: string, body?: unknown, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
930
|
-
_requestForm<T>(method: string, path: string, form: FormData, withAuth?: boolean): Promise<T>;
|
|
931
|
-
_requestFormBinary(method: string, path: string, form: FormData, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
932
912
|
};
|
|
933
913
|
} & {
|
|
934
914
|
new (...args: any[]): {
|
|
@@ -947,30 +927,30 @@ declare const EntityAppServerApi_base: {
|
|
|
947
927
|
csrfEnabled: boolean;
|
|
948
928
|
csrfHeaderName: string;
|
|
949
929
|
csrfCookieName: string;
|
|
950
|
-
|
|
930
|
+
csrfRefresher: (() => Promise<void>) | null;
|
|
951
931
|
activeTxId: string | null;
|
|
952
932
|
keepSession: boolean;
|
|
953
933
|
refreshBuffer: number;
|
|
954
934
|
onTokenRefreshed?: (accessToken: string, expiresIn: number) => void;
|
|
955
935
|
onSessionExpired?: (error: Error) => void;
|
|
956
936
|
onHealthChange?: (online: boolean) => void;
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
937
|
+
sessionRefreshToken: string | null;
|
|
938
|
+
refreshTimer: ReturnType<typeof setTimeout> | null;
|
|
939
|
+
healthTickTimer: ReturnType<typeof setInterval> | null;
|
|
940
|
+
healthTickPromise: Promise<unknown> | null;
|
|
961
941
|
realtimeEnabled: boolean;
|
|
962
942
|
realtimePath: string;
|
|
963
943
|
realtimeAutoConnect: boolean;
|
|
964
944
|
realtimeAutoReconnect: boolean;
|
|
965
945
|
realtimeReconnectDelayMs: number;
|
|
966
946
|
realtimeStatus: import("./types.js").RealtimeConnectionStatus;
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
947
|
+
realtimeSocket: WebSocket | null;
|
|
948
|
+
realtimeConnectPromise: Promise<void> | null;
|
|
949
|
+
realtimeReconnectTimer: ReturnType<typeof setTimeout> | null;
|
|
950
|
+
realtimeShouldReconnect: boolean;
|
|
951
|
+
realtimeMessageListeners: Set<import("./types.js").RealtimeMessageListener>;
|
|
952
|
+
realtimeStatusListeners: Set<import("./types.js").RealtimeStatusListener>;
|
|
953
|
+
realtimeEventListeners: Map<string, Set<import("./types.js").RealtimeMessageListener>>;
|
|
974
954
|
configure(options: Partial<import("./types.js").EntityServerClientOptions>): void;
|
|
975
955
|
setToken(token: string): void;
|
|
976
956
|
setAnonymousPacketToken(token: string): void;
|
|
@@ -991,21 +971,22 @@ declare const EntityAppServerApi_base: {
|
|
|
991
971
|
unsubscribeRealtime(subscriptions: string[]): boolean;
|
|
992
972
|
startHealthTick(intervalMs?: number): void;
|
|
993
973
|
stopHealthTick(): void;
|
|
994
|
-
|
|
974
|
+
scheduleKeepSession(refreshToken: string, expiresIn: number, refreshFn: (rt: string) => Promise<{
|
|
995
975
|
access_token: string;
|
|
996
976
|
expires_in: number;
|
|
997
977
|
}>): void;
|
|
998
|
-
|
|
978
|
+
clearRefreshTimer(): void;
|
|
999
979
|
stopKeepSession(): void;
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
980
|
+
applyRealtimeOptions(options?: boolean | import("./types.js").RealtimeClientOptions): void;
|
|
981
|
+
buildRealtimeUrl(): string;
|
|
982
|
+
handleRealtimeMessage(payload: unknown): void;
|
|
983
|
+
scheduleRealtimeReconnect(reason: string): void;
|
|
984
|
+
clearRealtimeReconnectTimer(): void;
|
|
985
|
+
setRealtimeStatus(status: import("./types.js").RealtimeConnectionStatus, reason?: string, error?: Error): void;
|
|
986
|
+
applyCsrfHealth(): void;
|
|
1007
987
|
readRequestBody<T = Record<string, unknown>>(body: ArrayBuffer | Uint8Array | string | T | null | undefined, contentType?: string, requireEncrypted?: boolean): T;
|
|
1008
|
-
get
|
|
988
|
+
get reqOpts(): import("./client/request.js").RequestOptions;
|
|
989
|
+
prepareRequest(_withAuth: boolean): Promise<void>;
|
|
1009
990
|
get http(): {
|
|
1010
991
|
get<T>(path: string, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
1011
992
|
post<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
@@ -1013,13 +994,10 @@ declare const EntityAppServerApi_base: {
|
|
|
1013
994
|
patch<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
1014
995
|
delete<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
1015
996
|
};
|
|
997
|
+
request<T>(method: string, path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
1016
998
|
requestBinary(method: string, path: string, body?: unknown, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
1017
999
|
requestForm<T>(method: string, path: string, form: FormData, withAuth?: boolean): Promise<T>;
|
|
1018
1000
|
requestFormBinary(method: string, path: string, form: FormData, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
1019
|
-
_request<T>(method: string, path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
1020
|
-
_requestBinary(method: string, path: string, body?: unknown, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
1021
|
-
_requestForm<T>(method: string, path: string, form: FormData, withAuth?: boolean): Promise<T>;
|
|
1022
|
-
_requestFormBinary(method: string, path: string, form: FormData, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
1023
1001
|
};
|
|
1024
1002
|
} & {
|
|
1025
1003
|
new (...args: any[]): {
|
|
@@ -1039,30 +1017,30 @@ declare const EntityAppServerApi_base: {
|
|
|
1039
1017
|
csrfEnabled: boolean;
|
|
1040
1018
|
csrfHeaderName: string;
|
|
1041
1019
|
csrfCookieName: string;
|
|
1042
|
-
|
|
1020
|
+
csrfRefresher: (() => Promise<void>) | null;
|
|
1043
1021
|
activeTxId: string | null;
|
|
1044
1022
|
keepSession: boolean;
|
|
1045
1023
|
refreshBuffer: number;
|
|
1046
1024
|
onTokenRefreshed?: (accessToken: string, expiresIn: number) => void;
|
|
1047
1025
|
onSessionExpired?: (error: Error) => void;
|
|
1048
1026
|
onHealthChange?: (online: boolean) => void;
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1027
|
+
sessionRefreshToken: string | null;
|
|
1028
|
+
refreshTimer: ReturnType<typeof setTimeout> | null;
|
|
1029
|
+
healthTickTimer: ReturnType<typeof setInterval> | null;
|
|
1030
|
+
healthTickPromise: Promise<unknown> | null;
|
|
1053
1031
|
realtimeEnabled: boolean;
|
|
1054
1032
|
realtimePath: string;
|
|
1055
1033
|
realtimeAutoConnect: boolean;
|
|
1056
1034
|
realtimeAutoReconnect: boolean;
|
|
1057
1035
|
realtimeReconnectDelayMs: number;
|
|
1058
1036
|
realtimeStatus: import("./types.js").RealtimeConnectionStatus;
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1037
|
+
realtimeSocket: WebSocket | null;
|
|
1038
|
+
realtimeConnectPromise: Promise<void> | null;
|
|
1039
|
+
realtimeReconnectTimer: ReturnType<typeof setTimeout> | null;
|
|
1040
|
+
realtimeShouldReconnect: boolean;
|
|
1041
|
+
realtimeMessageListeners: Set<import("./types.js").RealtimeMessageListener>;
|
|
1042
|
+
realtimeStatusListeners: Set<import("./types.js").RealtimeStatusListener>;
|
|
1043
|
+
realtimeEventListeners: Map<string, Set<import("./types.js").RealtimeMessageListener>>;
|
|
1066
1044
|
configure(options: Partial<import("./types.js").EntityServerClientOptions>): void;
|
|
1067
1045
|
setToken(token: string): void;
|
|
1068
1046
|
setAnonymousPacketToken(token: string): void;
|
|
@@ -1083,21 +1061,22 @@ declare const EntityAppServerApi_base: {
|
|
|
1083
1061
|
unsubscribeRealtime(subscriptions: string[]): boolean;
|
|
1084
1062
|
startHealthTick(intervalMs?: number): void;
|
|
1085
1063
|
stopHealthTick(): void;
|
|
1086
|
-
|
|
1064
|
+
scheduleKeepSession(refreshToken: string, expiresIn: number, refreshFn: (rt: string) => Promise<{
|
|
1087
1065
|
access_token: string;
|
|
1088
1066
|
expires_in: number;
|
|
1089
1067
|
}>): void;
|
|
1090
|
-
|
|
1068
|
+
clearRefreshTimer(): void;
|
|
1091
1069
|
stopKeepSession(): void;
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1070
|
+
applyRealtimeOptions(options?: boolean | import("./types.js").RealtimeClientOptions): void;
|
|
1071
|
+
buildRealtimeUrl(): string;
|
|
1072
|
+
handleRealtimeMessage(payload: unknown): void;
|
|
1073
|
+
scheduleRealtimeReconnect(reason: string): void;
|
|
1074
|
+
clearRealtimeReconnectTimer(): void;
|
|
1075
|
+
setRealtimeStatus(status: import("./types.js").RealtimeConnectionStatus, reason?: string, error?: Error): void;
|
|
1076
|
+
applyCsrfHealth(): void;
|
|
1099
1077
|
readRequestBody<T = Record<string, unknown>>(body: ArrayBuffer | Uint8Array | string | T | null | undefined, contentType?: string, requireEncrypted?: boolean): T;
|
|
1100
|
-
get
|
|
1078
|
+
get reqOpts(): import("./client/request.js").RequestOptions;
|
|
1079
|
+
prepareRequest(_withAuth: boolean): Promise<void>;
|
|
1101
1080
|
get http(): {
|
|
1102
1081
|
get<T>(path: string, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
1103
1082
|
post<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
@@ -1105,13 +1084,10 @@ declare const EntityAppServerApi_base: {
|
|
|
1105
1084
|
patch<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
1106
1085
|
delete<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
1107
1086
|
};
|
|
1087
|
+
request<T>(method: string, path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
1108
1088
|
requestBinary(method: string, path: string, body?: unknown, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
1109
1089
|
requestForm<T>(method: string, path: string, form: FormData, withAuth?: boolean): Promise<T>;
|
|
1110
1090
|
requestFormBinary(method: string, path: string, form: FormData, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
1111
|
-
_request<T>(method: string, path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
1112
|
-
_requestBinary(method: string, path: string, body?: unknown, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
1113
|
-
_requestForm<T>(method: string, path: string, form: FormData, withAuth?: boolean): Promise<T>;
|
|
1114
|
-
_requestFormBinary(method: string, path: string, form: FormData, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
1115
1091
|
};
|
|
1116
1092
|
} & {
|
|
1117
1093
|
new (...args: any[]): {
|
|
@@ -1129,30 +1105,30 @@ declare const EntityAppServerApi_base: {
|
|
|
1129
1105
|
csrfEnabled: boolean;
|
|
1130
1106
|
csrfHeaderName: string;
|
|
1131
1107
|
csrfCookieName: string;
|
|
1132
|
-
|
|
1108
|
+
csrfRefresher: (() => Promise<void>) | null;
|
|
1133
1109
|
activeTxId: string | null;
|
|
1134
1110
|
keepSession: boolean;
|
|
1135
1111
|
refreshBuffer: number;
|
|
1136
1112
|
onTokenRefreshed?: (accessToken: string, expiresIn: number) => void;
|
|
1137
1113
|
onSessionExpired?: (error: Error) => void;
|
|
1138
1114
|
onHealthChange?: (online: boolean) => void;
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1115
|
+
sessionRefreshToken: string | null;
|
|
1116
|
+
refreshTimer: ReturnType<typeof setTimeout> | null;
|
|
1117
|
+
healthTickTimer: ReturnType<typeof setInterval> | null;
|
|
1118
|
+
healthTickPromise: Promise<unknown> | null;
|
|
1143
1119
|
realtimeEnabled: boolean;
|
|
1144
1120
|
realtimePath: string;
|
|
1145
1121
|
realtimeAutoConnect: boolean;
|
|
1146
1122
|
realtimeAutoReconnect: boolean;
|
|
1147
1123
|
realtimeReconnectDelayMs: number;
|
|
1148
1124
|
realtimeStatus: import("./types.js").RealtimeConnectionStatus;
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1125
|
+
realtimeSocket: WebSocket | null;
|
|
1126
|
+
realtimeConnectPromise: Promise<void> | null;
|
|
1127
|
+
realtimeReconnectTimer: ReturnType<typeof setTimeout> | null;
|
|
1128
|
+
realtimeShouldReconnect: boolean;
|
|
1129
|
+
realtimeMessageListeners: Set<import("./types.js").RealtimeMessageListener>;
|
|
1130
|
+
realtimeStatusListeners: Set<import("./types.js").RealtimeStatusListener>;
|
|
1131
|
+
realtimeEventListeners: Map<string, Set<import("./types.js").RealtimeMessageListener>>;
|
|
1156
1132
|
configure(options: Partial<import("./types.js").EntityServerClientOptions>): void;
|
|
1157
1133
|
setToken(token: string): void;
|
|
1158
1134
|
setAnonymousPacketToken(token: string): void;
|
|
@@ -1173,21 +1149,22 @@ declare const EntityAppServerApi_base: {
|
|
|
1173
1149
|
unsubscribeRealtime(subscriptions: string[]): boolean;
|
|
1174
1150
|
startHealthTick(intervalMs?: number): void;
|
|
1175
1151
|
stopHealthTick(): void;
|
|
1176
|
-
|
|
1152
|
+
scheduleKeepSession(refreshToken: string, expiresIn: number, refreshFn: (rt: string) => Promise<{
|
|
1177
1153
|
access_token: string;
|
|
1178
1154
|
expires_in: number;
|
|
1179
1155
|
}>): void;
|
|
1180
|
-
|
|
1156
|
+
clearRefreshTimer(): void;
|
|
1181
1157
|
stopKeepSession(): void;
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1158
|
+
applyRealtimeOptions(options?: boolean | import("./types.js").RealtimeClientOptions): void;
|
|
1159
|
+
buildRealtimeUrl(): string;
|
|
1160
|
+
handleRealtimeMessage(payload: unknown): void;
|
|
1161
|
+
scheduleRealtimeReconnect(reason: string): void;
|
|
1162
|
+
clearRealtimeReconnectTimer(): void;
|
|
1163
|
+
setRealtimeStatus(status: import("./types.js").RealtimeConnectionStatus, reason?: string, error?: Error): void;
|
|
1164
|
+
applyCsrfHealth(): void;
|
|
1189
1165
|
readRequestBody<T = Record<string, unknown>>(body: ArrayBuffer | Uint8Array | string | T | null | undefined, contentType?: string, requireEncrypted?: boolean): T;
|
|
1190
|
-
get
|
|
1166
|
+
get reqOpts(): import("./client/request.js").RequestOptions;
|
|
1167
|
+
prepareRequest(_withAuth: boolean): Promise<void>;
|
|
1191
1168
|
get http(): {
|
|
1192
1169
|
get<T>(path: string, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
1193
1170
|
post<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
@@ -1195,13 +1172,10 @@ declare const EntityAppServerApi_base: {
|
|
|
1195
1172
|
patch<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
1196
1173
|
delete<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
1197
1174
|
};
|
|
1175
|
+
request<T>(method: string, path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
1198
1176
|
requestBinary(method: string, path: string, body?: unknown, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
1199
1177
|
requestForm<T>(method: string, path: string, form: FormData, withAuth?: boolean): Promise<T>;
|
|
1200
1178
|
requestFormBinary(method: string, path: string, form: FormData, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
1201
|
-
_request<T>(method: string, path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
1202
|
-
_requestBinary(method: string, path: string, body?: unknown, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
1203
|
-
_requestForm<T>(method: string, path: string, form: FormData, withAuth?: boolean): Promise<T>;
|
|
1204
|
-
_requestFormBinary(method: string, path: string, form: FormData, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
1205
1179
|
};
|
|
1206
1180
|
} & {
|
|
1207
1181
|
new (...args: any[]): {
|
|
@@ -1219,30 +1193,30 @@ declare const EntityAppServerApi_base: {
|
|
|
1219
1193
|
csrfEnabled: boolean;
|
|
1220
1194
|
csrfHeaderName: string;
|
|
1221
1195
|
csrfCookieName: string;
|
|
1222
|
-
|
|
1196
|
+
csrfRefresher: (() => Promise<void>) | null;
|
|
1223
1197
|
activeTxId: string | null;
|
|
1224
1198
|
keepSession: boolean;
|
|
1225
1199
|
refreshBuffer: number;
|
|
1226
1200
|
onTokenRefreshed?: (accessToken: string, expiresIn: number) => void;
|
|
1227
1201
|
onSessionExpired?: (error: Error) => void;
|
|
1228
1202
|
onHealthChange?: (online: boolean) => void;
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1203
|
+
sessionRefreshToken: string | null;
|
|
1204
|
+
refreshTimer: ReturnType<typeof setTimeout> | null;
|
|
1205
|
+
healthTickTimer: ReturnType<typeof setInterval> | null;
|
|
1206
|
+
healthTickPromise: Promise<unknown> | null;
|
|
1233
1207
|
realtimeEnabled: boolean;
|
|
1234
1208
|
realtimePath: string;
|
|
1235
1209
|
realtimeAutoConnect: boolean;
|
|
1236
1210
|
realtimeAutoReconnect: boolean;
|
|
1237
1211
|
realtimeReconnectDelayMs: number;
|
|
1238
1212
|
realtimeStatus: import("./types.js").RealtimeConnectionStatus;
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1213
|
+
realtimeSocket: WebSocket | null;
|
|
1214
|
+
realtimeConnectPromise: Promise<void> | null;
|
|
1215
|
+
realtimeReconnectTimer: ReturnType<typeof setTimeout> | null;
|
|
1216
|
+
realtimeShouldReconnect: boolean;
|
|
1217
|
+
realtimeMessageListeners: Set<import("./types.js").RealtimeMessageListener>;
|
|
1218
|
+
realtimeStatusListeners: Set<import("./types.js").RealtimeStatusListener>;
|
|
1219
|
+
realtimeEventListeners: Map<string, Set<import("./types.js").RealtimeMessageListener>>;
|
|
1246
1220
|
configure(options: Partial<import("./types.js").EntityServerClientOptions>): void;
|
|
1247
1221
|
setToken(token: string): void;
|
|
1248
1222
|
setAnonymousPacketToken(token: string): void;
|
|
@@ -1263,21 +1237,22 @@ declare const EntityAppServerApi_base: {
|
|
|
1263
1237
|
unsubscribeRealtime(subscriptions: string[]): boolean;
|
|
1264
1238
|
startHealthTick(intervalMs?: number): void;
|
|
1265
1239
|
stopHealthTick(): void;
|
|
1266
|
-
|
|
1240
|
+
scheduleKeepSession(refreshToken: string, expiresIn: number, refreshFn: (rt: string) => Promise<{
|
|
1267
1241
|
access_token: string;
|
|
1268
1242
|
expires_in: number;
|
|
1269
1243
|
}>): void;
|
|
1270
|
-
|
|
1244
|
+
clearRefreshTimer(): void;
|
|
1271
1245
|
stopKeepSession(): void;
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1246
|
+
applyRealtimeOptions(options?: boolean | import("./types.js").RealtimeClientOptions): void;
|
|
1247
|
+
buildRealtimeUrl(): string;
|
|
1248
|
+
handleRealtimeMessage(payload: unknown): void;
|
|
1249
|
+
scheduleRealtimeReconnect(reason: string): void;
|
|
1250
|
+
clearRealtimeReconnectTimer(): void;
|
|
1251
|
+
setRealtimeStatus(status: import("./types.js").RealtimeConnectionStatus, reason?: string, error?: Error): void;
|
|
1252
|
+
applyCsrfHealth(): void;
|
|
1279
1253
|
readRequestBody<T = Record<string, unknown>>(body: ArrayBuffer | Uint8Array | string | T | null | undefined, contentType?: string, requireEncrypted?: boolean): T;
|
|
1280
|
-
get
|
|
1254
|
+
get reqOpts(): import("./client/request.js").RequestOptions;
|
|
1255
|
+
prepareRequest(_withAuth: boolean): Promise<void>;
|
|
1281
1256
|
get http(): {
|
|
1282
1257
|
get<T>(path: string, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
1283
1258
|
post<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
@@ -1285,13 +1260,10 @@ declare const EntityAppServerApi_base: {
|
|
|
1285
1260
|
patch<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
1286
1261
|
delete<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
1287
1262
|
};
|
|
1263
|
+
request<T>(method: string, path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
1288
1264
|
requestBinary(method: string, path: string, body?: unknown, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
1289
1265
|
requestForm<T>(method: string, path: string, form: FormData, withAuth?: boolean): Promise<T>;
|
|
1290
1266
|
requestFormBinary(method: string, path: string, form: FormData, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
1291
|
-
_request<T>(method: string, path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
1292
|
-
_requestBinary(method: string, path: string, body?: unknown, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
1293
|
-
_requestForm<T>(method: string, path: string, form: FormData, withAuth?: boolean): Promise<T>;
|
|
1294
|
-
_requestFormBinary(method: string, path: string, form: FormData, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
1295
1267
|
};
|
|
1296
1268
|
} & {
|
|
1297
1269
|
new (...args: any[]): {
|
|
@@ -1337,30 +1309,30 @@ declare const EntityAppServerApi_base: {
|
|
|
1337
1309
|
csrfEnabled: boolean;
|
|
1338
1310
|
csrfHeaderName: string;
|
|
1339
1311
|
csrfCookieName: string;
|
|
1340
|
-
|
|
1312
|
+
csrfRefresher: (() => Promise<void>) | null;
|
|
1341
1313
|
activeTxId: string | null;
|
|
1342
1314
|
keepSession: boolean;
|
|
1343
1315
|
refreshBuffer: number;
|
|
1344
1316
|
onTokenRefreshed?: (accessToken: string, expiresIn: number) => void;
|
|
1345
1317
|
onSessionExpired?: (error: Error) => void;
|
|
1346
1318
|
onHealthChange?: (online: boolean) => void;
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1319
|
+
sessionRefreshToken: string | null;
|
|
1320
|
+
refreshTimer: ReturnType<typeof setTimeout> | null;
|
|
1321
|
+
healthTickTimer: ReturnType<typeof setInterval> | null;
|
|
1322
|
+
healthTickPromise: Promise<unknown> | null;
|
|
1351
1323
|
realtimeEnabled: boolean;
|
|
1352
1324
|
realtimePath: string;
|
|
1353
1325
|
realtimeAutoConnect: boolean;
|
|
1354
1326
|
realtimeAutoReconnect: boolean;
|
|
1355
1327
|
realtimeReconnectDelayMs: number;
|
|
1356
1328
|
realtimeStatus: import("./types.js").RealtimeConnectionStatus;
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1329
|
+
realtimeSocket: WebSocket | null;
|
|
1330
|
+
realtimeConnectPromise: Promise<void> | null;
|
|
1331
|
+
realtimeReconnectTimer: ReturnType<typeof setTimeout> | null;
|
|
1332
|
+
realtimeShouldReconnect: boolean;
|
|
1333
|
+
realtimeMessageListeners: Set<import("./types.js").RealtimeMessageListener>;
|
|
1334
|
+
realtimeStatusListeners: Set<import("./types.js").RealtimeStatusListener>;
|
|
1335
|
+
realtimeEventListeners: Map<string, Set<import("./types.js").RealtimeMessageListener>>;
|
|
1364
1336
|
configure(options: Partial<import("./types.js").EntityServerClientOptions>): void;
|
|
1365
1337
|
setToken(token: string): void;
|
|
1366
1338
|
setAnonymousPacketToken(token: string): void;
|
|
@@ -1381,21 +1353,22 @@ declare const EntityAppServerApi_base: {
|
|
|
1381
1353
|
unsubscribeRealtime(subscriptions: string[]): boolean;
|
|
1382
1354
|
startHealthTick(intervalMs?: number): void;
|
|
1383
1355
|
stopHealthTick(): void;
|
|
1384
|
-
|
|
1356
|
+
scheduleKeepSession(refreshToken: string, expiresIn: number, refreshFn: (rt: string) => Promise<{
|
|
1385
1357
|
access_token: string;
|
|
1386
1358
|
expires_in: number;
|
|
1387
1359
|
}>): void;
|
|
1388
|
-
|
|
1360
|
+
clearRefreshTimer(): void;
|
|
1389
1361
|
stopKeepSession(): void;
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1362
|
+
applyRealtimeOptions(options?: boolean | import("./types.js").RealtimeClientOptions): void;
|
|
1363
|
+
buildRealtimeUrl(): string;
|
|
1364
|
+
handleRealtimeMessage(payload: unknown): void;
|
|
1365
|
+
scheduleRealtimeReconnect(reason: string): void;
|
|
1366
|
+
clearRealtimeReconnectTimer(): void;
|
|
1367
|
+
setRealtimeStatus(status: import("./types.js").RealtimeConnectionStatus, reason?: string, error?: Error): void;
|
|
1368
|
+
applyCsrfHealth(): void;
|
|
1397
1369
|
readRequestBody<T = Record<string, unknown>>(body: ArrayBuffer | Uint8Array | string | T | null | undefined, contentType?: string, requireEncrypted?: boolean): T;
|
|
1398
|
-
get
|
|
1370
|
+
get reqOpts(): import("./client/request.js").RequestOptions;
|
|
1371
|
+
prepareRequest(_withAuth: boolean): Promise<void>;
|
|
1399
1372
|
get http(): {
|
|
1400
1373
|
get<T>(path: string, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
1401
1374
|
post<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
@@ -1403,13 +1376,10 @@ declare const EntityAppServerApi_base: {
|
|
|
1403
1376
|
patch<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
1404
1377
|
delete<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
1405
1378
|
};
|
|
1379
|
+
request<T>(method: string, path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
1406
1380
|
requestBinary(method: string, path: string, body?: unknown, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
1407
1381
|
requestForm<T>(method: string, path: string, form: FormData, withAuth?: boolean): Promise<T>;
|
|
1408
1382
|
requestFormBinary(method: string, path: string, form: FormData, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
1409
|
-
_request<T>(method: string, path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
1410
|
-
_requestBinary(method: string, path: string, body?: unknown, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
1411
|
-
_requestForm<T>(method: string, path: string, form: FormData, withAuth?: boolean): Promise<T>;
|
|
1412
|
-
_requestFormBinary(method: string, path: string, form: FormData, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
1413
1383
|
};
|
|
1414
1384
|
} & {
|
|
1415
1385
|
new (...args: any[]): {
|
|
@@ -1432,30 +1402,30 @@ declare const EntityAppServerApi_base: {
|
|
|
1432
1402
|
csrfEnabled: boolean;
|
|
1433
1403
|
csrfHeaderName: string;
|
|
1434
1404
|
csrfCookieName: string;
|
|
1435
|
-
|
|
1405
|
+
csrfRefresher: (() => Promise<void>) | null;
|
|
1436
1406
|
activeTxId: string | null;
|
|
1437
1407
|
keepSession: boolean;
|
|
1438
1408
|
refreshBuffer: number;
|
|
1439
1409
|
onTokenRefreshed?: (accessToken: string, expiresIn: number) => void;
|
|
1440
1410
|
onSessionExpired?: (error: Error) => void;
|
|
1441
1411
|
onHealthChange?: (online: boolean) => void;
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1412
|
+
sessionRefreshToken: string | null;
|
|
1413
|
+
refreshTimer: ReturnType<typeof setTimeout> | null;
|
|
1414
|
+
healthTickTimer: ReturnType<typeof setInterval> | null;
|
|
1415
|
+
healthTickPromise: Promise<unknown> | null;
|
|
1446
1416
|
realtimeEnabled: boolean;
|
|
1447
1417
|
realtimePath: string;
|
|
1448
1418
|
realtimeAutoConnect: boolean;
|
|
1449
1419
|
realtimeAutoReconnect: boolean;
|
|
1450
1420
|
realtimeReconnectDelayMs: number;
|
|
1451
1421
|
realtimeStatus: import("./types.js").RealtimeConnectionStatus;
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1422
|
+
realtimeSocket: WebSocket | null;
|
|
1423
|
+
realtimeConnectPromise: Promise<void> | null;
|
|
1424
|
+
realtimeReconnectTimer: ReturnType<typeof setTimeout> | null;
|
|
1425
|
+
realtimeShouldReconnect: boolean;
|
|
1426
|
+
realtimeMessageListeners: Set<import("./types.js").RealtimeMessageListener>;
|
|
1427
|
+
realtimeStatusListeners: Set<import("./types.js").RealtimeStatusListener>;
|
|
1428
|
+
realtimeEventListeners: Map<string, Set<import("./types.js").RealtimeMessageListener>>;
|
|
1459
1429
|
configure(options: Partial<import("./types.js").EntityServerClientOptions>): void;
|
|
1460
1430
|
setToken(token: string): void;
|
|
1461
1431
|
setAnonymousPacketToken(token: string): void;
|
|
@@ -1476,21 +1446,22 @@ declare const EntityAppServerApi_base: {
|
|
|
1476
1446
|
unsubscribeRealtime(subscriptions: string[]): boolean;
|
|
1477
1447
|
startHealthTick(intervalMs?: number): void;
|
|
1478
1448
|
stopHealthTick(): void;
|
|
1479
|
-
|
|
1449
|
+
scheduleKeepSession(refreshToken: string, expiresIn: number, refreshFn: (rt: string) => Promise<{
|
|
1480
1450
|
access_token: string;
|
|
1481
1451
|
expires_in: number;
|
|
1482
1452
|
}>): void;
|
|
1483
|
-
|
|
1453
|
+
clearRefreshTimer(): void;
|
|
1484
1454
|
stopKeepSession(): void;
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1455
|
+
applyRealtimeOptions(options?: boolean | import("./types.js").RealtimeClientOptions): void;
|
|
1456
|
+
buildRealtimeUrl(): string;
|
|
1457
|
+
handleRealtimeMessage(payload: unknown): void;
|
|
1458
|
+
scheduleRealtimeReconnect(reason: string): void;
|
|
1459
|
+
clearRealtimeReconnectTimer(): void;
|
|
1460
|
+
setRealtimeStatus(status: import("./types.js").RealtimeConnectionStatus, reason?: string, error?: Error): void;
|
|
1461
|
+
applyCsrfHealth(): void;
|
|
1492
1462
|
readRequestBody<T = Record<string, unknown>>(body: ArrayBuffer | Uint8Array | string | T | null | undefined, contentType?: string, requireEncrypted?: boolean): T;
|
|
1493
|
-
get
|
|
1463
|
+
get reqOpts(): import("./client/request.js").RequestOptions;
|
|
1464
|
+
prepareRequest(_withAuth: boolean): Promise<void>;
|
|
1494
1465
|
get http(): {
|
|
1495
1466
|
get<T>(path: string, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
1496
1467
|
post<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
@@ -1498,13 +1469,10 @@ declare const EntityAppServerApi_base: {
|
|
|
1498
1469
|
patch<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
1499
1470
|
delete<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
1500
1471
|
};
|
|
1472
|
+
request<T>(method: string, path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
1501
1473
|
requestBinary(method: string, path: string, body?: unknown, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
1502
1474
|
requestForm<T>(method: string, path: string, form: FormData, withAuth?: boolean): Promise<T>;
|
|
1503
1475
|
requestFormBinary(method: string, path: string, form: FormData, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
1504
|
-
_request<T>(method: string, path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
1505
|
-
_requestBinary(method: string, path: string, body?: unknown, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
1506
|
-
_requestForm<T>(method: string, path: string, form: FormData, withAuth?: boolean): Promise<T>;
|
|
1507
|
-
_requestFormBinary(method: string, path: string, form: FormData, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
1508
1476
|
};
|
|
1509
1477
|
} & typeof EntityServerApi;
|
|
1510
1478
|
export declare class EntityAppServerApi extends EntityAppServerApi_base {
|