entity-client 1.0.14 → 1.0.16
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 +368 -416
- package/dist/EntityServerApi.d.ts +193 -216
- package/dist/client/base.d.ts +26 -40
- package/dist/client/base.js +1 -1
- package/dist/client/base.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 +23 -26
- package/dist/mixins/app/plugins/friendtalk.d.ts +23 -26
- package/dist/mixins/app/plugins/holidays.d.ts +23 -26
- package/dist/mixins/app/plugins/identity.d.ts +23 -26
- package/dist/mixins/app/plugins/llm.d.ts +23 -26
- package/dist/mixins/app/plugins/ocr.d.ts +23 -26
- package/dist/mixins/app/plugins/pg.d.ts +23 -26
- package/dist/mixins/app/plugins/push.d.ts +23 -26
- package/dist/mixins/app/plugins/sms.d.ts +23 -26
- package/dist/mixins/app/plugins/taxinvoice.d.ts +23 -26
- package/dist/mixins/app/routes/account.d.ts +23 -26
- package/dist/mixins/app/routes/board.d.ts +23 -26
- package/dist/mixins/app/routes/email-verify.d.ts +23 -26
- package/dist/mixins/app/routes/oauth.d.ts +23 -26
- package/dist/mixins/app/routes/password-reset.d.ts +23 -26
- package/dist/mixins/app/routes/two-factor.d.ts +23 -26
- package/dist/mixins/server/admin.d.ts +29 -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 +26 -28
- package/dist/mixins/server/auth.js +1 -1
- package/dist/mixins/server/auth.js.map +2 -2
- package/dist/mixins/server/entity.d.ts +23 -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 +23 -26
- package/dist/mixins/server/file.js +1 -1
- package/dist/mixins/server/file.js.map +2 -2
- package/dist/mixins/server/push.d.ts +23 -26
- package/dist/mixins/server/smtp.d.ts +23 -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 +23 -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 +23 -26
- package/dist/mixins/server/utils.js +1 -1
- package/dist/mixins/server/utils.js.map +2 -2
- package/dist/react.js +1 -1
- package/dist/react.js.map +3 -3
- package/package.json +1 -1
|
@@ -45,30 +45,30 @@ declare const EntityServerApi_base: {
|
|
|
45
45
|
csrfEnabled: boolean;
|
|
46
46
|
csrfHeaderName: string;
|
|
47
47
|
csrfCookieName: string;
|
|
48
|
-
|
|
48
|
+
csrfRefresher: (() => Promise<void>) | null;
|
|
49
49
|
activeTxId: string | null;
|
|
50
50
|
keepSession: boolean;
|
|
51
51
|
refreshBuffer: number;
|
|
52
52
|
onTokenRefreshed?: (accessToken: string, expiresIn: number) => void;
|
|
53
53
|
onSessionExpired?: (error: Error) => void;
|
|
54
54
|
onHealthChange?: (online: boolean) => void;
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
55
|
+
sessionRefreshToken: string | null;
|
|
56
|
+
refreshTimer: ReturnType<typeof setTimeout> | null;
|
|
57
|
+
healthTickTimer: ReturnType<typeof setInterval> | null;
|
|
58
|
+
healthTickPromise: Promise<unknown> | null;
|
|
59
59
|
realtimeEnabled: boolean;
|
|
60
60
|
realtimePath: string;
|
|
61
61
|
realtimeAutoConnect: boolean;
|
|
62
62
|
realtimeAutoReconnect: boolean;
|
|
63
63
|
realtimeReconnectDelayMs: number;
|
|
64
64
|
realtimeStatus: import("./types.js").RealtimeConnectionStatus;
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
65
|
+
realtimeSocket: WebSocket | null;
|
|
66
|
+
realtimeConnectPromise: Promise<void> | null;
|
|
67
|
+
realtimeReconnectTimer: ReturnType<typeof setTimeout> | null;
|
|
68
|
+
realtimeShouldReconnect: boolean;
|
|
69
|
+
realtimeMessageListeners: Set<import("./types.js").RealtimeMessageListener>;
|
|
70
|
+
realtimeStatusListeners: Set<import("./types.js").RealtimeStatusListener>;
|
|
71
|
+
realtimeEventListeners: Map<string, Set<import("./types.js").RealtimeMessageListener>>;
|
|
72
72
|
configure(options: Partial<import("./types.js").EntityServerClientOptions>): void;
|
|
73
73
|
setToken(token: string): void;
|
|
74
74
|
setAnonymousPacketToken(token: string): void;
|
|
@@ -89,21 +89,21 @@ declare const EntityServerApi_base: {
|
|
|
89
89
|
unsubscribeRealtime(subscriptions: string[]): boolean;
|
|
90
90
|
startHealthTick(intervalMs?: number): void;
|
|
91
91
|
stopHealthTick(): void;
|
|
92
|
-
|
|
92
|
+
scheduleKeepSession(refreshToken: string, expiresIn: number, refreshFn: (rt: string) => Promise<{
|
|
93
93
|
access_token: string;
|
|
94
94
|
expires_in: number;
|
|
95
95
|
}>): void;
|
|
96
|
-
|
|
96
|
+
clearRefreshTimer(): void;
|
|
97
97
|
stopKeepSession(): void;
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
98
|
+
applyRealtimeOptions(options?: boolean | import("./types.js").RealtimeClientOptions): void;
|
|
99
|
+
buildRealtimeUrl(): string;
|
|
100
|
+
handleRealtimeMessage(payload: unknown): void;
|
|
101
|
+
scheduleRealtimeReconnect(reason: string): void;
|
|
102
|
+
clearRealtimeReconnectTimer(): void;
|
|
103
|
+
setRealtimeStatus(status: import("./types.js").RealtimeConnectionStatus, reason?: string, error?: Error): void;
|
|
104
|
+
applyCsrfHealth(): void;
|
|
105
105
|
readRequestBody<T = Record<string, unknown>>(body: ArrayBuffer | Uint8Array | string | T | null | undefined, contentType?: string, requireEncrypted?: boolean): T;
|
|
106
|
-
get
|
|
106
|
+
get reqOpts(): import("./client/request.js").RequestOptions;
|
|
107
107
|
get http(): {
|
|
108
108
|
get<T>(path: string, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
109
109
|
post<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
@@ -111,13 +111,10 @@ declare const EntityServerApi_base: {
|
|
|
111
111
|
patch<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
112
112
|
delete<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
113
113
|
};
|
|
114
|
+
request<T>(method: string, path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
114
115
|
requestBinary(method: string, path: string, body?: unknown, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
115
116
|
requestForm<T>(method: string, path: string, form: FormData, withAuth?: boolean): Promise<T>;
|
|
116
117
|
requestFormBinary(method: string, path: string, form: FormData, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
117
|
-
_request<T>(method: string, path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
118
|
-
_requestBinary(method: string, path: string, body?: unknown, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
119
|
-
_requestForm<T>(method: string, path: string, form: FormData, withAuth?: boolean): Promise<T>;
|
|
120
|
-
_requestFormBinary(method: string, path: string, form: FormData, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
121
118
|
};
|
|
122
119
|
} & {
|
|
123
120
|
new (...args: any[]): {
|
|
@@ -133,30 +130,30 @@ declare const EntityServerApi_base: {
|
|
|
133
130
|
csrfEnabled: boolean;
|
|
134
131
|
csrfHeaderName: string;
|
|
135
132
|
csrfCookieName: string;
|
|
136
|
-
|
|
133
|
+
csrfRefresher: (() => Promise<void>) | null;
|
|
137
134
|
activeTxId: string | null;
|
|
138
135
|
keepSession: boolean;
|
|
139
136
|
refreshBuffer: number;
|
|
140
137
|
onTokenRefreshed?: (accessToken: string, expiresIn: number) => void;
|
|
141
138
|
onSessionExpired?: (error: Error) => void;
|
|
142
139
|
onHealthChange?: (online: boolean) => void;
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
140
|
+
sessionRefreshToken: string | null;
|
|
141
|
+
refreshTimer: ReturnType<typeof setTimeout> | null;
|
|
142
|
+
healthTickTimer: ReturnType<typeof setInterval> | null;
|
|
143
|
+
healthTickPromise: Promise<unknown> | null;
|
|
147
144
|
realtimeEnabled: boolean;
|
|
148
145
|
realtimePath: string;
|
|
149
146
|
realtimeAutoConnect: boolean;
|
|
150
147
|
realtimeAutoReconnect: boolean;
|
|
151
148
|
realtimeReconnectDelayMs: number;
|
|
152
149
|
realtimeStatus: import("./types.js").RealtimeConnectionStatus;
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
150
|
+
realtimeSocket: WebSocket | null;
|
|
151
|
+
realtimeConnectPromise: Promise<void> | null;
|
|
152
|
+
realtimeReconnectTimer: ReturnType<typeof setTimeout> | null;
|
|
153
|
+
realtimeShouldReconnect: boolean;
|
|
154
|
+
realtimeMessageListeners: Set<import("./types.js").RealtimeMessageListener>;
|
|
155
|
+
realtimeStatusListeners: Set<import("./types.js").RealtimeStatusListener>;
|
|
156
|
+
realtimeEventListeners: Map<string, Set<import("./types.js").RealtimeMessageListener>>;
|
|
160
157
|
configure(options: Partial<import("./types.js").EntityServerClientOptions>): void;
|
|
161
158
|
setToken(token: string): void;
|
|
162
159
|
setAnonymousPacketToken(token: string): void;
|
|
@@ -177,21 +174,21 @@ declare const EntityServerApi_base: {
|
|
|
177
174
|
unsubscribeRealtime(subscriptions: string[]): boolean;
|
|
178
175
|
startHealthTick(intervalMs?: number): void;
|
|
179
176
|
stopHealthTick(): void;
|
|
180
|
-
|
|
177
|
+
scheduleKeepSession(refreshToken: string, expiresIn: number, refreshFn: (rt: string) => Promise<{
|
|
181
178
|
access_token: string;
|
|
182
179
|
expires_in: number;
|
|
183
180
|
}>): void;
|
|
184
|
-
|
|
181
|
+
clearRefreshTimer(): void;
|
|
185
182
|
stopKeepSession(): void;
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
183
|
+
applyRealtimeOptions(options?: boolean | import("./types.js").RealtimeClientOptions): void;
|
|
184
|
+
buildRealtimeUrl(): string;
|
|
185
|
+
handleRealtimeMessage(payload: unknown): void;
|
|
186
|
+
scheduleRealtimeReconnect(reason: string): void;
|
|
187
|
+
clearRealtimeReconnectTimer(): void;
|
|
188
|
+
setRealtimeStatus(status: import("./types.js").RealtimeConnectionStatus, reason?: string, error?: Error): void;
|
|
189
|
+
applyCsrfHealth(): void;
|
|
193
190
|
readRequestBody<T = Record<string, unknown>>(body: ArrayBuffer | Uint8Array | string | T | null | undefined, contentType?: string, requireEncrypted?: boolean): T;
|
|
194
|
-
get
|
|
191
|
+
get reqOpts(): import("./client/request.js").RequestOptions;
|
|
195
192
|
get http(): {
|
|
196
193
|
get<T>(path: string, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
197
194
|
post<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
@@ -199,13 +196,10 @@ declare const EntityServerApi_base: {
|
|
|
199
196
|
patch<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
200
197
|
delete<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
201
198
|
};
|
|
199
|
+
request<T>(method: string, path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
202
200
|
requestBinary(method: string, path: string, body?: unknown, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
203
201
|
requestForm<T>(method: string, path: string, form: FormData, withAuth?: boolean): Promise<T>;
|
|
204
202
|
requestFormBinary(method: string, path: string, form: FormData, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
205
|
-
_request<T>(method: string, path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
206
|
-
_requestBinary(method: string, path: string, body?: unknown, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
207
|
-
_requestForm<T>(method: string, path: string, form: FormData, withAuth?: boolean): Promise<T>;
|
|
208
|
-
_requestFormBinary(method: string, path: string, form: FormData, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
209
203
|
};
|
|
210
204
|
} & {
|
|
211
205
|
new (...args: any[]): {
|
|
@@ -250,30 +244,30 @@ declare const EntityServerApi_base: {
|
|
|
250
244
|
csrfEnabled: boolean;
|
|
251
245
|
csrfHeaderName: string;
|
|
252
246
|
csrfCookieName: string;
|
|
253
|
-
|
|
247
|
+
csrfRefresher: (() => Promise<void>) | null;
|
|
254
248
|
activeTxId: string | null;
|
|
255
249
|
keepSession: boolean;
|
|
256
250
|
refreshBuffer: number;
|
|
257
251
|
onTokenRefreshed?: (accessToken: string, expiresIn: number) => void;
|
|
258
252
|
onSessionExpired?: (error: Error) => void;
|
|
259
253
|
onHealthChange?: (online: boolean) => void;
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
254
|
+
sessionRefreshToken: string | null;
|
|
255
|
+
refreshTimer: ReturnType<typeof setTimeout> | null;
|
|
256
|
+
healthTickTimer: ReturnType<typeof setInterval> | null;
|
|
257
|
+
healthTickPromise: Promise<unknown> | null;
|
|
264
258
|
realtimeEnabled: boolean;
|
|
265
259
|
realtimePath: string;
|
|
266
260
|
realtimeAutoConnect: boolean;
|
|
267
261
|
realtimeAutoReconnect: boolean;
|
|
268
262
|
realtimeReconnectDelayMs: number;
|
|
269
263
|
realtimeStatus: import("./types.js").RealtimeConnectionStatus;
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
264
|
+
realtimeSocket: WebSocket | null;
|
|
265
|
+
realtimeConnectPromise: Promise<void> | null;
|
|
266
|
+
realtimeReconnectTimer: ReturnType<typeof setTimeout> | null;
|
|
267
|
+
realtimeShouldReconnect: boolean;
|
|
268
|
+
realtimeMessageListeners: Set<import("./types.js").RealtimeMessageListener>;
|
|
269
|
+
realtimeStatusListeners: Set<import("./types.js").RealtimeStatusListener>;
|
|
270
|
+
realtimeEventListeners: Map<string, Set<import("./types.js").RealtimeMessageListener>>;
|
|
277
271
|
configure(options: Partial<import("./types.js").EntityServerClientOptions>): void;
|
|
278
272
|
setToken(token: string): void;
|
|
279
273
|
setAnonymousPacketToken(token: string): void;
|
|
@@ -294,21 +288,21 @@ declare const EntityServerApi_base: {
|
|
|
294
288
|
unsubscribeRealtime(subscriptions: string[]): boolean;
|
|
295
289
|
startHealthTick(intervalMs?: number): void;
|
|
296
290
|
stopHealthTick(): void;
|
|
297
|
-
|
|
291
|
+
scheduleKeepSession(refreshToken: string, expiresIn: number, refreshFn: (rt: string) => Promise<{
|
|
298
292
|
access_token: string;
|
|
299
293
|
expires_in: number;
|
|
300
294
|
}>): void;
|
|
301
|
-
|
|
295
|
+
clearRefreshTimer(): void;
|
|
302
296
|
stopKeepSession(): void;
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
297
|
+
applyRealtimeOptions(options?: boolean | import("./types.js").RealtimeClientOptions): void;
|
|
298
|
+
buildRealtimeUrl(): string;
|
|
299
|
+
handleRealtimeMessage(payload: unknown): void;
|
|
300
|
+
scheduleRealtimeReconnect(reason: string): void;
|
|
301
|
+
clearRealtimeReconnectTimer(): void;
|
|
302
|
+
setRealtimeStatus(status: import("./types.js").RealtimeConnectionStatus, reason?: string, error?: Error): void;
|
|
303
|
+
applyCsrfHealth(): void;
|
|
310
304
|
readRequestBody<T = Record<string, unknown>>(body: ArrayBuffer | Uint8Array | string | T | null | undefined, contentType?: string, requireEncrypted?: boolean): T;
|
|
311
|
-
get
|
|
305
|
+
get reqOpts(): import("./client/request.js").RequestOptions;
|
|
312
306
|
get http(): {
|
|
313
307
|
get<T>(path: string, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
314
308
|
post<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
@@ -316,13 +310,10 @@ declare const EntityServerApi_base: {
|
|
|
316
310
|
patch<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
317
311
|
delete<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
318
312
|
};
|
|
313
|
+
request<T>(method: string, path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
319
314
|
requestBinary(method: string, path: string, body?: unknown, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
320
315
|
requestForm<T>(method: string, path: string, form: FormData, withAuth?: boolean): Promise<T>;
|
|
321
316
|
requestFormBinary(method: string, path: string, form: FormData, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
322
|
-
_request<T>(method: string, path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
323
|
-
_requestBinary(method: string, path: string, body?: unknown, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
324
|
-
_requestForm<T>(method: string, path: string, form: FormData, withAuth?: boolean): Promise<T>;
|
|
325
|
-
_requestFormBinary(method: string, path: string, form: FormData, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
326
317
|
};
|
|
327
318
|
} & {
|
|
328
319
|
new (...args: any[]): {
|
|
@@ -344,30 +335,30 @@ declare const EntityServerApi_base: {
|
|
|
344
335
|
csrfEnabled: boolean;
|
|
345
336
|
csrfHeaderName: string;
|
|
346
337
|
csrfCookieName: string;
|
|
347
|
-
|
|
338
|
+
csrfRefresher: (() => Promise<void>) | null;
|
|
348
339
|
activeTxId: string | null;
|
|
349
340
|
keepSession: boolean;
|
|
350
341
|
refreshBuffer: number;
|
|
351
342
|
onTokenRefreshed?: (accessToken: string, expiresIn: number) => void;
|
|
352
343
|
onSessionExpired?: (error: Error) => void;
|
|
353
344
|
onHealthChange?: (online: boolean) => void;
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
345
|
+
sessionRefreshToken: string | null;
|
|
346
|
+
refreshTimer: ReturnType<typeof setTimeout> | null;
|
|
347
|
+
healthTickTimer: ReturnType<typeof setInterval> | null;
|
|
348
|
+
healthTickPromise: Promise<unknown> | null;
|
|
358
349
|
realtimeEnabled: boolean;
|
|
359
350
|
realtimePath: string;
|
|
360
351
|
realtimeAutoConnect: boolean;
|
|
361
352
|
realtimeAutoReconnect: boolean;
|
|
362
353
|
realtimeReconnectDelayMs: number;
|
|
363
354
|
realtimeStatus: import("./types.js").RealtimeConnectionStatus;
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
355
|
+
realtimeSocket: WebSocket | null;
|
|
356
|
+
realtimeConnectPromise: Promise<void> | null;
|
|
357
|
+
realtimeReconnectTimer: ReturnType<typeof setTimeout> | null;
|
|
358
|
+
realtimeShouldReconnect: boolean;
|
|
359
|
+
realtimeMessageListeners: Set<import("./types.js").RealtimeMessageListener>;
|
|
360
|
+
realtimeStatusListeners: Set<import("./types.js").RealtimeStatusListener>;
|
|
361
|
+
realtimeEventListeners: Map<string, Set<import("./types.js").RealtimeMessageListener>>;
|
|
371
362
|
configure(options: Partial<import("./types.js").EntityServerClientOptions>): void;
|
|
372
363
|
setToken(token: string): void;
|
|
373
364
|
setAnonymousPacketToken(token: string): void;
|
|
@@ -388,21 +379,21 @@ declare const EntityServerApi_base: {
|
|
|
388
379
|
unsubscribeRealtime(subscriptions: string[]): boolean;
|
|
389
380
|
startHealthTick(intervalMs?: number): void;
|
|
390
381
|
stopHealthTick(): void;
|
|
391
|
-
|
|
382
|
+
scheduleKeepSession(refreshToken: string, expiresIn: number, refreshFn: (rt: string) => Promise<{
|
|
392
383
|
access_token: string;
|
|
393
384
|
expires_in: number;
|
|
394
385
|
}>): void;
|
|
395
|
-
|
|
386
|
+
clearRefreshTimer(): void;
|
|
396
387
|
stopKeepSession(): void;
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
388
|
+
applyRealtimeOptions(options?: boolean | import("./types.js").RealtimeClientOptions): void;
|
|
389
|
+
buildRealtimeUrl(): string;
|
|
390
|
+
handleRealtimeMessage(payload: unknown): void;
|
|
391
|
+
scheduleRealtimeReconnect(reason: string): void;
|
|
392
|
+
clearRealtimeReconnectTimer(): void;
|
|
393
|
+
setRealtimeStatus(status: import("./types.js").RealtimeConnectionStatus, reason?: string, error?: Error): void;
|
|
394
|
+
applyCsrfHealth(): void;
|
|
404
395
|
readRequestBody<T = Record<string, unknown>>(body: ArrayBuffer | Uint8Array | string | T | null | undefined, contentType?: string, requireEncrypted?: boolean): T;
|
|
405
|
-
get
|
|
396
|
+
get reqOpts(): import("./client/request.js").RequestOptions;
|
|
406
397
|
get http(): {
|
|
407
398
|
get<T>(path: string, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
408
399
|
post<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
@@ -410,13 +401,10 @@ declare const EntityServerApi_base: {
|
|
|
410
401
|
patch<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
411
402
|
delete<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
412
403
|
};
|
|
404
|
+
request<T>(method: string, path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
413
405
|
requestBinary(method: string, path: string, body?: unknown, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
414
406
|
requestForm<T>(method: string, path: string, form: FormData, withAuth?: boolean): Promise<T>;
|
|
415
407
|
requestFormBinary(method: string, path: string, form: FormData, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
416
|
-
_request<T>(method: string, path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
417
|
-
_requestBinary(method: string, path: string, body?: unknown, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
418
|
-
_requestForm<T>(method: string, path: string, form: FormData, withAuth?: boolean): Promise<T>;
|
|
419
|
-
_requestFormBinary(method: string, path: string, form: FormData, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
420
408
|
};
|
|
421
409
|
} & {
|
|
422
410
|
new (...args: any[]): {
|
|
@@ -456,30 +444,30 @@ declare const EntityServerApi_base: {
|
|
|
456
444
|
csrfEnabled: boolean;
|
|
457
445
|
csrfHeaderName: string;
|
|
458
446
|
csrfCookieName: string;
|
|
459
|
-
|
|
447
|
+
csrfRefresher: (() => Promise<void>) | null;
|
|
460
448
|
activeTxId: string | null;
|
|
461
449
|
keepSession: boolean;
|
|
462
450
|
refreshBuffer: number;
|
|
463
451
|
onTokenRefreshed?: (accessToken: string, expiresIn: number) => void;
|
|
464
452
|
onSessionExpired?: (error: Error) => void;
|
|
465
453
|
onHealthChange?: (online: boolean) => void;
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
454
|
+
sessionRefreshToken: string | null;
|
|
455
|
+
refreshTimer: ReturnType<typeof setTimeout> | null;
|
|
456
|
+
healthTickTimer: ReturnType<typeof setInterval> | null;
|
|
457
|
+
healthTickPromise: Promise<unknown> | null;
|
|
470
458
|
realtimeEnabled: boolean;
|
|
471
459
|
realtimePath: string;
|
|
472
460
|
realtimeAutoConnect: boolean;
|
|
473
461
|
realtimeAutoReconnect: boolean;
|
|
474
462
|
realtimeReconnectDelayMs: number;
|
|
475
463
|
realtimeStatus: import("./types.js").RealtimeConnectionStatus;
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
464
|
+
realtimeSocket: WebSocket | null;
|
|
465
|
+
realtimeConnectPromise: Promise<void> | null;
|
|
466
|
+
realtimeReconnectTimer: ReturnType<typeof setTimeout> | null;
|
|
467
|
+
realtimeShouldReconnect: boolean;
|
|
468
|
+
realtimeMessageListeners: Set<import("./types.js").RealtimeMessageListener>;
|
|
469
|
+
realtimeStatusListeners: Set<import("./types.js").RealtimeStatusListener>;
|
|
470
|
+
realtimeEventListeners: Map<string, Set<import("./types.js").RealtimeMessageListener>>;
|
|
483
471
|
configure(options: Partial<import("./types.js").EntityServerClientOptions>): void;
|
|
484
472
|
setToken(token: string): void;
|
|
485
473
|
setAnonymousPacketToken(token: string): void;
|
|
@@ -500,21 +488,21 @@ declare const EntityServerApi_base: {
|
|
|
500
488
|
unsubscribeRealtime(subscriptions: string[]): boolean;
|
|
501
489
|
startHealthTick(intervalMs?: number): void;
|
|
502
490
|
stopHealthTick(): void;
|
|
503
|
-
|
|
491
|
+
scheduleKeepSession(refreshToken: string, expiresIn: number, refreshFn: (rt: string) => Promise<{
|
|
504
492
|
access_token: string;
|
|
505
493
|
expires_in: number;
|
|
506
494
|
}>): void;
|
|
507
|
-
|
|
495
|
+
clearRefreshTimer(): void;
|
|
508
496
|
stopKeepSession(): void;
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
497
|
+
applyRealtimeOptions(options?: boolean | import("./types.js").RealtimeClientOptions): void;
|
|
498
|
+
buildRealtimeUrl(): string;
|
|
499
|
+
handleRealtimeMessage(payload: unknown): void;
|
|
500
|
+
scheduleRealtimeReconnect(reason: string): void;
|
|
501
|
+
clearRealtimeReconnectTimer(): void;
|
|
502
|
+
setRealtimeStatus(status: import("./types.js").RealtimeConnectionStatus, reason?: string, error?: Error): void;
|
|
503
|
+
applyCsrfHealth(): void;
|
|
516
504
|
readRequestBody<T = Record<string, unknown>>(body: ArrayBuffer | Uint8Array | string | T | null | undefined, contentType?: string, requireEncrypted?: boolean): T;
|
|
517
|
-
get
|
|
505
|
+
get reqOpts(): import("./client/request.js").RequestOptions;
|
|
518
506
|
get http(): {
|
|
519
507
|
get<T>(path: string, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
520
508
|
post<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
@@ -522,13 +510,10 @@ declare const EntityServerApi_base: {
|
|
|
522
510
|
patch<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
523
511
|
delete<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
524
512
|
};
|
|
513
|
+
request<T>(method: string, path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
525
514
|
requestBinary(method: string, path: string, body?: unknown, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
526
515
|
requestForm<T>(method: string, path: string, form: FormData, withAuth?: boolean): Promise<T>;
|
|
527
516
|
requestFormBinary(method: string, path: string, form: FormData, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
528
|
-
_request<T>(method: string, path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
529
|
-
_requestBinary(method: string, path: string, body?: unknown, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
530
|
-
_requestForm<T>(method: string, path: string, form: FormData, withAuth?: boolean): Promise<T>;
|
|
531
|
-
_requestFormBinary(method: string, path: string, form: FormData, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
532
517
|
submit(entity: string, data: Record<string, unknown>, opts?: {
|
|
533
518
|
transactionId?: string;
|
|
534
519
|
skipHooks?: boolean;
|
|
@@ -543,12 +528,12 @@ declare const EntityServerApi_base: {
|
|
|
543
528
|
};
|
|
544
529
|
} & {
|
|
545
530
|
new (...args: any[]): {
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
531
|
+
adminPath(path: string): string;
|
|
532
|
+
adminGet<T>(path: string): Promise<T>;
|
|
533
|
+
adminPost<T>(path: string, body?: unknown): Promise<T>;
|
|
534
|
+
adminPut<T>(path: string, body?: unknown): Promise<T>;
|
|
535
|
+
adminPatch<T>(path: string, body?: unknown): Promise<T>;
|
|
536
|
+
adminDelete<T>(path: string, body?: unknown): Promise<T>;
|
|
552
537
|
listAdminEntities<T = unknown>(): Promise<T>;
|
|
553
538
|
getAdminErdSchema<T = unknown>(): Promise<T>;
|
|
554
539
|
batchEnsureAdminEntities<T = unknown>(configs: unknown[]): Promise<T>;
|
|
@@ -603,30 +588,30 @@ declare const EntityServerApi_base: {
|
|
|
603
588
|
csrfEnabled: boolean;
|
|
604
589
|
csrfHeaderName: string;
|
|
605
590
|
csrfCookieName: string;
|
|
606
|
-
|
|
591
|
+
csrfRefresher: (() => Promise<void>) | null;
|
|
607
592
|
activeTxId: string | null;
|
|
608
593
|
keepSession: boolean;
|
|
609
594
|
refreshBuffer: number;
|
|
610
595
|
onTokenRefreshed?: (accessToken: string, expiresIn: number) => void;
|
|
611
596
|
onSessionExpired?: (error: Error) => void;
|
|
612
597
|
onHealthChange?: (online: boolean) => void;
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
598
|
+
sessionRefreshToken: string | null;
|
|
599
|
+
refreshTimer: ReturnType<typeof setTimeout> | null;
|
|
600
|
+
healthTickTimer: ReturnType<typeof setInterval> | null;
|
|
601
|
+
healthTickPromise: Promise<unknown> | null;
|
|
617
602
|
realtimeEnabled: boolean;
|
|
618
603
|
realtimePath: string;
|
|
619
604
|
realtimeAutoConnect: boolean;
|
|
620
605
|
realtimeAutoReconnect: boolean;
|
|
621
606
|
realtimeReconnectDelayMs: number;
|
|
622
607
|
realtimeStatus: import("./types.js").RealtimeConnectionStatus;
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
608
|
+
realtimeSocket: WebSocket | null;
|
|
609
|
+
realtimeConnectPromise: Promise<void> | null;
|
|
610
|
+
realtimeReconnectTimer: ReturnType<typeof setTimeout> | null;
|
|
611
|
+
realtimeShouldReconnect: boolean;
|
|
612
|
+
realtimeMessageListeners: Set<import("./types.js").RealtimeMessageListener>;
|
|
613
|
+
realtimeStatusListeners: Set<import("./types.js").RealtimeStatusListener>;
|
|
614
|
+
realtimeEventListeners: Map<string, Set<import("./types.js").RealtimeMessageListener>>;
|
|
630
615
|
configure(options: Partial<import("./types.js").EntityServerClientOptions>): void;
|
|
631
616
|
setToken(token: string): void;
|
|
632
617
|
setAnonymousPacketToken(token: string): void;
|
|
@@ -647,21 +632,21 @@ declare const EntityServerApi_base: {
|
|
|
647
632
|
unsubscribeRealtime(subscriptions: string[]): boolean;
|
|
648
633
|
startHealthTick(intervalMs?: number): void;
|
|
649
634
|
stopHealthTick(): void;
|
|
650
|
-
|
|
635
|
+
scheduleKeepSession(refreshToken: string, expiresIn: number, refreshFn: (rt: string) => Promise<{
|
|
651
636
|
access_token: string;
|
|
652
637
|
expires_in: number;
|
|
653
638
|
}>): void;
|
|
654
|
-
|
|
639
|
+
clearRefreshTimer(): void;
|
|
655
640
|
stopKeepSession(): void;
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
641
|
+
applyRealtimeOptions(options?: boolean | import("./types.js").RealtimeClientOptions): void;
|
|
642
|
+
buildRealtimeUrl(): string;
|
|
643
|
+
handleRealtimeMessage(payload: unknown): void;
|
|
644
|
+
scheduleRealtimeReconnect(reason: string): void;
|
|
645
|
+
clearRealtimeReconnectTimer(): void;
|
|
646
|
+
setRealtimeStatus(status: import("./types.js").RealtimeConnectionStatus, reason?: string, error?: Error): void;
|
|
647
|
+
applyCsrfHealth(): void;
|
|
663
648
|
readRequestBody<T = Record<string, unknown>>(body: ArrayBuffer | Uint8Array | string | T | null | undefined, contentType?: string, requireEncrypted?: boolean): T;
|
|
664
|
-
get
|
|
649
|
+
get reqOpts(): import("./client/request.js").RequestOptions;
|
|
665
650
|
get http(): {
|
|
666
651
|
get<T>(path: string, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
667
652
|
post<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
@@ -669,13 +654,10 @@ declare const EntityServerApi_base: {
|
|
|
669
654
|
patch<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
670
655
|
delete<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
671
656
|
};
|
|
657
|
+
request<T>(method: string, path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
672
658
|
requestBinary(method: string, path: string, body?: unknown, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
673
659
|
requestForm<T>(method: string, path: string, form: FormData, withAuth?: boolean): Promise<T>;
|
|
674
660
|
requestFormBinary(method: string, path: string, form: FormData, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
675
|
-
_request<T>(method: string, path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
676
|
-
_requestBinary(method: string, path: string, body?: unknown, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
677
|
-
_requestForm<T>(method: string, path: string, form: FormData, withAuth?: boolean): Promise<T>;
|
|
678
|
-
_requestFormBinary(method: string, path: string, form: FormData, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
679
661
|
};
|
|
680
662
|
} & {
|
|
681
663
|
new (...args: any[]): {
|
|
@@ -754,30 +736,30 @@ declare const EntityServerApi_base: {
|
|
|
754
736
|
csrfEnabled: boolean;
|
|
755
737
|
csrfHeaderName: string;
|
|
756
738
|
csrfCookieName: string;
|
|
757
|
-
|
|
739
|
+
csrfRefresher: (() => Promise<void>) | null;
|
|
758
740
|
activeTxId: string | null;
|
|
759
741
|
keepSession: boolean;
|
|
760
742
|
refreshBuffer: number;
|
|
761
743
|
onTokenRefreshed?: (accessToken: string, expiresIn: number) => void;
|
|
762
744
|
onSessionExpired?: (error: Error) => void;
|
|
763
745
|
onHealthChange?: (online: boolean) => void;
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
746
|
+
sessionRefreshToken: string | null;
|
|
747
|
+
refreshTimer: ReturnType<typeof setTimeout> | null;
|
|
748
|
+
healthTickTimer: ReturnType<typeof setInterval> | null;
|
|
749
|
+
healthTickPromise: Promise<unknown> | null;
|
|
768
750
|
realtimeEnabled: boolean;
|
|
769
751
|
realtimePath: string;
|
|
770
752
|
realtimeAutoConnect: boolean;
|
|
771
753
|
realtimeAutoReconnect: boolean;
|
|
772
754
|
realtimeReconnectDelayMs: number;
|
|
773
755
|
realtimeStatus: import("./types.js").RealtimeConnectionStatus;
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
756
|
+
realtimeSocket: WebSocket | null;
|
|
757
|
+
realtimeConnectPromise: Promise<void> | null;
|
|
758
|
+
realtimeReconnectTimer: ReturnType<typeof setTimeout> | null;
|
|
759
|
+
realtimeShouldReconnect: boolean;
|
|
760
|
+
realtimeMessageListeners: Set<import("./types.js").RealtimeMessageListener>;
|
|
761
|
+
realtimeStatusListeners: Set<import("./types.js").RealtimeStatusListener>;
|
|
762
|
+
realtimeEventListeners: Map<string, Set<import("./types.js").RealtimeMessageListener>>;
|
|
781
763
|
configure(options: Partial<import("./types.js").EntityServerClientOptions>): void;
|
|
782
764
|
setToken(token: string): void;
|
|
783
765
|
setAnonymousPacketToken(token: string): void;
|
|
@@ -798,21 +780,21 @@ declare const EntityServerApi_base: {
|
|
|
798
780
|
unsubscribeRealtime(subscriptions: string[]): boolean;
|
|
799
781
|
startHealthTick(intervalMs?: number): void;
|
|
800
782
|
stopHealthTick(): void;
|
|
801
|
-
|
|
783
|
+
scheduleKeepSession(refreshToken: string, expiresIn: number, refreshFn: (rt: string) => Promise<{
|
|
802
784
|
access_token: string;
|
|
803
785
|
expires_in: number;
|
|
804
786
|
}>): void;
|
|
805
|
-
|
|
787
|
+
clearRefreshTimer(): void;
|
|
806
788
|
stopKeepSession(): void;
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
789
|
+
applyRealtimeOptions(options?: boolean | import("./types.js").RealtimeClientOptions): void;
|
|
790
|
+
buildRealtimeUrl(): string;
|
|
791
|
+
handleRealtimeMessage(payload: unknown): void;
|
|
792
|
+
scheduleRealtimeReconnect(reason: string): void;
|
|
793
|
+
clearRealtimeReconnectTimer(): void;
|
|
794
|
+
setRealtimeStatus(status: import("./types.js").RealtimeConnectionStatus, reason?: string, error?: Error): void;
|
|
795
|
+
applyCsrfHealth(): void;
|
|
814
796
|
readRequestBody<T = Record<string, unknown>>(body: ArrayBuffer | Uint8Array | string | T | null | undefined, contentType?: string, requireEncrypted?: boolean): T;
|
|
815
|
-
get
|
|
797
|
+
get reqOpts(): import("./client/request.js").RequestOptions;
|
|
816
798
|
get http(): {
|
|
817
799
|
get<T>(path: string, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
818
800
|
post<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
@@ -820,23 +802,21 @@ declare const EntityServerApi_base: {
|
|
|
820
802
|
patch<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
821
803
|
delete<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
822
804
|
};
|
|
805
|
+
request<T>(method: string, path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
823
806
|
requestBinary(method: string, path: string, body?: unknown, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
824
807
|
requestForm<T>(method: string, path: string, form: FormData, withAuth?: boolean): Promise<T>;
|
|
825
808
|
requestFormBinary(method: string, path: string, form: FormData, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
826
|
-
_request<T>(method: string, path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
827
|
-
_requestBinary(method: string, path: string, body?: unknown, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
828
|
-
_requestForm<T>(method: string, path: string, form: FormData, withAuth?: boolean): Promise<T>;
|
|
829
|
-
_requestFormBinary(method: string, path: string, form: FormData, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
830
809
|
};
|
|
831
810
|
} & {
|
|
832
811
|
new (...args: any[]): {
|
|
833
|
-
|
|
812
|
+
csrfRefresher: () => Promise<void>;
|
|
834
813
|
checkHealth(bootstrapAuth?: boolean): Promise<{
|
|
835
814
|
status: string;
|
|
836
815
|
authenticated?: boolean;
|
|
816
|
+
packet_encryption?: boolean;
|
|
837
817
|
}>;
|
|
838
|
-
|
|
839
|
-
|
|
818
|
+
readCookie(name: string): string | null;
|
|
819
|
+
ensurePublicAuthBootstrap(): Promise<void>;
|
|
840
820
|
login(email: string, password: string): Promise<import("./index.js").AuthLoginResponse>;
|
|
841
821
|
tokenRefresh(): Promise<{
|
|
842
822
|
access_token: string;
|
|
@@ -873,23 +853,23 @@ declare const EntityServerApi_base: {
|
|
|
873
853
|
onTokenRefreshed?: (accessToken: string, expiresIn: number) => void;
|
|
874
854
|
onSessionExpired?: (error: Error) => void;
|
|
875
855
|
onHealthChange?: (online: boolean) => void;
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
856
|
+
sessionRefreshToken: string | null;
|
|
857
|
+
refreshTimer: ReturnType<typeof setTimeout> | null;
|
|
858
|
+
healthTickTimer: ReturnType<typeof setInterval> | null;
|
|
859
|
+
healthTickPromise: Promise<unknown> | null;
|
|
880
860
|
realtimeEnabled: boolean;
|
|
881
861
|
realtimePath: string;
|
|
882
862
|
realtimeAutoConnect: boolean;
|
|
883
863
|
realtimeAutoReconnect: boolean;
|
|
884
864
|
realtimeReconnectDelayMs: number;
|
|
885
865
|
realtimeStatus: import("./types.js").RealtimeConnectionStatus;
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
866
|
+
realtimeSocket: WebSocket | null;
|
|
867
|
+
realtimeConnectPromise: Promise<void> | null;
|
|
868
|
+
realtimeReconnectTimer: ReturnType<typeof setTimeout> | null;
|
|
869
|
+
realtimeShouldReconnect: boolean;
|
|
870
|
+
realtimeMessageListeners: Set<import("./types.js").RealtimeMessageListener>;
|
|
871
|
+
realtimeStatusListeners: Set<import("./types.js").RealtimeStatusListener>;
|
|
872
|
+
realtimeEventListeners: Map<string, Set<import("./types.js").RealtimeMessageListener>>;
|
|
893
873
|
configure(options: Partial<import("./types.js").EntityServerClientOptions>): void;
|
|
894
874
|
setToken(token: string): void;
|
|
895
875
|
setAnonymousPacketToken(token: string): void;
|
|
@@ -910,21 +890,21 @@ declare const EntityServerApi_base: {
|
|
|
910
890
|
unsubscribeRealtime(subscriptions: string[]): boolean;
|
|
911
891
|
startHealthTick(intervalMs?: number): void;
|
|
912
892
|
stopHealthTick(): void;
|
|
913
|
-
|
|
893
|
+
scheduleKeepSession(refreshToken: string, expiresIn: number, refreshFn: (rt: string) => Promise<{
|
|
914
894
|
access_token: string;
|
|
915
895
|
expires_in: number;
|
|
916
896
|
}>): void;
|
|
917
|
-
|
|
897
|
+
clearRefreshTimer(): void;
|
|
918
898
|
stopKeepSession(): void;
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
899
|
+
applyRealtimeOptions(options?: boolean | import("./types.js").RealtimeClientOptions): void;
|
|
900
|
+
buildRealtimeUrl(): string;
|
|
901
|
+
handleRealtimeMessage(payload: unknown): void;
|
|
902
|
+
scheduleRealtimeReconnect(reason: string): void;
|
|
903
|
+
clearRealtimeReconnectTimer(): void;
|
|
904
|
+
setRealtimeStatus(status: import("./types.js").RealtimeConnectionStatus, reason?: string, error?: Error): void;
|
|
905
|
+
applyCsrfHealth(): void;
|
|
926
906
|
readRequestBody<T = Record<string, unknown>>(body: ArrayBuffer | Uint8Array | string | T | null | undefined, contentType?: string, requireEncrypted?: boolean): T;
|
|
927
|
-
get
|
|
907
|
+
get reqOpts(): import("./client/request.js").RequestOptions;
|
|
928
908
|
get http(): {
|
|
929
909
|
get<T>(path: string, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
930
910
|
post<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
@@ -932,13 +912,10 @@ declare const EntityServerApi_base: {
|
|
|
932
912
|
patch<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
933
913
|
delete<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
934
914
|
};
|
|
915
|
+
request<T>(method: string, path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
935
916
|
requestBinary(method: string, path: string, body?: unknown, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
936
917
|
requestForm<T>(method: string, path: string, form: FormData, withAuth?: boolean): Promise<T>;
|
|
937
918
|
requestFormBinary(method: string, path: string, form: FormData, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
938
|
-
_request<T>(method: string, path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
939
|
-
_requestBinary(method: string, path: string, body?: unknown, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
940
|
-
_requestForm<T>(method: string, path: string, form: FormData, withAuth?: boolean): Promise<T>;
|
|
941
|
-
_requestFormBinary(method: string, path: string, form: FormData, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
942
919
|
};
|
|
943
920
|
} & typeof EntityServerClientBase;
|
|
944
921
|
export declare class EntityServerApi extends EntityServerApi_base {
|