@gscdump/contracts 1.4.0 → 1.4.1

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.
@@ -0,0 +1,650 @@
1
+ import { z } from "zod";
2
+ declare const GSCDUMP_REALTIME_PROTOCOL_VERSION: 1;
3
+ declare const GSCDUMP_REALTIME_SUBPROTOCOL: 'gscdump.v1';
4
+ declare const GSCDUMP_REALTIME_TICKET_PREFIX: 'gscdump.ticket.v1';
5
+ declare const GSCDUMP_REALTIME_TICKET_ISSUER: 'https://gscdump.com';
6
+ declare const GSCDUMP_REALTIME_TICKET_AUDIENCE: 'https://gscdump.com/ws/v1';
7
+ declare const GSCDUMP_REALTIME_PING: 'ping';
8
+ declare const GSCDUMP_REALTIME_PONG: 'pong';
9
+ declare const GSCDUMP_REALTIME_TICKET_TTL_SECONDS: 60;
10
+ declare const GSCDUMP_REALTIME_MAX_CONNECTION_SECONDS: 900;
11
+ declare const GSCDUMP_REALTIME_TICKET_POLICY: {
12
+ readonly algorithm: 'HMAC-SHA-256';
13
+ readonly minimumSigningKeyBytes: 32;
14
+ readonly jtiRandomBits: 128;
15
+ readonly maxVerificationKeys: 2;
16
+ readonly futureIssuedAtToleranceMs: 5000;
17
+ readonly expiryToleranceMs: 0;
18
+ readonly rotationOverlapMs: 90000;
19
+ readonly maxBytes: 2048;
20
+ readonly singleUse: true;
21
+ };
22
+ declare const GSCDUMP_REALTIME_CONNECTION_POLICY: {
23
+ readonly helloDeadlineMs: 10000;
24
+ readonly maxLifetimeMs: 900000;
25
+ readonly connectionRefreshBeforeExpiryMs: 30000;
26
+ readonly heartbeatIntervalMs: 25000;
27
+ readonly staleAfterMs: 75000;
28
+ readonly reconnectBaseDelayMs: 1000;
29
+ readonly reconnectMaxDelayMs: 30000;
30
+ readonly reconnectJitter: 'equal';
31
+ };
32
+ declare const GSCDUMP_REALTIME_REPLAY_POLICY: {
33
+ readonly maxAgeMs: 86400000;
34
+ readonly maxEventsPerStream: 10000;
35
+ };
36
+ declare const GSCDUMP_REALTIME_LIMITS: {
37
+ readonly clientFrameMaxBytes: 16384;
38
+ readonly durableEventMaxBytes: 65536;
39
+ readonly ephemeralEventMaxBytes: 16384;
40
+ readonly outboundFrameMaxBytes: 262144;
41
+ readonly batchMaxEvents: 20;
42
+ readonly batchMaxBytes: 262144;
43
+ readonly connectionAttachmentMaxBytes: 2048;
44
+ };
45
+ declare const GSCDUMP_REALTIME_ACK_POLICY: {
46
+ readonly softLagEvents: 100;
47
+ readonly softLagBytes: 1048576;
48
+ readonly hardLagEvents: 500;
49
+ readonly hardLagBytes: 4194304;
50
+ readonly hardLagCloseCode: 1013;
51
+ readonly effectRetryBeforeUnsafeResync: 3;
52
+ };
53
+ declare const GSCDUMP_REALTIME_CLOSE_CODES: {
54
+ readonly normal: 1000;
55
+ readonly protocolError: 1002;
56
+ readonly policyViolation: 1008;
57
+ readonly internalError: 1011;
58
+ readonly serviceRestart: 1012;
59
+ readonly overloadedOrAckLag: 1013;
60
+ readonly maximumLifetime: 4001;
61
+ };
62
+ declare const REALTIME_V1_RESOURCE_TYPES: readonly ['partner.user', 'partner.team', 'user.sites', 'site.registration', 'site.lifecycle', 'site.analytics', 'site.sitemaps', 'site.indexing', 'site.auth'];
63
+ declare const REALTIME_V1_EVENT_NAMES: readonly ['user.lifecycle.changed', 'site.lifecycle.changed', 'site.lifecycle.progress', 'site.analytics.ready', 'site.sitemaps.ready', 'site.indexing.ready', 'site.auth.failed', 'site.lifecycle.failed', 'site.registration.changed'];
64
+ declare const REALTIME_V1_EVENT_SEMANTICS: {
65
+ readonly 'user.lifecycle.changed': {
66
+ readonly delivery: 'durable';
67
+ readonly baseChanges: readonly ["partner.user", "user.sites"];
68
+ };
69
+ readonly 'site.lifecycle.changed': {
70
+ readonly delivery: 'durable';
71
+ readonly baseChanges: readonly ["site.lifecycle"];
72
+ };
73
+ readonly 'site.lifecycle.progress': {
74
+ readonly delivery: 'ephemeral';
75
+ readonly baseChanges: readonly [];
76
+ };
77
+ readonly 'site.analytics.ready': {
78
+ readonly delivery: 'durable';
79
+ readonly baseChanges: readonly ["site.analytics", "site.lifecycle"];
80
+ };
81
+ readonly 'site.sitemaps.ready': {
82
+ readonly delivery: 'durable';
83
+ readonly baseChanges: readonly ["site.sitemaps", "site.lifecycle"];
84
+ };
85
+ readonly 'site.indexing.ready': {
86
+ readonly delivery: 'durable';
87
+ readonly baseChanges: readonly ["site.indexing", "site.lifecycle"];
88
+ };
89
+ readonly 'site.auth.failed': {
90
+ readonly delivery: 'durable';
91
+ readonly baseChanges: readonly ["site.auth", "site.lifecycle"];
92
+ };
93
+ readonly 'site.lifecycle.failed': {
94
+ readonly delivery: 'durable';
95
+ readonly baseChanges: readonly ["site.lifecycle"];
96
+ };
97
+ readonly 'site.registration.changed': {
98
+ readonly delivery: 'durable';
99
+ readonly baseChanges: readonly ["site.registration", "user.sites"];
100
+ };
101
+ };
102
+ declare function createRealtimeV1Schemas(): {
103
+ opaquePublicId: z.ZodString;
104
+ userStreamId: z.ZodString;
105
+ partnerStreamId: z.ZodString;
106
+ publicUserId: z.ZodString;
107
+ publicPartnerId: z.ZodString;
108
+ publicTeamId: z.ZodString;
109
+ publicSiteId: z.ZodString;
110
+ publicPrincipalId: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
111
+ publicResourceId: z.ZodUnion<readonly [z.ZodString, z.ZodString, z.ZodString, z.ZodString]>;
112
+ publicRequestId: z.ZodString;
113
+ publicEventId: z.ZodString;
114
+ sequence: z.ZodString;
115
+ streamId: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
116
+ cursor: z.ZodObject<{
117
+ streamId: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
118
+ sequence: z.ZodString;
119
+ }, z.core.$strict>;
120
+ streamHead: z.ZodObject<{
121
+ streamId: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
122
+ sequence: z.ZodString;
123
+ }, z.core.$strict>;
124
+ ticketRequest: z.ZodObject<{
125
+ origin: z.ZodOptional<z.ZodURL>;
126
+ }, z.core.$strict>;
127
+ ticketClaims: z.ZodObject<{
128
+ v: z.ZodLiteral<1>;
129
+ iss: z.ZodLiteral<"https://gscdump.com">;
130
+ aud: z.ZodLiteral<"https://gscdump.com/ws/v1">;
131
+ kid: z.ZodString;
132
+ jti: z.ZodString;
133
+ iat: z.ZodNumber;
134
+ exp: z.ZodNumber;
135
+ connectionExpiresAt: z.ZodNumber;
136
+ principalClass: z.ZodEnum<{
137
+ partner_key: "partner_key";
138
+ user_key: "user_key";
139
+ }>;
140
+ principalPublicId: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
141
+ streamId: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
142
+ origin: z.ZodNullable<z.ZodURL>;
143
+ }, z.core.$strict>;
144
+ knownResourceType: z.ZodEnum<{
145
+ "partner.team": "partner.team";
146
+ "partner.user": "partner.user";
147
+ "site.analytics": "site.analytics";
148
+ "site.auth": "site.auth";
149
+ "site.indexing": "site.indexing";
150
+ "site.lifecycle": "site.lifecycle";
151
+ "site.registration": "site.registration";
152
+ "site.sitemaps": "site.sitemaps";
153
+ "user.sites": "user.sites";
154
+ }>;
155
+ resourceChange: z.ZodObject<{
156
+ type: z.ZodString;
157
+ id: z.ZodString;
158
+ kind: z.ZodEnum<{
159
+ created: "created";
160
+ deleted: "deleted";
161
+ updated: "updated";
162
+ }>;
163
+ }, z.core.$strict>;
164
+ subject: z.ZodDiscriminatedUnion<[z.ZodObject<{
165
+ type: z.ZodLiteral<"partner">;
166
+ id: z.ZodString;
167
+ }, z.core.$strict>, z.ZodObject<{
168
+ type: z.ZodLiteral<"team">;
169
+ id: z.ZodString;
170
+ }, z.core.$strict>, z.ZodObject<{
171
+ type: z.ZodLiteral<"user">;
172
+ id: z.ZodString;
173
+ }, z.core.$strict>, z.ZodObject<{
174
+ type: z.ZodLiteral<"site">;
175
+ id: z.ZodString;
176
+ }, z.core.$strict>], "type">;
177
+ durableEvent: z.ZodObject<{
178
+ type: z.ZodLiteral<"event">;
179
+ protocolVersion: z.ZodLiteral<1>;
180
+ eventVersion: z.ZodNumber;
181
+ id: z.ZodString;
182
+ name: z.ZodString;
183
+ subject: z.ZodDiscriminatedUnion<[z.ZodObject<{
184
+ type: z.ZodLiteral<"partner">;
185
+ id: z.ZodString;
186
+ }, z.core.$strict>, z.ZodObject<{
187
+ type: z.ZodLiteral<"team">;
188
+ id: z.ZodString;
189
+ }, z.core.$strict>, z.ZodObject<{
190
+ type: z.ZodLiteral<"user">;
191
+ id: z.ZodString;
192
+ }, z.core.$strict>, z.ZodObject<{
193
+ type: z.ZodLiteral<"site">;
194
+ id: z.ZodString;
195
+ }, z.core.$strict>], "type">;
196
+ occurredAt: z.ZodISODateTime;
197
+ correlationId: z.ZodNullable<z.ZodString>;
198
+ data: z.ZodJSONSchema;
199
+ cursor: z.ZodObject<{
200
+ streamId: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
201
+ sequence: z.ZodString;
202
+ }, z.core.$strict>;
203
+ changes: z.ZodArray<z.ZodObject<{
204
+ type: z.ZodString;
205
+ id: z.ZodString;
206
+ kind: z.ZodEnum<{
207
+ created: "created";
208
+ deleted: "deleted";
209
+ updated: "updated";
210
+ }>;
211
+ }, z.core.$strict>>;
212
+ delivery: z.ZodLiteral<"durable">;
213
+ }, z.core.$strict>;
214
+ ephemeralEvent: z.ZodObject<{
215
+ type: z.ZodLiteral<"event">;
216
+ protocolVersion: z.ZodLiteral<1>;
217
+ eventVersion: z.ZodNumber;
218
+ id: z.ZodString;
219
+ name: z.ZodString;
220
+ subject: z.ZodDiscriminatedUnion<[z.ZodObject<{
221
+ type: z.ZodLiteral<"partner">;
222
+ id: z.ZodString;
223
+ }, z.core.$strict>, z.ZodObject<{
224
+ type: z.ZodLiteral<"team">;
225
+ id: z.ZodString;
226
+ }, z.core.$strict>, z.ZodObject<{
227
+ type: z.ZodLiteral<"user">;
228
+ id: z.ZodString;
229
+ }, z.core.$strict>, z.ZodObject<{
230
+ type: z.ZodLiteral<"site">;
231
+ id: z.ZodString;
232
+ }, z.core.$strict>], "type">;
233
+ occurredAt: z.ZodISODateTime;
234
+ correlationId: z.ZodNullable<z.ZodString>;
235
+ data: z.ZodJSONSchema;
236
+ cursor: z.ZodNull;
237
+ changes: z.ZodArray<z.ZodObject<{
238
+ type: z.ZodString;
239
+ id: z.ZodString;
240
+ kind: z.ZodEnum<{
241
+ created: "created";
242
+ deleted: "deleted";
243
+ updated: "updated";
244
+ }>;
245
+ }, z.core.$strict>>;
246
+ delivery: z.ZodLiteral<"ephemeral">;
247
+ }, z.core.$strict>;
248
+ event: z.ZodUnion<readonly [z.ZodObject<{
249
+ type: z.ZodLiteral<"event">;
250
+ protocolVersion: z.ZodLiteral<1>;
251
+ eventVersion: z.ZodNumber;
252
+ id: z.ZodString;
253
+ name: z.ZodString;
254
+ subject: z.ZodDiscriminatedUnion<[z.ZodObject<{
255
+ type: z.ZodLiteral<"partner">;
256
+ id: z.ZodString;
257
+ }, z.core.$strict>, z.ZodObject<{
258
+ type: z.ZodLiteral<"team">;
259
+ id: z.ZodString;
260
+ }, z.core.$strict>, z.ZodObject<{
261
+ type: z.ZodLiteral<"user">;
262
+ id: z.ZodString;
263
+ }, z.core.$strict>, z.ZodObject<{
264
+ type: z.ZodLiteral<"site">;
265
+ id: z.ZodString;
266
+ }, z.core.$strict>], "type">;
267
+ occurredAt: z.ZodISODateTime;
268
+ correlationId: z.ZodNullable<z.ZodString>;
269
+ data: z.ZodJSONSchema;
270
+ cursor: z.ZodObject<{
271
+ streamId: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
272
+ sequence: z.ZodString;
273
+ }, z.core.$strict>;
274
+ changes: z.ZodArray<z.ZodObject<{
275
+ type: z.ZodString;
276
+ id: z.ZodString;
277
+ kind: z.ZodEnum<{
278
+ created: "created";
279
+ deleted: "deleted";
280
+ updated: "updated";
281
+ }>;
282
+ }, z.core.$strict>>;
283
+ delivery: z.ZodLiteral<"durable">;
284
+ }, z.core.$strict>, z.ZodObject<{
285
+ type: z.ZodLiteral<"event">;
286
+ protocolVersion: z.ZodLiteral<1>;
287
+ eventVersion: z.ZodNumber;
288
+ id: z.ZodString;
289
+ name: z.ZodString;
290
+ subject: z.ZodDiscriminatedUnion<[z.ZodObject<{
291
+ type: z.ZodLiteral<"partner">;
292
+ id: z.ZodString;
293
+ }, z.core.$strict>, z.ZodObject<{
294
+ type: z.ZodLiteral<"team">;
295
+ id: z.ZodString;
296
+ }, z.core.$strict>, z.ZodObject<{
297
+ type: z.ZodLiteral<"user">;
298
+ id: z.ZodString;
299
+ }, z.core.$strict>, z.ZodObject<{
300
+ type: z.ZodLiteral<"site">;
301
+ id: z.ZodString;
302
+ }, z.core.$strict>], "type">;
303
+ occurredAt: z.ZodISODateTime;
304
+ correlationId: z.ZodNullable<z.ZodString>;
305
+ data: z.ZodJSONSchema;
306
+ cursor: z.ZodNull;
307
+ changes: z.ZodArray<z.ZodObject<{
308
+ type: z.ZodString;
309
+ id: z.ZodString;
310
+ kind: z.ZodEnum<{
311
+ created: "created";
312
+ deleted: "deleted";
313
+ updated: "updated";
314
+ }>;
315
+ }, z.core.$strict>>;
316
+ delivery: z.ZodLiteral<"ephemeral">;
317
+ }, z.core.$strict>]>;
318
+ helloFrame: z.ZodObject<{
319
+ type: z.ZodLiteral<"hello">;
320
+ protocolVersion: z.ZodLiteral<1>;
321
+ sdkVersion: z.ZodString;
322
+ resume: z.ZodNullable<z.ZodObject<{
323
+ streamId: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
324
+ sequence: z.ZodString;
325
+ }, z.core.$strict>>;
326
+ }, z.core.$strict>;
327
+ ackFrame: z.ZodObject<{
328
+ type: z.ZodLiteral<"ack">;
329
+ cursor: z.ZodObject<{
330
+ streamId: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
331
+ sequence: z.ZodString;
332
+ }, z.core.$strict>;
333
+ }, z.core.$strict>;
334
+ readyFrame: z.ZodObject<{
335
+ type: z.ZodLiteral<"ready">;
336
+ protocolVersion: z.ZodLiteral<1>;
337
+ connectionId: z.ZodString;
338
+ streamId: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
339
+ replayFloor: z.ZodObject<{
340
+ streamId: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
341
+ sequence: z.ZodString;
342
+ }, z.core.$strict>;
343
+ head: z.ZodObject<{
344
+ streamId: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
345
+ sequence: z.ZodString;
346
+ }, z.core.$strict>;
347
+ limits: z.ZodObject<{
348
+ maxBatchEvents: z.ZodNumber;
349
+ maxUnackedEvents: z.ZodNumber;
350
+ }, z.core.$strict>;
351
+ heartbeat: z.ZodObject<{
352
+ ping: z.ZodLiteral<"ping">;
353
+ pong: z.ZodLiteral<"pong">;
354
+ }, z.core.$strict>;
355
+ expiresAt: z.ZodISODateTime;
356
+ }, z.core.$strict>;
357
+ replayBeginFrame: z.ZodObject<{
358
+ type: z.ZodLiteral<"replay.begin">;
359
+ after: z.ZodNullable<z.ZodObject<{
360
+ streamId: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
361
+ sequence: z.ZodString;
362
+ }, z.core.$strict>>;
363
+ through: z.ZodObject<{
364
+ streamId: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
365
+ sequence: z.ZodString;
366
+ }, z.core.$strict>;
367
+ }, z.core.$strict>;
368
+ replayEndFrame: z.ZodObject<{
369
+ type: z.ZodLiteral<"replay.end">;
370
+ through: z.ZodObject<{
371
+ streamId: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
372
+ sequence: z.ZodString;
373
+ }, z.core.$strict>;
374
+ }, z.core.$strict>;
375
+ batchFrame: z.ZodObject<{
376
+ type: z.ZodLiteral<"batch">;
377
+ events: z.ZodArray<z.ZodObject<{
378
+ type: z.ZodLiteral<"event">;
379
+ protocolVersion: z.ZodLiteral<1>;
380
+ eventVersion: z.ZodNumber;
381
+ id: z.ZodString;
382
+ name: z.ZodString;
383
+ subject: z.ZodDiscriminatedUnion<[z.ZodObject<{
384
+ type: z.ZodLiteral<"partner">;
385
+ id: z.ZodString;
386
+ }, z.core.$strict>, z.ZodObject<{
387
+ type: z.ZodLiteral<"team">;
388
+ id: z.ZodString;
389
+ }, z.core.$strict>, z.ZodObject<{
390
+ type: z.ZodLiteral<"user">;
391
+ id: z.ZodString;
392
+ }, z.core.$strict>, z.ZodObject<{
393
+ type: z.ZodLiteral<"site">;
394
+ id: z.ZodString;
395
+ }, z.core.$strict>], "type">;
396
+ occurredAt: z.ZodISODateTime;
397
+ correlationId: z.ZodNullable<z.ZodString>;
398
+ data: z.ZodJSONSchema;
399
+ cursor: z.ZodObject<{
400
+ streamId: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
401
+ sequence: z.ZodString;
402
+ }, z.core.$strict>;
403
+ changes: z.ZodArray<z.ZodObject<{
404
+ type: z.ZodString;
405
+ id: z.ZodString;
406
+ kind: z.ZodEnum<{
407
+ created: "created";
408
+ deleted: "deleted";
409
+ updated: "updated";
410
+ }>;
411
+ }, z.core.$strict>>;
412
+ delivery: z.ZodLiteral<"durable">;
413
+ }, z.core.$strict>>;
414
+ }, z.core.$strict>;
415
+ resyncRequiredFrame: z.ZodObject<{
416
+ type: z.ZodLiteral<"resync.required">;
417
+ reason: z.ZodEnum<{
418
+ cursor_expired: "cursor_expired";
419
+ retention_gap: "retention_gap";
420
+ sequence_gap: "sequence_gap";
421
+ stream_mismatch: "stream_mismatch";
422
+ }>;
423
+ scope: z.ZodObject<{
424
+ type: z.ZodLiteral<"stream">;
425
+ streamId: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
426
+ }, z.core.$strict>;
427
+ resumeAfter: z.ZodObject<{
428
+ streamId: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
429
+ sequence: z.ZodString;
430
+ }, z.core.$strict>;
431
+ }, z.core.$strict>;
432
+ realtimeErrorFrame: z.ZodObject<{
433
+ type: z.ZodLiteral<"error">;
434
+ error: z.ZodObject<{
435
+ code: z.ZodEnum<{
436
+ internal_error: "internal_error";
437
+ invalid_frame: "invalid_frame";
438
+ overloaded: "overloaded";
439
+ policy_violation: "policy_violation";
440
+ protocol_mismatch: "protocol_mismatch";
441
+ }>;
442
+ message: z.ZodString;
443
+ retryable: z.ZodBoolean;
444
+ retryAfter: z.ZodOptional<z.ZodNumber>;
445
+ }, z.core.$strict>;
446
+ }, z.core.$strict>;
447
+ clientFrame: z.ZodUnion<readonly [z.ZodObject<{
448
+ type: z.ZodLiteral<"hello">;
449
+ protocolVersion: z.ZodLiteral<1>;
450
+ sdkVersion: z.ZodString;
451
+ resume: z.ZodNullable<z.ZodObject<{
452
+ streamId: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
453
+ sequence: z.ZodString;
454
+ }, z.core.$strict>>;
455
+ }, z.core.$strict>, z.ZodObject<{
456
+ type: z.ZodLiteral<"ack">;
457
+ cursor: z.ZodObject<{
458
+ streamId: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
459
+ sequence: z.ZodString;
460
+ }, z.core.$strict>;
461
+ }, z.core.$strict>]>;
462
+ serverFrame: z.ZodUnion<readonly [z.ZodObject<{
463
+ type: z.ZodLiteral<"ready">;
464
+ protocolVersion: z.ZodLiteral<1>;
465
+ connectionId: z.ZodString;
466
+ streamId: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
467
+ replayFloor: z.ZodObject<{
468
+ streamId: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
469
+ sequence: z.ZodString;
470
+ }, z.core.$strict>;
471
+ head: z.ZodObject<{
472
+ streamId: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
473
+ sequence: z.ZodString;
474
+ }, z.core.$strict>;
475
+ limits: z.ZodObject<{
476
+ maxBatchEvents: z.ZodNumber;
477
+ maxUnackedEvents: z.ZodNumber;
478
+ }, z.core.$strict>;
479
+ heartbeat: z.ZodObject<{
480
+ ping: z.ZodLiteral<"ping">;
481
+ pong: z.ZodLiteral<"pong">;
482
+ }, z.core.$strict>;
483
+ expiresAt: z.ZodISODateTime;
484
+ }, z.core.$strict>, z.ZodObject<{
485
+ type: z.ZodLiteral<"replay.begin">;
486
+ after: z.ZodNullable<z.ZodObject<{
487
+ streamId: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
488
+ sequence: z.ZodString;
489
+ }, z.core.$strict>>;
490
+ through: z.ZodObject<{
491
+ streamId: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
492
+ sequence: z.ZodString;
493
+ }, z.core.$strict>;
494
+ }, z.core.$strict>, z.ZodObject<{
495
+ type: z.ZodLiteral<"replay.end">;
496
+ through: z.ZodObject<{
497
+ streamId: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
498
+ sequence: z.ZodString;
499
+ }, z.core.$strict>;
500
+ }, z.core.$strict>, z.ZodUnion<readonly [z.ZodObject<{
501
+ type: z.ZodLiteral<"event">;
502
+ protocolVersion: z.ZodLiteral<1>;
503
+ eventVersion: z.ZodNumber;
504
+ id: z.ZodString;
505
+ name: z.ZodString;
506
+ subject: z.ZodDiscriminatedUnion<[z.ZodObject<{
507
+ type: z.ZodLiteral<"partner">;
508
+ id: z.ZodString;
509
+ }, z.core.$strict>, z.ZodObject<{
510
+ type: z.ZodLiteral<"team">;
511
+ id: z.ZodString;
512
+ }, z.core.$strict>, z.ZodObject<{
513
+ type: z.ZodLiteral<"user">;
514
+ id: z.ZodString;
515
+ }, z.core.$strict>, z.ZodObject<{
516
+ type: z.ZodLiteral<"site">;
517
+ id: z.ZodString;
518
+ }, z.core.$strict>], "type">;
519
+ occurredAt: z.ZodISODateTime;
520
+ correlationId: z.ZodNullable<z.ZodString>;
521
+ data: z.ZodJSONSchema;
522
+ cursor: z.ZodObject<{
523
+ streamId: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
524
+ sequence: z.ZodString;
525
+ }, z.core.$strict>;
526
+ changes: z.ZodArray<z.ZodObject<{
527
+ type: z.ZodString;
528
+ id: z.ZodString;
529
+ kind: z.ZodEnum<{
530
+ created: "created";
531
+ deleted: "deleted";
532
+ updated: "updated";
533
+ }>;
534
+ }, z.core.$strict>>;
535
+ delivery: z.ZodLiteral<"durable">;
536
+ }, z.core.$strict>, z.ZodObject<{
537
+ type: z.ZodLiteral<"event">;
538
+ protocolVersion: z.ZodLiteral<1>;
539
+ eventVersion: z.ZodNumber;
540
+ id: z.ZodString;
541
+ name: z.ZodString;
542
+ subject: z.ZodDiscriminatedUnion<[z.ZodObject<{
543
+ type: z.ZodLiteral<"partner">;
544
+ id: z.ZodString;
545
+ }, z.core.$strict>, z.ZodObject<{
546
+ type: z.ZodLiteral<"team">;
547
+ id: z.ZodString;
548
+ }, z.core.$strict>, z.ZodObject<{
549
+ type: z.ZodLiteral<"user">;
550
+ id: z.ZodString;
551
+ }, z.core.$strict>, z.ZodObject<{
552
+ type: z.ZodLiteral<"site">;
553
+ id: z.ZodString;
554
+ }, z.core.$strict>], "type">;
555
+ occurredAt: z.ZodISODateTime;
556
+ correlationId: z.ZodNullable<z.ZodString>;
557
+ data: z.ZodJSONSchema;
558
+ cursor: z.ZodNull;
559
+ changes: z.ZodArray<z.ZodObject<{
560
+ type: z.ZodString;
561
+ id: z.ZodString;
562
+ kind: z.ZodEnum<{
563
+ created: "created";
564
+ deleted: "deleted";
565
+ updated: "updated";
566
+ }>;
567
+ }, z.core.$strict>>;
568
+ delivery: z.ZodLiteral<"ephemeral">;
569
+ }, z.core.$strict>]>, z.ZodObject<{
570
+ type: z.ZodLiteral<"batch">;
571
+ events: z.ZodArray<z.ZodObject<{
572
+ type: z.ZodLiteral<"event">;
573
+ protocolVersion: z.ZodLiteral<1>;
574
+ eventVersion: z.ZodNumber;
575
+ id: z.ZodString;
576
+ name: z.ZodString;
577
+ subject: z.ZodDiscriminatedUnion<[z.ZodObject<{
578
+ type: z.ZodLiteral<"partner">;
579
+ id: z.ZodString;
580
+ }, z.core.$strict>, z.ZodObject<{
581
+ type: z.ZodLiteral<"team">;
582
+ id: z.ZodString;
583
+ }, z.core.$strict>, z.ZodObject<{
584
+ type: z.ZodLiteral<"user">;
585
+ id: z.ZodString;
586
+ }, z.core.$strict>, z.ZodObject<{
587
+ type: z.ZodLiteral<"site">;
588
+ id: z.ZodString;
589
+ }, z.core.$strict>], "type">;
590
+ occurredAt: z.ZodISODateTime;
591
+ correlationId: z.ZodNullable<z.ZodString>;
592
+ data: z.ZodJSONSchema;
593
+ cursor: z.ZodObject<{
594
+ streamId: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
595
+ sequence: z.ZodString;
596
+ }, z.core.$strict>;
597
+ changes: z.ZodArray<z.ZodObject<{
598
+ type: z.ZodString;
599
+ id: z.ZodString;
600
+ kind: z.ZodEnum<{
601
+ created: "created";
602
+ deleted: "deleted";
603
+ updated: "updated";
604
+ }>;
605
+ }, z.core.$strict>>;
606
+ delivery: z.ZodLiteral<"durable">;
607
+ }, z.core.$strict>>;
608
+ }, z.core.$strict>, z.ZodObject<{
609
+ type: z.ZodLiteral<"resync.required">;
610
+ reason: z.ZodEnum<{
611
+ cursor_expired: "cursor_expired";
612
+ retention_gap: "retention_gap";
613
+ sequence_gap: "sequence_gap";
614
+ stream_mismatch: "stream_mismatch";
615
+ }>;
616
+ scope: z.ZodObject<{
617
+ type: z.ZodLiteral<"stream">;
618
+ streamId: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
619
+ }, z.core.$strict>;
620
+ resumeAfter: z.ZodObject<{
621
+ streamId: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
622
+ sequence: z.ZodString;
623
+ }, z.core.$strict>;
624
+ }, z.core.$strict>, z.ZodObject<{
625
+ type: z.ZodLiteral<"error">;
626
+ error: z.ZodObject<{
627
+ code: z.ZodEnum<{
628
+ internal_error: "internal_error";
629
+ invalid_frame: "invalid_frame";
630
+ overloaded: "overloaded";
631
+ policy_violation: "policy_violation";
632
+ protocol_mismatch: "protocol_mismatch";
633
+ }>;
634
+ message: z.ZodString;
635
+ retryable: z.ZodBoolean;
636
+ retryAfter: z.ZodOptional<z.ZodNumber>;
637
+ }, z.core.$strict>;
638
+ }, z.core.$strict>]>;
639
+ };
640
+ type RealtimeV1Schemas = ReturnType<typeof createRealtimeV1Schemas>;
641
+ type RealtimeV1StreamId = z.infer<RealtimeV1Schemas['streamId']>;
642
+ type RealtimeV1Cursor = z.infer<RealtimeV1Schemas['cursor']>;
643
+ type RealtimeV1StreamHead = z.infer<RealtimeV1Schemas['streamHead']>;
644
+ type RealtimeV1TicketRequest = z.infer<RealtimeV1Schemas['ticketRequest']>;
645
+ type RealtimeV1TicketClaims = z.infer<RealtimeV1Schemas['ticketClaims']>;
646
+ type RealtimeV1ResourceChange = z.infer<RealtimeV1Schemas['resourceChange']>;
647
+ type RealtimeV1Event = z.infer<RealtimeV1Schemas['event']>;
648
+ type RealtimeV1ClientFrame = z.infer<RealtimeV1Schemas['clientFrame']>;
649
+ type RealtimeV1ServerFrame = z.infer<RealtimeV1Schemas['serverFrame']>;
650
+ export { GSCDUMP_REALTIME_ACK_POLICY, GSCDUMP_REALTIME_CLOSE_CODES, GSCDUMP_REALTIME_CONNECTION_POLICY, GSCDUMP_REALTIME_LIMITS, GSCDUMP_REALTIME_MAX_CONNECTION_SECONDS, GSCDUMP_REALTIME_PING, GSCDUMP_REALTIME_PONG, GSCDUMP_REALTIME_PROTOCOL_VERSION, GSCDUMP_REALTIME_REPLAY_POLICY, GSCDUMP_REALTIME_SUBPROTOCOL, GSCDUMP_REALTIME_TICKET_AUDIENCE, GSCDUMP_REALTIME_TICKET_ISSUER, GSCDUMP_REALTIME_TICKET_POLICY, GSCDUMP_REALTIME_TICKET_PREFIX, GSCDUMP_REALTIME_TICKET_TTL_SECONDS, REALTIME_V1_EVENT_NAMES, REALTIME_V1_EVENT_SEMANTICS, REALTIME_V1_RESOURCE_TYPES, RealtimeV1ClientFrame, RealtimeV1Cursor, RealtimeV1Event, RealtimeV1ResourceChange, RealtimeV1Schemas, RealtimeV1ServerFrame, RealtimeV1StreamHead, RealtimeV1StreamId, RealtimeV1TicketClaims, RealtimeV1TicketRequest, createRealtimeV1Schemas };