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