@kurrent/kurrentdb-client 1.0.1 → 1.0.2

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.
@@ -65,7 +65,7 @@ const batchAppend = async function (streamName, events, { streamState, batchAppe
65
65
  const identifier = (0, utils_1.createStreamIdentifier)(streamName);
66
66
  const deadline = timestamp_pb_1.Timestamp.fromDate(this.createDeadline(baseOptions.deadline));
67
67
  options.setStreamIdentifier(identifier);
68
- options.setDeadline(deadline);
68
+ options.setDeadline21100(deadline);
69
69
  switch (streamState) {
70
70
  case "any": {
71
71
  options.setAny(new shared_pb_1.Empty());
@@ -1 +1 @@
1
- {"version":3,"file":"batchAppend.js","sourceRoot":"","sources":["../../../src/streams/appendToStream/batchAppend.ts"],"names":[],"mappings":";;;AAAA,+BAAkC;AAClC,+EAAyE;AAEzE,wEAAmE;AACnE,8DAAgF;AAChF,4DAA2D;AAI3D,uCAQqB;AAErB,+CAGuB;AAIvB,MAAM,WAAW,GAAG,IAAI,OAAO,EAG5B,CAAC;AAEJ,MAAM,WAAW,GAAG,IAAI,GAAG,EAGxB,CAAC;AAEG,MAAM,WAAW,GAAG,KAAK,WAE9B,UAAkB,EAClB,MAAmB,EACnB,EACE,WAAW,EACX,eAAe,EACf,GAAG,WAAW,EACyB;IAEzC,MAAM,aAAa,GAAG,IAAA,SAAI,GAAE,CAAC;IAE7B,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,iBAAiB,CACzC,+BAAa,EACb,gBAAgB,EAChB,CAAC,MAAM,EAAE,EAAE,CACT,MAAM;SACH,WAAW,CACV,GAAG,IAAI,CAAC,aAAa,CAAC,WAAW,EAAE;QACjC,QAAQ,EAAE,QAAQ;KACnB,CAAC,CACH;SACA,EAAE,CAAC,MAAM,EAAE,CAAC,IAAqB,EAAE,EAAE;QACpC,MAAM,WAAW,GAAG,IAAA,iBAAS,EAAC,IAAI,CAAC,gBAAgB,EAAG,CAAC,CAAC;QACxD,MAAM,CA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,WAAW,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC,MAAM,CAAC;QAErD,IAAI,SAAS,GAAG,WAAW,IAAI,YAAY,EAAE,CAAC;YAC5C,MAAM,aAAa,CAAC;YACpB,aAAa,GAAG,mBAAmB,CAAC,KAAK,CAAC,CAAC;YAC3C,SAAS,GAAG,CAAC,CAAC;QAChB,CAAC;QAED,SAAS,IAAI,WAAW,CAAC;QACzB,aAAa,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAC;IAC7C,CAAC;IAED,aAAa,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IAE/B,MAAM,aAAa,CAAC;AACtB,CAAC"}
@@ -10,7 +10,7 @@ Client_1.Client.prototype.readAll = function ({ maxCount = Number.MAX_SAFE_INTEG
10
10
  fromPosition,
11
11
  resolvesLink: resolveLinkTos,
12
12
  direction,
13
- requiresLeader: baseOptions.requiresLeader ?? true,
13
+ requiresLeader: baseOptions.requiresLeader ?? false,
14
14
  credentials: baseOptions.credentials,
15
15
  filter: baseOptions.filter,
16
16
  };
@@ -1 +1 @@
1
- {"version":3,"file":"readAll.js","sourceRoot":"","sources":["../../src/streams/readAll.ts"],"names":[],"mappings":";;AAOA,4CAA+C;AAC/C,sCAAmC;AAGnC,gEAA6D;AAC7D,oEAAiE;AA4CjE,eAAM,CAAC,SAAS,CAAC,OAAO,GAAG,UAEzB,EACE,QAAQ,GAAG,MAAM,CAAC,gBAAgB,EAClC,YAAY,GAAG,iBAAK,EACpB,cAAc,GAAG,KAAK,EACtB,SAAS,GAAG,oBAAQ,EACpB,GAAG,WAAW,KACI,EAAE;IAEtB,MAAM,OAAO,GAA8B;QACzC,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAC;QAC1B,YAAY;QACZ,YAAY,EAAE,cAAc;QAC5B,SAAS;QACT,cAAc,EAAE,WAAW,CAAC,cAAc,IAAI,IAAI;QAClD,WAAW,EAAE,WAAW,CAAC,WAAW;QACpC,MAAM,EAAE,WAAW,CAAC,MAA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CAAC,MAAM;KAC3B,CAAC;IAEF,IAAI,MAAM,CAAC;IACX,IAAI,CAAC;QACH,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAC5C,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,IAAA,uCAAkB,EAAC,KAAK,CAAC,CAAC;IAClC,CAAC;IAED,MAAM,OAAO,GAAG,KAAK,SAAS,CAAC,EAC7B,MAA6C;QAE7C,IAAI,CAAC;YACH,IAAI,KAAK,EAAE,MAAM,MAAM,IAAI,MAAM,EAAE,CAAC;gBAClC,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;oBAC3B,MAAM,IAAA,mCAAgB,EAAyB,KAAK,CAAC,CAAC;gBACxD,CAAC;YACH,CAAC;QACH,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,IAAA,uCAAkB,EAAC,KAAK,CAAC,CAAC;QAClC,CAAC;IACH,CAAC,CAAC;IAEF,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC;AACzB,CAAC,CAAC"}
@@ -11,7 +11,7 @@ Client_1.Client.prototype.readStream = function (streamName, { maxCount = Number
11
11
  fromRevision,
12
12
  resolvesLink: resolveLinkTos,
13
13
  direction,
14
- requiresLeader: baseOptions.requiresLeader ?? true,
14
+ requiresLeader: baseOptions.requiresLeader ?? false,
15
15
  credentials: baseOptions.credentials,
16
16
  };
17
17
  switch (fromRevision) {
@@ -1 +1 @@
1
- {"version":3,"file":"readStream.js","sourceRoot":"","sources":["../../src/streams/readStream.ts"],"names":[],"mappings":";;AAEA,sCAAmC;AACnC,4CAAoD;AAQpD,oCAAgD;AAChD,gEAA6D;AAC7D,oEAAiE;AAyCjE,eAAM,CAAC,SAAS,CAAC,UAAU,GAAG,UAI5B,UAAkB,EAClB,EACE,QAAQ,GAAG,MAAM,CAAC,gBAAgB,EAClC,YAAY,GAAG,iBAAK,EACpB,cAAc,GAAG,KAAK,EACtB,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,CAAC;gBAC9B,MAAM,IAAI,4BAAoB,CAC5B,sEAAsE,YAAY,EAAE,CACrF,CAAC;YACJ,CAAC;YAED,IAAI,YAAY,GAAG,UAAU,EAAE,CAAC;gBAC9B,MAAM,IAAI,4BAAoB,CAC5B,4GAA4G,YAAY,EAAE,CAC3H,CAAC;YACJ,CAAC;YAED,OAAO,CAAC,YAAY,GAAG,YAAY,CAAC;YAEpC,MAAM;QACR,CAAC;IACH,CAAC;IAED,IAAI,MAAM,CAAC;IACX,IAAI,CAAC;QACH,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IAC3D,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,IAAA,uCAAkB,EAAC,KAAK,EAAE,UAAU,CAAC,CAAC;IAC9C,CAAC;IAED,MAAM,OAAO,GAAG,KAAK,SAAS,CAAC,EAC7B,MAA6C;QAE7C,IAAI,CAAC;YACH,IAAI,KAAK,EAAE,MAAM,MAAM,IAAI,MAAM,EAAE,CAAC;gBAClC,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;oBAC3B,MAAM,IAAA,mCAAgB,EAAC,KAAK,CAAC,CAAC;gBAChC,CAAC;YACH,CAAC;QACH,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,IAAA,uCAAkB,EAAC,KAAK,EAAE,UAAU,CAAC,CAAC;QAC9C,CAAC;IACH,CAAC,CAAC;IAEF,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC;AACzB,CAAC,CAAC"}
@@ -36,10 +36,40 @@ class Subscription extends stream_1.Transform {
36
36
  this.emit("confirmation");
37
37
  }
38
38
  if (resp.hasCaughtUp?.()) {
39
- this.emit("caughtUp");
39
+ const info = {};
40
+ const grpc = resp.getCaughtUp();
41
+ if (grpc.hasTimestamp()) {
42
+ info.date = grpc.getTimestamp().toDate();
43
+ if (grpc.hasStreamRevision()) {
44
+ info.revision = BigInt(grpc.getStreamRevision());
45
+ }
46
+ else if (grpc.hasPosition()) {
47
+ const position = grpc.getPosition();
48
+ info.position = {
49
+ commit: BigInt(position.getCommitPosition()),
50
+ prepare: BigInt(position.getPreparePosition()),
51
+ };
52
+ }
53
+ }
54
+ this.emit("caughtUp", info);
40
55
  }
41
56
  if (resp.hasFellBehind?.()) {
42
- this.emit("fellBehind");
57
+ const info = {};
58
+ const grpc = resp.getFellBehind();
59
+ if (grpc.hasTimestamp()) {
60
+ info.date = grpc.getTimestamp().toDate();
61
+ if (grpc.hasStreamRevision()) {
62
+ info.revision = BigInt(grpc.getStreamRevision());
63
+ }
64
+ else if (grpc.hasPosition()) {
65
+ const position = grpc.getPosition();
66
+ info.position = {
67
+ commit: BigInt(position.getCommitPosition()),
68
+ prepare: BigInt(position.getPreparePosition()),
69
+ };
70
+ }
71
+ }
72
+ this.emit("fellBehind", info);
43
73
  }
44
74
  if (resp.hasCheckpoint?.() && this.#checkpointReached) {
45
75
  const checkpoint = resp.getCheckpoint();
@@ -1 +1 @@
1
- {"version":3,"file":"Subscription.js","sourceRoot":"","sources":["../../../src/streams/utils/Subscription.ts"],"names":[],"mappings":";;;AAAA,mCAAwE;AAOxE,uCAIqB;AAIrB,MAAa,YACX,SAAQ,kBAAS;IAGP,gBAAgB,CAA0C;IACpE,WAAW,CAA0C;IACrD,kBAAkB,CAA+B;IAC1C,EAAE,CAAU;IAEnB,YACE,gBAAkC,EAClC,gBAAyD,EACzD,OAAyB,EACzB,iBAA+C;QAE/C,KAAK,CAAC,EAAE,GAAG,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC;QACxC,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;QACzC,IAAI,CAAC,WAAW,GAAG,gBAAgB,EAAE,CAAC;QACtC,IAAI,CAAC,kBAAkB,GAAG,iBAAiB,CAAC;QAC5C,IAAI,CAAC,UAAU,EAAE,CAAC;IACpB,CAAC;IAEO,UAAU,GAAG,KAAK,IAAI,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,EAAE,IAAI,IAAI,CAAC,kBAAkB,EAAE,CAAC;YACtD,MAAM,UAAU,GAAG,IAAI,CAAC,aAAa,EAAG,CAAC;YACzC,MAAM,QAAQ,GAAa;gBACzB,MAAM,EAAE,MAAM,CAAC,UAAU,CAAC,iBAAiB,EAAE,CAAC;gBAC9C,OAAO,EAAE,MAAM,CAAC,UAAU,CAAC,kBAAkB,EAAE,CAAC;aACjD,CAAC;YACF,MAAM,IAAI,CAAC,kBAAkB,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;QAChD,CAAC;QAED,IAAI,IAAI,CAAC,QAAQ,EAAE,EAAE,EAAE,CAAC;YACtB,MAAM,QAAQ,GAAG,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,QAAQ,EAAG,CAAC,CAAC;YACzD,OAAO,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;QAC9B,CAAC;QAED,IAAI,EAAE,CAAC;IACT,CAAC;IAEM,KAAK,CAAC,WAAW;QACtB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC;QACtC,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;YAC7B,gDAAgD;YAChD,gDAAgD;YAChD,YAAY,CAAC,GAAG,EAAE;gBAChB,MAAM,CAAC,MAAM,EAAE,CAAC;gBAChB,OAAO,EAAE,CAAC;YACZ,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AAlHD,oCAkHC"}
@@ -326,19 +326,61 @@ export interface PersistentSubscriptionBase<E> extends ReadableSubscription<E> {
326
326
  */
327
327
  nack(action: PersistentAction, reason: string, ...events: ResolvedEvent[]): Promise<void>;
328
328
  }
329
+ /**
330
+ * The $all or stream subscription has caught up and become live.
331
+ */
332
+ export interface CaughtUp {
333
+ /**
334
+ * Current time in the server when the subscription caught up.
335
+ */
336
+ date?: Date;
337
+ /**
338
+ * Checkpoint for resuming a stream subscription.
339
+ * For stream subscriptions it is populated unless the stream is empty.
340
+ * For $all subscriptions it is not populated.
341
+ */
342
+ revision?: bigint;
343
+ /**
344
+ * Checkpoint for resuming a $all subscription.
345
+ * For stream subscriptions it is not populated.
346
+ * For $all subscriptions it is populated unless the database is empty.
347
+ */
348
+ position?: Position;
349
+ }
350
+ /**
351
+ * The $all or stream subscription has fallen back into catchup mode and is no longer live.
352
+ */
353
+ export interface FellBehind {
354
+ /**
355
+ * Current time in the server when the subscription fell behind.
356
+ */
357
+ date?: Date;
358
+ /**
359
+ * Checkpoint for resuming a stream subscription.
360
+ * For stream subscriptions it is populated unless the stream is empty.
361
+ * For $all subscriptions it is not populated.
362
+ */
363
+ revision?: bigint;
364
+ /**
365
+ * Checkpoint for resuming an $all subscription.
366
+ * For stream subscriptions it is not populated.
367
+ * For $all subscriptions it is populated unless the database is empty.
368
+ */
369
+ position?: Position;
370
+ }
329
371
  export interface CatchupSubscription {
330
- addListener(event: "caughtUp", listener: () => void): this;
331
- addListener(event: "fellBehind", listener: () => void): this;
332
- on(event: "caughtUp", listener: () => void): this;
333
- on(event: "fellBehind", listener: () => void): this;
334
- once(event: "caughtUp", listener: () => void): this;
335
- once(event: "fellBehind", listener: () => void): this;
336
- prependListener(event: "caughtUp", listener: () => void): this;
337
- prependListener(event: "fellBehind", listener: () => void): this;
338
- prependOnceListener(event: "caughtUp", listener: () => void): this;
339
- prependOnceListener(event: "fellBehind", listener: () => void): this;
340
- removeListener(event: "caughtUp", listener: () => void): this;
341
- removeListener(event: "fellBehind", listener: () => void): this;
372
+ addListener(event: "caughtUp", listener: (info: CaughtUp) => void): this;
373
+ addListener(event: "fellBehind", listener: (info: FellBehind) => void): this;
374
+ on(event: "caughtUp", listener: (info: CaughtUp) => void): this;
375
+ on(event: "fellBehind", listener: (info: FellBehind) => void): this;
376
+ once(event: "caughtUp", listener: (info: CaughtUp) => void): this;
377
+ once(event: "fellBehind", listener: (info: FellBehind) => void): this;
378
+ prependListener(event: "caughtUp", listener: (info: CaughtUp) => void): this;
379
+ prependListener(event: "fellBehind", listener: (info: FellBehind) => void): this;
380
+ prependOnceListener(event: "caughtUp", listener: (info: CaughtUp) => void): this;
381
+ prependOnceListener(event: "fellBehind", listener: (info: FellBehind) => void): this;
382
+ removeListener(event: "caughtUp", listener: (info: CaughtUp) => void): this;
383
+ removeListener(event: "fellBehind", listener: (info: FellBehind) => void): this;
342
384
  }
343
385
  export type PersistentSubscriptionToStream<E extends EventType = EventType> = PersistentSubscriptionBase<PersistentSubscriptionToStreamResolvedEvent<E>>;
344
386
  export type PersistentSubscriptionToAll = PersistentSubscriptionBase<PersistentSubscriptionToAllResolvedEvent>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAOA,yDAAyE;AACzE,IAAO,UAAU,GAAG,sBAAc,CAAC,UAAU,CAAC;AA0frC,gCAAU;AACnB,2CAAyB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAOA,yDAAyE;AACzE,IAAO,UAAU,GAAG,sBAAc,CAAC,UAAU,CAAC;AAsjBrC,gCAAU;AACnB,2CAAyB"}
@@ -8,6 +8,7 @@ import * as grpc from "@grpc/grpc-js";
8
8
  import * as streams_pb from "./streams_pb";
9
9
  import * as shared_pb from "./shared_pb";
10
10
  import * as status_pb from "./status_pb";
11
+ import * as google_protobuf_duration_pb from "google-protobuf/google/protobuf/duration_pb";
11
12
  import * as google_protobuf_empty_pb from "google-protobuf/google/protobuf/empty_pb";
12
13
  import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb";
13
14
 
@@ -5,6 +5,7 @@ var grpc = require('@grpc/grpc-js');
5
5
  var streams_pb = require('./streams_pb.js');
6
6
  var shared_pb = require('./shared_pb.js');
7
7
  var status_pb = require('./status_pb.js');
8
+ var google_protobuf_duration_pb = require('google-protobuf/google/protobuf/duration_pb.js');
8
9
  var google_protobuf_empty_pb = require('google-protobuf/google/protobuf/empty_pb.js');
9
10
  var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js');
10
11
 
@@ -7,6 +7,7 @@
7
7
  import * as jspb from "google-protobuf";
8
8
  import * as shared_pb from "./shared_pb";
9
9
  import * as status_pb from "./status_pb";
10
+ import * as google_protobuf_duration_pb from "google-protobuf/google/protobuf/duration_pb";
10
11
  import * as google_protobuf_empty_pb from "google-protobuf/google/protobuf/empty_pb";
11
12
  import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb";
12
13
 
@@ -493,6 +494,21 @@ export namespace ReadResp {
493
494
 
494
495
  export class CaughtUp extends jspb.Message {
495
496
 
497
+ hasTimestamp(): boolean;
498
+ clearTimestamp(): void;
499
+ getTimestamp(): google_protobuf_timestamp_pb.Timestamp | undefined;
500
+ setTimestamp(value?: google_protobuf_timestamp_pb.Timestamp): CaughtUp;
501
+
502
+ hasStreamRevision(): boolean;
503
+ clearStreamRevision(): void;
504
+ getStreamRevision(): string | undefined;
505
+ setStreamRevision(value: string): CaughtUp;
506
+
507
+ hasPosition(): boolean;
508
+ clearPosition(): void;
509
+ getPosition(): ReadResp.Position | undefined;
510
+ setPosition(value?: ReadResp.Position): CaughtUp;
511
+
496
512
  serializeBinary(): Uint8Array;
497
513
  toObject(includeInstance?: boolean): CaughtUp.AsObject;
498
514
  static toObject(includeInstance: boolean, msg: CaughtUp): CaughtUp.AsObject;
@@ -505,11 +521,29 @@ export namespace ReadResp {
505
521
 
506
522
  export namespace CaughtUp {
507
523
  export type AsObject = {
524
+ timestamp?: google_protobuf_timestamp_pb.Timestamp.AsObject,
525
+ streamRevision?: string,
526
+ position?: ReadResp.Position.AsObject,
508
527
  }
509
528
  }
510
529
 
511
530
  export class FellBehind extends jspb.Message {
512
531
 
532
+ hasTimestamp(): boolean;
533
+ clearTimestamp(): void;
534
+ getTimestamp(): google_protobuf_timestamp_pb.Timestamp | undefined;
535
+ setTimestamp(value?: google_protobuf_timestamp_pb.Timestamp): FellBehind;
536
+
537
+ hasStreamRevision(): boolean;
538
+ clearStreamRevision(): void;
539
+ getStreamRevision(): string | undefined;
540
+ setStreamRevision(value: string): FellBehind;
541
+
542
+ hasPosition(): boolean;
543
+ clearPosition(): void;
544
+ getPosition(): ReadResp.Position | undefined;
545
+ setPosition(value?: ReadResp.Position): FellBehind;
546
+
513
547
  serializeBinary(): Uint8Array;
514
548
  toObject(includeInstance?: boolean): FellBehind.AsObject;
515
549
  static toObject(includeInstance: boolean, msg: FellBehind): FellBehind.AsObject;
@@ -522,6 +556,9 @@ export namespace ReadResp {
522
556
 
523
557
  export namespace FellBehind {
524
558
  export type AsObject = {
559
+ timestamp?: google_protobuf_timestamp_pb.Timestamp.AsObject,
560
+ streamRevision?: string,
561
+ position?: ReadResp.Position.AsObject,
525
562
  }
526
563
  }
527
564
 
@@ -656,6 +693,11 @@ export namespace ReadResp {
656
693
  getPreparePosition(): string;
657
694
  setPreparePosition(value: string): Checkpoint;
658
695
 
696
+ hasTimestamp(): boolean;
697
+ clearTimestamp(): void;
698
+ getTimestamp(): google_protobuf_timestamp_pb.Timestamp | undefined;
699
+ setTimestamp(value?: google_protobuf_timestamp_pb.Timestamp): Checkpoint;
700
+
659
701
  serializeBinary(): Uint8Array;
660
702
  toObject(includeInstance?: boolean): Checkpoint.AsObject;
661
703
  static toObject(includeInstance: boolean, msg: Checkpoint): Checkpoint.AsObject;
@@ -667,6 +709,30 @@ export namespace ReadResp {
667
709
  }
668
710
 
669
711
  export namespace Checkpoint {
712
+ export type AsObject = {
713
+ commitPosition: string,
714
+ preparePosition: string,
715
+ timestamp?: google_protobuf_timestamp_pb.Timestamp.AsObject,
716
+ }
717
+ }
718
+
719
+ export class Position extends jspb.Message {
720
+ getCommitPosition(): string;
721
+ setCommitPosition(value: string): Position;
722
+ getPreparePosition(): string;
723
+ setPreparePosition(value: string): Position;
724
+
725
+ serializeBinary(): Uint8Array;
726
+ toObject(includeInstance?: boolean): Position.AsObject;
727
+ static toObject(includeInstance: boolean, msg: Position): Position.AsObject;
728
+ static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
729
+ static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
730
+ static serializeBinaryToWriter(message: Position, writer: jspb.BinaryWriter): void;
731
+ static deserializeBinary(bytes: Uint8Array): Position;
732
+ static deserializeBinaryFromReader(message: Position, reader: jspb.BinaryReader): Position;
733
+ }
734
+
735
+ export namespace Position {
670
736
  export type AsObject = {
671
737
  commitPosition: string,
672
738
  preparePosition: string,
@@ -1148,12 +1214,18 @@ export namespace BatchAppendReq {
1148
1214
  getStreamExists(): google_protobuf_empty_pb.Empty | undefined;
1149
1215
  setStreamExists(value?: google_protobuf_empty_pb.Empty): Options;
1150
1216
 
1217
+ hasDeadline21100(): boolean;
1218
+ clearDeadline21100(): void;
1219
+ getDeadline21100(): google_protobuf_timestamp_pb.Timestamp | undefined;
1220
+ setDeadline21100(value?: google_protobuf_timestamp_pb.Timestamp): Options;
1221
+
1151
1222
  hasDeadline(): boolean;
1152
1223
  clearDeadline(): void;
1153
- getDeadline(): google_protobuf_timestamp_pb.Timestamp | undefined;
1154
- setDeadline(value?: google_protobuf_timestamp_pb.Timestamp): Options;
1224
+ getDeadline(): google_protobuf_duration_pb.Duration | undefined;
1225
+ setDeadline(value?: google_protobuf_duration_pb.Duration): Options;
1155
1226
 
1156
1227
  getExpectedStreamPositionCase(): Options.ExpectedStreamPositionCase;
1228
+ getDeadlineOptionCase(): Options.DeadlineOptionCase;
1157
1229
 
1158
1230
  serializeBinary(): Uint8Array;
1159
1231
  toObject(includeInstance?: boolean): Options.AsObject;
@@ -1172,7 +1244,8 @@ export namespace BatchAppendReq {
1172
1244
  noStream?: google_protobuf_empty_pb.Empty.AsObject,
1173
1245
  any?: google_protobuf_empty_pb.Empty.AsObject,
1174
1246
  streamExists?: google_protobuf_empty_pb.Empty.AsObject,
1175
- deadline?: google_protobuf_timestamp_pb.Timestamp.AsObject,
1247
+ deadline21100?: google_protobuf_timestamp_pb.Timestamp.AsObject,
1248
+ deadline?: google_protobuf_duration_pb.Duration.AsObject,
1176
1249
  }
1177
1250
 
1178
1251
  export enum ExpectedStreamPositionCase {
@@ -1183,6 +1256,12 @@ export namespace BatchAppendReq {
1183
1256
  STREAM_EXISTS = 5,
1184
1257
  }
1185
1258
 
1259
+ export enum DeadlineOptionCase {
1260
+ DEADLINE_OPTION_NOT_SET = 0,
1261
+ DEADLINE_21_10_0 = 6,
1262
+ DEADLINE = 7,
1263
+ }
1264
+
1186
1265
  }
1187
1266
 
1188
1267
  export class ProposedMessage extends jspb.Message {
@@ -25,6 +25,8 @@ var shared_pb = require('./shared_pb.js');
25
25
  goog.object.extend(proto, shared_pb);
26
26
  var status_pb = require('./status_pb.js');
27
27
  goog.object.extend(proto, status_pb);
28
+ var google_protobuf_duration_pb = require('google-protobuf/google/protobuf/duration_pb.js');
29
+ goog.object.extend(proto, google_protobuf_duration_pb);
28
30
  var google_protobuf_empty_pb = require('google-protobuf/google/protobuf/empty_pb.js');
29
31
  goog.object.extend(proto, google_protobuf_empty_pb);
30
32
  var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js');
@@ -47,6 +49,7 @@ goog.exportSymbol('proto.event_store.client.streams.AppendResp.WrongExpectedVers
47
49
  goog.exportSymbol('proto.event_store.client.streams.AppendResp.WrongExpectedVersion.ExpectedRevisionOptionCase', null, global);
48
50
  goog.exportSymbol('proto.event_store.client.streams.BatchAppendReq', null, global);
49
51
  goog.exportSymbol('proto.event_store.client.streams.BatchAppendReq.Options', null, global);
52
+ goog.exportSymbol('proto.event_store.client.streams.BatchAppendReq.Options.DeadlineOptionCase', null, global);
50
53
  goog.exportSymbol('proto.event_store.client.streams.BatchAppendReq.Options.ExpectedStreamPositionCase', null, global);
51
54
  goog.exportSymbol('proto.event_store.client.streams.BatchAppendReq.ProposedMessage', null, global);
52
55
  goog.exportSymbol('proto.event_store.client.streams.BatchAppendResp', null, global);
@@ -85,6 +88,7 @@ goog.exportSymbol('proto.event_store.client.streams.ReadResp.CaughtUp', null, gl
85
88
  goog.exportSymbol('proto.event_store.client.streams.ReadResp.Checkpoint', null, global);
86
89
  goog.exportSymbol('proto.event_store.client.streams.ReadResp.ContentCase', null, global);
87
90
  goog.exportSymbol('proto.event_store.client.streams.ReadResp.FellBehind', null, global);
91
+ goog.exportSymbol('proto.event_store.client.streams.ReadResp.Position', null, global);
88
92
  goog.exportSymbol('proto.event_store.client.streams.ReadResp.ReadEvent', null, global);
89
93
  goog.exportSymbol('proto.event_store.client.streams.ReadResp.ReadEvent.PositionCase', null, global);
90
94
  goog.exportSymbol('proto.event_store.client.streams.ReadResp.ReadEvent.RecordedEvent', null, global);
@@ -453,6 +457,27 @@ if (goog.DEBUG && !COMPILED) {
453
457
  */
454
458
  proto.event_store.client.streams.ReadResp.Checkpoint.displayName = 'proto.event_store.client.streams.ReadResp.Checkpoint';
455
459
  }
460
+ /**
461
+ * Generated by JsPbCodeGenerator.
462
+ * @param {Array=} opt_data Optional initial data array, typically from a
463
+ * server response, or constructed directly in Javascript. The array is used
464
+ * in place and becomes part of the constructed object. It is not cloned.
465
+ * If no data is provided, the constructed object will be empty, but still
466
+ * valid.
467
+ * @extends {jspb.Message}
468
+ * @constructor
469
+ */
470
+ proto.event_store.client.streams.ReadResp.Position = function(opt_data) {
471
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
472
+ };
473
+ goog.inherits(proto.event_store.client.streams.ReadResp.Position, jspb.Message);
474
+ if (goog.DEBUG && !COMPILED) {
475
+ /**
476
+ * @public
477
+ * @override
478
+ */
479
+ proto.event_store.client.streams.ReadResp.Position.displayName = 'proto.event_store.client.streams.ReadResp.Position';
480
+ }
456
481
  /**
457
482
  * Generated by JsPbCodeGenerator.
458
483
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -3749,7 +3774,9 @@ proto.event_store.client.streams.ReadResp.CaughtUp.prototype.toObject = function
3749
3774
  */
3750
3775
  proto.event_store.client.streams.ReadResp.CaughtUp.toObject = function(includeInstance, msg) {
3751
3776
  var f, obj = {
3752
-
3777
+ timestamp: (f = msg.getTimestamp()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
3778
+ streamRevision: jspb.Message.getFieldWithDefault(msg, 2, "0"),
3779
+ position: (f = msg.getPosition()) && proto.event_store.client.streams.ReadResp.Position.toObject(includeInstance, f)
3753
3780
  };
3754
3781
 
3755
3782
  if (includeInstance) {
@@ -3786,6 +3813,20 @@ proto.event_store.client.streams.ReadResp.CaughtUp.deserializeBinaryFromReader =
3786
3813
  }
3787
3814
  var field = reader.getFieldNumber();
3788
3815
  switch (field) {
3816
+ case 1:
3817
+ var value = new google_protobuf_timestamp_pb.Timestamp;
3818
+ reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
3819
+ msg.setTimestamp(value);
3820
+ break;
3821
+ case 2:
3822
+ var value = /** @type {string} */ (reader.readInt64String());
3823
+ msg.setStreamRevision(value);
3824
+ break;
3825
+ case 3:
3826
+ var value = new proto.event_store.client.streams.ReadResp.Position;
3827
+ reader.readMessage(value,proto.event_store.client.streams.ReadResp.Position.deserializeBinaryFromReader);
3828
+ msg.setPosition(value);
3829
+ break;
3789
3830
  default:
3790
3831
  reader.skipField();
3791
3832
  break;
@@ -3815,6 +3856,139 @@ proto.event_store.client.streams.ReadResp.CaughtUp.prototype.serializeBinary = f
3815
3856
  */
3816
3857
  proto.event_store.client.streams.ReadResp.CaughtUp.serializeBinaryToWriter = function(message, writer) {
3817
3858
  var f = undefined;
3859
+ f = message.getTimestamp();
3860
+ if (f != null) {
3861
+ writer.writeMessage(
3862
+ 1,
3863
+ f,
3864
+ google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
3865
+ );
3866
+ }
3867
+ f = /** @type {string} */ (jspb.Message.getField(message, 2));
3868
+ if (f != null) {
3869
+ writer.writeInt64String(
3870
+ 2,
3871
+ f
3872
+ );
3873
+ }
3874
+ f = message.getPosition();
3875
+ if (f != null) {
3876
+ writer.writeMessage(
3877
+ 3,
3878
+ f,
3879
+ proto.event_store.client.streams.ReadResp.Position.serializeBinaryToWriter
3880
+ );
3881
+ }
3882
+ };
3883
+
3884
+
3885
+ /**
3886
+ * optional google.protobuf.Timestamp timestamp = 1;
3887
+ * @return {?proto.google.protobuf.Timestamp}
3888
+ */
3889
+ proto.event_store.client.streams.ReadResp.CaughtUp.prototype.getTimestamp = function() {
3890
+ return /** @type{?proto.google.protobuf.Timestamp} */ (
3891
+ jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 1));
3892
+ };
3893
+
3894
+
3895
+ /**
3896
+ * @param {?proto.google.protobuf.Timestamp|undefined} value
3897
+ * @return {!proto.event_store.client.streams.ReadResp.CaughtUp} returns this
3898
+ */
3899
+ proto.event_store.client.streams.ReadResp.CaughtUp.prototype.setTimestamp = function(value) {
3900
+ return jspb.Message.setWrapperField(this, 1, value);
3901
+ };
3902
+
3903
+
3904
+ /**
3905
+ * Clears the message field making it undefined.
3906
+ * @return {!proto.event_store.client.streams.ReadResp.CaughtUp} returns this
3907
+ */
3908
+ proto.event_store.client.streams.ReadResp.CaughtUp.prototype.clearTimestamp = function() {
3909
+ return this.setTimestamp(undefined);
3910
+ };
3911
+
3912
+
3913
+ /**
3914
+ * Returns whether this field is set.
3915
+ * @return {boolean}
3916
+ */
3917
+ proto.event_store.client.streams.ReadResp.CaughtUp.prototype.hasTimestamp = function() {
3918
+ return jspb.Message.getField(this, 1) != null;
3919
+ };
3920
+
3921
+
3922
+ /**
3923
+ * optional int64 stream_revision = 2;
3924
+ * @return {string}
3925
+ */
3926
+ proto.event_store.client.streams.ReadResp.CaughtUp.prototype.getStreamRevision = function() {
3927
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0"));
3928
+ };
3929
+
3930
+
3931
+ /**
3932
+ * @param {string} value
3933
+ * @return {!proto.event_store.client.streams.ReadResp.CaughtUp} returns this
3934
+ */
3935
+ proto.event_store.client.streams.ReadResp.CaughtUp.prototype.setStreamRevision = function(value) {
3936
+ return jspb.Message.setField(this, 2, value);
3937
+ };
3938
+
3939
+
3940
+ /**
3941
+ * Clears the field making it undefined.
3942
+ * @return {!proto.event_store.client.streams.ReadResp.CaughtUp} returns this
3943
+ */
3944
+ proto.event_store.client.streams.ReadResp.CaughtUp.prototype.clearStreamRevision = function() {
3945
+ return jspb.Message.setField(this, 2, undefined);
3946
+ };
3947
+
3948
+
3949
+ /**
3950
+ * Returns whether this field is set.
3951
+ * @return {boolean}
3952
+ */
3953
+ proto.event_store.client.streams.ReadResp.CaughtUp.prototype.hasStreamRevision = function() {
3954
+ return jspb.Message.getField(this, 2) != null;
3955
+ };
3956
+
3957
+
3958
+ /**
3959
+ * optional Position position = 3;
3960
+ * @return {?proto.event_store.client.streams.ReadResp.Position}
3961
+ */
3962
+ proto.event_store.client.streams.ReadResp.CaughtUp.prototype.getPosition = function() {
3963
+ return /** @type{?proto.event_store.client.streams.ReadResp.Position} */ (
3964
+ jspb.Message.getWrapperField(this, proto.event_store.client.streams.ReadResp.Position, 3));
3965
+ };
3966
+
3967
+
3968
+ /**
3969
+ * @param {?proto.event_store.client.streams.ReadResp.Position|undefined} value
3970
+ * @return {!proto.event_store.client.streams.ReadResp.CaughtUp} returns this
3971
+ */
3972
+ proto.event_store.client.streams.ReadResp.CaughtUp.prototype.setPosition = function(value) {
3973
+ return jspb.Message.setWrapperField(this, 3, value);
3974
+ };
3975
+
3976
+
3977
+ /**
3978
+ * Clears the message field making it undefined.
3979
+ * @return {!proto.event_store.client.streams.ReadResp.CaughtUp} returns this
3980
+ */
3981
+ proto.event_store.client.streams.ReadResp.CaughtUp.prototype.clearPosition = function() {
3982
+ return this.setPosition(undefined);
3983
+ };
3984
+
3985
+
3986
+ /**
3987
+ * Returns whether this field is set.
3988
+ * @return {boolean}
3989
+ */
3990
+ proto.event_store.client.streams.ReadResp.CaughtUp.prototype.hasPosition = function() {
3991
+ return jspb.Message.getField(this, 3) != null;
3818
3992
  };
3819
3993
 
3820
3994
 
@@ -3850,7 +4024,9 @@ proto.event_store.client.streams.ReadResp.FellBehind.prototype.toObject = functi
3850
4024
  */
3851
4025
  proto.event_store.client.streams.ReadResp.FellBehind.toObject = function(includeInstance, msg) {
3852
4026
  var f, obj = {
3853
-
4027
+ timestamp: (f = msg.getTimestamp()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
4028
+ streamRevision: jspb.Message.getFieldWithDefault(msg, 2, "0"),
4029
+ position: (f = msg.getPosition()) && proto.event_store.client.streams.ReadResp.Position.toObject(includeInstance, f)
3854
4030
  };
3855
4031
 
3856
4032
  if (includeInstance) {
@@ -3887,6 +4063,20 @@ proto.event_store.client.streams.ReadResp.FellBehind.deserializeBinaryFromReader
3887
4063
  }
3888
4064
  var field = reader.getFieldNumber();
3889
4065
  switch (field) {
4066
+ case 1:
4067
+ var value = new google_protobuf_timestamp_pb.Timestamp;
4068
+ reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
4069
+ msg.setTimestamp(value);
4070
+ break;
4071
+ case 2:
4072
+ var value = /** @type {string} */ (reader.readInt64String());
4073
+ msg.setStreamRevision(value);
4074
+ break;
4075
+ case 3:
4076
+ var value = new proto.event_store.client.streams.ReadResp.Position;
4077
+ reader.readMessage(value,proto.event_store.client.streams.ReadResp.Position.deserializeBinaryFromReader);
4078
+ msg.setPosition(value);
4079
+ break;
3890
4080
  default:
3891
4081
  reader.skipField();
3892
4082
  break;
@@ -3916,6 +4106,139 @@ proto.event_store.client.streams.ReadResp.FellBehind.prototype.serializeBinary =
3916
4106
  */
3917
4107
  proto.event_store.client.streams.ReadResp.FellBehind.serializeBinaryToWriter = function(message, writer) {
3918
4108
  var f = undefined;
4109
+ f = message.getTimestamp();
4110
+ if (f != null) {
4111
+ writer.writeMessage(
4112
+ 1,
4113
+ f,
4114
+ google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
4115
+ );
4116
+ }
4117
+ f = /** @type {string} */ (jspb.Message.getField(message, 2));
4118
+ if (f != null) {
4119
+ writer.writeInt64String(
4120
+ 2,
4121
+ f
4122
+ );
4123
+ }
4124
+ f = message.getPosition();
4125
+ if (f != null) {
4126
+ writer.writeMessage(
4127
+ 3,
4128
+ f,
4129
+ proto.event_store.client.streams.ReadResp.Position.serializeBinaryToWriter
4130
+ );
4131
+ }
4132
+ };
4133
+
4134
+
4135
+ /**
4136
+ * optional google.protobuf.Timestamp timestamp = 1;
4137
+ * @return {?proto.google.protobuf.Timestamp}
4138
+ */
4139
+ proto.event_store.client.streams.ReadResp.FellBehind.prototype.getTimestamp = function() {
4140
+ return /** @type{?proto.google.protobuf.Timestamp} */ (
4141
+ jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 1));
4142
+ };
4143
+
4144
+
4145
+ /**
4146
+ * @param {?proto.google.protobuf.Timestamp|undefined} value
4147
+ * @return {!proto.event_store.client.streams.ReadResp.FellBehind} returns this
4148
+ */
4149
+ proto.event_store.client.streams.ReadResp.FellBehind.prototype.setTimestamp = function(value) {
4150
+ return jspb.Message.setWrapperField(this, 1, value);
4151
+ };
4152
+
4153
+
4154
+ /**
4155
+ * Clears the message field making it undefined.
4156
+ * @return {!proto.event_store.client.streams.ReadResp.FellBehind} returns this
4157
+ */
4158
+ proto.event_store.client.streams.ReadResp.FellBehind.prototype.clearTimestamp = function() {
4159
+ return this.setTimestamp(undefined);
4160
+ };
4161
+
4162
+
4163
+ /**
4164
+ * Returns whether this field is set.
4165
+ * @return {boolean}
4166
+ */
4167
+ proto.event_store.client.streams.ReadResp.FellBehind.prototype.hasTimestamp = function() {
4168
+ return jspb.Message.getField(this, 1) != null;
4169
+ };
4170
+
4171
+
4172
+ /**
4173
+ * optional int64 stream_revision = 2;
4174
+ * @return {string}
4175
+ */
4176
+ proto.event_store.client.streams.ReadResp.FellBehind.prototype.getStreamRevision = function() {
4177
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0"));
4178
+ };
4179
+
4180
+
4181
+ /**
4182
+ * @param {string} value
4183
+ * @return {!proto.event_store.client.streams.ReadResp.FellBehind} returns this
4184
+ */
4185
+ proto.event_store.client.streams.ReadResp.FellBehind.prototype.setStreamRevision = function(value) {
4186
+ return jspb.Message.setField(this, 2, value);
4187
+ };
4188
+
4189
+
4190
+ /**
4191
+ * Clears the field making it undefined.
4192
+ * @return {!proto.event_store.client.streams.ReadResp.FellBehind} returns this
4193
+ */
4194
+ proto.event_store.client.streams.ReadResp.FellBehind.prototype.clearStreamRevision = function() {
4195
+ return jspb.Message.setField(this, 2, undefined);
4196
+ };
4197
+
4198
+
4199
+ /**
4200
+ * Returns whether this field is set.
4201
+ * @return {boolean}
4202
+ */
4203
+ proto.event_store.client.streams.ReadResp.FellBehind.prototype.hasStreamRevision = function() {
4204
+ return jspb.Message.getField(this, 2) != null;
4205
+ };
4206
+
4207
+
4208
+ /**
4209
+ * optional Position position = 3;
4210
+ * @return {?proto.event_store.client.streams.ReadResp.Position}
4211
+ */
4212
+ proto.event_store.client.streams.ReadResp.FellBehind.prototype.getPosition = function() {
4213
+ return /** @type{?proto.event_store.client.streams.ReadResp.Position} */ (
4214
+ jspb.Message.getWrapperField(this, proto.event_store.client.streams.ReadResp.Position, 3));
4215
+ };
4216
+
4217
+
4218
+ /**
4219
+ * @param {?proto.event_store.client.streams.ReadResp.Position|undefined} value
4220
+ * @return {!proto.event_store.client.streams.ReadResp.FellBehind} returns this
4221
+ */
4222
+ proto.event_store.client.streams.ReadResp.FellBehind.prototype.setPosition = function(value) {
4223
+ return jspb.Message.setWrapperField(this, 3, value);
4224
+ };
4225
+
4226
+
4227
+ /**
4228
+ * Clears the message field making it undefined.
4229
+ * @return {!proto.event_store.client.streams.ReadResp.FellBehind} returns this
4230
+ */
4231
+ proto.event_store.client.streams.ReadResp.FellBehind.prototype.clearPosition = function() {
4232
+ return this.setPosition(undefined);
4233
+ };
4234
+
4235
+
4236
+ /**
4237
+ * Returns whether this field is set.
4238
+ * @return {boolean}
4239
+ */
4240
+ proto.event_store.client.streams.ReadResp.FellBehind.prototype.hasPosition = function() {
4241
+ return jspb.Message.getField(this, 3) != null;
3919
4242
  };
3920
4243
 
3921
4244
 
@@ -4842,7 +5165,8 @@ proto.event_store.client.streams.ReadResp.Checkpoint.prototype.toObject = functi
4842
5165
  proto.event_store.client.streams.ReadResp.Checkpoint.toObject = function(includeInstance, msg) {
4843
5166
  var f, obj = {
4844
5167
  commitPosition: jspb.Message.getFieldWithDefault(msg, 1, "0"),
4845
- preparePosition: jspb.Message.getFieldWithDefault(msg, 2, "0")
5168
+ preparePosition: jspb.Message.getFieldWithDefault(msg, 2, "0"),
5169
+ timestamp: (f = msg.getTimestamp()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f)
4846
5170
  };
4847
5171
 
4848
5172
  if (includeInstance) {
@@ -4887,6 +5211,11 @@ proto.event_store.client.streams.ReadResp.Checkpoint.deserializeBinaryFromReader
4887
5211
  var value = /** @type {string} */ (reader.readUint64String());
4888
5212
  msg.setPreparePosition(value);
4889
5213
  break;
5214
+ case 3:
5215
+ var value = new google_protobuf_timestamp_pb.Timestamp;
5216
+ reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
5217
+ msg.setTimestamp(value);
5218
+ break;
4890
5219
  default:
4891
5220
  reader.skipField();
4892
5221
  break;
@@ -4930,6 +5259,14 @@ proto.event_store.client.streams.ReadResp.Checkpoint.serializeBinaryToWriter = f
4930
5259
  f
4931
5260
  );
4932
5261
  }
5262
+ f = message.getTimestamp();
5263
+ if (f != null) {
5264
+ writer.writeMessage(
5265
+ 3,
5266
+ f,
5267
+ google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
5268
+ );
5269
+ }
4933
5270
  };
4934
5271
 
4935
5272
 
@@ -4969,6 +5306,203 @@ proto.event_store.client.streams.ReadResp.Checkpoint.prototype.setPreparePositio
4969
5306
  };
4970
5307
 
4971
5308
 
5309
+ /**
5310
+ * optional google.protobuf.Timestamp timestamp = 3;
5311
+ * @return {?proto.google.protobuf.Timestamp}
5312
+ */
5313
+ proto.event_store.client.streams.ReadResp.Checkpoint.prototype.getTimestamp = function() {
5314
+ return /** @type{?proto.google.protobuf.Timestamp} */ (
5315
+ jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3));
5316
+ };
5317
+
5318
+
5319
+ /**
5320
+ * @param {?proto.google.protobuf.Timestamp|undefined} value
5321
+ * @return {!proto.event_store.client.streams.ReadResp.Checkpoint} returns this
5322
+ */
5323
+ proto.event_store.client.streams.ReadResp.Checkpoint.prototype.setTimestamp = function(value) {
5324
+ return jspb.Message.setWrapperField(this, 3, value);
5325
+ };
5326
+
5327
+
5328
+ /**
5329
+ * Clears the message field making it undefined.
5330
+ * @return {!proto.event_store.client.streams.ReadResp.Checkpoint} returns this
5331
+ */
5332
+ proto.event_store.client.streams.ReadResp.Checkpoint.prototype.clearTimestamp = function() {
5333
+ return this.setTimestamp(undefined);
5334
+ };
5335
+
5336
+
5337
+ /**
5338
+ * Returns whether this field is set.
5339
+ * @return {boolean}
5340
+ */
5341
+ proto.event_store.client.streams.ReadResp.Checkpoint.prototype.hasTimestamp = function() {
5342
+ return jspb.Message.getField(this, 3) != null;
5343
+ };
5344
+
5345
+
5346
+
5347
+
5348
+
5349
+ if (jspb.Message.GENERATE_TO_OBJECT) {
5350
+ /**
5351
+ * Creates an object representation of this proto.
5352
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
5353
+ * Optional fields that are not set will be set to undefined.
5354
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
5355
+ * For the list of reserved names please see:
5356
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
5357
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
5358
+ * JSPB instance for transitional soy proto support:
5359
+ * http://goto/soy-param-migration
5360
+ * @return {!Object}
5361
+ */
5362
+ proto.event_store.client.streams.ReadResp.Position.prototype.toObject = function(opt_includeInstance) {
5363
+ return proto.event_store.client.streams.ReadResp.Position.toObject(opt_includeInstance, this);
5364
+ };
5365
+
5366
+
5367
+ /**
5368
+ * Static version of the {@see toObject} method.
5369
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
5370
+ * the JSPB instance for transitional soy proto support:
5371
+ * http://goto/soy-param-migration
5372
+ * @param {!proto.event_store.client.streams.ReadResp.Position} msg The msg instance to transform.
5373
+ * @return {!Object}
5374
+ * @suppress {unusedLocalVariables} f is only used for nested messages
5375
+ */
5376
+ proto.event_store.client.streams.ReadResp.Position.toObject = function(includeInstance, msg) {
5377
+ var f, obj = {
5378
+ commitPosition: jspb.Message.getFieldWithDefault(msg, 1, "0"),
5379
+ preparePosition: jspb.Message.getFieldWithDefault(msg, 2, "0")
5380
+ };
5381
+
5382
+ if (includeInstance) {
5383
+ obj.$jspbMessageInstance = msg;
5384
+ }
5385
+ return obj;
5386
+ };
5387
+ }
5388
+
5389
+
5390
+ /**
5391
+ * Deserializes binary data (in protobuf wire format).
5392
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
5393
+ * @return {!proto.event_store.client.streams.ReadResp.Position}
5394
+ */
5395
+ proto.event_store.client.streams.ReadResp.Position.deserializeBinary = function(bytes) {
5396
+ var reader = new jspb.BinaryReader(bytes);
5397
+ var msg = new proto.event_store.client.streams.ReadResp.Position;
5398
+ return proto.event_store.client.streams.ReadResp.Position.deserializeBinaryFromReader(msg, reader);
5399
+ };
5400
+
5401
+
5402
+ /**
5403
+ * Deserializes binary data (in protobuf wire format) from the
5404
+ * given reader into the given message object.
5405
+ * @param {!proto.event_store.client.streams.ReadResp.Position} msg The message object to deserialize into.
5406
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
5407
+ * @return {!proto.event_store.client.streams.ReadResp.Position}
5408
+ */
5409
+ proto.event_store.client.streams.ReadResp.Position.deserializeBinaryFromReader = function(msg, reader) {
5410
+ while (reader.nextField()) {
5411
+ if (reader.isEndGroup()) {
5412
+ break;
5413
+ }
5414
+ var field = reader.getFieldNumber();
5415
+ switch (field) {
5416
+ case 1:
5417
+ var value = /** @type {string} */ (reader.readUint64String());
5418
+ msg.setCommitPosition(value);
5419
+ break;
5420
+ case 2:
5421
+ var value = /** @type {string} */ (reader.readUint64String());
5422
+ msg.setPreparePosition(value);
5423
+ break;
5424
+ default:
5425
+ reader.skipField();
5426
+ break;
5427
+ }
5428
+ }
5429
+ return msg;
5430
+ };
5431
+
5432
+
5433
+ /**
5434
+ * Serializes the message to binary data (in protobuf wire format).
5435
+ * @return {!Uint8Array}
5436
+ */
5437
+ proto.event_store.client.streams.ReadResp.Position.prototype.serializeBinary = function() {
5438
+ var writer = new jspb.BinaryWriter();
5439
+ proto.event_store.client.streams.ReadResp.Position.serializeBinaryToWriter(this, writer);
5440
+ return writer.getResultBuffer();
5441
+ };
5442
+
5443
+
5444
+ /**
5445
+ * Serializes the given message to binary data (in protobuf wire
5446
+ * format), writing to the given BinaryWriter.
5447
+ * @param {!proto.event_store.client.streams.ReadResp.Position} message
5448
+ * @param {!jspb.BinaryWriter} writer
5449
+ * @suppress {unusedLocalVariables} f is only used for nested messages
5450
+ */
5451
+ proto.event_store.client.streams.ReadResp.Position.serializeBinaryToWriter = function(message, writer) {
5452
+ var f = undefined;
5453
+ f = message.getCommitPosition();
5454
+ if (parseInt(f, 10) !== 0) {
5455
+ writer.writeUint64String(
5456
+ 1,
5457
+ f
5458
+ );
5459
+ }
5460
+ f = message.getPreparePosition();
5461
+ if (parseInt(f, 10) !== 0) {
5462
+ writer.writeUint64String(
5463
+ 2,
5464
+ f
5465
+ );
5466
+ }
5467
+ };
5468
+
5469
+
5470
+ /**
5471
+ * optional uint64 commit_position = 1;
5472
+ * @return {string}
5473
+ */
5474
+ proto.event_store.client.streams.ReadResp.Position.prototype.getCommitPosition = function() {
5475
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0"));
5476
+ };
5477
+
5478
+
5479
+ /**
5480
+ * @param {string} value
5481
+ * @return {!proto.event_store.client.streams.ReadResp.Position} returns this
5482
+ */
5483
+ proto.event_store.client.streams.ReadResp.Position.prototype.setCommitPosition = function(value) {
5484
+ return jspb.Message.setProto3StringIntField(this, 1, value);
5485
+ };
5486
+
5487
+
5488
+ /**
5489
+ * optional uint64 prepare_position = 2;
5490
+ * @return {string}
5491
+ */
5492
+ proto.event_store.client.streams.ReadResp.Position.prototype.getPreparePosition = function() {
5493
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0"));
5494
+ };
5495
+
5496
+
5497
+ /**
5498
+ * @param {string} value
5499
+ * @return {!proto.event_store.client.streams.ReadResp.Position} returns this
5500
+ */
5501
+ proto.event_store.client.streams.ReadResp.Position.prototype.setPreparePosition = function(value) {
5502
+ return jspb.Message.setProto3StringIntField(this, 2, value);
5503
+ };
5504
+
5505
+
4972
5506
 
4973
5507
 
4974
5508
 
@@ -7979,7 +8513,7 @@ proto.event_store.client.streams.BatchAppendReq.serializeBinaryToWriter = functi
7979
8513
  * @private {!Array<!Array<number>>}
7980
8514
  * @const
7981
8515
  */
7982
- proto.event_store.client.streams.BatchAppendReq.Options.oneofGroups_ = [[2,3,4,5]];
8516
+ proto.event_store.client.streams.BatchAppendReq.Options.oneofGroups_ = [[2,3,4,5],[6,7]];
7983
8517
 
7984
8518
  /**
7985
8519
  * @enum {number}
@@ -7999,6 +8533,22 @@ proto.event_store.client.streams.BatchAppendReq.Options.prototype.getExpectedStr
7999
8533
  return /** @type {proto.event_store.client.streams.BatchAppendReq.Options.ExpectedStreamPositionCase} */(jspb.Message.computeOneofCase(this, proto.event_store.client.streams.BatchAppendReq.Options.oneofGroups_[0]));
8000
8534
  };
8001
8535
 
8536
+ /**
8537
+ * @enum {number}
8538
+ */
8539
+ proto.event_store.client.streams.BatchAppendReq.Options.DeadlineOptionCase = {
8540
+ DEADLINE_OPTION_NOT_SET: 0,
8541
+ DEADLINE_21_10_0: 6,
8542
+ DEADLINE: 7
8543
+ };
8544
+
8545
+ /**
8546
+ * @return {proto.event_store.client.streams.BatchAppendReq.Options.DeadlineOptionCase}
8547
+ */
8548
+ proto.event_store.client.streams.BatchAppendReq.Options.prototype.getDeadlineOptionCase = function() {
8549
+ return /** @type {proto.event_store.client.streams.BatchAppendReq.Options.DeadlineOptionCase} */(jspb.Message.computeOneofCase(this, proto.event_store.client.streams.BatchAppendReq.Options.oneofGroups_[1]));
8550
+ };
8551
+
8002
8552
 
8003
8553
 
8004
8554
  if (jspb.Message.GENERATE_TO_OBJECT) {
@@ -8035,7 +8585,8 @@ proto.event_store.client.streams.BatchAppendReq.Options.toObject = function(incl
8035
8585
  noStream: (f = msg.getNoStream()) && google_protobuf_empty_pb.Empty.toObject(includeInstance, f),
8036
8586
  any: (f = msg.getAny()) && google_protobuf_empty_pb.Empty.toObject(includeInstance, f),
8037
8587
  streamExists: (f = msg.getStreamExists()) && google_protobuf_empty_pb.Empty.toObject(includeInstance, f),
8038
- deadline: (f = msg.getDeadline()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f)
8588
+ deadline21100: (f = msg.getDeadline21100()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
8589
+ deadline: (f = msg.getDeadline()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f)
8039
8590
  };
8040
8591
 
8041
8592
  if (includeInstance) {
@@ -8099,6 +8650,11 @@ proto.event_store.client.streams.BatchAppendReq.Options.deserializeBinaryFromRea
8099
8650
  case 6:
8100
8651
  var value = new google_protobuf_timestamp_pb.Timestamp;
8101
8652
  reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
8653
+ msg.setDeadline21100(value);
8654
+ break;
8655
+ case 7:
8656
+ var value = new google_protobuf_duration_pb.Duration;
8657
+ reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader);
8102
8658
  msg.setDeadline(value);
8103
8659
  break;
8104
8660
  default:
@@ -8169,7 +8725,7 @@ proto.event_store.client.streams.BatchAppendReq.Options.serializeBinaryToWriter
8169
8725
  google_protobuf_empty_pb.Empty.serializeBinaryToWriter
8170
8726
  );
8171
8727
  }
8172
- f = message.getDeadline();
8728
+ f = message.getDeadline21100();
8173
8729
  if (f != null) {
8174
8730
  writer.writeMessage(
8175
8731
  6,
@@ -8177,6 +8733,14 @@ proto.event_store.client.streams.BatchAppendReq.Options.serializeBinaryToWriter
8177
8733
  google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
8178
8734
  );
8179
8735
  }
8736
+ f = message.getDeadline();
8737
+ if (f != null) {
8738
+ writer.writeMessage(
8739
+ 7,
8740
+ f,
8741
+ google_protobuf_duration_pb.Duration.serializeBinaryToWriter
8742
+ );
8743
+ }
8180
8744
  };
8181
8745
 
8182
8746
 
@@ -8365,10 +8929,10 @@ proto.event_store.client.streams.BatchAppendReq.Options.prototype.hasStreamExist
8365
8929
 
8366
8930
 
8367
8931
  /**
8368
- * optional google.protobuf.Timestamp deadline = 6;
8932
+ * optional google.protobuf.Timestamp deadline_21_10_0 = 6;
8369
8933
  * @return {?proto.google.protobuf.Timestamp}
8370
8934
  */
8371
- proto.event_store.client.streams.BatchAppendReq.Options.prototype.getDeadline = function() {
8935
+ proto.event_store.client.streams.BatchAppendReq.Options.prototype.getDeadline21100 = function() {
8372
8936
  return /** @type{?proto.google.protobuf.Timestamp} */ (
8373
8937
  jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 6));
8374
8938
  };
@@ -8378,8 +8942,45 @@ proto.event_store.client.streams.BatchAppendReq.Options.prototype.getDeadline =
8378
8942
  * @param {?proto.google.protobuf.Timestamp|undefined} value
8379
8943
  * @return {!proto.event_store.client.streams.BatchAppendReq.Options} returns this
8380
8944
  */
8945
+ proto.event_store.client.streams.BatchAppendReq.Options.prototype.setDeadline21100 = function(value) {
8946
+ return jspb.Message.setOneofWrapperField(this, 6, proto.event_store.client.streams.BatchAppendReq.Options.oneofGroups_[1], value);
8947
+ };
8948
+
8949
+
8950
+ /**
8951
+ * Clears the message field making it undefined.
8952
+ * @return {!proto.event_store.client.streams.BatchAppendReq.Options} returns this
8953
+ */
8954
+ proto.event_store.client.streams.BatchAppendReq.Options.prototype.clearDeadline21100 = function() {
8955
+ return this.setDeadline21100(undefined);
8956
+ };
8957
+
8958
+
8959
+ /**
8960
+ * Returns whether this field is set.
8961
+ * @return {boolean}
8962
+ */
8963
+ proto.event_store.client.streams.BatchAppendReq.Options.prototype.hasDeadline21100 = function() {
8964
+ return jspb.Message.getField(this, 6) != null;
8965
+ };
8966
+
8967
+
8968
+ /**
8969
+ * optional google.protobuf.Duration deadline = 7;
8970
+ * @return {?proto.google.protobuf.Duration}
8971
+ */
8972
+ proto.event_store.client.streams.BatchAppendReq.Options.prototype.getDeadline = function() {
8973
+ return /** @type{?proto.google.protobuf.Duration} */ (
8974
+ jspb.Message.getWrapperField(this, google_protobuf_duration_pb.Duration, 7));
8975
+ };
8976
+
8977
+
8978
+ /**
8979
+ * @param {?proto.google.protobuf.Duration|undefined} value
8980
+ * @return {!proto.event_store.client.streams.BatchAppendReq.Options} returns this
8981
+ */
8381
8982
  proto.event_store.client.streams.BatchAppendReq.Options.prototype.setDeadline = function(value) {
8382
- return jspb.Message.setWrapperField(this, 6, value);
8983
+ return jspb.Message.setOneofWrapperField(this, 7, proto.event_store.client.streams.BatchAppendReq.Options.oneofGroups_[1], value);
8383
8984
  };
8384
8985
 
8385
8986
 
@@ -8397,7 +8998,7 @@ proto.event_store.client.streams.BatchAppendReq.Options.prototype.clearDeadline
8397
8998
  * @return {boolean}
8398
8999
  */
8399
9000
  proto.event_store.client.streams.BatchAppendReq.Options.prototype.hasDeadline = function() {
8400
- return jspb.Message.getField(this, 6) != null;
9001
+ return jspb.Message.getField(this, 7) != null;
8401
9002
  };
8402
9003
 
8403
9004
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kurrent/kurrentdb-client",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "KurrentDB gRPC NodeJS Client SDK",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",