@topgunbuild/core 0.2.1 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +1597 -52
- package/dist/index.d.ts +1597 -52
- package/dist/index.js +1471 -191
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1418 -190
- package/dist/index.mjs.map +1 -1
- package/package.json +11 -11
- package/LICENSE +0 -97
package/dist/index.d.mts
CHANGED
|
@@ -402,6 +402,706 @@ declare function hashORMapRecord<V>(record: ORMapRecord<V>): number;
|
|
|
402
402
|
*/
|
|
403
403
|
declare function compareTimestamps(a: Timestamp, b: Timestamp): number;
|
|
404
404
|
|
|
405
|
+
/**
|
|
406
|
+
* State of a PN Counter CRDT.
|
|
407
|
+
* Tracks positive and negative increments per node for convergence.
|
|
408
|
+
*/
|
|
409
|
+
interface PNCounterState {
|
|
410
|
+
/** Positive increments per node */
|
|
411
|
+
positive: Map<string, number>;
|
|
412
|
+
/** Negative increments per node */
|
|
413
|
+
negative: Map<string, number>;
|
|
414
|
+
}
|
|
415
|
+
/**
|
|
416
|
+
* Serializable form of PNCounterState for network/storage.
|
|
417
|
+
*/
|
|
418
|
+
interface PNCounterStateObject {
|
|
419
|
+
/** Positive increments per node as object */
|
|
420
|
+
p: Record<string, number>;
|
|
421
|
+
/** Negative increments per node as object */
|
|
422
|
+
n: Record<string, number>;
|
|
423
|
+
}
|
|
424
|
+
/**
|
|
425
|
+
* Configuration for creating a PN Counter.
|
|
426
|
+
*/
|
|
427
|
+
interface PNCounterConfig {
|
|
428
|
+
/** Unique node identifier for this counter instance */
|
|
429
|
+
nodeId: string;
|
|
430
|
+
/** Initial state to restore from */
|
|
431
|
+
initialState?: PNCounterState;
|
|
432
|
+
}
|
|
433
|
+
/**
|
|
434
|
+
* Interface for PN Counter CRDT.
|
|
435
|
+
*/
|
|
436
|
+
interface PNCounter {
|
|
437
|
+
/** Get current value */
|
|
438
|
+
get(): number;
|
|
439
|
+
/** Increment by 1, return new value */
|
|
440
|
+
increment(): number;
|
|
441
|
+
/** Decrement by 1, return new value */
|
|
442
|
+
decrement(): number;
|
|
443
|
+
/** Add delta (positive or negative), return new value */
|
|
444
|
+
addAndGet(delta: number): number;
|
|
445
|
+
/** Get state for sync */
|
|
446
|
+
getState(): PNCounterState;
|
|
447
|
+
/** Merge remote state */
|
|
448
|
+
merge(remote: PNCounterState): void;
|
|
449
|
+
/** Subscribe to value changes */
|
|
450
|
+
subscribe(listener: (value: number) => void): () => void;
|
|
451
|
+
}
|
|
452
|
+
/**
|
|
453
|
+
* Positive-Negative Counter CRDT implementation.
|
|
454
|
+
*
|
|
455
|
+
* A PN Counter is a CRDT that supports increment and decrement operations
|
|
456
|
+
* on any node, works offline, and guarantees convergence without coordination.
|
|
457
|
+
*
|
|
458
|
+
* How it works:
|
|
459
|
+
* - Tracks positive increments per node in a G-Counter
|
|
460
|
+
* - Tracks negative increments per node in another G-Counter
|
|
461
|
+
* - Value = sum(positive) - sum(negative)
|
|
462
|
+
* - Merge takes max for each node in both counters
|
|
463
|
+
*
|
|
464
|
+
* @example
|
|
465
|
+
* ```typescript
|
|
466
|
+
* const counter = new PNCounterImpl({ nodeId: 'node-1' });
|
|
467
|
+
* counter.increment(); // 1
|
|
468
|
+
* counter.increment(); // 2
|
|
469
|
+
* counter.decrement(); // 1
|
|
470
|
+
* counter.addAndGet(5); // 6
|
|
471
|
+
* ```
|
|
472
|
+
*/
|
|
473
|
+
declare class PNCounterImpl implements PNCounter {
|
|
474
|
+
private readonly nodeId;
|
|
475
|
+
private state;
|
|
476
|
+
private listeners;
|
|
477
|
+
constructor(config: PNCounterConfig);
|
|
478
|
+
/**
|
|
479
|
+
* Get the current counter value.
|
|
480
|
+
* Value = sum(positive) - sum(negative)
|
|
481
|
+
*/
|
|
482
|
+
get(): number;
|
|
483
|
+
/**
|
|
484
|
+
* Increment by 1 and return the new value.
|
|
485
|
+
*/
|
|
486
|
+
increment(): number;
|
|
487
|
+
/**
|
|
488
|
+
* Decrement by 1 and return the new value.
|
|
489
|
+
*/
|
|
490
|
+
decrement(): number;
|
|
491
|
+
/**
|
|
492
|
+
* Add a delta (positive or negative) and return the new value.
|
|
493
|
+
* @param delta The amount to add (can be negative)
|
|
494
|
+
*/
|
|
495
|
+
addAndGet(delta: number): number;
|
|
496
|
+
/**
|
|
497
|
+
* Get a copy of the current state for synchronization.
|
|
498
|
+
*/
|
|
499
|
+
getState(): PNCounterState;
|
|
500
|
+
/**
|
|
501
|
+
* Merge remote state into this counter.
|
|
502
|
+
* Takes the maximum value for each node in both positive and negative counters.
|
|
503
|
+
* This operation is commutative, associative, and idempotent (CRDT properties).
|
|
504
|
+
*
|
|
505
|
+
* @param remote The remote state to merge
|
|
506
|
+
*/
|
|
507
|
+
merge(remote: PNCounterState): void;
|
|
508
|
+
/**
|
|
509
|
+
* Subscribe to value changes.
|
|
510
|
+
* The listener is immediately called with the current value.
|
|
511
|
+
*
|
|
512
|
+
* @param listener Callback function receiving the new value
|
|
513
|
+
* @returns Unsubscribe function
|
|
514
|
+
*/
|
|
515
|
+
subscribe(listener: (value: number) => void): () => void;
|
|
516
|
+
private notifyListeners;
|
|
517
|
+
/**
|
|
518
|
+
* Get the node ID of this counter instance.
|
|
519
|
+
*/
|
|
520
|
+
getNodeId(): string;
|
|
521
|
+
/**
|
|
522
|
+
* Serialize state to binary format (msgpack).
|
|
523
|
+
*/
|
|
524
|
+
static serialize(state: PNCounterState): Uint8Array;
|
|
525
|
+
/**
|
|
526
|
+
* Deserialize binary data to state.
|
|
527
|
+
*/
|
|
528
|
+
static deserialize(data: Uint8Array): PNCounterState;
|
|
529
|
+
/**
|
|
530
|
+
* Convert state to plain object (for JSON/network).
|
|
531
|
+
*/
|
|
532
|
+
static stateToObject(state: PNCounterState): PNCounterStateObject;
|
|
533
|
+
/**
|
|
534
|
+
* Convert plain object to state.
|
|
535
|
+
*/
|
|
536
|
+
static objectToState(obj: PNCounterStateObject): PNCounterState;
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
/**
|
|
540
|
+
* Fixed-size circular buffer with sequence numbers.
|
|
541
|
+
* Older entries are overwritten when capacity is reached.
|
|
542
|
+
*
|
|
543
|
+
* @template T - Type of items stored in the buffer
|
|
544
|
+
*/
|
|
545
|
+
declare class Ringbuffer<T> {
|
|
546
|
+
private buffer;
|
|
547
|
+
private readonly _capacity;
|
|
548
|
+
private headSequence;
|
|
549
|
+
private tailSequence;
|
|
550
|
+
constructor(capacity: number);
|
|
551
|
+
/**
|
|
552
|
+
* Add item to buffer, returns sequence number.
|
|
553
|
+
*/
|
|
554
|
+
add(item: T): bigint;
|
|
555
|
+
/**
|
|
556
|
+
* Read item at sequence.
|
|
557
|
+
* Returns undefined if sequence is out of range.
|
|
558
|
+
*/
|
|
559
|
+
read(sequence: bigint): T | undefined;
|
|
560
|
+
/**
|
|
561
|
+
* Read range of items (inclusive).
|
|
562
|
+
* Automatically clamps to available range.
|
|
563
|
+
*/
|
|
564
|
+
readRange(startSeq: bigint, endSeq: bigint): T[];
|
|
565
|
+
/**
|
|
566
|
+
* Read from sequence with limit.
|
|
567
|
+
*/
|
|
568
|
+
readFrom(startSeq: bigint, limit?: number): T[];
|
|
569
|
+
/**
|
|
570
|
+
* Get the oldest available sequence number.
|
|
571
|
+
*/
|
|
572
|
+
getHeadSequence(): bigint;
|
|
573
|
+
/**
|
|
574
|
+
* Get the next sequence number to be written.
|
|
575
|
+
*/
|
|
576
|
+
getTailSequence(): bigint;
|
|
577
|
+
/**
|
|
578
|
+
* Get the number of items currently in the buffer.
|
|
579
|
+
*/
|
|
580
|
+
size(): number;
|
|
581
|
+
/**
|
|
582
|
+
* Get the maximum capacity of the buffer.
|
|
583
|
+
*/
|
|
584
|
+
getCapacity(): number;
|
|
585
|
+
/**
|
|
586
|
+
* Clear all items from the buffer.
|
|
587
|
+
*/
|
|
588
|
+
clear(): void;
|
|
589
|
+
/**
|
|
590
|
+
* Check if a sequence is available in the buffer.
|
|
591
|
+
*/
|
|
592
|
+
isAvailable(sequence: bigint): boolean;
|
|
593
|
+
/**
|
|
594
|
+
* Get remaining capacity before oldest entries are overwritten.
|
|
595
|
+
*/
|
|
596
|
+
remainingCapacity(): number;
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
/**
|
|
600
|
+
* Type of journal event.
|
|
601
|
+
*/
|
|
602
|
+
type JournalEventType = 'PUT' | 'UPDATE' | 'DELETE';
|
|
603
|
+
/**
|
|
604
|
+
* Single event in the journal.
|
|
605
|
+
*/
|
|
606
|
+
interface JournalEvent<V = unknown> {
|
|
607
|
+
/** Monotonically increasing sequence number */
|
|
608
|
+
sequence: bigint;
|
|
609
|
+
/** Event type */
|
|
610
|
+
type: JournalEventType;
|
|
611
|
+
/** Map name */
|
|
612
|
+
mapName: string;
|
|
613
|
+
/** Entry key */
|
|
614
|
+
key: string;
|
|
615
|
+
/** New value (undefined for DELETE) */
|
|
616
|
+
value?: V;
|
|
617
|
+
/** Previous value (for UPDATE and DELETE) */
|
|
618
|
+
previousValue?: V;
|
|
619
|
+
/** HLC timestamp */
|
|
620
|
+
timestamp: Timestamp;
|
|
621
|
+
/** Node that made the change */
|
|
622
|
+
nodeId: string;
|
|
623
|
+
/** Optional metadata */
|
|
624
|
+
metadata?: Record<string, unknown>;
|
|
625
|
+
}
|
|
626
|
+
/**
|
|
627
|
+
* Input for appending events (without sequence).
|
|
628
|
+
*/
|
|
629
|
+
type JournalEventInput<V = unknown> = Omit<JournalEvent<V>, 'sequence'>;
|
|
630
|
+
/**
|
|
631
|
+
* Event Journal configuration.
|
|
632
|
+
*/
|
|
633
|
+
interface EventJournalConfig {
|
|
634
|
+
/** Maximum number of events to keep in memory */
|
|
635
|
+
capacity: number;
|
|
636
|
+
/** Time-to-live for events (ms), 0 = infinite */
|
|
637
|
+
ttlMs: number;
|
|
638
|
+
/** Persist to storage adapter */
|
|
639
|
+
persistent: boolean;
|
|
640
|
+
/** Maps to include (empty = all) */
|
|
641
|
+
includeMaps?: string[];
|
|
642
|
+
/** Maps to exclude */
|
|
643
|
+
excludeMaps?: string[];
|
|
644
|
+
}
|
|
645
|
+
/**
|
|
646
|
+
* Default configuration for Event Journal.
|
|
647
|
+
*/
|
|
648
|
+
declare const DEFAULT_EVENT_JOURNAL_CONFIG: EventJournalConfig;
|
|
649
|
+
/**
|
|
650
|
+
* Event Journal interface.
|
|
651
|
+
*/
|
|
652
|
+
interface EventJournal {
|
|
653
|
+
/** Append event to journal */
|
|
654
|
+
append<V>(event: JournalEventInput<V>): JournalEvent<V>;
|
|
655
|
+
/** Read events from sequence (inclusive) */
|
|
656
|
+
readFrom(sequence: bigint, limit?: number): JournalEvent[];
|
|
657
|
+
/** Read events in range */
|
|
658
|
+
readRange(startSeq: bigint, endSeq: bigint): JournalEvent[];
|
|
659
|
+
/** Get latest sequence number */
|
|
660
|
+
getLatestSequence(): bigint;
|
|
661
|
+
/** Get oldest sequence number (after compaction) */
|
|
662
|
+
getOldestSequence(): bigint;
|
|
663
|
+
/** Subscribe to new events */
|
|
664
|
+
subscribe(listener: (event: JournalEvent) => void, fromSequence?: bigint): () => void;
|
|
665
|
+
/** Get capacity info */
|
|
666
|
+
getCapacity(): {
|
|
667
|
+
used: number;
|
|
668
|
+
total: number;
|
|
669
|
+
};
|
|
670
|
+
/** Force compaction */
|
|
671
|
+
compact(): Promise<void>;
|
|
672
|
+
/** Dispose resources */
|
|
673
|
+
dispose(): void;
|
|
674
|
+
}
|
|
675
|
+
/**
|
|
676
|
+
* Journal event listener type.
|
|
677
|
+
*/
|
|
678
|
+
type JournalEventListener = (event: JournalEvent) => void;
|
|
679
|
+
/**
|
|
680
|
+
* Event Journal implementation using Ringbuffer.
|
|
681
|
+
* Records all Map changes as an append-only log.
|
|
682
|
+
*/
|
|
683
|
+
declare class EventJournalImpl implements EventJournal {
|
|
684
|
+
private readonly config;
|
|
685
|
+
private readonly buffer;
|
|
686
|
+
private readonly listeners;
|
|
687
|
+
private ttlTimer?;
|
|
688
|
+
constructor(config?: Partial<EventJournalConfig>);
|
|
689
|
+
/**
|
|
690
|
+
* Append event to journal.
|
|
691
|
+
* Returns the event with assigned sequence number.
|
|
692
|
+
* Returns event with sequence -1n if map is filtered out.
|
|
693
|
+
*/
|
|
694
|
+
append<V>(eventData: JournalEventInput<V>): JournalEvent<V>;
|
|
695
|
+
/**
|
|
696
|
+
* Read events from sequence with optional limit.
|
|
697
|
+
*/
|
|
698
|
+
readFrom(sequence: bigint, limit?: number): JournalEvent[];
|
|
699
|
+
/**
|
|
700
|
+
* Read events in range (inclusive).
|
|
701
|
+
*/
|
|
702
|
+
readRange(startSeq: bigint, endSeq: bigint): JournalEvent[];
|
|
703
|
+
/**
|
|
704
|
+
* Get latest sequence number.
|
|
705
|
+
* Returns 0n if no events have been added.
|
|
706
|
+
*/
|
|
707
|
+
getLatestSequence(): bigint;
|
|
708
|
+
/**
|
|
709
|
+
* Get oldest available sequence number.
|
|
710
|
+
*/
|
|
711
|
+
getOldestSequence(): bigint;
|
|
712
|
+
/**
|
|
713
|
+
* Subscribe to new events.
|
|
714
|
+
* Optionally replay events from a specific sequence.
|
|
715
|
+
*
|
|
716
|
+
* @param listener Callback for each event
|
|
717
|
+
* @param fromSequence Optional sequence to start replay from
|
|
718
|
+
* @returns Unsubscribe function
|
|
719
|
+
*/
|
|
720
|
+
subscribe(listener: JournalEventListener, fromSequence?: bigint): () => void;
|
|
721
|
+
/**
|
|
722
|
+
* Get capacity information.
|
|
723
|
+
*/
|
|
724
|
+
getCapacity(): {
|
|
725
|
+
used: number;
|
|
726
|
+
total: number;
|
|
727
|
+
};
|
|
728
|
+
/**
|
|
729
|
+
* Force compaction.
|
|
730
|
+
* Note: The ringbuffer handles eviction automatically.
|
|
731
|
+
* This method is provided for explicit cleanup of old events.
|
|
732
|
+
*/
|
|
733
|
+
compact(): Promise<void>;
|
|
734
|
+
/**
|
|
735
|
+
* Check if a map should be captured.
|
|
736
|
+
*/
|
|
737
|
+
private shouldCapture;
|
|
738
|
+
/**
|
|
739
|
+
* Start TTL cleanup timer.
|
|
740
|
+
*/
|
|
741
|
+
private startTTLCleanup;
|
|
742
|
+
/**
|
|
743
|
+
* Dispose resources.
|
|
744
|
+
*/
|
|
745
|
+
dispose(): void;
|
|
746
|
+
/**
|
|
747
|
+
* Get all current listeners count (for testing).
|
|
748
|
+
*/
|
|
749
|
+
getListenerCount(): number;
|
|
750
|
+
/**
|
|
751
|
+
* Get configuration (for testing).
|
|
752
|
+
*/
|
|
753
|
+
getConfig(): EventJournalConfig;
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
/**
|
|
757
|
+
* Function executed on the server against a single entry.
|
|
758
|
+
* Receives the current value (or undefined if key doesn't exist).
|
|
759
|
+
* Returns the new value (or undefined to delete the entry).
|
|
760
|
+
*/
|
|
761
|
+
type EntryProcessorFn<V, R = V> = (value: V | undefined, key: string, args?: unknown) => {
|
|
762
|
+
value: V | undefined;
|
|
763
|
+
result?: R;
|
|
764
|
+
};
|
|
765
|
+
/**
|
|
766
|
+
* Zod schema for entry processor definition validation.
|
|
767
|
+
*/
|
|
768
|
+
declare const EntryProcessorDefSchema: z.ZodObject<{
|
|
769
|
+
name: z.ZodString;
|
|
770
|
+
code: z.ZodString;
|
|
771
|
+
args: z.ZodOptional<z.ZodUnknown>;
|
|
772
|
+
}, z.core.$strip>;
|
|
773
|
+
/**
|
|
774
|
+
* Serializable entry processor definition.
|
|
775
|
+
* Code is sent as string and executed in isolated sandbox.
|
|
776
|
+
*/
|
|
777
|
+
interface EntryProcessorDef<V = unknown, R = V> {
|
|
778
|
+
/** Unique processor name for caching compiled code */
|
|
779
|
+
name: string;
|
|
780
|
+
/** JavaScript function body as string */
|
|
781
|
+
code: string;
|
|
782
|
+
/** Optional arguments passed to the processor */
|
|
783
|
+
args?: unknown;
|
|
784
|
+
/** Type markers (not serialized) */
|
|
785
|
+
__valueType?: V;
|
|
786
|
+
__resultType?: R;
|
|
787
|
+
}
|
|
788
|
+
/**
|
|
789
|
+
* Result of entry processor execution.
|
|
790
|
+
*/
|
|
791
|
+
interface EntryProcessorResult<R = unknown> {
|
|
792
|
+
/** Whether the operation succeeded */
|
|
793
|
+
success: boolean;
|
|
794
|
+
/** Custom result returned by processor */
|
|
795
|
+
result?: R;
|
|
796
|
+
/** Error message if failed */
|
|
797
|
+
error?: string;
|
|
798
|
+
/** New value after processing (for client cache update) */
|
|
799
|
+
newValue?: unknown;
|
|
800
|
+
}
|
|
801
|
+
/**
|
|
802
|
+
* Patterns that are denied in processor code for security reasons.
|
|
803
|
+
*/
|
|
804
|
+
declare const FORBIDDEN_PATTERNS: RegExp[];
|
|
805
|
+
/**
|
|
806
|
+
* Validates processor code against forbidden patterns.
|
|
807
|
+
* Returns true if code is safe, false otherwise.
|
|
808
|
+
*/
|
|
809
|
+
declare function validateProcessorCode(code: string): {
|
|
810
|
+
valid: boolean;
|
|
811
|
+
error?: string;
|
|
812
|
+
};
|
|
813
|
+
/**
|
|
814
|
+
* Built-in processors for common operations.
|
|
815
|
+
* These are type-safe and pre-validated.
|
|
816
|
+
*/
|
|
817
|
+
declare const BuiltInProcessors: {
|
|
818
|
+
/**
|
|
819
|
+
* Increment numeric value by delta.
|
|
820
|
+
* If value doesn't exist, starts from 0.
|
|
821
|
+
*/
|
|
822
|
+
INCREMENT: (delta?: number) => EntryProcessorDef<number, number>;
|
|
823
|
+
/**
|
|
824
|
+
* Decrement numeric value by delta.
|
|
825
|
+
* If value doesn't exist, starts from 0.
|
|
826
|
+
*/
|
|
827
|
+
DECREMENT: (delta?: number) => EntryProcessorDef<number, number>;
|
|
828
|
+
/**
|
|
829
|
+
* Decrement with floor (won't go below 0).
|
|
830
|
+
* Returns both the new value and whether it was floored.
|
|
831
|
+
*/
|
|
832
|
+
DECREMENT_FLOOR: (delta?: number) => EntryProcessorDef<number, {
|
|
833
|
+
newValue: number;
|
|
834
|
+
wasFloored: boolean;
|
|
835
|
+
}>;
|
|
836
|
+
/**
|
|
837
|
+
* Multiply numeric value by factor.
|
|
838
|
+
* If value doesn't exist, starts from 1.
|
|
839
|
+
*/
|
|
840
|
+
MULTIPLY: (factor: number) => EntryProcessorDef<number, number>;
|
|
841
|
+
/**
|
|
842
|
+
* Set value only if key doesn't exist.
|
|
843
|
+
* Returns true if value was set, false if key already existed.
|
|
844
|
+
*/
|
|
845
|
+
PUT_IF_ABSENT: <V>(newValue: V) => EntryProcessorDef<V, boolean>;
|
|
846
|
+
/**
|
|
847
|
+
* Replace value only if key exists.
|
|
848
|
+
* Returns the old value if replaced, undefined otherwise.
|
|
849
|
+
*/
|
|
850
|
+
REPLACE: <V>(newValue: V) => EntryProcessorDef<V, V | undefined>;
|
|
851
|
+
/**
|
|
852
|
+
* Replace value only if it matches expected value.
|
|
853
|
+
* Returns true if replaced, false otherwise.
|
|
854
|
+
*/
|
|
855
|
+
REPLACE_IF_EQUALS: <V>(expectedValue: V, newValue: V) => EntryProcessorDef<V, boolean>;
|
|
856
|
+
/**
|
|
857
|
+
* Delete entry only if value matches.
|
|
858
|
+
* Returns true if deleted, false otherwise.
|
|
859
|
+
*/
|
|
860
|
+
DELETE_IF_EQUALS: <V>(expectedValue: V) => EntryProcessorDef<V, boolean>;
|
|
861
|
+
/**
|
|
862
|
+
* Append item to array.
|
|
863
|
+
* Creates array if it doesn't exist.
|
|
864
|
+
* Returns new array length.
|
|
865
|
+
*/
|
|
866
|
+
ARRAY_PUSH: <T>(item: T) => EntryProcessorDef<T[], number>;
|
|
867
|
+
/**
|
|
868
|
+
* Remove last item from array.
|
|
869
|
+
* Returns the removed item or undefined.
|
|
870
|
+
*/
|
|
871
|
+
ARRAY_POP: <T>() => EntryProcessorDef<T[], T | undefined>;
|
|
872
|
+
/**
|
|
873
|
+
* Remove item from array by value (first occurrence).
|
|
874
|
+
* Returns true if item was found and removed.
|
|
875
|
+
*/
|
|
876
|
+
ARRAY_REMOVE: <T>(item: T) => EntryProcessorDef<T[], boolean>;
|
|
877
|
+
/**
|
|
878
|
+
* Update nested property using dot notation path.
|
|
879
|
+
* Creates intermediate objects if they don't exist.
|
|
880
|
+
*/
|
|
881
|
+
SET_PROPERTY: <V>(path: string, propValue: unknown) => EntryProcessorDef<V, V>;
|
|
882
|
+
/**
|
|
883
|
+
* Delete nested property using dot notation path.
|
|
884
|
+
* Returns the deleted value or undefined.
|
|
885
|
+
*/
|
|
886
|
+
DELETE_PROPERTY: <V>(path: string) => EntryProcessorDef<V, unknown>;
|
|
887
|
+
/**
|
|
888
|
+
* Get current value without modifying it.
|
|
889
|
+
* Useful for conditional reads.
|
|
890
|
+
*/
|
|
891
|
+
GET: <V>() => EntryProcessorDef<V, V | undefined>;
|
|
892
|
+
/**
|
|
893
|
+
* Conditional update based on version/timestamp.
|
|
894
|
+
* Only updates if current version matches expected.
|
|
895
|
+
* Useful for optimistic locking.
|
|
896
|
+
*/
|
|
897
|
+
CONDITIONAL_UPDATE: <V extends {
|
|
898
|
+
version?: number;
|
|
899
|
+
}>(expectedVersion: number, newData: Partial<V>) => EntryProcessorDef<V, {
|
|
900
|
+
updated: boolean;
|
|
901
|
+
conflict: boolean;
|
|
902
|
+
}>;
|
|
903
|
+
/**
|
|
904
|
+
* Merge object properties into existing value.
|
|
905
|
+
* Shallow merge only.
|
|
906
|
+
*/
|
|
907
|
+
MERGE: <V extends Record<string, unknown>>(properties: Partial<V>) => EntryProcessorDef<V, V>;
|
|
908
|
+
};
|
|
909
|
+
/**
|
|
910
|
+
* Rate limiting configuration for processor execution.
|
|
911
|
+
*/
|
|
912
|
+
interface ProcessorRateLimitConfig {
|
|
913
|
+
/** Max processor executions per second per client */
|
|
914
|
+
maxExecutionsPerSecond: number;
|
|
915
|
+
/** Max processor code size in bytes */
|
|
916
|
+
maxCodeSizeBytes: number;
|
|
917
|
+
/** Max args size in bytes (JSON stringified) */
|
|
918
|
+
maxArgsSizeBytes: number;
|
|
919
|
+
}
|
|
920
|
+
/**
|
|
921
|
+
* Default rate limit configuration.
|
|
922
|
+
*/
|
|
923
|
+
declare const DEFAULT_PROCESSOR_RATE_LIMITS: ProcessorRateLimitConfig;
|
|
924
|
+
|
|
925
|
+
/**
|
|
926
|
+
* Context provided to a conflict resolver during merge operations.
|
|
927
|
+
*/
|
|
928
|
+
interface MergeContext<V = unknown> {
|
|
929
|
+
/** Map name being modified */
|
|
930
|
+
mapName: string;
|
|
931
|
+
/** Entry key being modified */
|
|
932
|
+
key: string;
|
|
933
|
+
/** Current server/local value (undefined if key doesn't exist) */
|
|
934
|
+
localValue: V | undefined;
|
|
935
|
+
/** Incoming client/remote value */
|
|
936
|
+
remoteValue: V;
|
|
937
|
+
/** Local HLC timestamp (undefined if key doesn't exist) */
|
|
938
|
+
localTimestamp?: Timestamp;
|
|
939
|
+
/** Remote HLC timestamp */
|
|
940
|
+
remoteTimestamp: Timestamp;
|
|
941
|
+
/** Client/node ID that sent the update */
|
|
942
|
+
remoteNodeId: string;
|
|
943
|
+
/** Authentication context (optional) */
|
|
944
|
+
auth?: {
|
|
945
|
+
userId?: string;
|
|
946
|
+
roles?: string[];
|
|
947
|
+
metadata?: Record<string, unknown>;
|
|
948
|
+
};
|
|
949
|
+
/** Read other entries for cross-key validation */
|
|
950
|
+
readEntry: (key: string) => V | undefined;
|
|
951
|
+
}
|
|
952
|
+
/**
|
|
953
|
+
* Result of conflict resolution.
|
|
954
|
+
*/
|
|
955
|
+
type MergeResult<V = unknown> = {
|
|
956
|
+
action: 'accept';
|
|
957
|
+
value: V;
|
|
958
|
+
} | {
|
|
959
|
+
action: 'reject';
|
|
960
|
+
reason: string;
|
|
961
|
+
} | {
|
|
962
|
+
action: 'merge';
|
|
963
|
+
value: V;
|
|
964
|
+
} | {
|
|
965
|
+
action: 'local';
|
|
966
|
+
};
|
|
967
|
+
/**
|
|
968
|
+
* Conflict resolver function signature.
|
|
969
|
+
*/
|
|
970
|
+
type ConflictResolverFn<V = unknown> = (context: MergeContext<V>) => MergeResult<V> | Promise<MergeResult<V>>;
|
|
971
|
+
/**
|
|
972
|
+
* Conflict resolver definition (can be native function or sandboxed code).
|
|
973
|
+
*/
|
|
974
|
+
interface ConflictResolverDef<V = unknown> {
|
|
975
|
+
/** Unique resolver name */
|
|
976
|
+
name: string;
|
|
977
|
+
/** JavaScript function body as string (for sandboxed execution) */
|
|
978
|
+
code?: string;
|
|
979
|
+
/** Native function (for trusted server-side resolvers) */
|
|
980
|
+
fn?: ConflictResolverFn<V>;
|
|
981
|
+
/** Priority (higher = runs first, default 50) */
|
|
982
|
+
priority?: number;
|
|
983
|
+
/** Apply only to specific keys (glob pattern) */
|
|
984
|
+
keyPattern?: string;
|
|
985
|
+
}
|
|
986
|
+
/**
|
|
987
|
+
* Zod schema for validating conflict resolver definitions from network.
|
|
988
|
+
*/
|
|
989
|
+
declare const ConflictResolverDefSchema: z.ZodObject<{
|
|
990
|
+
name: z.ZodString;
|
|
991
|
+
code: z.ZodOptional<z.ZodString>;
|
|
992
|
+
priority: z.ZodDefault<z.ZodNumber>;
|
|
993
|
+
keyPattern: z.ZodOptional<z.ZodString>;
|
|
994
|
+
}, z.core.$strip>;
|
|
995
|
+
/**
|
|
996
|
+
* Patterns that are denied in resolver code for security reasons.
|
|
997
|
+
* Same patterns as EntryProcessor for consistency.
|
|
998
|
+
*/
|
|
999
|
+
declare const RESOLVER_FORBIDDEN_PATTERNS: RegExp[];
|
|
1000
|
+
/**
|
|
1001
|
+
* Validates resolver code against forbidden patterns.
|
|
1002
|
+
*/
|
|
1003
|
+
declare function validateResolverCode(code: string): {
|
|
1004
|
+
valid: boolean;
|
|
1005
|
+
error?: string;
|
|
1006
|
+
};
|
|
1007
|
+
/**
|
|
1008
|
+
* Rate limiting configuration for resolver registration.
|
|
1009
|
+
*/
|
|
1010
|
+
interface ResolverRateLimitConfig {
|
|
1011
|
+
/** Max resolver registrations per client */
|
|
1012
|
+
maxResolversPerClient: number;
|
|
1013
|
+
/** Max resolver code size in bytes */
|
|
1014
|
+
maxCodeSizeBytes: number;
|
|
1015
|
+
}
|
|
1016
|
+
/**
|
|
1017
|
+
* Default rate limit configuration.
|
|
1018
|
+
*/
|
|
1019
|
+
declare const DEFAULT_RESOLVER_RATE_LIMITS: ResolverRateLimitConfig;
|
|
1020
|
+
/**
|
|
1021
|
+
* Compares two HLC timestamps.
|
|
1022
|
+
* Returns negative if a < b, positive if a > b, 0 if equal.
|
|
1023
|
+
*/
|
|
1024
|
+
declare function compareHLCTimestamps(a: Timestamp, b: Timestamp): number;
|
|
1025
|
+
/**
|
|
1026
|
+
* Deep merges two objects.
|
|
1027
|
+
* Remote values take precedence at each level.
|
|
1028
|
+
*/
|
|
1029
|
+
declare function deepMerge<T extends object>(target: T, source: T): T;
|
|
1030
|
+
/**
|
|
1031
|
+
* Built-in conflict resolvers for common patterns.
|
|
1032
|
+
* These are type-safe and pre-validated.
|
|
1033
|
+
*/
|
|
1034
|
+
declare const BuiltInResolvers: {
|
|
1035
|
+
/**
|
|
1036
|
+
* Standard Last-Write-Wins - accept if remote timestamp is newer.
|
|
1037
|
+
*/
|
|
1038
|
+
LWW: <V>() => ConflictResolverDef<V>;
|
|
1039
|
+
/**
|
|
1040
|
+
* First-Write-Wins - reject if local value exists.
|
|
1041
|
+
* Useful for booking systems, unique constraints.
|
|
1042
|
+
*/
|
|
1043
|
+
FIRST_WRITE_WINS: <V>() => ConflictResolverDef<V>;
|
|
1044
|
+
/**
|
|
1045
|
+
* Numeric minimum - keep lowest value.
|
|
1046
|
+
* Useful for auction systems (lowest bid wins).
|
|
1047
|
+
*/
|
|
1048
|
+
NUMERIC_MIN: () => ConflictResolverDef<number>;
|
|
1049
|
+
/**
|
|
1050
|
+
* Numeric maximum - keep highest value.
|
|
1051
|
+
* Useful for high score tracking.
|
|
1052
|
+
*/
|
|
1053
|
+
NUMERIC_MAX: () => ConflictResolverDef<number>;
|
|
1054
|
+
/**
|
|
1055
|
+
* Non-negative - reject if value would be negative.
|
|
1056
|
+
* Useful for inventory systems.
|
|
1057
|
+
*/
|
|
1058
|
+
NON_NEGATIVE: () => ConflictResolverDef<number>;
|
|
1059
|
+
/**
|
|
1060
|
+
* Array union - merge arrays by taking union of elements.
|
|
1061
|
+
* Useful for tags, categories.
|
|
1062
|
+
*/
|
|
1063
|
+
ARRAY_UNION: <T>() => ConflictResolverDef<T[]>;
|
|
1064
|
+
/**
|
|
1065
|
+
* Deep merge - recursively merge objects.
|
|
1066
|
+
* Remote values take precedence at leaf level.
|
|
1067
|
+
*/
|
|
1068
|
+
DEEP_MERGE: <V extends object>() => ConflictResolverDef<V>;
|
|
1069
|
+
/**
|
|
1070
|
+
* Server-only - reject all client writes.
|
|
1071
|
+
* Useful for server-controlled state.
|
|
1072
|
+
*/
|
|
1073
|
+
SERVER_ONLY: <V>() => ConflictResolverDef<V>;
|
|
1074
|
+
/**
|
|
1075
|
+
* Owner-only - only the original creator can modify.
|
|
1076
|
+
* Requires value to have an `ownerId` property.
|
|
1077
|
+
*/
|
|
1078
|
+
OWNER_ONLY: <V extends {
|
|
1079
|
+
ownerId?: string;
|
|
1080
|
+
}>() => ConflictResolverDef<V>;
|
|
1081
|
+
/**
|
|
1082
|
+
* Immutable - reject any modifications after initial write.
|
|
1083
|
+
*/
|
|
1084
|
+
IMMUTABLE: <V>() => ConflictResolverDef<V>;
|
|
1085
|
+
/**
|
|
1086
|
+
* Version check - only accept if version increments by 1.
|
|
1087
|
+
* Useful for optimistic locking.
|
|
1088
|
+
*/
|
|
1089
|
+
VERSION_INCREMENT: <V extends {
|
|
1090
|
+
version?: number;
|
|
1091
|
+
}>() => ConflictResolverDef<V>;
|
|
1092
|
+
};
|
|
1093
|
+
/**
|
|
1094
|
+
* Event emitted when a merge is rejected.
|
|
1095
|
+
*/
|
|
1096
|
+
interface MergeRejection {
|
|
1097
|
+
mapName: string;
|
|
1098
|
+
key: string;
|
|
1099
|
+
attemptedValue: unknown;
|
|
1100
|
+
reason: string;
|
|
1101
|
+
timestamp: Timestamp;
|
|
1102
|
+
nodeId: string;
|
|
1103
|
+
}
|
|
1104
|
+
|
|
405
1105
|
/**
|
|
406
1106
|
* Hash utilities for TopGun
|
|
407
1107
|
*
|
|
@@ -509,15 +1209,15 @@ declare const WriteConcernSchema: z.ZodEnum<{
|
|
|
509
1209
|
}>;
|
|
510
1210
|
type WriteConcernValue = z.infer<typeof WriteConcernSchema>;
|
|
511
1211
|
declare const TimestampSchema: z.ZodObject<{
|
|
512
|
-
millis: z.ZodNumber
|
|
513
|
-
counter: z.ZodNumber
|
|
1212
|
+
millis: z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<number, number | bigint>>;
|
|
1213
|
+
counter: z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<number, number | bigint>>;
|
|
514
1214
|
nodeId: z.ZodString;
|
|
515
1215
|
}, z.core.$strip>;
|
|
516
1216
|
declare const LWWRecordSchema: z.ZodObject<{
|
|
517
1217
|
value: z.ZodNullable<z.ZodAny>;
|
|
518
1218
|
timestamp: z.ZodObject<{
|
|
519
|
-
millis: z.ZodNumber
|
|
520
|
-
counter: z.ZodNumber
|
|
1219
|
+
millis: z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<number, number | bigint>>;
|
|
1220
|
+
counter: z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<number, number | bigint>>;
|
|
521
1221
|
nodeId: z.ZodString;
|
|
522
1222
|
}, z.core.$strip>;
|
|
523
1223
|
ttlMs: z.ZodOptional<z.ZodNumber>;
|
|
@@ -525,8 +1225,8 @@ declare const LWWRecordSchema: z.ZodObject<{
|
|
|
525
1225
|
declare const ORMapRecordSchema: z.ZodObject<{
|
|
526
1226
|
value: z.ZodAny;
|
|
527
1227
|
timestamp: z.ZodObject<{
|
|
528
|
-
millis: z.ZodNumber
|
|
529
|
-
counter: z.ZodNumber
|
|
1228
|
+
millis: z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<number, number | bigint>>;
|
|
1229
|
+
counter: z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<number, number | bigint>>;
|
|
530
1230
|
nodeId: z.ZodString;
|
|
531
1231
|
}, z.core.$strip>;
|
|
532
1232
|
tag: z.ZodString;
|
|
@@ -564,8 +1264,8 @@ declare const ClientOpSchema: z.ZodObject<{
|
|
|
564
1264
|
record: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
565
1265
|
value: z.ZodNullable<z.ZodAny>;
|
|
566
1266
|
timestamp: z.ZodObject<{
|
|
567
|
-
millis: z.ZodNumber
|
|
568
|
-
counter: z.ZodNumber
|
|
1267
|
+
millis: z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<number, number | bigint>>;
|
|
1268
|
+
counter: z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<number, number | bigint>>;
|
|
569
1269
|
nodeId: z.ZodString;
|
|
570
1270
|
}, z.core.$strip>;
|
|
571
1271
|
ttlMs: z.ZodOptional<z.ZodNumber>;
|
|
@@ -573,8 +1273,8 @@ declare const ClientOpSchema: z.ZodObject<{
|
|
|
573
1273
|
orRecord: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
574
1274
|
value: z.ZodAny;
|
|
575
1275
|
timestamp: z.ZodObject<{
|
|
576
|
-
millis: z.ZodNumber
|
|
577
|
-
counter: z.ZodNumber
|
|
1276
|
+
millis: z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<number, number | bigint>>;
|
|
1277
|
+
counter: z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<number, number | bigint>>;
|
|
578
1278
|
nodeId: z.ZodString;
|
|
579
1279
|
}, z.core.$strip>;
|
|
580
1280
|
tag: z.ZodString;
|
|
@@ -627,8 +1327,8 @@ declare const ClientOpMessageSchema: z.ZodObject<{
|
|
|
627
1327
|
record: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
628
1328
|
value: z.ZodNullable<z.ZodAny>;
|
|
629
1329
|
timestamp: z.ZodObject<{
|
|
630
|
-
millis: z.ZodNumber
|
|
631
|
-
counter: z.ZodNumber
|
|
1330
|
+
millis: z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<number, number | bigint>>;
|
|
1331
|
+
counter: z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<number, number | bigint>>;
|
|
632
1332
|
nodeId: z.ZodString;
|
|
633
1333
|
}, z.core.$strip>;
|
|
634
1334
|
ttlMs: z.ZodOptional<z.ZodNumber>;
|
|
@@ -636,8 +1336,8 @@ declare const ClientOpMessageSchema: z.ZodObject<{
|
|
|
636
1336
|
orRecord: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
637
1337
|
value: z.ZodAny;
|
|
638
1338
|
timestamp: z.ZodObject<{
|
|
639
|
-
millis: z.ZodNumber
|
|
640
|
-
counter: z.ZodNumber
|
|
1339
|
+
millis: z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<number, number | bigint>>;
|
|
1340
|
+
counter: z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<number, number | bigint>>;
|
|
641
1341
|
nodeId: z.ZodString;
|
|
642
1342
|
}, z.core.$strip>;
|
|
643
1343
|
tag: z.ZodString;
|
|
@@ -665,8 +1365,8 @@ declare const OpBatchMessageSchema: z.ZodObject<{
|
|
|
665
1365
|
record: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
666
1366
|
value: z.ZodNullable<z.ZodAny>;
|
|
667
1367
|
timestamp: z.ZodObject<{
|
|
668
|
-
millis: z.ZodNumber
|
|
669
|
-
counter: z.ZodNumber
|
|
1368
|
+
millis: z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<number, number | bigint>>;
|
|
1369
|
+
counter: z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<number, number | bigint>>;
|
|
670
1370
|
nodeId: z.ZodString;
|
|
671
1371
|
}, z.core.$strip>;
|
|
672
1372
|
ttlMs: z.ZodOptional<z.ZodNumber>;
|
|
@@ -674,8 +1374,8 @@ declare const OpBatchMessageSchema: z.ZodObject<{
|
|
|
674
1374
|
orRecord: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
675
1375
|
value: z.ZodAny;
|
|
676
1376
|
timestamp: z.ZodObject<{
|
|
677
|
-
millis: z.ZodNumber
|
|
678
|
-
counter: z.ZodNumber
|
|
1377
|
+
millis: z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<number, number | bigint>>;
|
|
1378
|
+
counter: z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<number, number | bigint>>;
|
|
679
1379
|
nodeId: z.ZodString;
|
|
680
1380
|
}, z.core.$strip>;
|
|
681
1381
|
tag: z.ZodString;
|
|
@@ -712,8 +1412,8 @@ declare const SyncRespRootMessageSchema: z.ZodObject<{
|
|
|
712
1412
|
mapName: z.ZodString;
|
|
713
1413
|
rootHash: z.ZodNumber;
|
|
714
1414
|
timestamp: z.ZodObject<{
|
|
715
|
-
millis: z.ZodNumber
|
|
716
|
-
counter: z.ZodNumber
|
|
1415
|
+
millis: z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<number, number | bigint>>;
|
|
1416
|
+
counter: z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<number, number | bigint>>;
|
|
717
1417
|
nodeId: z.ZodString;
|
|
718
1418
|
}, z.core.$strip>;
|
|
719
1419
|
}, z.core.$strip>;
|
|
@@ -736,8 +1436,8 @@ declare const SyncRespLeafMessageSchema: z.ZodObject<{
|
|
|
736
1436
|
record: z.ZodObject<{
|
|
737
1437
|
value: z.ZodNullable<z.ZodAny>;
|
|
738
1438
|
timestamp: z.ZodObject<{
|
|
739
|
-
millis: z.ZodNumber
|
|
740
|
-
counter: z.ZodNumber
|
|
1439
|
+
millis: z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<number, number | bigint>>;
|
|
1440
|
+
counter: z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<number, number | bigint>>;
|
|
741
1441
|
nodeId: z.ZodString;
|
|
742
1442
|
}, z.core.$strip>;
|
|
743
1443
|
ttlMs: z.ZodOptional<z.ZodNumber>;
|
|
@@ -796,6 +1496,46 @@ declare const TopicMessageEventSchema: z.ZodObject<{
|
|
|
796
1496
|
timestamp: z.ZodNumber;
|
|
797
1497
|
}, z.core.$strip>;
|
|
798
1498
|
}, z.core.$strip>;
|
|
1499
|
+
declare const PNCounterStateObjectSchema: z.ZodObject<{
|
|
1500
|
+
p: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
1501
|
+
n: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
1502
|
+
}, z.core.$strip>;
|
|
1503
|
+
declare const CounterRequestSchema: z.ZodObject<{
|
|
1504
|
+
type: z.ZodLiteral<"COUNTER_REQUEST">;
|
|
1505
|
+
payload: z.ZodObject<{
|
|
1506
|
+
name: z.ZodString;
|
|
1507
|
+
}, z.core.$strip>;
|
|
1508
|
+
}, z.core.$strip>;
|
|
1509
|
+
declare const CounterSyncSchema: z.ZodObject<{
|
|
1510
|
+
type: z.ZodLiteral<"COUNTER_SYNC">;
|
|
1511
|
+
payload: z.ZodObject<{
|
|
1512
|
+
name: z.ZodString;
|
|
1513
|
+
state: z.ZodObject<{
|
|
1514
|
+
p: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
1515
|
+
n: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
1516
|
+
}, z.core.$strip>;
|
|
1517
|
+
}, z.core.$strip>;
|
|
1518
|
+
}, z.core.$strip>;
|
|
1519
|
+
declare const CounterResponseSchema: z.ZodObject<{
|
|
1520
|
+
type: z.ZodLiteral<"COUNTER_RESPONSE">;
|
|
1521
|
+
payload: z.ZodObject<{
|
|
1522
|
+
name: z.ZodString;
|
|
1523
|
+
state: z.ZodObject<{
|
|
1524
|
+
p: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
1525
|
+
n: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
1526
|
+
}, z.core.$strip>;
|
|
1527
|
+
}, z.core.$strip>;
|
|
1528
|
+
}, z.core.$strip>;
|
|
1529
|
+
declare const CounterUpdateSchema: z.ZodObject<{
|
|
1530
|
+
type: z.ZodLiteral<"COUNTER_UPDATE">;
|
|
1531
|
+
payload: z.ZodObject<{
|
|
1532
|
+
name: z.ZodString;
|
|
1533
|
+
state: z.ZodObject<{
|
|
1534
|
+
p: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
1535
|
+
n: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
1536
|
+
}, z.core.$strip>;
|
|
1537
|
+
}, z.core.$strip>;
|
|
1538
|
+
}, z.core.$strip>;
|
|
799
1539
|
declare const PingMessageSchema: z.ZodObject<{
|
|
800
1540
|
type: z.ZodLiteral<"PING">;
|
|
801
1541
|
timestamp: z.ZodNumber;
|
|
@@ -835,8 +1575,8 @@ declare const ORMapSyncRespRootSchema: z.ZodObject<{
|
|
|
835
1575
|
mapName: z.ZodString;
|
|
836
1576
|
rootHash: z.ZodNumber;
|
|
837
1577
|
timestamp: z.ZodObject<{
|
|
838
|
-
millis: z.ZodNumber
|
|
839
|
-
counter: z.ZodNumber
|
|
1578
|
+
millis: z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<number, number | bigint>>;
|
|
1579
|
+
counter: z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<number, number | bigint>>;
|
|
840
1580
|
nodeId: z.ZodString;
|
|
841
1581
|
}, z.core.$strip>;
|
|
842
1582
|
}, z.core.$strip>;
|
|
@@ -875,8 +1615,8 @@ declare const ORMapSyncRespLeafSchema: z.ZodObject<{
|
|
|
875
1615
|
records: z.ZodArray<z.ZodObject<{
|
|
876
1616
|
value: z.ZodAny;
|
|
877
1617
|
timestamp: z.ZodObject<{
|
|
878
|
-
millis: z.ZodNumber
|
|
879
|
-
counter: z.ZodNumber
|
|
1618
|
+
millis: z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<number, number | bigint>>;
|
|
1619
|
+
counter: z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<number, number | bigint>>;
|
|
880
1620
|
nodeId: z.ZodString;
|
|
881
1621
|
}, z.core.$strip>;
|
|
882
1622
|
tag: z.ZodString;
|
|
@@ -908,8 +1648,8 @@ declare const ORMapDiffResponseSchema: z.ZodObject<{
|
|
|
908
1648
|
records: z.ZodArray<z.ZodObject<{
|
|
909
1649
|
value: z.ZodAny;
|
|
910
1650
|
timestamp: z.ZodObject<{
|
|
911
|
-
millis: z.ZodNumber
|
|
912
|
-
counter: z.ZodNumber
|
|
1651
|
+
millis: z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<number, number | bigint>>;
|
|
1652
|
+
counter: z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<number, number | bigint>>;
|
|
913
1653
|
nodeId: z.ZodString;
|
|
914
1654
|
}, z.core.$strip>;
|
|
915
1655
|
tag: z.ZodString;
|
|
@@ -931,8 +1671,8 @@ declare const ORMapPushDiffSchema: z.ZodObject<{
|
|
|
931
1671
|
records: z.ZodArray<z.ZodObject<{
|
|
932
1672
|
value: z.ZodAny;
|
|
933
1673
|
timestamp: z.ZodObject<{
|
|
934
|
-
millis: z.ZodNumber
|
|
935
|
-
counter: z.ZodNumber
|
|
1674
|
+
millis: z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<number, number | bigint>>;
|
|
1675
|
+
counter: z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<number, number | bigint>>;
|
|
936
1676
|
nodeId: z.ZodString;
|
|
937
1677
|
}, z.core.$strip>;
|
|
938
1678
|
tag: z.ZodString;
|
|
@@ -942,6 +1682,283 @@ declare const ORMapPushDiffSchema: z.ZodObject<{
|
|
|
942
1682
|
}, z.core.$strip>>;
|
|
943
1683
|
}, z.core.$strip>;
|
|
944
1684
|
}, z.core.$strip>;
|
|
1685
|
+
/**
|
|
1686
|
+
* PARTITION_MAP_REQUEST: Client requests current partition map
|
|
1687
|
+
*/
|
|
1688
|
+
declare const PartitionMapRequestSchema: z.ZodObject<{
|
|
1689
|
+
type: z.ZodLiteral<"PARTITION_MAP_REQUEST">;
|
|
1690
|
+
payload: z.ZodOptional<z.ZodObject<{
|
|
1691
|
+
currentVersion: z.ZodOptional<z.ZodNumber>;
|
|
1692
|
+
}, z.core.$strip>>;
|
|
1693
|
+
}, z.core.$strip>;
|
|
1694
|
+
/**
|
|
1695
|
+
* Entry processor definition schema.
|
|
1696
|
+
*/
|
|
1697
|
+
declare const EntryProcessorSchema: z.ZodObject<{
|
|
1698
|
+
name: z.ZodString;
|
|
1699
|
+
code: z.ZodString;
|
|
1700
|
+
args: z.ZodOptional<z.ZodUnknown>;
|
|
1701
|
+
}, z.core.$strip>;
|
|
1702
|
+
/**
|
|
1703
|
+
* ENTRY_PROCESS: Client requests atomic operation on single key.
|
|
1704
|
+
*/
|
|
1705
|
+
declare const EntryProcessRequestSchema: z.ZodObject<{
|
|
1706
|
+
type: z.ZodLiteral<"ENTRY_PROCESS">;
|
|
1707
|
+
requestId: z.ZodString;
|
|
1708
|
+
mapName: z.ZodString;
|
|
1709
|
+
key: z.ZodString;
|
|
1710
|
+
processor: z.ZodObject<{
|
|
1711
|
+
name: z.ZodString;
|
|
1712
|
+
code: z.ZodString;
|
|
1713
|
+
args: z.ZodOptional<z.ZodUnknown>;
|
|
1714
|
+
}, z.core.$strip>;
|
|
1715
|
+
}, z.core.$strip>;
|
|
1716
|
+
/**
|
|
1717
|
+
* ENTRY_PROCESS_BATCH: Client requests atomic operation on multiple keys.
|
|
1718
|
+
*/
|
|
1719
|
+
declare const EntryProcessBatchRequestSchema: z.ZodObject<{
|
|
1720
|
+
type: z.ZodLiteral<"ENTRY_PROCESS_BATCH">;
|
|
1721
|
+
requestId: z.ZodString;
|
|
1722
|
+
mapName: z.ZodString;
|
|
1723
|
+
keys: z.ZodArray<z.ZodString>;
|
|
1724
|
+
processor: z.ZodObject<{
|
|
1725
|
+
name: z.ZodString;
|
|
1726
|
+
code: z.ZodString;
|
|
1727
|
+
args: z.ZodOptional<z.ZodUnknown>;
|
|
1728
|
+
}, z.core.$strip>;
|
|
1729
|
+
}, z.core.$strip>;
|
|
1730
|
+
/**
|
|
1731
|
+
* ENTRY_PROCESS_RESPONSE: Server responds to single-key processor request.
|
|
1732
|
+
*/
|
|
1733
|
+
declare const EntryProcessResponseSchema: z.ZodObject<{
|
|
1734
|
+
type: z.ZodLiteral<"ENTRY_PROCESS_RESPONSE">;
|
|
1735
|
+
requestId: z.ZodString;
|
|
1736
|
+
success: z.ZodBoolean;
|
|
1737
|
+
result: z.ZodOptional<z.ZodUnknown>;
|
|
1738
|
+
newValue: z.ZodOptional<z.ZodUnknown>;
|
|
1739
|
+
error: z.ZodOptional<z.ZodString>;
|
|
1740
|
+
}, z.core.$strip>;
|
|
1741
|
+
/**
|
|
1742
|
+
* Individual key result in batch response.
|
|
1743
|
+
*/
|
|
1744
|
+
declare const EntryProcessKeyResultSchema: z.ZodObject<{
|
|
1745
|
+
success: z.ZodBoolean;
|
|
1746
|
+
result: z.ZodOptional<z.ZodUnknown>;
|
|
1747
|
+
newValue: z.ZodOptional<z.ZodUnknown>;
|
|
1748
|
+
error: z.ZodOptional<z.ZodString>;
|
|
1749
|
+
}, z.core.$strip>;
|
|
1750
|
+
/**
|
|
1751
|
+
* ENTRY_PROCESS_BATCH_RESPONSE: Server responds to multi-key processor request.
|
|
1752
|
+
*/
|
|
1753
|
+
declare const EntryProcessBatchResponseSchema: z.ZodObject<{
|
|
1754
|
+
type: z.ZodLiteral<"ENTRY_PROCESS_BATCH_RESPONSE">;
|
|
1755
|
+
requestId: z.ZodString;
|
|
1756
|
+
results: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
1757
|
+
success: z.ZodBoolean;
|
|
1758
|
+
result: z.ZodOptional<z.ZodUnknown>;
|
|
1759
|
+
newValue: z.ZodOptional<z.ZodUnknown>;
|
|
1760
|
+
error: z.ZodOptional<z.ZodString>;
|
|
1761
|
+
}, z.core.$strip>>;
|
|
1762
|
+
}, z.core.$strip>;
|
|
1763
|
+
/**
|
|
1764
|
+
* Journal event type schema.
|
|
1765
|
+
*/
|
|
1766
|
+
declare const JournalEventTypeSchema: z.ZodEnum<{
|
|
1767
|
+
PUT: "PUT";
|
|
1768
|
+
UPDATE: "UPDATE";
|
|
1769
|
+
DELETE: "DELETE";
|
|
1770
|
+
}>;
|
|
1771
|
+
/**
|
|
1772
|
+
* Journal event data (serialized for network).
|
|
1773
|
+
*/
|
|
1774
|
+
declare const JournalEventDataSchema: z.ZodObject<{
|
|
1775
|
+
sequence: z.ZodString;
|
|
1776
|
+
type: z.ZodEnum<{
|
|
1777
|
+
PUT: "PUT";
|
|
1778
|
+
UPDATE: "UPDATE";
|
|
1779
|
+
DELETE: "DELETE";
|
|
1780
|
+
}>;
|
|
1781
|
+
mapName: z.ZodString;
|
|
1782
|
+
key: z.ZodString;
|
|
1783
|
+
value: z.ZodOptional<z.ZodUnknown>;
|
|
1784
|
+
previousValue: z.ZodOptional<z.ZodUnknown>;
|
|
1785
|
+
timestamp: z.ZodObject<{
|
|
1786
|
+
millis: z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<number, number | bigint>>;
|
|
1787
|
+
counter: z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<number, number | bigint>>;
|
|
1788
|
+
nodeId: z.ZodString;
|
|
1789
|
+
}, z.core.$strip>;
|
|
1790
|
+
nodeId: z.ZodString;
|
|
1791
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1792
|
+
}, z.core.$strip>;
|
|
1793
|
+
/**
|
|
1794
|
+
* JOURNAL_SUBSCRIBE: Client subscribes to journal events.
|
|
1795
|
+
*/
|
|
1796
|
+
declare const JournalSubscribeRequestSchema: z.ZodObject<{
|
|
1797
|
+
type: z.ZodLiteral<"JOURNAL_SUBSCRIBE">;
|
|
1798
|
+
requestId: z.ZodString;
|
|
1799
|
+
fromSequence: z.ZodOptional<z.ZodString>;
|
|
1800
|
+
mapName: z.ZodOptional<z.ZodString>;
|
|
1801
|
+
types: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
1802
|
+
PUT: "PUT";
|
|
1803
|
+
UPDATE: "UPDATE";
|
|
1804
|
+
DELETE: "DELETE";
|
|
1805
|
+
}>>>;
|
|
1806
|
+
}, z.core.$strip>;
|
|
1807
|
+
/**
|
|
1808
|
+
* JOURNAL_UNSUBSCRIBE: Client unsubscribes from journal events.
|
|
1809
|
+
*/
|
|
1810
|
+
declare const JournalUnsubscribeRequestSchema: z.ZodObject<{
|
|
1811
|
+
type: z.ZodLiteral<"JOURNAL_UNSUBSCRIBE">;
|
|
1812
|
+
subscriptionId: z.ZodString;
|
|
1813
|
+
}, z.core.$strip>;
|
|
1814
|
+
/**
|
|
1815
|
+
* JOURNAL_EVENT: Server sends journal event to client.
|
|
1816
|
+
*/
|
|
1817
|
+
declare const JournalEventMessageSchema: z.ZodObject<{
|
|
1818
|
+
type: z.ZodLiteral<"JOURNAL_EVENT">;
|
|
1819
|
+
event: z.ZodObject<{
|
|
1820
|
+
sequence: z.ZodString;
|
|
1821
|
+
type: z.ZodEnum<{
|
|
1822
|
+
PUT: "PUT";
|
|
1823
|
+
UPDATE: "UPDATE";
|
|
1824
|
+
DELETE: "DELETE";
|
|
1825
|
+
}>;
|
|
1826
|
+
mapName: z.ZodString;
|
|
1827
|
+
key: z.ZodString;
|
|
1828
|
+
value: z.ZodOptional<z.ZodUnknown>;
|
|
1829
|
+
previousValue: z.ZodOptional<z.ZodUnknown>;
|
|
1830
|
+
timestamp: z.ZodObject<{
|
|
1831
|
+
millis: z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<number, number | bigint>>;
|
|
1832
|
+
counter: z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<number, number | bigint>>;
|
|
1833
|
+
nodeId: z.ZodString;
|
|
1834
|
+
}, z.core.$strip>;
|
|
1835
|
+
nodeId: z.ZodString;
|
|
1836
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1837
|
+
}, z.core.$strip>;
|
|
1838
|
+
}, z.core.$strip>;
|
|
1839
|
+
/**
|
|
1840
|
+
* JOURNAL_READ: Client requests events from journal.
|
|
1841
|
+
*/
|
|
1842
|
+
declare const JournalReadRequestSchema: z.ZodObject<{
|
|
1843
|
+
type: z.ZodLiteral<"JOURNAL_READ">;
|
|
1844
|
+
requestId: z.ZodString;
|
|
1845
|
+
fromSequence: z.ZodString;
|
|
1846
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
1847
|
+
mapName: z.ZodOptional<z.ZodString>;
|
|
1848
|
+
}, z.core.$strip>;
|
|
1849
|
+
/**
|
|
1850
|
+
* JOURNAL_READ_RESPONSE: Server responds with journal events.
|
|
1851
|
+
*/
|
|
1852
|
+
declare const JournalReadResponseSchema: z.ZodObject<{
|
|
1853
|
+
type: z.ZodLiteral<"JOURNAL_READ_RESPONSE">;
|
|
1854
|
+
requestId: z.ZodString;
|
|
1855
|
+
events: z.ZodArray<z.ZodObject<{
|
|
1856
|
+
sequence: z.ZodString;
|
|
1857
|
+
type: z.ZodEnum<{
|
|
1858
|
+
PUT: "PUT";
|
|
1859
|
+
UPDATE: "UPDATE";
|
|
1860
|
+
DELETE: "DELETE";
|
|
1861
|
+
}>;
|
|
1862
|
+
mapName: z.ZodString;
|
|
1863
|
+
key: z.ZodString;
|
|
1864
|
+
value: z.ZodOptional<z.ZodUnknown>;
|
|
1865
|
+
previousValue: z.ZodOptional<z.ZodUnknown>;
|
|
1866
|
+
timestamp: z.ZodObject<{
|
|
1867
|
+
millis: z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<number, number | bigint>>;
|
|
1868
|
+
counter: z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<number, number | bigint>>;
|
|
1869
|
+
nodeId: z.ZodString;
|
|
1870
|
+
}, z.core.$strip>;
|
|
1871
|
+
nodeId: z.ZodString;
|
|
1872
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1873
|
+
}, z.core.$strip>>;
|
|
1874
|
+
hasMore: z.ZodBoolean;
|
|
1875
|
+
}, z.core.$strip>;
|
|
1876
|
+
/**
|
|
1877
|
+
* Conflict resolver definition schema (wire format).
|
|
1878
|
+
*/
|
|
1879
|
+
declare const ConflictResolverSchema: z.ZodObject<{
|
|
1880
|
+
name: z.ZodString;
|
|
1881
|
+
code: z.ZodString;
|
|
1882
|
+
priority: z.ZodOptional<z.ZodNumber>;
|
|
1883
|
+
keyPattern: z.ZodOptional<z.ZodString>;
|
|
1884
|
+
}, z.core.$strip>;
|
|
1885
|
+
/**
|
|
1886
|
+
* REGISTER_RESOLVER: Client registers a conflict resolver on server.
|
|
1887
|
+
*/
|
|
1888
|
+
declare const RegisterResolverRequestSchema: z.ZodObject<{
|
|
1889
|
+
type: z.ZodLiteral<"REGISTER_RESOLVER">;
|
|
1890
|
+
requestId: z.ZodString;
|
|
1891
|
+
mapName: z.ZodString;
|
|
1892
|
+
resolver: z.ZodObject<{
|
|
1893
|
+
name: z.ZodString;
|
|
1894
|
+
code: z.ZodString;
|
|
1895
|
+
priority: z.ZodOptional<z.ZodNumber>;
|
|
1896
|
+
keyPattern: z.ZodOptional<z.ZodString>;
|
|
1897
|
+
}, z.core.$strip>;
|
|
1898
|
+
}, z.core.$strip>;
|
|
1899
|
+
/**
|
|
1900
|
+
* REGISTER_RESOLVER_RESPONSE: Server acknowledges resolver registration.
|
|
1901
|
+
*/
|
|
1902
|
+
declare const RegisterResolverResponseSchema: z.ZodObject<{
|
|
1903
|
+
type: z.ZodLiteral<"REGISTER_RESOLVER_RESPONSE">;
|
|
1904
|
+
requestId: z.ZodString;
|
|
1905
|
+
success: z.ZodBoolean;
|
|
1906
|
+
error: z.ZodOptional<z.ZodString>;
|
|
1907
|
+
}, z.core.$strip>;
|
|
1908
|
+
/**
|
|
1909
|
+
* UNREGISTER_RESOLVER: Client unregisters a conflict resolver.
|
|
1910
|
+
*/
|
|
1911
|
+
declare const UnregisterResolverRequestSchema: z.ZodObject<{
|
|
1912
|
+
type: z.ZodLiteral<"UNREGISTER_RESOLVER">;
|
|
1913
|
+
requestId: z.ZodString;
|
|
1914
|
+
mapName: z.ZodString;
|
|
1915
|
+
resolverName: z.ZodString;
|
|
1916
|
+
}, z.core.$strip>;
|
|
1917
|
+
/**
|
|
1918
|
+
* UNREGISTER_RESOLVER_RESPONSE: Server acknowledges resolver unregistration.
|
|
1919
|
+
*/
|
|
1920
|
+
declare const UnregisterResolverResponseSchema: z.ZodObject<{
|
|
1921
|
+
type: z.ZodLiteral<"UNREGISTER_RESOLVER_RESPONSE">;
|
|
1922
|
+
requestId: z.ZodString;
|
|
1923
|
+
success: z.ZodBoolean;
|
|
1924
|
+
error: z.ZodOptional<z.ZodString>;
|
|
1925
|
+
}, z.core.$strip>;
|
|
1926
|
+
/**
|
|
1927
|
+
* MERGE_REJECTED: Server notifies client that a merge was rejected.
|
|
1928
|
+
*/
|
|
1929
|
+
declare const MergeRejectedMessageSchema: z.ZodObject<{
|
|
1930
|
+
type: z.ZodLiteral<"MERGE_REJECTED">;
|
|
1931
|
+
mapName: z.ZodString;
|
|
1932
|
+
key: z.ZodString;
|
|
1933
|
+
attemptedValue: z.ZodUnknown;
|
|
1934
|
+
reason: z.ZodString;
|
|
1935
|
+
timestamp: z.ZodObject<{
|
|
1936
|
+
millis: z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<number, number | bigint>>;
|
|
1937
|
+
counter: z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<number, number | bigint>>;
|
|
1938
|
+
nodeId: z.ZodString;
|
|
1939
|
+
}, z.core.$strip>;
|
|
1940
|
+
}, z.core.$strip>;
|
|
1941
|
+
/**
|
|
1942
|
+
* LIST_RESOLVERS: Client requests list of registered resolvers.
|
|
1943
|
+
*/
|
|
1944
|
+
declare const ListResolversRequestSchema: z.ZodObject<{
|
|
1945
|
+
type: z.ZodLiteral<"LIST_RESOLVERS">;
|
|
1946
|
+
requestId: z.ZodString;
|
|
1947
|
+
mapName: z.ZodOptional<z.ZodString>;
|
|
1948
|
+
}, z.core.$strip>;
|
|
1949
|
+
/**
|
|
1950
|
+
* LIST_RESOLVERS_RESPONSE: Server responds with registered resolvers.
|
|
1951
|
+
*/
|
|
1952
|
+
declare const ListResolversResponseSchema: z.ZodObject<{
|
|
1953
|
+
type: z.ZodLiteral<"LIST_RESOLVERS_RESPONSE">;
|
|
1954
|
+
requestId: z.ZodString;
|
|
1955
|
+
resolvers: z.ZodArray<z.ZodObject<{
|
|
1956
|
+
mapName: z.ZodString;
|
|
1957
|
+
name: z.ZodString;
|
|
1958
|
+
priority: z.ZodOptional<z.ZodNumber>;
|
|
1959
|
+
keyPattern: z.ZodOptional<z.ZodString>;
|
|
1960
|
+
}, z.core.$strip>>;
|
|
1961
|
+
}, z.core.$strip>;
|
|
945
1962
|
/**
|
|
946
1963
|
* Individual operation result within a batch ACK
|
|
947
1964
|
*/
|
|
@@ -1031,8 +2048,8 @@ declare const MessageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1031
2048
|
record: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
1032
2049
|
value: z.ZodNullable<z.ZodAny>;
|
|
1033
2050
|
timestamp: z.ZodObject<{
|
|
1034
|
-
millis: z.ZodNumber
|
|
1035
|
-
counter: z.ZodNumber
|
|
2051
|
+
millis: z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<number, number | bigint>>;
|
|
2052
|
+
counter: z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<number, number | bigint>>;
|
|
1036
2053
|
nodeId: z.ZodString;
|
|
1037
2054
|
}, z.core.$strip>;
|
|
1038
2055
|
ttlMs: z.ZodOptional<z.ZodNumber>;
|
|
@@ -1040,8 +2057,8 @@ declare const MessageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1040
2057
|
orRecord: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
1041
2058
|
value: z.ZodAny;
|
|
1042
2059
|
timestamp: z.ZodObject<{
|
|
1043
|
-
millis: z.ZodNumber
|
|
1044
|
-
counter: z.ZodNumber
|
|
2060
|
+
millis: z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<number, number | bigint>>;
|
|
2061
|
+
counter: z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<number, number | bigint>>;
|
|
1045
2062
|
nodeId: z.ZodString;
|
|
1046
2063
|
}, z.core.$strip>;
|
|
1047
2064
|
tag: z.ZodString;
|
|
@@ -1068,8 +2085,8 @@ declare const MessageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1068
2085
|
record: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
1069
2086
|
value: z.ZodNullable<z.ZodAny>;
|
|
1070
2087
|
timestamp: z.ZodObject<{
|
|
1071
|
-
millis: z.ZodNumber
|
|
1072
|
-
counter: z.ZodNumber
|
|
2088
|
+
millis: z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<number, number | bigint>>;
|
|
2089
|
+
counter: z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<number, number | bigint>>;
|
|
1073
2090
|
nodeId: z.ZodString;
|
|
1074
2091
|
}, z.core.$strip>;
|
|
1075
2092
|
ttlMs: z.ZodOptional<z.ZodNumber>;
|
|
@@ -1077,8 +2094,8 @@ declare const MessageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1077
2094
|
orRecord: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
1078
2095
|
value: z.ZodAny;
|
|
1079
2096
|
timestamp: z.ZodObject<{
|
|
1080
|
-
millis: z.ZodNumber
|
|
1081
|
-
counter: z.ZodNumber
|
|
2097
|
+
millis: z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<number, number | bigint>>;
|
|
2098
|
+
counter: z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<number, number | bigint>>;
|
|
1082
2099
|
nodeId: z.ZodString;
|
|
1083
2100
|
}, z.core.$strip>;
|
|
1084
2101
|
tag: z.ZodString;
|
|
@@ -1113,8 +2130,8 @@ declare const MessageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1113
2130
|
mapName: z.ZodString;
|
|
1114
2131
|
rootHash: z.ZodNumber;
|
|
1115
2132
|
timestamp: z.ZodObject<{
|
|
1116
|
-
millis: z.ZodNumber
|
|
1117
|
-
counter: z.ZodNumber
|
|
2133
|
+
millis: z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<number, number | bigint>>;
|
|
2134
|
+
counter: z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<number, number | bigint>>;
|
|
1118
2135
|
nodeId: z.ZodString;
|
|
1119
2136
|
}, z.core.$strip>;
|
|
1120
2137
|
}, z.core.$strip>;
|
|
@@ -1135,8 +2152,8 @@ declare const MessageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1135
2152
|
record: z.ZodObject<{
|
|
1136
2153
|
value: z.ZodNullable<z.ZodAny>;
|
|
1137
2154
|
timestamp: z.ZodObject<{
|
|
1138
|
-
millis: z.ZodNumber
|
|
1139
|
-
counter: z.ZodNumber
|
|
2155
|
+
millis: z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<number, number | bigint>>;
|
|
2156
|
+
counter: z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<number, number | bigint>>;
|
|
1140
2157
|
nodeId: z.ZodString;
|
|
1141
2158
|
}, z.core.$strip>;
|
|
1142
2159
|
ttlMs: z.ZodOptional<z.ZodNumber>;
|
|
@@ -1198,8 +2215,8 @@ declare const MessageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1198
2215
|
mapName: z.ZodString;
|
|
1199
2216
|
rootHash: z.ZodNumber;
|
|
1200
2217
|
timestamp: z.ZodObject<{
|
|
1201
|
-
millis: z.ZodNumber
|
|
1202
|
-
counter: z.ZodNumber
|
|
2218
|
+
millis: z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<number, number | bigint>>;
|
|
2219
|
+
counter: z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<number, number | bigint>>;
|
|
1203
2220
|
nodeId: z.ZodString;
|
|
1204
2221
|
}, z.core.$strip>;
|
|
1205
2222
|
}, z.core.$strip>;
|
|
@@ -1226,8 +2243,8 @@ declare const MessageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1226
2243
|
records: z.ZodArray<z.ZodObject<{
|
|
1227
2244
|
value: z.ZodAny;
|
|
1228
2245
|
timestamp: z.ZodObject<{
|
|
1229
|
-
millis: z.ZodNumber
|
|
1230
|
-
counter: z.ZodNumber
|
|
2246
|
+
millis: z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<number, number | bigint>>;
|
|
2247
|
+
counter: z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<number, number | bigint>>;
|
|
1231
2248
|
nodeId: z.ZodString;
|
|
1232
2249
|
}, z.core.$strip>;
|
|
1233
2250
|
tag: z.ZodString;
|
|
@@ -1251,8 +2268,8 @@ declare const MessageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1251
2268
|
records: z.ZodArray<z.ZodObject<{
|
|
1252
2269
|
value: z.ZodAny;
|
|
1253
2270
|
timestamp: z.ZodObject<{
|
|
1254
|
-
millis: z.ZodNumber
|
|
1255
|
-
counter: z.ZodNumber
|
|
2271
|
+
millis: z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<number, number | bigint>>;
|
|
2272
|
+
counter: z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<number, number | bigint>>;
|
|
1256
2273
|
nodeId: z.ZodString;
|
|
1257
2274
|
}, z.core.$strip>;
|
|
1258
2275
|
tag: z.ZodString;
|
|
@@ -1270,8 +2287,8 @@ declare const MessageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1270
2287
|
records: z.ZodArray<z.ZodObject<{
|
|
1271
2288
|
value: z.ZodAny;
|
|
1272
2289
|
timestamp: z.ZodObject<{
|
|
1273
|
-
millis: z.ZodNumber
|
|
1274
|
-
counter: z.ZodNumber
|
|
2290
|
+
millis: z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<number, number | bigint>>;
|
|
2291
|
+
counter: z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<number, number | bigint>>;
|
|
1275
2292
|
nodeId: z.ZodString;
|
|
1276
2293
|
}, z.core.$strip>;
|
|
1277
2294
|
tag: z.ZodString;
|
|
@@ -1280,6 +2297,173 @@ declare const MessageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1280
2297
|
tombstones: z.ZodArray<z.ZodString>;
|
|
1281
2298
|
}, z.core.$strip>>;
|
|
1282
2299
|
}, z.core.$strip>;
|
|
2300
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2301
|
+
type: z.ZodLiteral<"PARTITION_MAP_REQUEST">;
|
|
2302
|
+
payload: z.ZodOptional<z.ZodObject<{
|
|
2303
|
+
currentVersion: z.ZodOptional<z.ZodNumber>;
|
|
2304
|
+
}, z.core.$strip>>;
|
|
2305
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2306
|
+
type: z.ZodLiteral<"COUNTER_REQUEST">;
|
|
2307
|
+
payload: z.ZodObject<{
|
|
2308
|
+
name: z.ZodString;
|
|
2309
|
+
}, z.core.$strip>;
|
|
2310
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2311
|
+
type: z.ZodLiteral<"COUNTER_SYNC">;
|
|
2312
|
+
payload: z.ZodObject<{
|
|
2313
|
+
name: z.ZodString;
|
|
2314
|
+
state: z.ZodObject<{
|
|
2315
|
+
p: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
2316
|
+
n: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
2317
|
+
}, z.core.$strip>;
|
|
2318
|
+
}, z.core.$strip>;
|
|
2319
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2320
|
+
type: z.ZodLiteral<"ENTRY_PROCESS">;
|
|
2321
|
+
requestId: z.ZodString;
|
|
2322
|
+
mapName: z.ZodString;
|
|
2323
|
+
key: z.ZodString;
|
|
2324
|
+
processor: z.ZodObject<{
|
|
2325
|
+
name: z.ZodString;
|
|
2326
|
+
code: z.ZodString;
|
|
2327
|
+
args: z.ZodOptional<z.ZodUnknown>;
|
|
2328
|
+
}, z.core.$strip>;
|
|
2329
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2330
|
+
type: z.ZodLiteral<"ENTRY_PROCESS_BATCH">;
|
|
2331
|
+
requestId: z.ZodString;
|
|
2332
|
+
mapName: z.ZodString;
|
|
2333
|
+
keys: z.ZodArray<z.ZodString>;
|
|
2334
|
+
processor: z.ZodObject<{
|
|
2335
|
+
name: z.ZodString;
|
|
2336
|
+
code: z.ZodString;
|
|
2337
|
+
args: z.ZodOptional<z.ZodUnknown>;
|
|
2338
|
+
}, z.core.$strip>;
|
|
2339
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2340
|
+
type: z.ZodLiteral<"ENTRY_PROCESS_RESPONSE">;
|
|
2341
|
+
requestId: z.ZodString;
|
|
2342
|
+
success: z.ZodBoolean;
|
|
2343
|
+
result: z.ZodOptional<z.ZodUnknown>;
|
|
2344
|
+
newValue: z.ZodOptional<z.ZodUnknown>;
|
|
2345
|
+
error: z.ZodOptional<z.ZodString>;
|
|
2346
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2347
|
+
type: z.ZodLiteral<"ENTRY_PROCESS_BATCH_RESPONSE">;
|
|
2348
|
+
requestId: z.ZodString;
|
|
2349
|
+
results: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
2350
|
+
success: z.ZodBoolean;
|
|
2351
|
+
result: z.ZodOptional<z.ZodUnknown>;
|
|
2352
|
+
newValue: z.ZodOptional<z.ZodUnknown>;
|
|
2353
|
+
error: z.ZodOptional<z.ZodString>;
|
|
2354
|
+
}, z.core.$strip>>;
|
|
2355
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2356
|
+
type: z.ZodLiteral<"JOURNAL_SUBSCRIBE">;
|
|
2357
|
+
requestId: z.ZodString;
|
|
2358
|
+
fromSequence: z.ZodOptional<z.ZodString>;
|
|
2359
|
+
mapName: z.ZodOptional<z.ZodString>;
|
|
2360
|
+
types: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
2361
|
+
PUT: "PUT";
|
|
2362
|
+
UPDATE: "UPDATE";
|
|
2363
|
+
DELETE: "DELETE";
|
|
2364
|
+
}>>>;
|
|
2365
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2366
|
+
type: z.ZodLiteral<"JOURNAL_UNSUBSCRIBE">;
|
|
2367
|
+
subscriptionId: z.ZodString;
|
|
2368
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2369
|
+
type: z.ZodLiteral<"JOURNAL_EVENT">;
|
|
2370
|
+
event: z.ZodObject<{
|
|
2371
|
+
sequence: z.ZodString;
|
|
2372
|
+
type: z.ZodEnum<{
|
|
2373
|
+
PUT: "PUT";
|
|
2374
|
+
UPDATE: "UPDATE";
|
|
2375
|
+
DELETE: "DELETE";
|
|
2376
|
+
}>;
|
|
2377
|
+
mapName: z.ZodString;
|
|
2378
|
+
key: z.ZodString;
|
|
2379
|
+
value: z.ZodOptional<z.ZodUnknown>;
|
|
2380
|
+
previousValue: z.ZodOptional<z.ZodUnknown>;
|
|
2381
|
+
timestamp: z.ZodObject<{
|
|
2382
|
+
millis: z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<number, number | bigint>>;
|
|
2383
|
+
counter: z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<number, number | bigint>>;
|
|
2384
|
+
nodeId: z.ZodString;
|
|
2385
|
+
}, z.core.$strip>;
|
|
2386
|
+
nodeId: z.ZodString;
|
|
2387
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2388
|
+
}, z.core.$strip>;
|
|
2389
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2390
|
+
type: z.ZodLiteral<"JOURNAL_READ">;
|
|
2391
|
+
requestId: z.ZodString;
|
|
2392
|
+
fromSequence: z.ZodString;
|
|
2393
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
2394
|
+
mapName: z.ZodOptional<z.ZodString>;
|
|
2395
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2396
|
+
type: z.ZodLiteral<"JOURNAL_READ_RESPONSE">;
|
|
2397
|
+
requestId: z.ZodString;
|
|
2398
|
+
events: z.ZodArray<z.ZodObject<{
|
|
2399
|
+
sequence: z.ZodString;
|
|
2400
|
+
type: z.ZodEnum<{
|
|
2401
|
+
PUT: "PUT";
|
|
2402
|
+
UPDATE: "UPDATE";
|
|
2403
|
+
DELETE: "DELETE";
|
|
2404
|
+
}>;
|
|
2405
|
+
mapName: z.ZodString;
|
|
2406
|
+
key: z.ZodString;
|
|
2407
|
+
value: z.ZodOptional<z.ZodUnknown>;
|
|
2408
|
+
previousValue: z.ZodOptional<z.ZodUnknown>;
|
|
2409
|
+
timestamp: z.ZodObject<{
|
|
2410
|
+
millis: z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<number, number | bigint>>;
|
|
2411
|
+
counter: z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<number, number | bigint>>;
|
|
2412
|
+
nodeId: z.ZodString;
|
|
2413
|
+
}, z.core.$strip>;
|
|
2414
|
+
nodeId: z.ZodString;
|
|
2415
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2416
|
+
}, z.core.$strip>>;
|
|
2417
|
+
hasMore: z.ZodBoolean;
|
|
2418
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2419
|
+
type: z.ZodLiteral<"REGISTER_RESOLVER">;
|
|
2420
|
+
requestId: z.ZodString;
|
|
2421
|
+
mapName: z.ZodString;
|
|
2422
|
+
resolver: z.ZodObject<{
|
|
2423
|
+
name: z.ZodString;
|
|
2424
|
+
code: z.ZodString;
|
|
2425
|
+
priority: z.ZodOptional<z.ZodNumber>;
|
|
2426
|
+
keyPattern: z.ZodOptional<z.ZodString>;
|
|
2427
|
+
}, z.core.$strip>;
|
|
2428
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2429
|
+
type: z.ZodLiteral<"REGISTER_RESOLVER_RESPONSE">;
|
|
2430
|
+
requestId: z.ZodString;
|
|
2431
|
+
success: z.ZodBoolean;
|
|
2432
|
+
error: z.ZodOptional<z.ZodString>;
|
|
2433
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2434
|
+
type: z.ZodLiteral<"UNREGISTER_RESOLVER">;
|
|
2435
|
+
requestId: z.ZodString;
|
|
2436
|
+
mapName: z.ZodString;
|
|
2437
|
+
resolverName: z.ZodString;
|
|
2438
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2439
|
+
type: z.ZodLiteral<"UNREGISTER_RESOLVER_RESPONSE">;
|
|
2440
|
+
requestId: z.ZodString;
|
|
2441
|
+
success: z.ZodBoolean;
|
|
2442
|
+
error: z.ZodOptional<z.ZodString>;
|
|
2443
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2444
|
+
type: z.ZodLiteral<"MERGE_REJECTED">;
|
|
2445
|
+
mapName: z.ZodString;
|
|
2446
|
+
key: z.ZodString;
|
|
2447
|
+
attemptedValue: z.ZodUnknown;
|
|
2448
|
+
reason: z.ZodString;
|
|
2449
|
+
timestamp: z.ZodObject<{
|
|
2450
|
+
millis: z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<number, number | bigint>>;
|
|
2451
|
+
counter: z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<number, number | bigint>>;
|
|
2452
|
+
nodeId: z.ZodString;
|
|
2453
|
+
}, z.core.$strip>;
|
|
2454
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2455
|
+
type: z.ZodLiteral<"LIST_RESOLVERS">;
|
|
2456
|
+
requestId: z.ZodString;
|
|
2457
|
+
mapName: z.ZodOptional<z.ZodString>;
|
|
2458
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2459
|
+
type: z.ZodLiteral<"LIST_RESOLVERS_RESPONSE">;
|
|
2460
|
+
requestId: z.ZodString;
|
|
2461
|
+
resolvers: z.ZodArray<z.ZodObject<{
|
|
2462
|
+
mapName: z.ZodString;
|
|
2463
|
+
name: z.ZodString;
|
|
2464
|
+
priority: z.ZodOptional<z.ZodNumber>;
|
|
2465
|
+
keyPattern: z.ZodOptional<z.ZodString>;
|
|
2466
|
+
}, z.core.$strip>>;
|
|
1283
2467
|
}, z.core.$strip>], "type">;
|
|
1284
2468
|
type Query = z.infer<typeof QuerySchema>;
|
|
1285
2469
|
type ClientOp = z.infer<typeof ClientOpSchema>;
|
|
@@ -1290,6 +2474,25 @@ type BatchMessage = z.infer<typeof BatchMessageSchema>;
|
|
|
1290
2474
|
type OpAckMessage = z.infer<typeof OpAckMessageSchema>;
|
|
1291
2475
|
type OpRejectedMessage = z.infer<typeof OpRejectedMessageSchema>;
|
|
1292
2476
|
type OpResult = z.infer<typeof OpResultSchema>;
|
|
2477
|
+
type EntryProcessRequest = z.infer<typeof EntryProcessRequestSchema>;
|
|
2478
|
+
type EntryProcessBatchRequest = z.infer<typeof EntryProcessBatchRequestSchema>;
|
|
2479
|
+
type EntryProcessResponse = z.infer<typeof EntryProcessResponseSchema>;
|
|
2480
|
+
type EntryProcessBatchResponse = z.infer<typeof EntryProcessBatchResponseSchema>;
|
|
2481
|
+
type EntryProcessKeyResult = z.infer<typeof EntryProcessKeyResultSchema>;
|
|
2482
|
+
type JournalEventData = z.infer<typeof JournalEventDataSchema>;
|
|
2483
|
+
type JournalSubscribeRequest = z.infer<typeof JournalSubscribeRequestSchema>;
|
|
2484
|
+
type JournalUnsubscribeRequest = z.infer<typeof JournalUnsubscribeRequestSchema>;
|
|
2485
|
+
type JournalEventMessage = z.infer<typeof JournalEventMessageSchema>;
|
|
2486
|
+
type JournalReadRequest = z.infer<typeof JournalReadRequestSchema>;
|
|
2487
|
+
type JournalReadResponse = z.infer<typeof JournalReadResponseSchema>;
|
|
2488
|
+
type ConflictResolver = z.infer<typeof ConflictResolverSchema>;
|
|
2489
|
+
type RegisterResolverRequest = z.infer<typeof RegisterResolverRequestSchema>;
|
|
2490
|
+
type RegisterResolverResponse = z.infer<typeof RegisterResolverResponseSchema>;
|
|
2491
|
+
type UnregisterResolverRequest = z.infer<typeof UnregisterResolverRequestSchema>;
|
|
2492
|
+
type UnregisterResolverResponse = z.infer<typeof UnregisterResolverResponseSchema>;
|
|
2493
|
+
type MergeRejectedMessage = z.infer<typeof MergeRejectedMessageSchema>;
|
|
2494
|
+
type ListResolversRequest = z.infer<typeof ListResolversRequestSchema>;
|
|
2495
|
+
type ListResolversResponse = z.infer<typeof ListResolversResponseSchema>;
|
|
1293
2496
|
|
|
1294
2497
|
/**
|
|
1295
2498
|
* Write Concern - Configurable Acknowledgment Levels
|
|
@@ -1348,7 +2551,7 @@ declare const DEFAULT_WRITE_CONCERN_TIMEOUT = 5000;
|
|
|
1348
2551
|
/**
|
|
1349
2552
|
* Write options for PUT/REMOVE operations
|
|
1350
2553
|
*/
|
|
1351
|
-
interface WriteOptions {
|
|
2554
|
+
interface WriteOptions$1 {
|
|
1352
2555
|
/**
|
|
1353
2556
|
* Write acknowledgment level.
|
|
1354
2557
|
* @default WriteConcern.MEMORY
|
|
@@ -1417,4 +2620,346 @@ declare function isWriteConcernAchieved(achieved: Set<WriteConcern>, target: Wri
|
|
|
1417
2620
|
*/
|
|
1418
2621
|
declare function getHighestWriteConcernLevel(achieved: Set<WriteConcern>): WriteConcern;
|
|
1419
2622
|
|
|
1420
|
-
|
|
2623
|
+
/**
|
|
2624
|
+
* Cluster types for Phase 4: Clustering Improvements
|
|
2625
|
+
*
|
|
2626
|
+
* These types are shared between client and server packages
|
|
2627
|
+
* for partition-aware routing and cluster communication.
|
|
2628
|
+
*/
|
|
2629
|
+
type NodeStatus = 'ACTIVE' | 'JOINING' | 'LEAVING' | 'SUSPECTED' | 'FAILED';
|
|
2630
|
+
interface NodeInfo {
|
|
2631
|
+
nodeId: string;
|
|
2632
|
+
endpoints: {
|
|
2633
|
+
websocket: string;
|
|
2634
|
+
http?: string;
|
|
2635
|
+
};
|
|
2636
|
+
status: NodeStatus;
|
|
2637
|
+
}
|
|
2638
|
+
interface PartitionInfo {
|
|
2639
|
+
partitionId: number;
|
|
2640
|
+
ownerNodeId: string;
|
|
2641
|
+
backupNodeIds: string[];
|
|
2642
|
+
}
|
|
2643
|
+
interface PartitionMap {
|
|
2644
|
+
version: number;
|
|
2645
|
+
partitionCount: number;
|
|
2646
|
+
nodes: NodeInfo[];
|
|
2647
|
+
partitions: PartitionInfo[];
|
|
2648
|
+
generatedAt: number;
|
|
2649
|
+
}
|
|
2650
|
+
interface PartitionMapMessage {
|
|
2651
|
+
type: 'PARTITION_MAP';
|
|
2652
|
+
payload: PartitionMap;
|
|
2653
|
+
}
|
|
2654
|
+
interface PartitionMapRequestMessage {
|
|
2655
|
+
type: 'PARTITION_MAP_REQUEST';
|
|
2656
|
+
payload?: {
|
|
2657
|
+
currentVersion?: number;
|
|
2658
|
+
};
|
|
2659
|
+
}
|
|
2660
|
+
interface PartitionChange {
|
|
2661
|
+
partitionId: number;
|
|
2662
|
+
previousOwner: string;
|
|
2663
|
+
newOwner: string;
|
|
2664
|
+
reason: 'REBALANCE' | 'FAILOVER' | 'JOIN' | 'LEAVE';
|
|
2665
|
+
}
|
|
2666
|
+
interface PartitionMapDeltaMessage {
|
|
2667
|
+
type: 'PARTITION_MAP_DELTA';
|
|
2668
|
+
payload: {
|
|
2669
|
+
version: number;
|
|
2670
|
+
previousVersion: number;
|
|
2671
|
+
changes: PartitionChange[];
|
|
2672
|
+
timestamp: number;
|
|
2673
|
+
};
|
|
2674
|
+
}
|
|
2675
|
+
interface NotOwnerError {
|
|
2676
|
+
code: 'NOT_OWNER';
|
|
2677
|
+
message: string;
|
|
2678
|
+
hint: {
|
|
2679
|
+
partitionId: number;
|
|
2680
|
+
currentOwner: string;
|
|
2681
|
+
mapVersion: number;
|
|
2682
|
+
};
|
|
2683
|
+
}
|
|
2684
|
+
interface StaleMapError {
|
|
2685
|
+
code: 'STALE_MAP';
|
|
2686
|
+
message: string;
|
|
2687
|
+
hint: {
|
|
2688
|
+
clientVersion: number;
|
|
2689
|
+
serverVersion: number;
|
|
2690
|
+
};
|
|
2691
|
+
}
|
|
2692
|
+
type RoutingError = NotOwnerError | StaleMapError;
|
|
2693
|
+
interface ConnectionPoolConfig {
|
|
2694
|
+
/** Maximum connections per node (default: 1) */
|
|
2695
|
+
maxConnectionsPerNode: number;
|
|
2696
|
+
/** Connection timeout in ms (default: 5000) */
|
|
2697
|
+
connectionTimeoutMs: number;
|
|
2698
|
+
/** Health check interval in ms (default: 10000) */
|
|
2699
|
+
healthCheckIntervalMs: number;
|
|
2700
|
+
/** Reconnect delay base in ms (default: 1000) */
|
|
2701
|
+
reconnectDelayMs: number;
|
|
2702
|
+
/** Maximum reconnect delay in ms (default: 30000) */
|
|
2703
|
+
maxReconnectDelayMs: number;
|
|
2704
|
+
/** Maximum reconnect attempts before marking unhealthy (default: 5) */
|
|
2705
|
+
maxReconnectAttempts: number;
|
|
2706
|
+
}
|
|
2707
|
+
declare const DEFAULT_CONNECTION_POOL_CONFIG: ConnectionPoolConfig;
|
|
2708
|
+
interface PartitionRouterConfig {
|
|
2709
|
+
/** Fallback mode when routing fails: 'forward' uses primary, 'error' throws */
|
|
2710
|
+
fallbackMode: 'forward' | 'error';
|
|
2711
|
+
/** How often to refresh stale partition map in ms (default: 30000) */
|
|
2712
|
+
mapRefreshIntervalMs: number;
|
|
2713
|
+
/** Max staleness before forcing refresh in ms (default: 60000) */
|
|
2714
|
+
maxMapStalenessMs: number;
|
|
2715
|
+
}
|
|
2716
|
+
declare const DEFAULT_PARTITION_ROUTER_CONFIG: PartitionRouterConfig;
|
|
2717
|
+
/**
|
|
2718
|
+
* Circuit breaker configuration.
|
|
2719
|
+
*/
|
|
2720
|
+
interface CircuitBreakerConfig {
|
|
2721
|
+
/** Number of failures before opening circuit (default: 5) */
|
|
2722
|
+
failureThreshold: number;
|
|
2723
|
+
/** Time in ms before attempting to close circuit (default: 30000) */
|
|
2724
|
+
resetTimeoutMs: number;
|
|
2725
|
+
}
|
|
2726
|
+
declare const DEFAULT_CIRCUIT_BREAKER_CONFIG: CircuitBreakerConfig;
|
|
2727
|
+
interface ClusterClientConfig {
|
|
2728
|
+
/** Enable cluster mode */
|
|
2729
|
+
enabled: boolean;
|
|
2730
|
+
/** Initial seed nodes to connect to */
|
|
2731
|
+
seedNodes: string[];
|
|
2732
|
+
/** Routing mode: 'direct' routes to owner, 'forward' uses server forwarding */
|
|
2733
|
+
routingMode: 'direct' | 'forward';
|
|
2734
|
+
/** Connection pool configuration */
|
|
2735
|
+
connectionPool?: Partial<ConnectionPoolConfig>;
|
|
2736
|
+
/** Partition router configuration */
|
|
2737
|
+
routing?: Partial<PartitionRouterConfig>;
|
|
2738
|
+
/** Circuit breaker configuration */
|
|
2739
|
+
circuitBreaker?: Partial<CircuitBreakerConfig>;
|
|
2740
|
+
}
|
|
2741
|
+
type ConnectionState = 'DISCONNECTED' | 'CONNECTING' | 'CONNECTED' | 'AUTHENTICATED' | 'RECONNECTING' | 'FAILED';
|
|
2742
|
+
interface NodeHealth {
|
|
2743
|
+
nodeId: string;
|
|
2744
|
+
state: ConnectionState;
|
|
2745
|
+
lastSeen: number;
|
|
2746
|
+
latencyMs: number;
|
|
2747
|
+
reconnectAttempts: number;
|
|
2748
|
+
}
|
|
2749
|
+
interface ClusterEvents {
|
|
2750
|
+
'node:connected': {
|
|
2751
|
+
nodeId: string;
|
|
2752
|
+
};
|
|
2753
|
+
'node:disconnected': {
|
|
2754
|
+
nodeId: string;
|
|
2755
|
+
reason: string;
|
|
2756
|
+
};
|
|
2757
|
+
'node:healthy': {
|
|
2758
|
+
nodeId: string;
|
|
2759
|
+
};
|
|
2760
|
+
'node:unhealthy': {
|
|
2761
|
+
nodeId: string;
|
|
2762
|
+
reason: string;
|
|
2763
|
+
};
|
|
2764
|
+
'partitionMap:updated': {
|
|
2765
|
+
version: number;
|
|
2766
|
+
changesCount: number;
|
|
2767
|
+
};
|
|
2768
|
+
'partitionMap:stale': {
|
|
2769
|
+
currentVersion: number;
|
|
2770
|
+
lastRefresh: number;
|
|
2771
|
+
};
|
|
2772
|
+
'routing:miss': {
|
|
2773
|
+
key: string;
|
|
2774
|
+
expectedOwner: string;
|
|
2775
|
+
actualOwner: string;
|
|
2776
|
+
};
|
|
2777
|
+
}
|
|
2778
|
+
declare enum PartitionState {
|
|
2779
|
+
STABLE = "STABLE",// Normal operation
|
|
2780
|
+
MIGRATING = "MIGRATING",// Data being transferred
|
|
2781
|
+
SYNC = "SYNC",// Verifying consistency
|
|
2782
|
+
FAILED = "FAILED"
|
|
2783
|
+
}
|
|
2784
|
+
interface PartitionMigration {
|
|
2785
|
+
partitionId: number;
|
|
2786
|
+
state: PartitionState;
|
|
2787
|
+
sourceNode: string;
|
|
2788
|
+
targetNode: string;
|
|
2789
|
+
startTime: number;
|
|
2790
|
+
bytesTransferred: number;
|
|
2791
|
+
totalBytes: number;
|
|
2792
|
+
retryCount: number;
|
|
2793
|
+
}
|
|
2794
|
+
interface MigrationConfig {
|
|
2795
|
+
/** Partitions per batch (default: 10) */
|
|
2796
|
+
batchSize: number;
|
|
2797
|
+
/** Delay between batches in ms (default: 5000) */
|
|
2798
|
+
batchIntervalMs: number;
|
|
2799
|
+
/** Bytes per chunk (default: 64KB) */
|
|
2800
|
+
transferChunkSize: number;
|
|
2801
|
+
/** Retries per partition (default: 3) */
|
|
2802
|
+
maxRetries: number;
|
|
2803
|
+
/** Sync phase timeout in ms (default: 30000) */
|
|
2804
|
+
syncTimeoutMs: number;
|
|
2805
|
+
/** Concurrent transfers (default: 4) */
|
|
2806
|
+
parallelTransfers: number;
|
|
2807
|
+
}
|
|
2808
|
+
declare const DEFAULT_MIGRATION_CONFIG: MigrationConfig;
|
|
2809
|
+
interface MigrationStatus {
|
|
2810
|
+
inProgress: boolean;
|
|
2811
|
+
active: PartitionMigration[];
|
|
2812
|
+
queued: number;
|
|
2813
|
+
completed: number;
|
|
2814
|
+
failed: number;
|
|
2815
|
+
estimatedTimeRemainingMs: number;
|
|
2816
|
+
}
|
|
2817
|
+
interface MigrationMetrics {
|
|
2818
|
+
migrationsStarted: number;
|
|
2819
|
+
migrationsCompleted: number;
|
|
2820
|
+
migrationsFailed: number;
|
|
2821
|
+
chunksTransferred: number;
|
|
2822
|
+
bytesTransferred: number;
|
|
2823
|
+
activeMigrations: number;
|
|
2824
|
+
queuedMigrations: number;
|
|
2825
|
+
}
|
|
2826
|
+
interface MigrationStartMessage {
|
|
2827
|
+
type: 'MIGRATION_START';
|
|
2828
|
+
payload: {
|
|
2829
|
+
partitionId: number;
|
|
2830
|
+
sourceNode: string;
|
|
2831
|
+
estimatedSize: number;
|
|
2832
|
+
};
|
|
2833
|
+
}
|
|
2834
|
+
interface MigrationChunkMessage {
|
|
2835
|
+
type: 'MIGRATION_CHUNK';
|
|
2836
|
+
payload: {
|
|
2837
|
+
partitionId: number;
|
|
2838
|
+
chunkIndex: number;
|
|
2839
|
+
totalChunks: number;
|
|
2840
|
+
data: Uint8Array;
|
|
2841
|
+
checksum: string;
|
|
2842
|
+
};
|
|
2843
|
+
}
|
|
2844
|
+
interface MigrationChunkAckMessage {
|
|
2845
|
+
type: 'MIGRATION_CHUNK_ACK';
|
|
2846
|
+
payload: {
|
|
2847
|
+
partitionId: number;
|
|
2848
|
+
chunkIndex: number;
|
|
2849
|
+
success: boolean;
|
|
2850
|
+
};
|
|
2851
|
+
}
|
|
2852
|
+
interface MigrationCompleteMessage {
|
|
2853
|
+
type: 'MIGRATION_COMPLETE';
|
|
2854
|
+
payload: {
|
|
2855
|
+
partitionId: number;
|
|
2856
|
+
totalRecords: number;
|
|
2857
|
+
checksum: string;
|
|
2858
|
+
};
|
|
2859
|
+
}
|
|
2860
|
+
interface MigrationVerifyMessage {
|
|
2861
|
+
type: 'MIGRATION_VERIFY';
|
|
2862
|
+
payload: {
|
|
2863
|
+
partitionId: number;
|
|
2864
|
+
success: boolean;
|
|
2865
|
+
checksumMatch: boolean;
|
|
2866
|
+
};
|
|
2867
|
+
}
|
|
2868
|
+
type MigrationMessage = MigrationStartMessage | MigrationChunkMessage | MigrationChunkAckMessage | MigrationCompleteMessage | MigrationVerifyMessage;
|
|
2869
|
+
declare enum ConsistencyLevel {
|
|
2870
|
+
/** Wait for all replicas (owner + all backups) */
|
|
2871
|
+
STRONG = "STRONG",
|
|
2872
|
+
/** Wait for majority (owner + N/2 backups) */
|
|
2873
|
+
QUORUM = "QUORUM",
|
|
2874
|
+
/** Acknowledge after owner write only, background replication */
|
|
2875
|
+
EVENTUAL = "EVENTUAL"
|
|
2876
|
+
}
|
|
2877
|
+
interface WriteOptions {
|
|
2878
|
+
consistency?: ConsistencyLevel;
|
|
2879
|
+
/** Replication timeout in ms */
|
|
2880
|
+
timeout?: number;
|
|
2881
|
+
}
|
|
2882
|
+
interface ReadOptions {
|
|
2883
|
+
consistency?: ConsistencyLevel;
|
|
2884
|
+
/** Read from backup if owner unavailable */
|
|
2885
|
+
allowStale?: boolean;
|
|
2886
|
+
/** Max acceptable lag in ms */
|
|
2887
|
+
maxStaleness?: number;
|
|
2888
|
+
}
|
|
2889
|
+
interface ReplicationConfig {
|
|
2890
|
+
defaultConsistency: ConsistencyLevel;
|
|
2891
|
+
/** Max queued operations (default: 10000) */
|
|
2892
|
+
queueSizeLimit: number;
|
|
2893
|
+
/** Operations per batch (default: 100) */
|
|
2894
|
+
batchSize: number;
|
|
2895
|
+
/** Batch flush interval in ms (default: 50) */
|
|
2896
|
+
batchIntervalMs: number;
|
|
2897
|
+
/** Ack timeout in ms (default: 5000) */
|
|
2898
|
+
ackTimeoutMs: number;
|
|
2899
|
+
/** Retries before marking node unhealthy (default: 3) */
|
|
2900
|
+
maxRetries: number;
|
|
2901
|
+
}
|
|
2902
|
+
declare const DEFAULT_REPLICATION_CONFIG: ReplicationConfig;
|
|
2903
|
+
interface ReplicationTask {
|
|
2904
|
+
opId: string;
|
|
2905
|
+
operation: unknown;
|
|
2906
|
+
consistency: ConsistencyLevel;
|
|
2907
|
+
timestamp: number;
|
|
2908
|
+
retryCount: number;
|
|
2909
|
+
}
|
|
2910
|
+
interface ReplicationLag {
|
|
2911
|
+
/** Current lag in ms */
|
|
2912
|
+
current: number;
|
|
2913
|
+
/** Average lag */
|
|
2914
|
+
avg: number;
|
|
2915
|
+
/** Maximum observed lag */
|
|
2916
|
+
max: number;
|
|
2917
|
+
/** 99th percentile lag */
|
|
2918
|
+
percentile99: number;
|
|
2919
|
+
}
|
|
2920
|
+
interface ReplicationHealth {
|
|
2921
|
+
healthy: boolean;
|
|
2922
|
+
unhealthyNodes: string[];
|
|
2923
|
+
laggyNodes: string[];
|
|
2924
|
+
avgLagMs: number;
|
|
2925
|
+
}
|
|
2926
|
+
interface ReplicationResult {
|
|
2927
|
+
success: boolean;
|
|
2928
|
+
ackedBy: string[];
|
|
2929
|
+
}
|
|
2930
|
+
interface ReplicationMessage {
|
|
2931
|
+
type: 'REPLICATION';
|
|
2932
|
+
payload: {
|
|
2933
|
+
opId: string;
|
|
2934
|
+
operation: unknown;
|
|
2935
|
+
consistency: ConsistencyLevel;
|
|
2936
|
+
};
|
|
2937
|
+
}
|
|
2938
|
+
interface ReplicationBatchMessage {
|
|
2939
|
+
type: 'REPLICATION_BATCH';
|
|
2940
|
+
payload: {
|
|
2941
|
+
operations: unknown[];
|
|
2942
|
+
opIds: string[];
|
|
2943
|
+
};
|
|
2944
|
+
}
|
|
2945
|
+
interface ReplicationAckMessage {
|
|
2946
|
+
type: 'REPLICATION_ACK';
|
|
2947
|
+
payload: {
|
|
2948
|
+
opId: string;
|
|
2949
|
+
success: boolean;
|
|
2950
|
+
timestamp: number;
|
|
2951
|
+
};
|
|
2952
|
+
}
|
|
2953
|
+
interface ReplicationBatchAckMessage {
|
|
2954
|
+
type: 'REPLICATION_BATCH_ACK';
|
|
2955
|
+
payload: {
|
|
2956
|
+
opIds: string[];
|
|
2957
|
+
success: boolean;
|
|
2958
|
+
timestamp: number;
|
|
2959
|
+
};
|
|
2960
|
+
}
|
|
2961
|
+
type ReplicationProtocolMessage = ReplicationMessage | ReplicationBatchMessage | ReplicationAckMessage | ReplicationBatchAckMessage;
|
|
2962
|
+
declare const PARTITION_COUNT = 271;
|
|
2963
|
+
declare const DEFAULT_BACKUP_COUNT = 1;
|
|
2964
|
+
|
|
2965
|
+
export { AuthMessageSchema, type BatchMessage, BatchMessageSchema, BuiltInProcessors, BuiltInResolvers, type CircuitBreakerConfig, type ClientOp, ClientOpMessageSchema, ClientOpSchema, type ClusterClientConfig, type ClusterEvents, type ReadOptions as ClusterReadOptions, type WriteOptions as ClusterWriteOptions, type ConflictResolver, type ConflictResolverDef, ConflictResolverDefSchema, type ConflictResolverFn, ConflictResolverSchema, type ConnectionPoolConfig, type ConnectionState, ConsistencyLevel, CounterRequestSchema, CounterResponseSchema, CounterSyncSchema, CounterUpdateSchema, DEFAULT_BACKUP_COUNT, DEFAULT_CIRCUIT_BREAKER_CONFIG, DEFAULT_CONNECTION_POOL_CONFIG, DEFAULT_EVENT_JOURNAL_CONFIG, DEFAULT_MIGRATION_CONFIG, DEFAULT_PARTITION_ROUTER_CONFIG, DEFAULT_PROCESSOR_RATE_LIMITS, DEFAULT_REPLICATION_CONFIG, DEFAULT_RESOLVER_RATE_LIMITS, DEFAULT_WRITE_CONCERN_TIMEOUT, type EntryProcessBatchRequest, EntryProcessBatchRequestSchema, type EntryProcessBatchResponse, EntryProcessBatchResponseSchema, type EntryProcessKeyResult, EntryProcessKeyResultSchema, type EntryProcessRequest, EntryProcessRequestSchema, type EntryProcessResponse, EntryProcessResponseSchema, type EntryProcessorDef, EntryProcessorDefSchema, type EntryProcessorFn, type EntryProcessorResult, EntryProcessorSchema, type EventJournal, type EventJournalConfig, EventJournalImpl, FORBIDDEN_PATTERNS, HLC, type JournalEvent, type JournalEventData, JournalEventDataSchema, type JournalEventInput, type JournalEventListener, type JournalEventMessage, JournalEventMessageSchema, type JournalEventType, JournalEventTypeSchema, type JournalReadRequest, JournalReadRequestSchema, type JournalReadResponse, JournalReadResponseSchema, type JournalSubscribeRequest, JournalSubscribeRequestSchema, type JournalUnsubscribeRequest, JournalUnsubscribeRequestSchema, LWWMap, type LWWRecord, LWWRecordSchema, type ListResolversRequest, ListResolversRequestSchema, type ListResolversResponse, ListResolversResponseSchema, LockReleaseSchema, LockRequestSchema, type MergeContext, type MergeKeyResult, type MergeRejectedMessage, MergeRejectedMessageSchema, type MergeRejection, type MergeResult, MerkleReqBucketMessageSchema, MerkleTree, type Message, MessageSchema, type MigrationChunkAckMessage, type MigrationChunkMessage, type MigrationCompleteMessage, type MigrationConfig, type MigrationMessage, type MigrationMetrics, type MigrationStartMessage, type MigrationStatus, type MigrationVerifyMessage, type NodeHealth, type NodeInfo, type NodeStatus, type NotOwnerError, ORMap, ORMapDiffRequestSchema, ORMapDiffResponseSchema, type ORMapMerkleNode, ORMapMerkleReqBucketSchema, ORMapMerkleTree, ORMapPushDiffSchema, type ORMapRecord, ORMapRecordSchema, type ORMapSnapshot, ORMapSyncInitSchema, ORMapSyncRespBucketsSchema, ORMapSyncRespLeafSchema, ORMapSyncRespRootSchema, type OpAckMessage, OpAckMessageSchema, OpBatchMessageSchema, type OpRejectedMessage, OpRejectedMessageSchema, type OpResult, OpResultSchema, PARTITION_COUNT, type PNCounter, type PNCounterConfig, PNCounterImpl, type PNCounterState, type PNCounterStateObject, PNCounterStateObjectSchema, type PartitionChange, type PartitionInfo, type PartitionMap, type PartitionMapDeltaMessage, type PartitionMapMessage, type PartitionMapRequestMessage, PartitionMapRequestSchema, type PartitionMigration, type PartitionRouterConfig, PartitionState, type PendingWrite, type PermissionPolicy, type PermissionType, type PingMessage, PingMessageSchema, type PongMessage, PongMessageSchema, type PredicateNode, PredicateNodeSchema, type PredicateOp, PredicateOpSchema, Predicates, type Principal, type ProcessorRateLimitConfig, type Query, QuerySchema, QuerySubMessageSchema, QueryUnsubMessageSchema, RESOLVER_FORBIDDEN_PATTERNS, type RegisterResolverRequest, RegisterResolverRequestSchema, type RegisterResolverResponse, RegisterResolverResponseSchema, type ReplicationAckMessage, type ReplicationBatchAckMessage, type ReplicationBatchMessage, type ReplicationConfig, type ReplicationHealth, type ReplicationLag, type ReplicationMessage, type ReplicationProtocolMessage, type ReplicationResult, type ReplicationTask, type ResolverRateLimitConfig, Ringbuffer, type RoutingError, type StaleMapError, SyncInitMessageSchema, SyncRespBucketsMessageSchema, SyncRespLeafMessageSchema, SyncRespRootMessageSchema, type Timestamp, TimestampSchema, TopicMessageEventSchema, TopicPubSchema, TopicSubSchema, TopicUnsubSchema, type UnregisterResolverRequest, UnregisterResolverRequestSchema, type UnregisterResolverResponse, UnregisterResolverResponseSchema, WRITE_CONCERN_ORDER, WriteConcern, WriteConcernSchema, type WriteConcernValue, type WriteOptions$1 as WriteOptions, type WriteResult, combineHashes, compareHLCTimestamps, compareTimestamps, deepMerge, deserialize, disableNativeHash, evaluatePredicate, getHighestWriteConcernLevel, hashORMapEntry, hashORMapRecord, hashString, isUsingNativeHash, isWriteConcernAchieved, resetNativeHash, serialize, timestampToString, validateProcessorCode, validateResolverCode };
|