@syncular/server-hono 0.0.1 → 0.0.2-127
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 +23 -0
- package/dist/api-key-auth.js +1 -1
- package/dist/blobs.d.ts.map +1 -1
- package/dist/blobs.js +31 -8
- package/dist/blobs.js.map +1 -1
- package/dist/console/index.d.ts +1 -1
- package/dist/console/index.d.ts.map +1 -1
- package/dist/console/index.js +1 -1
- package/dist/console/index.js.map +1 -1
- package/dist/console/routes.d.ts +1 -2
- package/dist/console/routes.d.ts.map +1 -1
- package/dist/console/routes.js +65 -2
- package/dist/console/routes.js.map +1 -1
- package/dist/console/schemas.d.ts +138 -496
- package/dist/console/schemas.d.ts.map +1 -1
- package/dist/console/schemas.js +3 -9
- package/dist/console/schemas.js.map +1 -1
- package/dist/create-server.d.ts +3 -1
- package/dist/create-server.d.ts.map +1 -1
- package/dist/create-server.js +4 -3
- package/dist/create-server.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -9
- package/dist/index.js.map +1 -1
- package/dist/proxy/connection-manager.d.ts +1 -1
- package/dist/proxy/connection-manager.d.ts.map +1 -1
- package/dist/proxy/connection-manager.js +1 -1
- package/dist/proxy/connection-manager.js.map +1 -1
- package/dist/proxy/index.js +2 -2
- package/dist/proxy/routes.d.ts +2 -2
- package/dist/proxy/routes.d.ts.map +1 -1
- package/dist/proxy/routes.js +3 -3
- package/dist/proxy/routes.js.map +1 -1
- package/dist/routes.d.ts +2 -2
- package/dist/routes.d.ts.map +1 -1
- package/dist/routes.js +447 -260
- package/dist/routes.js.map +1 -1
- package/dist/ws.d.ts +40 -3
- package/dist/ws.d.ts.map +1 -1
- package/dist/ws.js +51 -6
- package/dist/ws.js.map +1 -1
- package/package.json +32 -9
- package/src/__tests__/pull-chunk-storage.test.ts +415 -27
- package/src/__tests__/realtime-bridge.test.ts +3 -1
- package/src/__tests__/sync-rate-limit-routing.test.ts +181 -0
- package/src/blobs.ts +31 -8
- package/src/console/index.ts +1 -0
- package/src/console/routes.ts +78 -25
- package/src/console/schemas.ts +0 -31
- package/src/create-server.ts +6 -0
- package/src/index.ts +12 -3
- package/src/proxy/connection-manager.ts +2 -2
- package/src/proxy/routes.ts +3 -3
- package/src/routes.ts +570 -327
- package/src/ws.ts +76 -13
|
@@ -11,25 +11,7 @@ export declare const SyncStatsSchema: z.ZodObject<{
|
|
|
11
11
|
activeClientCount: z.ZodNumber;
|
|
12
12
|
minActiveClientCursor: z.ZodNullable<z.ZodNumber>;
|
|
13
13
|
maxActiveClientCursor: z.ZodNullable<z.ZodNumber>;
|
|
14
|
-
},
|
|
15
|
-
commitCount: number;
|
|
16
|
-
changeCount: number;
|
|
17
|
-
minCommitSeq: number;
|
|
18
|
-
maxCommitSeq: number;
|
|
19
|
-
clientCount: number;
|
|
20
|
-
activeClientCount: number;
|
|
21
|
-
minActiveClientCursor: number | null;
|
|
22
|
-
maxActiveClientCursor: number | null;
|
|
23
|
-
}, {
|
|
24
|
-
commitCount: number;
|
|
25
|
-
changeCount: number;
|
|
26
|
-
minCommitSeq: number;
|
|
27
|
-
maxCommitSeq: number;
|
|
28
|
-
clientCount: number;
|
|
29
|
-
activeClientCount: number;
|
|
30
|
-
minActiveClientCursor: number | null;
|
|
31
|
-
maxActiveClientCursor: number | null;
|
|
32
|
-
}>;
|
|
14
|
+
}, z.core.$strip>;
|
|
33
15
|
export type SyncStats = z.infer<typeof SyncStatsSchema>;
|
|
34
16
|
export declare const ConsoleCommitListItemSchema: z.ZodObject<{
|
|
35
17
|
commitSeq: z.ZodNumber;
|
|
@@ -38,50 +20,21 @@ export declare const ConsoleCommitListItemSchema: z.ZodObject<{
|
|
|
38
20
|
clientCommitId: z.ZodString;
|
|
39
21
|
createdAt: z.ZodString;
|
|
40
22
|
changeCount: z.ZodNumber;
|
|
41
|
-
affectedTables: z.ZodArray<z.ZodString
|
|
42
|
-
},
|
|
43
|
-
commitSeq: number;
|
|
44
|
-
actorId: string;
|
|
45
|
-
clientId: string;
|
|
46
|
-
clientCommitId: string;
|
|
47
|
-
createdAt: string;
|
|
48
|
-
changeCount: number;
|
|
49
|
-
affectedTables: string[];
|
|
50
|
-
}, {
|
|
51
|
-
commitSeq: number;
|
|
52
|
-
actorId: string;
|
|
53
|
-
clientId: string;
|
|
54
|
-
clientCommitId: string;
|
|
55
|
-
createdAt: string;
|
|
56
|
-
changeCount: number;
|
|
57
|
-
affectedTables: string[];
|
|
58
|
-
}>;
|
|
23
|
+
affectedTables: z.ZodArray<z.ZodString>;
|
|
24
|
+
}, z.core.$strip>;
|
|
59
25
|
export type ConsoleCommitListItem = z.infer<typeof ConsoleCommitListItemSchema>;
|
|
60
26
|
export declare const ConsoleChangeSchema: z.ZodObject<{
|
|
61
27
|
changeId: z.ZodNumber;
|
|
62
28
|
table: z.ZodString;
|
|
63
29
|
rowId: z.ZodString;
|
|
64
|
-
op: z.ZodEnum<
|
|
30
|
+
op: z.ZodEnum<{
|
|
31
|
+
delete: "delete";
|
|
32
|
+
upsert: "upsert";
|
|
33
|
+
}>;
|
|
65
34
|
rowJson: z.ZodNullable<z.ZodUnknown>;
|
|
66
35
|
rowVersion: z.ZodNullable<z.ZodNumber>;
|
|
67
36
|
scopes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
68
|
-
},
|
|
69
|
-
changeId: number;
|
|
70
|
-
table: string;
|
|
71
|
-
rowId: string;
|
|
72
|
-
op: "delete" | "upsert";
|
|
73
|
-
rowJson?: unknown;
|
|
74
|
-
rowVersion: number | null;
|
|
75
|
-
scopes: Record<string, unknown>;
|
|
76
|
-
}, {
|
|
77
|
-
changeId: number;
|
|
78
|
-
table: string;
|
|
79
|
-
rowId: string;
|
|
80
|
-
op: "delete" | "upsert";
|
|
81
|
-
rowJson?: unknown;
|
|
82
|
-
rowVersion: number | null;
|
|
83
|
-
scopes: Record<string, unknown>;
|
|
84
|
-
}>;
|
|
37
|
+
}, z.core.$strip>;
|
|
85
38
|
export type ConsoleChange = z.infer<typeof ConsoleChangeSchema>;
|
|
86
39
|
export declare const ConsoleCommitDetailSchema: z.ZodObject<{
|
|
87
40
|
commitSeq: z.ZodNumber;
|
|
@@ -90,169 +43,84 @@ export declare const ConsoleCommitDetailSchema: z.ZodObject<{
|
|
|
90
43
|
clientCommitId: z.ZodString;
|
|
91
44
|
createdAt: z.ZodString;
|
|
92
45
|
changeCount: z.ZodNumber;
|
|
93
|
-
affectedTables: z.ZodArray<z.ZodString
|
|
94
|
-
} & {
|
|
46
|
+
affectedTables: z.ZodArray<z.ZodString>;
|
|
95
47
|
changes: z.ZodArray<z.ZodObject<{
|
|
96
48
|
changeId: z.ZodNumber;
|
|
97
49
|
table: z.ZodString;
|
|
98
50
|
rowId: z.ZodString;
|
|
99
|
-
op: z.ZodEnum<
|
|
51
|
+
op: z.ZodEnum<{
|
|
52
|
+
delete: "delete";
|
|
53
|
+
upsert: "upsert";
|
|
54
|
+
}>;
|
|
100
55
|
rowJson: z.ZodNullable<z.ZodUnknown>;
|
|
101
56
|
rowVersion: z.ZodNullable<z.ZodNumber>;
|
|
102
57
|
scopes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
103
|
-
},
|
|
104
|
-
|
|
105
|
-
table: string;
|
|
106
|
-
rowId: string;
|
|
107
|
-
op: "delete" | "upsert";
|
|
108
|
-
rowJson?: unknown;
|
|
109
|
-
rowVersion: number | null;
|
|
110
|
-
scopes: Record<string, unknown>;
|
|
111
|
-
}, {
|
|
112
|
-
changeId: number;
|
|
113
|
-
table: string;
|
|
114
|
-
rowId: string;
|
|
115
|
-
op: "delete" | "upsert";
|
|
116
|
-
rowJson?: unknown;
|
|
117
|
-
rowVersion: number | null;
|
|
118
|
-
scopes: Record<string, unknown>;
|
|
119
|
-
}>, "many">;
|
|
120
|
-
}, "strip", z.ZodTypeAny, {
|
|
121
|
-
commitSeq: number;
|
|
122
|
-
actorId: string;
|
|
123
|
-
clientId: string;
|
|
124
|
-
clientCommitId: string;
|
|
125
|
-
createdAt: string;
|
|
126
|
-
changeCount: number;
|
|
127
|
-
affectedTables: string[];
|
|
128
|
-
changes: {
|
|
129
|
-
changeId: number;
|
|
130
|
-
table: string;
|
|
131
|
-
rowId: string;
|
|
132
|
-
op: "delete" | "upsert";
|
|
133
|
-
rowJson?: unknown;
|
|
134
|
-
rowVersion: number | null;
|
|
135
|
-
scopes: Record<string, unknown>;
|
|
136
|
-
}[];
|
|
137
|
-
}, {
|
|
138
|
-
commitSeq: number;
|
|
139
|
-
actorId: string;
|
|
140
|
-
clientId: string;
|
|
141
|
-
clientCommitId: string;
|
|
142
|
-
createdAt: string;
|
|
143
|
-
changeCount: number;
|
|
144
|
-
affectedTables: string[];
|
|
145
|
-
changes: {
|
|
146
|
-
changeId: number;
|
|
147
|
-
table: string;
|
|
148
|
-
rowId: string;
|
|
149
|
-
op: "delete" | "upsert";
|
|
150
|
-
rowJson?: unknown;
|
|
151
|
-
rowVersion: number | null;
|
|
152
|
-
scopes: Record<string, unknown>;
|
|
153
|
-
}[];
|
|
154
|
-
}>;
|
|
58
|
+
}, z.core.$strip>>;
|
|
59
|
+
}, z.core.$strip>;
|
|
155
60
|
export type ConsoleCommitDetail = z.infer<typeof ConsoleCommitDetailSchema>;
|
|
156
61
|
export declare const ConsoleClientSchema: z.ZodObject<{
|
|
157
62
|
clientId: z.ZodString;
|
|
158
63
|
actorId: z.ZodString;
|
|
159
64
|
cursor: z.ZodNumber;
|
|
160
65
|
lagCommitCount: z.ZodNumber;
|
|
161
|
-
connectionPath: z.ZodEnum<
|
|
162
|
-
|
|
66
|
+
connectionPath: z.ZodEnum<{
|
|
67
|
+
direct: "direct";
|
|
68
|
+
relay: "relay";
|
|
69
|
+
}>;
|
|
70
|
+
connectionMode: z.ZodEnum<{
|
|
71
|
+
polling: "polling";
|
|
72
|
+
realtime: "realtime";
|
|
73
|
+
}>;
|
|
163
74
|
realtimeConnectionCount: z.ZodNumber;
|
|
164
75
|
isRealtimeConnected: z.ZodBoolean;
|
|
165
|
-
activityState: z.ZodEnum<
|
|
76
|
+
activityState: z.ZodEnum<{
|
|
77
|
+
active: "active";
|
|
78
|
+
idle: "idle";
|
|
79
|
+
stale: "stale";
|
|
80
|
+
}>;
|
|
166
81
|
lastRequestAt: z.ZodNullable<z.ZodString>;
|
|
167
|
-
lastRequestType: z.ZodNullable<z.ZodEnum<
|
|
82
|
+
lastRequestType: z.ZodNullable<z.ZodEnum<{
|
|
83
|
+
pull: "pull";
|
|
84
|
+
push: "push";
|
|
85
|
+
}>>;
|
|
168
86
|
lastRequestOutcome: z.ZodNullable<z.ZodString>;
|
|
169
87
|
effectiveScopes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
170
88
|
updatedAt: z.ZodString;
|
|
171
|
-
},
|
|
172
|
-
clientId: string;
|
|
173
|
-
actorId: string;
|
|
174
|
-
cursor: number;
|
|
175
|
-
lagCommitCount: number;
|
|
176
|
-
connectionPath: "direct" | "relay";
|
|
177
|
-
connectionMode: "polling" | "realtime";
|
|
178
|
-
realtimeConnectionCount: number;
|
|
179
|
-
isRealtimeConnected: boolean;
|
|
180
|
-
activityState: "active" | "idle" | "stale";
|
|
181
|
-
lastRequestAt: string | null;
|
|
182
|
-
lastRequestType: "pull" | "push" | null;
|
|
183
|
-
lastRequestOutcome: string | null;
|
|
184
|
-
effectiveScopes: Record<string, unknown>;
|
|
185
|
-
updatedAt: string;
|
|
186
|
-
}, {
|
|
187
|
-
clientId: string;
|
|
188
|
-
actorId: string;
|
|
189
|
-
cursor: number;
|
|
190
|
-
lagCommitCount: number;
|
|
191
|
-
connectionPath: "direct" | "relay";
|
|
192
|
-
connectionMode: "polling" | "realtime";
|
|
193
|
-
realtimeConnectionCount: number;
|
|
194
|
-
isRealtimeConnected: boolean;
|
|
195
|
-
activityState: "active" | "idle" | "stale";
|
|
196
|
-
lastRequestAt: string | null;
|
|
197
|
-
lastRequestType: "pull" | "push" | null;
|
|
198
|
-
lastRequestOutcome: string | null;
|
|
199
|
-
effectiveScopes: Record<string, unknown>;
|
|
200
|
-
updatedAt: string;
|
|
201
|
-
}>;
|
|
89
|
+
}, z.core.$strip>;
|
|
202
90
|
export type ConsoleClient = z.infer<typeof ConsoleClientSchema>;
|
|
203
91
|
export declare const ConsoleHandlerSchema: z.ZodObject<{
|
|
204
92
|
table: z.ZodString;
|
|
205
|
-
dependsOn: z.ZodOptional<z.ZodArray<z.ZodString
|
|
93
|
+
dependsOn: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
206
94
|
snapshotChunkTtlMs: z.ZodOptional<z.ZodNumber>;
|
|
207
|
-
},
|
|
208
|
-
table: string;
|
|
209
|
-
dependsOn?: string[] | undefined;
|
|
210
|
-
snapshotChunkTtlMs?: number | undefined;
|
|
211
|
-
}, {
|
|
212
|
-
table: string;
|
|
213
|
-
dependsOn?: string[] | undefined;
|
|
214
|
-
snapshotChunkTtlMs?: number | undefined;
|
|
215
|
-
}>;
|
|
95
|
+
}, z.core.$strip>;
|
|
216
96
|
export type ConsoleHandler = z.infer<typeof ConsoleHandlerSchema>;
|
|
217
97
|
export declare const ConsolePrunePreviewSchema: z.ZodObject<{
|
|
218
98
|
watermarkCommitSeq: z.ZodNumber;
|
|
219
99
|
commitsToDelete: z.ZodNumber;
|
|
220
|
-
},
|
|
221
|
-
watermarkCommitSeq: number;
|
|
222
|
-
commitsToDelete: number;
|
|
223
|
-
}, {
|
|
224
|
-
watermarkCommitSeq: number;
|
|
225
|
-
commitsToDelete: number;
|
|
226
|
-
}>;
|
|
100
|
+
}, z.core.$strip>;
|
|
227
101
|
export type ConsolePrunePreview = z.infer<typeof ConsolePrunePreviewSchema>;
|
|
228
102
|
export declare const ConsolePruneResultSchema: z.ZodObject<{
|
|
229
103
|
deletedCommits: z.ZodNumber;
|
|
230
|
-
},
|
|
231
|
-
deletedCommits: number;
|
|
232
|
-
}, {
|
|
233
|
-
deletedCommits: number;
|
|
234
|
-
}>;
|
|
104
|
+
}, z.core.$strip>;
|
|
235
105
|
export type ConsolePruneResult = z.infer<typeof ConsolePruneResultSchema>;
|
|
236
106
|
export declare const ConsoleCompactResultSchema: z.ZodObject<{
|
|
237
107
|
deletedChanges: z.ZodNumber;
|
|
238
|
-
},
|
|
239
|
-
deletedChanges: number;
|
|
240
|
-
}, {
|
|
241
|
-
deletedChanges: number;
|
|
242
|
-
}>;
|
|
108
|
+
}, z.core.$strip>;
|
|
243
109
|
export type ConsoleCompactResult = z.infer<typeof ConsoleCompactResultSchema>;
|
|
244
110
|
export declare const ConsoleEvictResultSchema: z.ZodObject<{
|
|
245
111
|
evicted: z.ZodBoolean;
|
|
246
|
-
},
|
|
247
|
-
evicted: boolean;
|
|
248
|
-
}, {
|
|
249
|
-
evicted: boolean;
|
|
250
|
-
}>;
|
|
112
|
+
}, z.core.$strip>;
|
|
251
113
|
export type ConsoleEvictResult = z.infer<typeof ConsoleEvictResultSchema>;
|
|
252
114
|
export declare const ConsoleRequestEventSchema: z.ZodObject<{
|
|
253
115
|
eventId: z.ZodNumber;
|
|
254
|
-
eventType: z.ZodEnum<
|
|
255
|
-
|
|
116
|
+
eventType: z.ZodEnum<{
|
|
117
|
+
pull: "pull";
|
|
118
|
+
push: "push";
|
|
119
|
+
}>;
|
|
120
|
+
transportPath: z.ZodEnum<{
|
|
121
|
+
direct: "direct";
|
|
122
|
+
relay: "relay";
|
|
123
|
+
}>;
|
|
256
124
|
actorId: z.ZodString;
|
|
257
125
|
clientId: z.ZodString;
|
|
258
126
|
statusCode: z.ZodNumber;
|
|
@@ -261,272 +129,113 @@ export declare const ConsoleRequestEventSchema: z.ZodObject<{
|
|
|
261
129
|
commitSeq: z.ZodNullable<z.ZodNumber>;
|
|
262
130
|
operationCount: z.ZodNullable<z.ZodNumber>;
|
|
263
131
|
rowCount: z.ZodNullable<z.ZodNumber>;
|
|
264
|
-
tables: z.ZodArray<z.ZodString
|
|
132
|
+
tables: z.ZodArray<z.ZodString>;
|
|
265
133
|
errorMessage: z.ZodNullable<z.ZodString>;
|
|
266
134
|
createdAt: z.ZodString;
|
|
267
|
-
},
|
|
268
|
-
eventId: number;
|
|
269
|
-
eventType: "pull" | "push";
|
|
270
|
-
transportPath: "direct" | "relay";
|
|
271
|
-
actorId: string;
|
|
272
|
-
clientId: string;
|
|
273
|
-
statusCode: number;
|
|
274
|
-
outcome: string;
|
|
275
|
-
durationMs: number;
|
|
276
|
-
commitSeq: number | null;
|
|
277
|
-
operationCount: number | null;
|
|
278
|
-
rowCount: number | null;
|
|
279
|
-
tables: string[];
|
|
280
|
-
errorMessage: string | null;
|
|
281
|
-
createdAt: string;
|
|
282
|
-
}, {
|
|
283
|
-
eventId: number;
|
|
284
|
-
eventType: "pull" | "push";
|
|
285
|
-
transportPath: "direct" | "relay";
|
|
286
|
-
actorId: string;
|
|
287
|
-
clientId: string;
|
|
288
|
-
statusCode: number;
|
|
289
|
-
outcome: string;
|
|
290
|
-
durationMs: number;
|
|
291
|
-
commitSeq: number | null;
|
|
292
|
-
operationCount: number | null;
|
|
293
|
-
rowCount: number | null;
|
|
294
|
-
tables: string[];
|
|
295
|
-
errorMessage: string | null;
|
|
296
|
-
createdAt: string;
|
|
297
|
-
}>;
|
|
135
|
+
}, z.core.$strip>;
|
|
298
136
|
export type ConsoleRequestEvent = z.infer<typeof ConsoleRequestEventSchema>;
|
|
299
|
-
declare const ConsoleRequestEventFiltersSchema: z.ZodObject<{
|
|
300
|
-
eventType: z.ZodOptional<z.ZodEnum<["push", "pull"]>>;
|
|
301
|
-
actorId: z.ZodOptional<z.ZodString>;
|
|
302
|
-
clientId: z.ZodOptional<z.ZodString>;
|
|
303
|
-
outcome: z.ZodOptional<z.ZodString>;
|
|
304
|
-
}, "strip", z.ZodTypeAny, {
|
|
305
|
-
eventType?: "pull" | "push" | undefined;
|
|
306
|
-
actorId?: string | undefined;
|
|
307
|
-
clientId?: string | undefined;
|
|
308
|
-
outcome?: string | undefined;
|
|
309
|
-
}, {
|
|
310
|
-
eventType?: "pull" | "push" | undefined;
|
|
311
|
-
actorId?: string | undefined;
|
|
312
|
-
clientId?: string | undefined;
|
|
313
|
-
outcome?: string | undefined;
|
|
314
|
-
}>;
|
|
315
|
-
export type ConsoleRequestEventFilters = z.infer<typeof ConsoleRequestEventFiltersSchema>;
|
|
316
137
|
export declare const ConsoleClearEventsResultSchema: z.ZodObject<{
|
|
317
138
|
deletedCount: z.ZodNumber;
|
|
318
|
-
},
|
|
319
|
-
deletedCount: number;
|
|
320
|
-
}, {
|
|
321
|
-
deletedCount: number;
|
|
322
|
-
}>;
|
|
139
|
+
}, z.core.$strip>;
|
|
323
140
|
export type ConsoleClearEventsResult = z.infer<typeof ConsoleClearEventsResultSchema>;
|
|
324
141
|
export declare const ConsolePruneEventsResultSchema: z.ZodObject<{
|
|
325
142
|
deletedCount: z.ZodNumber;
|
|
326
|
-
},
|
|
327
|
-
deletedCount: number;
|
|
328
|
-
}, {
|
|
329
|
-
deletedCount: number;
|
|
330
|
-
}>;
|
|
143
|
+
}, z.core.$strip>;
|
|
331
144
|
export type ConsolePruneEventsResult = z.infer<typeof ConsolePruneEventsResultSchema>;
|
|
332
|
-
export declare const ApiKeyTypeSchema: z.ZodEnum<
|
|
145
|
+
export declare const ApiKeyTypeSchema: z.ZodEnum<{
|
|
146
|
+
admin: "admin";
|
|
147
|
+
proxy: "proxy";
|
|
148
|
+
relay: "relay";
|
|
149
|
+
}>;
|
|
333
150
|
export type ApiKeyType = z.infer<typeof ApiKeyTypeSchema>;
|
|
334
151
|
export declare const ConsoleApiKeySchema: z.ZodObject<{
|
|
335
152
|
keyId: z.ZodString;
|
|
336
153
|
keyPrefix: z.ZodString;
|
|
337
154
|
name: z.ZodString;
|
|
338
|
-
keyType: z.ZodEnum<
|
|
339
|
-
|
|
155
|
+
keyType: z.ZodEnum<{
|
|
156
|
+
admin: "admin";
|
|
157
|
+
proxy: "proxy";
|
|
158
|
+
relay: "relay";
|
|
159
|
+
}>;
|
|
160
|
+
scopeKeys: z.ZodArray<z.ZodString>;
|
|
340
161
|
actorId: z.ZodNullable<z.ZodString>;
|
|
341
162
|
createdAt: z.ZodString;
|
|
342
163
|
expiresAt: z.ZodNullable<z.ZodString>;
|
|
343
164
|
lastUsedAt: z.ZodNullable<z.ZodString>;
|
|
344
165
|
revokedAt: z.ZodNullable<z.ZodString>;
|
|
345
|
-
},
|
|
346
|
-
keyId: string;
|
|
347
|
-
keyPrefix: string;
|
|
348
|
-
name: string;
|
|
349
|
-
keyType: "admin" | "proxy" | "relay";
|
|
350
|
-
scopeKeys: string[];
|
|
351
|
-
actorId: string | null;
|
|
352
|
-
createdAt: string;
|
|
353
|
-
expiresAt: string | null;
|
|
354
|
-
lastUsedAt: string | null;
|
|
355
|
-
revokedAt: string | null;
|
|
356
|
-
}, {
|
|
357
|
-
keyId: string;
|
|
358
|
-
keyPrefix: string;
|
|
359
|
-
name: string;
|
|
360
|
-
keyType: "admin" | "proxy" | "relay";
|
|
361
|
-
scopeKeys: string[];
|
|
362
|
-
actorId: string | null;
|
|
363
|
-
createdAt: string;
|
|
364
|
-
expiresAt: string | null;
|
|
365
|
-
lastUsedAt: string | null;
|
|
366
|
-
revokedAt: string | null;
|
|
367
|
-
}>;
|
|
166
|
+
}, z.core.$strip>;
|
|
368
167
|
export type ConsoleApiKey = z.infer<typeof ConsoleApiKeySchema>;
|
|
369
168
|
export declare const ConsoleApiKeyCreateRequestSchema: z.ZodObject<{
|
|
370
169
|
name: z.ZodString;
|
|
371
|
-
keyType: z.ZodEnum<
|
|
372
|
-
|
|
170
|
+
keyType: z.ZodEnum<{
|
|
171
|
+
admin: "admin";
|
|
172
|
+
proxy: "proxy";
|
|
173
|
+
relay: "relay";
|
|
174
|
+
}>;
|
|
175
|
+
scopeKeys: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
373
176
|
actorId: z.ZodOptional<z.ZodString>;
|
|
374
177
|
expiresInDays: z.ZodOptional<z.ZodNumber>;
|
|
375
|
-
},
|
|
376
|
-
name: string;
|
|
377
|
-
keyType: "admin" | "proxy" | "relay";
|
|
378
|
-
scopeKeys?: string[] | undefined;
|
|
379
|
-
actorId?: string | undefined;
|
|
380
|
-
expiresInDays?: number | undefined;
|
|
381
|
-
}, {
|
|
382
|
-
name: string;
|
|
383
|
-
keyType: "admin" | "proxy" | "relay";
|
|
384
|
-
scopeKeys?: string[] | undefined;
|
|
385
|
-
actorId?: string | undefined;
|
|
386
|
-
expiresInDays?: number | undefined;
|
|
387
|
-
}>;
|
|
388
|
-
export type ConsoleApiKeyCreateRequest = z.infer<typeof ConsoleApiKeyCreateRequestSchema>;
|
|
178
|
+
}, z.core.$strip>;
|
|
389
179
|
export declare const ConsoleApiKeyCreateResponseSchema: z.ZodObject<{
|
|
390
180
|
key: z.ZodObject<{
|
|
391
181
|
keyId: z.ZodString;
|
|
392
182
|
keyPrefix: z.ZodString;
|
|
393
183
|
name: z.ZodString;
|
|
394
|
-
keyType: z.ZodEnum<
|
|
395
|
-
|
|
184
|
+
keyType: z.ZodEnum<{
|
|
185
|
+
admin: "admin";
|
|
186
|
+
proxy: "proxy";
|
|
187
|
+
relay: "relay";
|
|
188
|
+
}>;
|
|
189
|
+
scopeKeys: z.ZodArray<z.ZodString>;
|
|
396
190
|
actorId: z.ZodNullable<z.ZodString>;
|
|
397
191
|
createdAt: z.ZodString;
|
|
398
192
|
expiresAt: z.ZodNullable<z.ZodString>;
|
|
399
193
|
lastUsedAt: z.ZodNullable<z.ZodString>;
|
|
400
194
|
revokedAt: z.ZodNullable<z.ZodString>;
|
|
401
|
-
},
|
|
402
|
-
keyId: string;
|
|
403
|
-
keyPrefix: string;
|
|
404
|
-
name: string;
|
|
405
|
-
keyType: "admin" | "proxy" | "relay";
|
|
406
|
-
scopeKeys: string[];
|
|
407
|
-
actorId: string | null;
|
|
408
|
-
createdAt: string;
|
|
409
|
-
expiresAt: string | null;
|
|
410
|
-
lastUsedAt: string | null;
|
|
411
|
-
revokedAt: string | null;
|
|
412
|
-
}, {
|
|
413
|
-
keyId: string;
|
|
414
|
-
keyPrefix: string;
|
|
415
|
-
name: string;
|
|
416
|
-
keyType: "admin" | "proxy" | "relay";
|
|
417
|
-
scopeKeys: string[];
|
|
418
|
-
actorId: string | null;
|
|
419
|
-
createdAt: string;
|
|
420
|
-
expiresAt: string | null;
|
|
421
|
-
lastUsedAt: string | null;
|
|
422
|
-
revokedAt: string | null;
|
|
423
|
-
}>;
|
|
195
|
+
}, z.core.$strip>;
|
|
424
196
|
secretKey: z.ZodString;
|
|
425
|
-
},
|
|
426
|
-
key: {
|
|
427
|
-
keyId: string;
|
|
428
|
-
keyPrefix: string;
|
|
429
|
-
name: string;
|
|
430
|
-
keyType: "admin" | "proxy" | "relay";
|
|
431
|
-
scopeKeys: string[];
|
|
432
|
-
actorId: string | null;
|
|
433
|
-
createdAt: string;
|
|
434
|
-
expiresAt: string | null;
|
|
435
|
-
lastUsedAt: string | null;
|
|
436
|
-
revokedAt: string | null;
|
|
437
|
-
};
|
|
438
|
-
secretKey: string;
|
|
439
|
-
}, {
|
|
440
|
-
key: {
|
|
441
|
-
keyId: string;
|
|
442
|
-
keyPrefix: string;
|
|
443
|
-
name: string;
|
|
444
|
-
keyType: "admin" | "proxy" | "relay";
|
|
445
|
-
scopeKeys: string[];
|
|
446
|
-
actorId: string | null;
|
|
447
|
-
createdAt: string;
|
|
448
|
-
expiresAt: string | null;
|
|
449
|
-
lastUsedAt: string | null;
|
|
450
|
-
revokedAt: string | null;
|
|
451
|
-
};
|
|
452
|
-
secretKey: string;
|
|
453
|
-
}>;
|
|
197
|
+
}, z.core.$strip>;
|
|
454
198
|
export type ConsoleApiKeyCreateResponse = z.infer<typeof ConsoleApiKeyCreateResponseSchema>;
|
|
455
199
|
export declare const ConsoleApiKeyRevokeResponseSchema: z.ZodObject<{
|
|
456
200
|
revoked: z.ZodBoolean;
|
|
457
|
-
},
|
|
458
|
-
revoked: boolean;
|
|
459
|
-
}, {
|
|
460
|
-
revoked: boolean;
|
|
461
|
-
}>;
|
|
462
|
-
export type ConsoleApiKeyRevokeResponse = z.infer<typeof ConsoleApiKeyRevokeResponseSchema>;
|
|
201
|
+
}, z.core.$strip>;
|
|
463
202
|
export declare const ConsolePaginationQuerySchema: z.ZodObject<{
|
|
464
|
-
limit: z.ZodDefault<z.
|
|
465
|
-
offset: z.ZodDefault<z.
|
|
466
|
-
},
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
}, {
|
|
470
|
-
limit?: number | undefined;
|
|
471
|
-
offset?: number | undefined;
|
|
472
|
-
}>;
|
|
473
|
-
export type ConsolePaginationQuery = z.infer<typeof ConsolePaginationQuerySchema>;
|
|
474
|
-
export declare const ConsolePaginatedResponseSchema: <T extends z.ZodTypeAny>(itemSchema: T) => z.ZodObject<{
|
|
475
|
-
items: z.ZodArray<T, "many">;
|
|
203
|
+
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
204
|
+
offset: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
205
|
+
}, z.core.$strip>;
|
|
206
|
+
export declare const ConsolePaginatedResponseSchema: <T extends z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>(itemSchema: T) => z.ZodObject<{
|
|
207
|
+
items: z.ZodArray<T>;
|
|
476
208
|
total: z.ZodNumber;
|
|
477
209
|
offset: z.ZodNumber;
|
|
478
210
|
limit: z.ZodNumber;
|
|
479
|
-
},
|
|
480
|
-
items: T["_output"][];
|
|
481
|
-
total: number;
|
|
482
|
-
offset: number;
|
|
483
|
-
limit: number;
|
|
484
|
-
}, {
|
|
485
|
-
items: T["_input"][];
|
|
486
|
-
total: number;
|
|
487
|
-
offset: number;
|
|
488
|
-
limit: number;
|
|
489
|
-
}>;
|
|
211
|
+
}, z.core.$strip>;
|
|
490
212
|
export type ConsolePaginatedResponse<T> = {
|
|
491
213
|
items: T[];
|
|
492
214
|
total: number;
|
|
493
215
|
offset: number;
|
|
494
216
|
limit: number;
|
|
495
217
|
};
|
|
496
|
-
declare const TimeseriesIntervalSchema: z.ZodEnum<["minute", "hour", "day"]>;
|
|
497
|
-
export type TimeseriesInterval = z.infer<typeof TimeseriesIntervalSchema>;
|
|
498
|
-
declare const TimeseriesRangeSchema: z.ZodEnum<["1h", "6h", "24h", "7d", "30d"]>;
|
|
499
|
-
export type TimeseriesRange = z.infer<typeof TimeseriesRangeSchema>;
|
|
500
218
|
export declare const TimeseriesQuerySchema: z.ZodObject<{
|
|
501
|
-
interval: z.ZodDefault<z.ZodEnum<
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
219
|
+
interval: z.ZodDefault<z.ZodEnum<{
|
|
220
|
+
day: "day";
|
|
221
|
+
hour: "hour";
|
|
222
|
+
minute: "minute";
|
|
223
|
+
}>>;
|
|
224
|
+
range: z.ZodDefault<z.ZodEnum<{
|
|
225
|
+
"1h": "1h";
|
|
226
|
+
"24h": "24h";
|
|
227
|
+
"30d": "30d";
|
|
228
|
+
"6h": "6h";
|
|
229
|
+
"7d": "7d";
|
|
230
|
+
}>>;
|
|
231
|
+
}, z.core.$strip>;
|
|
511
232
|
export declare const TimeseriesBucketSchema: z.ZodObject<{
|
|
512
233
|
timestamp: z.ZodString;
|
|
513
234
|
pushCount: z.ZodNumber;
|
|
514
235
|
pullCount: z.ZodNumber;
|
|
515
236
|
errorCount: z.ZodNumber;
|
|
516
237
|
avgLatencyMs: z.ZodNumber;
|
|
517
|
-
},
|
|
518
|
-
timestamp: string;
|
|
519
|
-
pushCount: number;
|
|
520
|
-
pullCount: number;
|
|
521
|
-
errorCount: number;
|
|
522
|
-
avgLatencyMs: number;
|
|
523
|
-
}, {
|
|
524
|
-
timestamp: string;
|
|
525
|
-
pushCount: number;
|
|
526
|
-
pullCount: number;
|
|
527
|
-
errorCount: number;
|
|
528
|
-
avgLatencyMs: number;
|
|
529
|
-
}>;
|
|
238
|
+
}, z.core.$strip>;
|
|
530
239
|
export type TimeseriesBucket = z.infer<typeof TimeseriesBucketSchema>;
|
|
531
240
|
export declare const TimeseriesStatsResponseSchema: z.ZodObject<{
|
|
532
241
|
buckets: z.ZodArray<z.ZodObject<{
|
|
@@ -535,132 +244,65 @@ export declare const TimeseriesStatsResponseSchema: z.ZodObject<{
|
|
|
535
244
|
pullCount: z.ZodNumber;
|
|
536
245
|
errorCount: z.ZodNumber;
|
|
537
246
|
avgLatencyMs: z.ZodNumber;
|
|
538
|
-
},
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
}
|
|
551
|
-
|
|
552
|
-
range: z.ZodEnum<["1h", "6h", "24h", "7d", "30d"]>;
|
|
553
|
-
}, "strip", z.ZodTypeAny, {
|
|
554
|
-
buckets: {
|
|
555
|
-
timestamp: string;
|
|
556
|
-
pushCount: number;
|
|
557
|
-
pullCount: number;
|
|
558
|
-
errorCount: number;
|
|
559
|
-
avgLatencyMs: number;
|
|
560
|
-
}[];
|
|
561
|
-
interval: "day" | "hour" | "minute";
|
|
562
|
-
range: "1h" | "24h" | "30d" | "6h" | "7d";
|
|
563
|
-
}, {
|
|
564
|
-
buckets: {
|
|
565
|
-
timestamp: string;
|
|
566
|
-
pushCount: number;
|
|
567
|
-
pullCount: number;
|
|
568
|
-
errorCount: number;
|
|
569
|
-
avgLatencyMs: number;
|
|
570
|
-
}[];
|
|
571
|
-
interval: "day" | "hour" | "minute";
|
|
572
|
-
range: "1h" | "24h" | "30d" | "6h" | "7d";
|
|
573
|
-
}>;
|
|
247
|
+
}, z.core.$strip>>;
|
|
248
|
+
interval: z.ZodEnum<{
|
|
249
|
+
day: "day";
|
|
250
|
+
hour: "hour";
|
|
251
|
+
minute: "minute";
|
|
252
|
+
}>;
|
|
253
|
+
range: z.ZodEnum<{
|
|
254
|
+
"1h": "1h";
|
|
255
|
+
"24h": "24h";
|
|
256
|
+
"30d": "30d";
|
|
257
|
+
"6h": "6h";
|
|
258
|
+
"7d": "7d";
|
|
259
|
+
}>;
|
|
260
|
+
}, z.core.$strip>;
|
|
574
261
|
export type TimeseriesStatsResponse = z.infer<typeof TimeseriesStatsResponseSchema>;
|
|
575
262
|
export declare const LatencyPercentilesSchema: z.ZodObject<{
|
|
576
263
|
p50: z.ZodNumber;
|
|
577
264
|
p90: z.ZodNumber;
|
|
578
265
|
p99: z.ZodNumber;
|
|
579
|
-
},
|
|
580
|
-
p50: number;
|
|
581
|
-
p90: number;
|
|
582
|
-
p99: number;
|
|
583
|
-
}, {
|
|
584
|
-
p50: number;
|
|
585
|
-
p90: number;
|
|
586
|
-
p99: number;
|
|
587
|
-
}>;
|
|
266
|
+
}, z.core.$strip>;
|
|
588
267
|
export type LatencyPercentiles = z.infer<typeof LatencyPercentilesSchema>;
|
|
589
268
|
export declare const LatencyStatsResponseSchema: z.ZodObject<{
|
|
590
269
|
push: z.ZodObject<{
|
|
591
270
|
p50: z.ZodNumber;
|
|
592
271
|
p90: z.ZodNumber;
|
|
593
272
|
p99: z.ZodNumber;
|
|
594
|
-
},
|
|
595
|
-
p50: number;
|
|
596
|
-
p90: number;
|
|
597
|
-
p99: number;
|
|
598
|
-
}, {
|
|
599
|
-
p50: number;
|
|
600
|
-
p90: number;
|
|
601
|
-
p99: number;
|
|
602
|
-
}>;
|
|
273
|
+
}, z.core.$strip>;
|
|
603
274
|
pull: z.ZodObject<{
|
|
604
275
|
p50: z.ZodNumber;
|
|
605
276
|
p90: z.ZodNumber;
|
|
606
277
|
p99: z.ZodNumber;
|
|
607
|
-
},
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
p99: number;
|
|
278
|
+
}, z.core.$strip>;
|
|
279
|
+
range: z.ZodEnum<{
|
|
280
|
+
"1h": "1h";
|
|
281
|
+
"24h": "24h";
|
|
282
|
+
"30d": "30d";
|
|
283
|
+
"6h": "6h";
|
|
284
|
+
"7d": "7d";
|
|
615
285
|
}>;
|
|
616
|
-
|
|
617
|
-
}, "strip", z.ZodTypeAny, {
|
|
618
|
-
push: {
|
|
619
|
-
p50: number;
|
|
620
|
-
p90: number;
|
|
621
|
-
p99: number;
|
|
622
|
-
};
|
|
623
|
-
pull: {
|
|
624
|
-
p50: number;
|
|
625
|
-
p90: number;
|
|
626
|
-
p99: number;
|
|
627
|
-
};
|
|
628
|
-
range: "1h" | "24h" | "30d" | "6h" | "7d";
|
|
629
|
-
}, {
|
|
630
|
-
push: {
|
|
631
|
-
p50: number;
|
|
632
|
-
p90: number;
|
|
633
|
-
p99: number;
|
|
634
|
-
};
|
|
635
|
-
pull: {
|
|
636
|
-
p50: number;
|
|
637
|
-
p90: number;
|
|
638
|
-
p99: number;
|
|
639
|
-
};
|
|
640
|
-
range: "1h" | "24h" | "30d" | "6h" | "7d";
|
|
641
|
-
}>;
|
|
286
|
+
}, z.core.$strip>;
|
|
642
287
|
export type LatencyStatsResponse = z.infer<typeof LatencyStatsResponseSchema>;
|
|
643
288
|
export declare const LatencyQuerySchema: z.ZodObject<{
|
|
644
|
-
range: z.ZodDefault<z.ZodEnum<
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
289
|
+
range: z.ZodDefault<z.ZodEnum<{
|
|
290
|
+
"1h": "1h";
|
|
291
|
+
"24h": "24h";
|
|
292
|
+
"30d": "30d";
|
|
293
|
+
"6h": "6h";
|
|
294
|
+
"7d": "7d";
|
|
295
|
+
}>>;
|
|
296
|
+
}, z.core.$strip>;
|
|
651
297
|
export declare const LiveEventSchema: z.ZodObject<{
|
|
652
|
-
type: z.ZodEnum<
|
|
298
|
+
type: z.ZodEnum<{
|
|
299
|
+
client_update: "client_update";
|
|
300
|
+
commit: "commit";
|
|
301
|
+
pull: "pull";
|
|
302
|
+
push: "push";
|
|
303
|
+
}>;
|
|
653
304
|
timestamp: z.ZodString;
|
|
654
305
|
data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
655
|
-
},
|
|
656
|
-
type: "client_update" | "commit" | "pull" | "push";
|
|
657
|
-
timestamp: string;
|
|
658
|
-
data: Record<string, unknown>;
|
|
659
|
-
}, {
|
|
660
|
-
type: "client_update" | "commit" | "pull" | "push";
|
|
661
|
-
timestamp: string;
|
|
662
|
-
data: Record<string, unknown>;
|
|
663
|
-
}>;
|
|
306
|
+
}, z.core.$strip>;
|
|
664
307
|
export type LiveEvent = z.infer<typeof LiveEventSchema>;
|
|
665
|
-
export {};
|
|
666
308
|
//# sourceMappingURL=schemas.d.ts.map
|