@cratis/chronicle.contracts 18.4.0 → 18.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/dist/cjs/generated/descriptorSet.js +1 -1
  2. package/dist/cjs/generated/descriptorSet.js.map +1 -1
  3. package/dist/cjs/generated/index.d.ts +1 -1
  4. package/dist/cjs/generated/index.d.ts.map +1 -1
  5. package/dist/cjs/generated/sequences.d.ts +0 -46
  6. package/dist/cjs/generated/sequences.d.ts.map +1 -1
  7. package/dist/cjs/generated/sequences.js +205 -950
  8. package/dist/cjs/generated/sequences.js.map +1 -1
  9. package/dist/cjs/index.js +0 -4
  10. package/dist/cjs/index.js.map +1 -1
  11. package/dist/esm/generated/descriptorSet.js +1 -1
  12. package/dist/esm/generated/descriptorSet.js.map +1 -1
  13. package/dist/esm/generated/index.d.ts +1 -1
  14. package/dist/esm/generated/index.d.ts.map +1 -1
  15. package/dist/esm/generated/sequences.d.ts +0 -46
  16. package/dist/esm/generated/sequences.d.ts.map +1 -1
  17. package/dist/esm/generated/sequences.js +206 -947
  18. package/dist/esm/generated/sequences.js.map +1 -1
  19. package/dist/esm/index.js +1 -1
  20. package/dist/generated/descriptorSet.js +1 -1
  21. package/dist/generated/descriptorSet.js.map +1 -1
  22. package/dist/generated/index.d.ts +1 -1
  23. package/dist/generated/index.d.ts.map +1 -1
  24. package/dist/generated/index.js +1 -1
  25. package/dist/generated/index.js.map +1 -1
  26. package/dist/generated/sequences.d.ts +0 -46
  27. package/dist/generated/sequences.d.ts.map +1 -1
  28. package/dist/generated/sequences.js +205 -946
  29. package/dist/generated/sequences.js.map +1 -1
  30. package/dist/tsconfig.tsbuildinfo +1 -1
  31. package/generated/descriptorSet.ts +1 -1
  32. package/generated/index.ts +1 -1
  33. package/generated/sequences.ts +304 -1150
  34. package/package.json +1 -1
@@ -296,313 +296,6 @@ const AllEventSequencesRequest = {
296
296
  return message;
297
297
  },
298
298
  };
299
- function createBaseAppendCausation() {
300
- return { Occurred: undefined, Type: "", Properties: {} };
301
- }
302
- const AppendCausation = {
303
- encode(message, writer = new wire.BinaryWriter()) {
304
- if (message.Occurred !== undefined) {
305
- SerializableDateTimeOffset.encode(message.Occurred, writer.uint32(10).fork()).join();
306
- }
307
- if (message.Type !== "") {
308
- writer.uint32(18).string(message.Type);
309
- }
310
- globalThis.Object.entries(message.Properties).forEach(([key, value]) => {
311
- AppendCausation_PropertiesEntry.encode({ key: key, value }, writer.uint32(26).fork()).join();
312
- });
313
- return writer;
314
- },
315
- decode(input, length) {
316
- const reader = input instanceof wire.BinaryReader ? input : new wire.BinaryReader(input);
317
- const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
318
- if (previousRecursionDepth >= 100) {
319
- throw new globalThis.Error("protobuf decode recursion limit exceeded");
320
- }
321
- reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
322
- try {
323
- const end = length === undefined ? reader.len : reader.pos + length;
324
- const message = createBaseAppendCausation();
325
- while (reader.pos < end) {
326
- const tag = reader.uint32();
327
- switch (tag >>> 3) {
328
- case 1: {
329
- if (tag !== 10) {
330
- break;
331
- }
332
- message.Occurred = SerializableDateTimeOffset.decode(reader, reader.uint32());
333
- continue;
334
- }
335
- case 2: {
336
- if (tag !== 18) {
337
- break;
338
- }
339
- message.Type = reader.string();
340
- continue;
341
- }
342
- case 3: {
343
- if (tag !== 26) {
344
- break;
345
- }
346
- const entry3 = AppendCausation_PropertiesEntry.decode(reader, reader.uint32());
347
- if (entry3.value !== undefined) {
348
- message.Properties[entry3.key] = entry3.value;
349
- }
350
- continue;
351
- }
352
- }
353
- if ((tag & 7) === 4 || tag === 0) {
354
- break;
355
- }
356
- reader.skip(tag & 7);
357
- }
358
- return message;
359
- }
360
- finally {
361
- reader.__tsProtoDecodeDepth = previousRecursionDepth;
362
- }
363
- },
364
- fromJSON(object) {
365
- return {
366
- Occurred: isSet(object.Occurred) ? SerializableDateTimeOffset.fromJSON(object.Occurred) : undefined,
367
- Type: isSet(object.Type) ? globalThis.String(object.Type) : "",
368
- Properties: isObject(object.Properties)
369
- ? globalThis.Object.entries(object.Properties).reduce((acc, [key, value]) => {
370
- globalThis.Object.defineProperty(acc, key, {
371
- value: globalThis.String(value),
372
- enumerable: true,
373
- configurable: true,
374
- writable: true,
375
- });
376
- return acc;
377
- }, {})
378
- : {},
379
- };
380
- },
381
- toJSON(message) {
382
- const obj = {};
383
- if (message.Occurred !== undefined) {
384
- obj.Occurred = SerializableDateTimeOffset.toJSON(message.Occurred);
385
- }
386
- if (message.Type !== "") {
387
- obj.Type = message.Type;
388
- }
389
- if (message.Properties) {
390
- const entries = globalThis.Object.entries(message.Properties);
391
- if (entries.length > 0) {
392
- obj.Properties = {};
393
- entries.forEach(([k, v]) => {
394
- obj.Properties[k] = v;
395
- });
396
- }
397
- }
398
- return obj;
399
- },
400
- create(base) {
401
- return AppendCausation.fromPartial(base ?? {});
402
- },
403
- fromPartial(object) {
404
- const message = createBaseAppendCausation();
405
- message.Occurred = (object.Occurred !== undefined && object.Occurred !== null)
406
- ? SerializableDateTimeOffset.fromPartial(object.Occurred)
407
- : undefined;
408
- message.Type = object.Type ?? "";
409
- message.Properties = globalThis.Object.entries(object.Properties ?? {}).reduce((acc, [key, value]) => {
410
- if (value !== undefined) {
411
- acc[key] = globalThis.String(value);
412
- }
413
- return acc;
414
- }, {});
415
- return message;
416
- },
417
- };
418
- function createBaseAppendCausation_PropertiesEntry() {
419
- return { key: "", value: "" };
420
- }
421
- const AppendCausation_PropertiesEntry = {
422
- encode(message, writer = new wire.BinaryWriter()) {
423
- if (message.key !== "") {
424
- writer.uint32(10).string(message.key);
425
- }
426
- if (message.value !== "") {
427
- writer.uint32(18).string(message.value);
428
- }
429
- return writer;
430
- },
431
- decode(input, length) {
432
- const reader = input instanceof wire.BinaryReader ? input : new wire.BinaryReader(input);
433
- const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
434
- if (previousRecursionDepth >= 100) {
435
- throw new globalThis.Error("protobuf decode recursion limit exceeded");
436
- }
437
- reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
438
- try {
439
- const end = length === undefined ? reader.len : reader.pos + length;
440
- const message = createBaseAppendCausation_PropertiesEntry();
441
- while (reader.pos < end) {
442
- const tag = reader.uint32();
443
- switch (tag >>> 3) {
444
- case 1: {
445
- if (tag !== 10) {
446
- break;
447
- }
448
- message.key = reader.string();
449
- continue;
450
- }
451
- case 2: {
452
- if (tag !== 18) {
453
- break;
454
- }
455
- message.value = reader.string();
456
- continue;
457
- }
458
- }
459
- if ((tag & 7) === 4 || tag === 0) {
460
- break;
461
- }
462
- reader.skip(tag & 7);
463
- }
464
- return message;
465
- }
466
- finally {
467
- reader.__tsProtoDecodeDepth = previousRecursionDepth;
468
- }
469
- },
470
- fromJSON(object) {
471
- return {
472
- key: isSet(object.key) ? globalThis.String(object.key) : "",
473
- value: isSet(object.value) ? globalThis.String(object.value) : "",
474
- };
475
- },
476
- toJSON(message) {
477
- const obj = {};
478
- if (message.key !== "") {
479
- obj.key = message.key;
480
- }
481
- if (message.value !== "") {
482
- obj.value = message.value;
483
- }
484
- return obj;
485
- },
486
- create(base) {
487
- return AppendCausation_PropertiesEntry.fromPartial(base ?? {});
488
- },
489
- fromPartial(object) {
490
- const message = createBaseAppendCausation_PropertiesEntry();
491
- message.key = object.key ?? "";
492
- message.value = object.value ?? "";
493
- return message;
494
- },
495
- };
496
- function createBaseAppendIdentity() {
497
- return { Subject: "", Name: "", UserName: "", OnBehalfOf: undefined };
498
- }
499
- const AppendIdentity = {
500
- encode(message, writer = new wire.BinaryWriter()) {
501
- if (message.Subject !== "") {
502
- writer.uint32(10).string(message.Subject);
503
- }
504
- if (message.Name !== "") {
505
- writer.uint32(18).string(message.Name);
506
- }
507
- if (message.UserName !== "") {
508
- writer.uint32(26).string(message.UserName);
509
- }
510
- if (message.OnBehalfOf !== undefined) {
511
- AppendIdentity.encode(message.OnBehalfOf, writer.uint32(34).fork()).join();
512
- }
513
- return writer;
514
- },
515
- decode(input, length) {
516
- const reader = input instanceof wire.BinaryReader ? input : new wire.BinaryReader(input);
517
- const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
518
- if (previousRecursionDepth >= 100) {
519
- throw new globalThis.Error("protobuf decode recursion limit exceeded");
520
- }
521
- reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
522
- try {
523
- const end = length === undefined ? reader.len : reader.pos + length;
524
- const message = createBaseAppendIdentity();
525
- while (reader.pos < end) {
526
- const tag = reader.uint32();
527
- switch (tag >>> 3) {
528
- case 1: {
529
- if (tag !== 10) {
530
- break;
531
- }
532
- message.Subject = reader.string();
533
- continue;
534
- }
535
- case 2: {
536
- if (tag !== 18) {
537
- break;
538
- }
539
- message.Name = reader.string();
540
- continue;
541
- }
542
- case 3: {
543
- if (tag !== 26) {
544
- break;
545
- }
546
- message.UserName = reader.string();
547
- continue;
548
- }
549
- case 4: {
550
- if (tag !== 34) {
551
- break;
552
- }
553
- message.OnBehalfOf = AppendIdentity.decode(reader, reader.uint32());
554
- continue;
555
- }
556
- }
557
- if ((tag & 7) === 4 || tag === 0) {
558
- break;
559
- }
560
- reader.skip(tag & 7);
561
- }
562
- return message;
563
- }
564
- finally {
565
- reader.__tsProtoDecodeDepth = previousRecursionDepth;
566
- }
567
- },
568
- fromJSON(object) {
569
- return {
570
- Subject: isSet(object.Subject) ? globalThis.String(object.Subject) : "",
571
- Name: isSet(object.Name) ? globalThis.String(object.Name) : "",
572
- UserName: isSet(object.UserName) ? globalThis.String(object.UserName) : "",
573
- OnBehalfOf: isSet(object.OnBehalfOf) ? AppendIdentity.fromJSON(object.OnBehalfOf) : undefined,
574
- };
575
- },
576
- toJSON(message) {
577
- const obj = {};
578
- if (message.Subject !== "") {
579
- obj.Subject = message.Subject;
580
- }
581
- if (message.Name !== "") {
582
- obj.Name = message.Name;
583
- }
584
- if (message.UserName !== "") {
585
- obj.UserName = message.UserName;
586
- }
587
- if (message.OnBehalfOf !== undefined) {
588
- obj.OnBehalfOf = AppendIdentity.toJSON(message.OnBehalfOf);
589
- }
590
- return obj;
591
- },
592
- create(base) {
593
- return AppendIdentity.fromPartial(base ?? {});
594
- },
595
- fromPartial(object) {
596
- const message = createBaseAppendIdentity();
597
- message.Subject = object.Subject ?? "";
598
- message.Name = object.Name ?? "";
599
- message.UserName = object.UserName ?? "";
600
- message.OnBehalfOf = (object.OnBehalfOf !== undefined && object.OnBehalfOf !== null)
601
- ? AppendIdentity.fromPartial(object.OnBehalfOf)
602
- : undefined;
603
- return message;
604
- },
605
- };
606
299
  function createBaseAppendManyForEventSourcesRequest() {
607
300
  return {
608
301
  EventStore: "",
@@ -614,7 +307,6 @@ function createBaseAppendManyForEventSourcesRequest() {
614
307
  Causation: [],
615
308
  CausedBy: undefined,
616
309
  ConcurrencyScopes: [],
617
- IncludeReceipts: false,
618
310
  };
619
311
  }
620
312
  const AppendManyForEventSourcesRequest = {
@@ -646,9 +338,6 @@ const AppendManyForEventSourcesRequest = {
646
338
  for (const v of message.ConcurrencyScopes) {
647
339
  EventSourceConcurrencyScope.encode(v, writer.uint32(74).fork()).join();
648
340
  }
649
- if (message.IncludeReceipts !== false) {
650
- writer.uint32(80).bool(message.IncludeReceipts);
651
- }
652
341
  return writer;
653
342
  },
654
343
  decode(input, length) {
@@ -727,13 +416,6 @@ const AppendManyForEventSourcesRequest = {
727
416
  message.ConcurrencyScopes.push(EventSourceConcurrencyScope.decode(reader, reader.uint32()));
728
417
  continue;
729
418
  }
730
- case 10: {
731
- if (tag !== 80) {
732
- break;
733
- }
734
- message.IncludeReceipts = reader.bool();
735
- continue;
736
- }
737
419
  }
738
420
  if ((tag & 7) === 4 || tag === 0) {
739
421
  break;
@@ -763,7 +445,6 @@ const AppendManyForEventSourcesRequest = {
763
445
  ConcurrencyScopes: globalThis.Array.isArray(object?.ConcurrencyScopes)
764
446
  ? object.ConcurrencyScopes.map((e) => EventSourceConcurrencyScope.fromJSON(e))
765
447
  : [],
766
- IncludeReceipts: isSet(object.IncludeReceipts) ? globalThis.Boolean(object.IncludeReceipts) : false,
767
448
  };
768
449
  },
769
450
  toJSON(message) {
@@ -795,9 +476,6 @@ const AppendManyForEventSourcesRequest = {
795
476
  if (message.ConcurrencyScopes?.length) {
796
477
  obj.ConcurrencyScopes = message.ConcurrencyScopes.map((e) => EventSourceConcurrencyScope.toJSON(e));
797
478
  }
798
- if (message.IncludeReceipts !== false) {
799
- obj.IncludeReceipts = message.IncludeReceipts;
800
- }
801
479
  return obj;
802
480
  },
803
481
  create(base) {
@@ -818,7 +496,6 @@ const AppendManyForEventSourcesRequest = {
818
496
  ? Identity.fromPartial(object.CausedBy)
819
497
  : undefined;
820
498
  message.ConcurrencyScopes = object.ConcurrencyScopes?.map((e) => EventSourceConcurrencyScope.fromPartial(e)) || [];
821
- message.IncludeReceipts = object.IncludeReceipts ?? false;
822
499
  return message;
823
500
  },
824
501
  };
@@ -831,300 +508,46 @@ function createBaseAppendManyRequest() {
831
508
  Events: [],
832
509
  CorrelationId: undefined,
833
510
  Tags: [],
834
- Causation: [],
835
- CausedBy: undefined,
836
- ConcurrencyScope: undefined,
837
- Occurred: undefined,
838
- IncludeReceipts: false,
839
- };
840
- }
841
- const AppendManyRequest = {
842
- encode(message, writer = new wire.BinaryWriter()) {
843
- if (message.EventStore !== "") {
844
- writer.uint32(10).string(message.EventStore);
845
- }
846
- if (message.Namespace !== "") {
847
- writer.uint32(18).string(message.Namespace);
848
- }
849
- if (message.EventSequenceId !== "") {
850
- writer.uint32(26).string(message.EventSequenceId);
851
- }
852
- if (message.EventSourceId !== "") {
853
- writer.uint32(34).string(message.EventSourceId);
854
- }
855
- for (const v of message.Events) {
856
- EventToAppend.encode(v, writer.uint32(42).fork()).join();
857
- }
858
- if (message.CorrelationId !== undefined) {
859
- bcl.Guid.encode(message.CorrelationId, writer.uint32(50).fork()).join();
860
- }
861
- for (const v of message.Tags) {
862
- writer.uint32(58).string(v);
863
- }
864
- for (const v of message.Causation) {
865
- Causation.encode(v, writer.uint32(66).fork()).join();
866
- }
867
- if (message.CausedBy !== undefined) {
868
- Identity.encode(message.CausedBy, writer.uint32(74).fork()).join();
869
- }
870
- if (message.ConcurrencyScope !== undefined) {
871
- ConcurrencyScope.encode(message.ConcurrencyScope, writer.uint32(82).fork()).join();
872
- }
873
- if (message.Occurred !== undefined) {
874
- SerializableDateTimeOffset.encode(message.Occurred, writer.uint32(90).fork()).join();
875
- }
876
- if (message.IncludeReceipts !== false) {
877
- writer.uint32(96).bool(message.IncludeReceipts);
878
- }
879
- return writer;
880
- },
881
- decode(input, length) {
882
- const reader = input instanceof wire.BinaryReader ? input : new wire.BinaryReader(input);
883
- const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
884
- if (previousRecursionDepth >= 100) {
885
- throw new globalThis.Error("protobuf decode recursion limit exceeded");
886
- }
887
- reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
888
- try {
889
- const end = length === undefined ? reader.len : reader.pos + length;
890
- const message = createBaseAppendManyRequest();
891
- while (reader.pos < end) {
892
- const tag = reader.uint32();
893
- switch (tag >>> 3) {
894
- case 1: {
895
- if (tag !== 10) {
896
- break;
897
- }
898
- message.EventStore = reader.string();
899
- continue;
900
- }
901
- case 2: {
902
- if (tag !== 18) {
903
- break;
904
- }
905
- message.Namespace = reader.string();
906
- continue;
907
- }
908
- case 3: {
909
- if (tag !== 26) {
910
- break;
911
- }
912
- message.EventSequenceId = reader.string();
913
- continue;
914
- }
915
- case 4: {
916
- if (tag !== 34) {
917
- break;
918
- }
919
- message.EventSourceId = reader.string();
920
- continue;
921
- }
922
- case 5: {
923
- if (tag !== 42) {
924
- break;
925
- }
926
- message.Events.push(EventToAppend.decode(reader, reader.uint32()));
927
- continue;
928
- }
929
- case 6: {
930
- if (tag !== 50) {
931
- break;
932
- }
933
- message.CorrelationId = bcl.Guid.decode(reader, reader.uint32());
934
- continue;
935
- }
936
- case 7: {
937
- if (tag !== 58) {
938
- break;
939
- }
940
- message.Tags.push(reader.string());
941
- continue;
942
- }
943
- case 8: {
944
- if (tag !== 66) {
945
- break;
946
- }
947
- message.Causation.push(Causation.decode(reader, reader.uint32()));
948
- continue;
949
- }
950
- case 9: {
951
- if (tag !== 74) {
952
- break;
953
- }
954
- message.CausedBy = Identity.decode(reader, reader.uint32());
955
- continue;
956
- }
957
- case 10: {
958
- if (tag !== 82) {
959
- break;
960
- }
961
- message.ConcurrencyScope = ConcurrencyScope.decode(reader, reader.uint32());
962
- continue;
963
- }
964
- case 11: {
965
- if (tag !== 90) {
966
- break;
967
- }
968
- message.Occurred = SerializableDateTimeOffset.decode(reader, reader.uint32());
969
- continue;
970
- }
971
- case 12: {
972
- if (tag !== 96) {
973
- break;
974
- }
975
- message.IncludeReceipts = reader.bool();
976
- continue;
977
- }
978
- }
979
- if ((tag & 7) === 4 || tag === 0) {
980
- break;
981
- }
982
- reader.skip(tag & 7);
983
- }
984
- return message;
985
- }
986
- finally {
987
- reader.__tsProtoDecodeDepth = previousRecursionDepth;
988
- }
989
- },
990
- fromJSON(object) {
991
- return {
992
- EventStore: isSet(object.EventStore) ? globalThis.String(object.EventStore) : "",
993
- Namespace: isSet(object.Namespace) ? globalThis.String(object.Namespace) : "",
994
- EventSequenceId: isSet(object.EventSequenceId) ? globalThis.String(object.EventSequenceId) : "",
995
- EventSourceId: isSet(object.EventSourceId) ? globalThis.String(object.EventSourceId) : "",
996
- Events: globalThis.Array.isArray(object?.Events) ? object.Events.map((e) => EventToAppend.fromJSON(e)) : [],
997
- CorrelationId: isSet(object.CorrelationId) ? bcl.Guid.fromJSON(object.CorrelationId) : undefined,
998
- Tags: globalThis.Array.isArray(object?.Tags) ? object.Tags.map((e) => globalThis.String(e)) : [],
999
- Causation: globalThis.Array.isArray(object?.Causation)
1000
- ? object.Causation.map((e) => Causation.fromJSON(e))
1001
- : [],
1002
- CausedBy: isSet(object.CausedBy) ? Identity.fromJSON(object.CausedBy) : undefined,
1003
- ConcurrencyScope: isSet(object.ConcurrencyScope) ? ConcurrencyScope.fromJSON(object.ConcurrencyScope) : undefined,
1004
- Occurred: isSet(object.Occurred) ? SerializableDateTimeOffset.fromJSON(object.Occurred) : undefined,
1005
- IncludeReceipts: isSet(object.IncludeReceipts) ? globalThis.Boolean(object.IncludeReceipts) : false,
1006
- };
1007
- },
1008
- toJSON(message) {
1009
- const obj = {};
1010
- if (message.EventStore !== "") {
1011
- obj.EventStore = message.EventStore;
1012
- }
1013
- if (message.Namespace !== "") {
1014
- obj.Namespace = message.Namespace;
1015
- }
1016
- if (message.EventSequenceId !== "") {
1017
- obj.EventSequenceId = message.EventSequenceId;
1018
- }
1019
- if (message.EventSourceId !== "") {
1020
- obj.EventSourceId = message.EventSourceId;
1021
- }
1022
- if (message.Events?.length) {
1023
- obj.Events = message.Events.map((e) => EventToAppend.toJSON(e));
1024
- }
1025
- if (message.CorrelationId !== undefined) {
1026
- obj.CorrelationId = bcl.Guid.toJSON(message.CorrelationId);
1027
- }
1028
- if (message.Tags?.length) {
1029
- obj.Tags = message.Tags;
1030
- }
1031
- if (message.Causation?.length) {
1032
- obj.Causation = message.Causation.map((e) => Causation.toJSON(e));
1033
- }
1034
- if (message.CausedBy !== undefined) {
1035
- obj.CausedBy = Identity.toJSON(message.CausedBy);
1036
- }
1037
- if (message.ConcurrencyScope !== undefined) {
1038
- obj.ConcurrencyScope = ConcurrencyScope.toJSON(message.ConcurrencyScope);
1039
- }
1040
- if (message.Occurred !== undefined) {
1041
- obj.Occurred = SerializableDateTimeOffset.toJSON(message.Occurred);
1042
- }
1043
- if (message.IncludeReceipts !== false) {
1044
- obj.IncludeReceipts = message.IncludeReceipts;
1045
- }
1046
- return obj;
1047
- },
1048
- create(base) {
1049
- return AppendManyRequest.fromPartial(base ?? {});
1050
- },
1051
- fromPartial(object) {
1052
- const message = createBaseAppendManyRequest();
1053
- message.EventStore = object.EventStore ?? "";
1054
- message.Namespace = object.Namespace ?? "";
1055
- message.EventSequenceId = object.EventSequenceId ?? "";
1056
- message.EventSourceId = object.EventSourceId ?? "";
1057
- message.Events = object.Events?.map((e) => EventToAppend.fromPartial(e)) || [];
1058
- message.CorrelationId = (object.CorrelationId !== undefined && object.CorrelationId !== null)
1059
- ? bcl.Guid.fromPartial(object.CorrelationId)
1060
- : undefined;
1061
- message.Tags = object.Tags?.map((e) => e) || [];
1062
- message.Causation = object.Causation?.map((e) => Causation.fromPartial(e)) || [];
1063
- message.CausedBy = (object.CausedBy !== undefined && object.CausedBy !== null)
1064
- ? Identity.fromPartial(object.CausedBy)
1065
- : undefined;
1066
- message.ConcurrencyScope = (object.ConcurrencyScope !== undefined && object.ConcurrencyScope !== null)
1067
- ? ConcurrencyScope.fromPartial(object.ConcurrencyScope)
1068
- : undefined;
1069
- message.Occurred = (object.Occurred !== undefined && object.Occurred !== null)
1070
- ? SerializableDateTimeOffset.fromPartial(object.Occurred)
1071
- : undefined;
1072
- message.IncludeReceipts = object.IncludeReceipts ?? false;
1073
- return message;
1074
- },
1075
- };
1076
- function createBaseAppendManyResponse() {
1077
- return {
1078
- CorrelationId: undefined,
1079
- SequenceNumbers: [],
1080
- IsSuccess: false,
1081
- HasConstraintViolations: false,
1082
- HasConcurrencyViolations: false,
1083
- HasErrors: false,
1084
- ConcurrencyCheckPerformed: false,
1085
- ConstraintViolations: [],
1086
- Errors: [],
1087
- ConcurrencyViolations: [],
1088
- Receipts: [],
511
+ Causation: [],
512
+ CausedBy: undefined,
513
+ ConcurrencyScope: undefined,
514
+ Occurred: undefined,
1089
515
  };
1090
516
  }
1091
- const AppendManyResponse = {
517
+ const AppendManyRequest = {
1092
518
  encode(message, writer = new wire.BinaryWriter()) {
1093
- if (message.CorrelationId !== undefined) {
1094
- bcl.Guid.encode(message.CorrelationId, writer.uint32(10).fork()).join();
519
+ if (message.EventStore !== "") {
520
+ writer.uint32(10).string(message.EventStore);
1095
521
  }
1096
- for (const v of message.SequenceNumbers) {
1097
- if (BigInt.asUintN(64, v) !== v) {
1098
- throw new globalThis.Error("value provided for field v! of type uint64 too large");
1099
- }
1100
- writer.uint32(16).uint64(v);
522
+ if (message.Namespace !== "") {
523
+ writer.uint32(18).string(message.Namespace);
1101
524
  }
1102
- if (message.IsSuccess !== false) {
1103
- writer.uint32(24).bool(message.IsSuccess);
525
+ if (message.EventSequenceId !== "") {
526
+ writer.uint32(26).string(message.EventSequenceId);
1104
527
  }
1105
- if (message.HasConstraintViolations !== false) {
1106
- writer.uint32(32).bool(message.HasConstraintViolations);
528
+ if (message.EventSourceId !== "") {
529
+ writer.uint32(34).string(message.EventSourceId);
1107
530
  }
1108
- if (message.HasConcurrencyViolations !== false) {
1109
- writer.uint32(40).bool(message.HasConcurrencyViolations);
531
+ for (const v of message.Events) {
532
+ EventToAppend.encode(v, writer.uint32(42).fork()).join();
1110
533
  }
1111
- if (message.HasErrors !== false) {
1112
- writer.uint32(48).bool(message.HasErrors);
534
+ if (message.CorrelationId !== undefined) {
535
+ bcl.Guid.encode(message.CorrelationId, writer.uint32(50).fork()).join();
1113
536
  }
1114
- if (message.ConcurrencyCheckPerformed !== false) {
1115
- writer.uint32(56).bool(message.ConcurrencyCheckPerformed);
537
+ for (const v of message.Tags) {
538
+ writer.uint32(58).string(v);
1116
539
  }
1117
- for (const v of message.ConstraintViolations) {
1118
- ConstraintViolation.encode(v, writer.uint32(66).fork()).join();
540
+ for (const v of message.Causation) {
541
+ Causation.encode(v, writer.uint32(66).fork()).join();
1119
542
  }
1120
- for (const v of message.Errors) {
1121
- writer.uint32(74).string(v);
543
+ if (message.CausedBy !== undefined) {
544
+ Identity.encode(message.CausedBy, writer.uint32(74).fork()).join();
1122
545
  }
1123
- for (const v of message.ConcurrencyViolations) {
1124
- ConcurrencyViolation.encode(v, writer.uint32(82).fork()).join();
546
+ if (message.ConcurrencyScope !== undefined) {
547
+ ConcurrencyScope.encode(message.ConcurrencyScope, writer.uint32(82).fork()).join();
1125
548
  }
1126
- for (const v of message.Receipts) {
1127
- AppendReceipt.encode(v, writer.uint32(90).fork()).join();
549
+ if (message.Occurred !== undefined) {
550
+ SerializableDateTimeOffset.encode(message.Occurred, writer.uint32(90).fork()).join();
1128
551
  }
1129
552
  return writer;
1130
553
  },
@@ -1137,7 +560,7 @@ const AppendManyResponse = {
1137
560
  reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
1138
561
  try {
1139
562
  const end = length === undefined ? reader.len : reader.pos + length;
1140
- const message = createBaseAppendManyResponse();
563
+ const message = createBaseAppendManyRequest();
1141
564
  while (reader.pos < end) {
1142
565
  const tag = reader.uint32();
1143
566
  switch (tag >>> 3) {
@@ -1145,84 +568,77 @@ const AppendManyResponse = {
1145
568
  if (tag !== 10) {
1146
569
  break;
1147
570
  }
1148
- message.CorrelationId = bcl.Guid.decode(reader, reader.uint32());
571
+ message.EventStore = reader.string();
1149
572
  continue;
1150
573
  }
1151
574
  case 2: {
1152
- if (tag === 16) {
1153
- message.SequenceNumbers.push(reader.uint64());
1154
- continue;
1155
- }
1156
- if (tag === 18) {
1157
- const end2 = reader.uint32() + reader.pos;
1158
- while (reader.pos < end2) {
1159
- message.SequenceNumbers.push(reader.uint64());
1160
- }
1161
- continue;
575
+ if (tag !== 18) {
576
+ break;
1162
577
  }
1163
- break;
578
+ message.Namespace = reader.string();
579
+ continue;
1164
580
  }
1165
581
  case 3: {
1166
- if (tag !== 24) {
582
+ if (tag !== 26) {
1167
583
  break;
1168
584
  }
1169
- message.IsSuccess = reader.bool();
585
+ message.EventSequenceId = reader.string();
1170
586
  continue;
1171
587
  }
1172
588
  case 4: {
1173
- if (tag !== 32) {
589
+ if (tag !== 34) {
1174
590
  break;
1175
591
  }
1176
- message.HasConstraintViolations = reader.bool();
592
+ message.EventSourceId = reader.string();
1177
593
  continue;
1178
594
  }
1179
595
  case 5: {
1180
- if (tag !== 40) {
596
+ if (tag !== 42) {
1181
597
  break;
1182
598
  }
1183
- message.HasConcurrencyViolations = reader.bool();
599
+ message.Events.push(EventToAppend.decode(reader, reader.uint32()));
1184
600
  continue;
1185
601
  }
1186
602
  case 6: {
1187
- if (tag !== 48) {
603
+ if (tag !== 50) {
1188
604
  break;
1189
605
  }
1190
- message.HasErrors = reader.bool();
606
+ message.CorrelationId = bcl.Guid.decode(reader, reader.uint32());
1191
607
  continue;
1192
608
  }
1193
609
  case 7: {
1194
- if (tag !== 56) {
610
+ if (tag !== 58) {
1195
611
  break;
1196
612
  }
1197
- message.ConcurrencyCheckPerformed = reader.bool();
613
+ message.Tags.push(reader.string());
1198
614
  continue;
1199
615
  }
1200
616
  case 8: {
1201
617
  if (tag !== 66) {
1202
618
  break;
1203
619
  }
1204
- message.ConstraintViolations.push(ConstraintViolation.decode(reader, reader.uint32()));
620
+ message.Causation.push(Causation.decode(reader, reader.uint32()));
1205
621
  continue;
1206
622
  }
1207
623
  case 9: {
1208
624
  if (tag !== 74) {
1209
625
  break;
1210
626
  }
1211
- message.Errors.push(reader.string());
627
+ message.CausedBy = Identity.decode(reader, reader.uint32());
1212
628
  continue;
1213
629
  }
1214
630
  case 10: {
1215
631
  if (tag !== 82) {
1216
632
  break;
1217
633
  }
1218
- message.ConcurrencyViolations.push(ConcurrencyViolation.decode(reader, reader.uint32()));
634
+ message.ConcurrencyScope = ConcurrencyScope.decode(reader, reader.uint32());
1219
635
  continue;
1220
636
  }
1221
637
  case 11: {
1222
638
  if (tag !== 90) {
1223
639
  break;
1224
640
  }
1225
- message.Receipts.push(AppendReceipt.decode(reader, reader.uint32()));
641
+ message.Occurred = SerializableDateTimeOffset.decode(reader, reader.uint32());
1226
642
  continue;
1227
643
  }
1228
644
  }
@@ -1239,171 +655,133 @@ const AppendManyResponse = {
1239
655
  },
1240
656
  fromJSON(object) {
1241
657
  return {
658
+ EventStore: isSet(object.EventStore) ? globalThis.String(object.EventStore) : "",
659
+ Namespace: isSet(object.Namespace) ? globalThis.String(object.Namespace) : "",
660
+ EventSequenceId: isSet(object.EventSequenceId) ? globalThis.String(object.EventSequenceId) : "",
661
+ EventSourceId: isSet(object.EventSourceId) ? globalThis.String(object.EventSourceId) : "",
662
+ Events: globalThis.Array.isArray(object?.Events) ? object.Events.map((e) => EventToAppend.fromJSON(e)) : [],
1242
663
  CorrelationId: isSet(object.CorrelationId) ? bcl.Guid.fromJSON(object.CorrelationId) : undefined,
1243
- SequenceNumbers: globalThis.Array.isArray(object?.SequenceNumbers)
1244
- ? object.SequenceNumbers.map((e) => BigInt(e))
1245
- : [],
1246
- IsSuccess: isSet(object.IsSuccess) ? globalThis.Boolean(object.IsSuccess) : false,
1247
- HasConstraintViolations: isSet(object.HasConstraintViolations)
1248
- ? globalThis.Boolean(object.HasConstraintViolations)
1249
- : false,
1250
- HasConcurrencyViolations: isSet(object.HasConcurrencyViolations)
1251
- ? globalThis.Boolean(object.HasConcurrencyViolations)
1252
- : false,
1253
- HasErrors: isSet(object.HasErrors) ? globalThis.Boolean(object.HasErrors) : false,
1254
- ConcurrencyCheckPerformed: isSet(object.ConcurrencyCheckPerformed)
1255
- ? globalThis.Boolean(object.ConcurrencyCheckPerformed)
1256
- : false,
1257
- ConstraintViolations: globalThis.Array.isArray(object?.ConstraintViolations)
1258
- ? object.ConstraintViolations.map((e) => ConstraintViolation.fromJSON(e))
1259
- : [],
1260
- Errors: globalThis.Array.isArray(object?.Errors) ? object.Errors.map((e) => globalThis.String(e)) : [],
1261
- ConcurrencyViolations: globalThis.Array.isArray(object?.ConcurrencyViolations)
1262
- ? object.ConcurrencyViolations.map((e) => ConcurrencyViolation.fromJSON(e))
1263
- : [],
1264
- Receipts: globalThis.Array.isArray(object?.Receipts)
1265
- ? object.Receipts.map((e) => AppendReceipt.fromJSON(e))
664
+ Tags: globalThis.Array.isArray(object?.Tags) ? object.Tags.map((e) => globalThis.String(e)) : [],
665
+ Causation: globalThis.Array.isArray(object?.Causation)
666
+ ? object.Causation.map((e) => Causation.fromJSON(e))
1266
667
  : [],
668
+ CausedBy: isSet(object.CausedBy) ? Identity.fromJSON(object.CausedBy) : undefined,
669
+ ConcurrencyScope: isSet(object.ConcurrencyScope) ? ConcurrencyScope.fromJSON(object.ConcurrencyScope) : undefined,
670
+ Occurred: isSet(object.Occurred) ? SerializableDateTimeOffset.fromJSON(object.Occurred) : undefined,
1267
671
  };
1268
672
  },
1269
673
  toJSON(message) {
1270
674
  const obj = {};
1271
- if (message.CorrelationId !== undefined) {
1272
- obj.CorrelationId = bcl.Guid.toJSON(message.CorrelationId);
675
+ if (message.EventStore !== "") {
676
+ obj.EventStore = message.EventStore;
1273
677
  }
1274
- if (message.SequenceNumbers?.length) {
1275
- obj.SequenceNumbers = message.SequenceNumbers.map((e) => e.toString());
678
+ if (message.Namespace !== "") {
679
+ obj.Namespace = message.Namespace;
1276
680
  }
1277
- if (message.IsSuccess !== false) {
1278
- obj.IsSuccess = message.IsSuccess;
681
+ if (message.EventSequenceId !== "") {
682
+ obj.EventSequenceId = message.EventSequenceId;
1279
683
  }
1280
- if (message.HasConstraintViolations !== false) {
1281
- obj.HasConstraintViolations = message.HasConstraintViolations;
684
+ if (message.EventSourceId !== "") {
685
+ obj.EventSourceId = message.EventSourceId;
1282
686
  }
1283
- if (message.HasConcurrencyViolations !== false) {
1284
- obj.HasConcurrencyViolations = message.HasConcurrencyViolations;
687
+ if (message.Events?.length) {
688
+ obj.Events = message.Events.map((e) => EventToAppend.toJSON(e));
1285
689
  }
1286
- if (message.HasErrors !== false) {
1287
- obj.HasErrors = message.HasErrors;
690
+ if (message.CorrelationId !== undefined) {
691
+ obj.CorrelationId = bcl.Guid.toJSON(message.CorrelationId);
1288
692
  }
1289
- if (message.ConcurrencyCheckPerformed !== false) {
1290
- obj.ConcurrencyCheckPerformed = message.ConcurrencyCheckPerformed;
693
+ if (message.Tags?.length) {
694
+ obj.Tags = message.Tags;
1291
695
  }
1292
- if (message.ConstraintViolations?.length) {
1293
- obj.ConstraintViolations = message.ConstraintViolations.map((e) => ConstraintViolation.toJSON(e));
696
+ if (message.Causation?.length) {
697
+ obj.Causation = message.Causation.map((e) => Causation.toJSON(e));
1294
698
  }
1295
- if (message.Errors?.length) {
1296
- obj.Errors = message.Errors;
699
+ if (message.CausedBy !== undefined) {
700
+ obj.CausedBy = Identity.toJSON(message.CausedBy);
1297
701
  }
1298
- if (message.ConcurrencyViolations?.length) {
1299
- obj.ConcurrencyViolations = message.ConcurrencyViolations.map((e) => ConcurrencyViolation.toJSON(e));
702
+ if (message.ConcurrencyScope !== undefined) {
703
+ obj.ConcurrencyScope = ConcurrencyScope.toJSON(message.ConcurrencyScope);
1300
704
  }
1301
- if (message.Receipts?.length) {
1302
- obj.Receipts = message.Receipts.map((e) => AppendReceipt.toJSON(e));
705
+ if (message.Occurred !== undefined) {
706
+ obj.Occurred = SerializableDateTimeOffset.toJSON(message.Occurred);
1303
707
  }
1304
708
  return obj;
1305
709
  },
1306
710
  create(base) {
1307
- return AppendManyResponse.fromPartial(base ?? {});
711
+ return AppendManyRequest.fromPartial(base ?? {});
1308
712
  },
1309
713
  fromPartial(object) {
1310
- const message = createBaseAppendManyResponse();
714
+ const message = createBaseAppendManyRequest();
715
+ message.EventStore = object.EventStore ?? "";
716
+ message.Namespace = object.Namespace ?? "";
717
+ message.EventSequenceId = object.EventSequenceId ?? "";
718
+ message.EventSourceId = object.EventSourceId ?? "";
719
+ message.Events = object.Events?.map((e) => EventToAppend.fromPartial(e)) || [];
1311
720
  message.CorrelationId = (object.CorrelationId !== undefined && object.CorrelationId !== null)
1312
721
  ? bcl.Guid.fromPartial(object.CorrelationId)
1313
722
  : undefined;
1314
- message.SequenceNumbers = object.SequenceNumbers?.map((e) => BigInt(e)) || [];
1315
- message.IsSuccess = object.IsSuccess ?? false;
1316
- message.HasConstraintViolations = object.HasConstraintViolations ?? false;
1317
- message.HasConcurrencyViolations = object.HasConcurrencyViolations ?? false;
1318
- message.HasErrors = object.HasErrors ?? false;
1319
- message.ConcurrencyCheckPerformed = object.ConcurrencyCheckPerformed ?? false;
1320
- message.ConstraintViolations = object.ConstraintViolations?.map((e) => ConstraintViolation.fromPartial(e)) || [];
1321
- message.Errors = object.Errors?.map((e) => e) || [];
1322
- message.ConcurrencyViolations = object.ConcurrencyViolations?.map((e) => ConcurrencyViolation.fromPartial(e)) || [];
1323
- message.Receipts = object.Receipts?.map((e) => AppendReceipt.fromPartial(e)) || [];
723
+ message.Tags = object.Tags?.map((e) => e) || [];
724
+ message.Causation = object.Causation?.map((e) => Causation.fromPartial(e)) || [];
725
+ message.CausedBy = (object.CausedBy !== undefined && object.CausedBy !== null)
726
+ ? Identity.fromPartial(object.CausedBy)
727
+ : undefined;
728
+ message.ConcurrencyScope = (object.ConcurrencyScope !== undefined && object.ConcurrencyScope !== null)
729
+ ? ConcurrencyScope.fromPartial(object.ConcurrencyScope)
730
+ : undefined;
731
+ message.Occurred = (object.Occurred !== undefined && object.Occurred !== null)
732
+ ? SerializableDateTimeOffset.fromPartial(object.Occurred)
733
+ : undefined;
1324
734
  return message;
1325
735
  },
1326
736
  };
1327
- function createBaseAppendReceipt() {
737
+ function createBaseAppendManyResponse() {
1328
738
  return {
1329
- EventStore: "",
1330
- Namespace: "",
1331
- SequenceNumber: 0n,
1332
- EventTypeId: "",
1333
- Generation: 0,
1334
- Tombstone: false,
1335
- EventSourceType: "",
1336
- EventSourceId: "",
1337
- EventStreamType: "",
1338
- EventStreamId: "",
1339
- Occurred: undefined,
1340
739
  CorrelationId: undefined,
1341
- Subject: "",
1342
- Tags: [],
1343
- Hash: "",
1344
- Causation: [],
1345
- CausedBy: undefined,
1346
- ObservationState: 0,
740
+ SequenceNumbers: [],
741
+ IsSuccess: false,
742
+ HasConstraintViolations: false,
743
+ HasConcurrencyViolations: false,
744
+ HasErrors: false,
745
+ ConcurrencyCheckPerformed: false,
746
+ ConstraintViolations: [],
747
+ Errors: [],
748
+ ConcurrencyViolations: [],
1347
749
  };
1348
750
  }
1349
- const AppendReceipt = {
751
+ const AppendManyResponse = {
1350
752
  encode(message, writer = new wire.BinaryWriter()) {
1351
- if (message.EventStore !== "") {
1352
- writer.uint32(10).string(message.EventStore);
1353
- }
1354
- if (message.Namespace !== "") {
1355
- writer.uint32(18).string(message.Namespace);
753
+ if (message.CorrelationId !== undefined) {
754
+ bcl.Guid.encode(message.CorrelationId, writer.uint32(10).fork()).join();
1356
755
  }
1357
- if (message.SequenceNumber !== 0n) {
1358
- if (BigInt.asUintN(64, message.SequenceNumber) !== message.SequenceNumber) {
1359
- throw new globalThis.Error("value provided for field message.SequenceNumber of type uint64 too large");
756
+ for (const v of message.SequenceNumbers) {
757
+ if (BigInt.asUintN(64, v) !== v) {
758
+ throw new globalThis.Error("value provided for field v! of type uint64 too large");
1360
759
  }
1361
- writer.uint32(24).uint64(message.SequenceNumber);
1362
- }
1363
- if (message.EventTypeId !== "") {
1364
- writer.uint32(34).string(message.EventTypeId);
1365
- }
1366
- if (message.Generation !== 0) {
1367
- writer.uint32(40).uint32(message.Generation);
1368
- }
1369
- if (message.Tombstone !== false) {
1370
- writer.uint32(48).bool(message.Tombstone);
1371
- }
1372
- if (message.EventSourceType !== "") {
1373
- writer.uint32(58).string(message.EventSourceType);
1374
- }
1375
- if (message.EventSourceId !== "") {
1376
- writer.uint32(66).string(message.EventSourceId);
1377
- }
1378
- if (message.EventStreamType !== "") {
1379
- writer.uint32(74).string(message.EventStreamType);
1380
- }
1381
- if (message.EventStreamId !== "") {
1382
- writer.uint32(82).string(message.EventStreamId);
760
+ writer.uint32(16).uint64(v);
1383
761
  }
1384
- if (message.Occurred !== undefined) {
1385
- SerializableDateTimeOffset.encode(message.Occurred, writer.uint32(90).fork()).join();
762
+ if (message.IsSuccess !== false) {
763
+ writer.uint32(24).bool(message.IsSuccess);
1386
764
  }
1387
- if (message.CorrelationId !== undefined) {
1388
- bcl.Guid.encode(message.CorrelationId, writer.uint32(98).fork()).join();
765
+ if (message.HasConstraintViolations !== false) {
766
+ writer.uint32(32).bool(message.HasConstraintViolations);
1389
767
  }
1390
- if (message.Subject !== "") {
1391
- writer.uint32(106).string(message.Subject);
768
+ if (message.HasConcurrencyViolations !== false) {
769
+ writer.uint32(40).bool(message.HasConcurrencyViolations);
1392
770
  }
1393
- for (const v of message.Tags) {
1394
- writer.uint32(114).string(v);
771
+ if (message.HasErrors !== false) {
772
+ writer.uint32(48).bool(message.HasErrors);
1395
773
  }
1396
- if (message.Hash !== "") {
1397
- writer.uint32(122).string(message.Hash);
774
+ if (message.ConcurrencyCheckPerformed !== false) {
775
+ writer.uint32(56).bool(message.ConcurrencyCheckPerformed);
1398
776
  }
1399
- for (const v of message.Causation) {
1400
- AppendCausation.encode(v, writer.uint32(130).fork()).join();
777
+ for (const v of message.ConstraintViolations) {
778
+ ConstraintViolation.encode(v, writer.uint32(66).fork()).join();
1401
779
  }
1402
- if (message.CausedBy !== undefined) {
1403
- AppendIdentity.encode(message.CausedBy, writer.uint32(138).fork()).join();
780
+ for (const v of message.Errors) {
781
+ writer.uint32(74).string(v);
1404
782
  }
1405
- if (message.ObservationState !== 0) {
1406
- writer.uint32(144).int32(message.ObservationState);
783
+ for (const v of message.ConcurrencyViolations) {
784
+ ConcurrencyViolation.encode(v, writer.uint32(82).fork()).join();
1407
785
  }
1408
786
  return writer;
1409
787
  },
@@ -1416,7 +794,7 @@ const AppendReceipt = {
1416
794
  reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
1417
795
  try {
1418
796
  const end = length === undefined ? reader.len : reader.pos + length;
1419
- const message = createBaseAppendReceipt();
797
+ const message = createBaseAppendManyResponse();
1420
798
  while (reader.pos < end) {
1421
799
  const tag = reader.uint32();
1422
800
  switch (tag >>> 3) {
@@ -1424,126 +802,77 @@ const AppendReceipt = {
1424
802
  if (tag !== 10) {
1425
803
  break;
1426
804
  }
1427
- message.EventStore = reader.string();
805
+ message.CorrelationId = bcl.Guid.decode(reader, reader.uint32());
1428
806
  continue;
1429
807
  }
1430
808
  case 2: {
1431
- if (tag !== 18) {
1432
- break;
809
+ if (tag === 16) {
810
+ message.SequenceNumbers.push(reader.uint64());
811
+ continue;
1433
812
  }
1434
- message.Namespace = reader.string();
1435
- continue;
813
+ if (tag === 18) {
814
+ const end2 = reader.uint32() + reader.pos;
815
+ while (reader.pos < end2) {
816
+ message.SequenceNumbers.push(reader.uint64());
817
+ }
818
+ continue;
819
+ }
820
+ break;
1436
821
  }
1437
822
  case 3: {
1438
823
  if (tag !== 24) {
1439
824
  break;
1440
825
  }
1441
- message.SequenceNumber = reader.uint64();
826
+ message.IsSuccess = reader.bool();
1442
827
  continue;
1443
828
  }
1444
829
  case 4: {
1445
- if (tag !== 34) {
830
+ if (tag !== 32) {
1446
831
  break;
1447
832
  }
1448
- message.EventTypeId = reader.string();
833
+ message.HasConstraintViolations = reader.bool();
1449
834
  continue;
1450
835
  }
1451
836
  case 5: {
1452
837
  if (tag !== 40) {
1453
838
  break;
1454
839
  }
1455
- message.Generation = reader.uint32();
840
+ message.HasConcurrencyViolations = reader.bool();
1456
841
  continue;
1457
842
  }
1458
843
  case 6: {
1459
844
  if (tag !== 48) {
1460
845
  break;
1461
846
  }
1462
- message.Tombstone = reader.bool();
847
+ message.HasErrors = reader.bool();
1463
848
  continue;
1464
849
  }
1465
850
  case 7: {
1466
- if (tag !== 58) {
851
+ if (tag !== 56) {
1467
852
  break;
1468
853
  }
1469
- message.EventSourceType = reader.string();
854
+ message.ConcurrencyCheckPerformed = reader.bool();
1470
855
  continue;
1471
856
  }
1472
857
  case 8: {
1473
858
  if (tag !== 66) {
1474
859
  break;
1475
860
  }
1476
- message.EventSourceId = reader.string();
861
+ message.ConstraintViolations.push(ConstraintViolation.decode(reader, reader.uint32()));
1477
862
  continue;
1478
863
  }
1479
864
  case 9: {
1480
865
  if (tag !== 74) {
1481
866
  break;
1482
867
  }
1483
- message.EventStreamType = reader.string();
868
+ message.Errors.push(reader.string());
1484
869
  continue;
1485
870
  }
1486
871
  case 10: {
1487
872
  if (tag !== 82) {
1488
873
  break;
1489
874
  }
1490
- message.EventStreamId = reader.string();
1491
- continue;
1492
- }
1493
- case 11: {
1494
- if (tag !== 90) {
1495
- break;
1496
- }
1497
- message.Occurred = SerializableDateTimeOffset.decode(reader, reader.uint32());
1498
- continue;
1499
- }
1500
- case 12: {
1501
- if (tag !== 98) {
1502
- break;
1503
- }
1504
- message.CorrelationId = bcl.Guid.decode(reader, reader.uint32());
1505
- continue;
1506
- }
1507
- case 13: {
1508
- if (tag !== 106) {
1509
- break;
1510
- }
1511
- message.Subject = reader.string();
1512
- continue;
1513
- }
1514
- case 14: {
1515
- if (tag !== 114) {
1516
- break;
1517
- }
1518
- message.Tags.push(reader.string());
1519
- continue;
1520
- }
1521
- case 15: {
1522
- if (tag !== 122) {
1523
- break;
1524
- }
1525
- message.Hash = reader.string();
1526
- continue;
1527
- }
1528
- case 16: {
1529
- if (tag !== 130) {
1530
- break;
1531
- }
1532
- message.Causation.push(AppendCausation.decode(reader, reader.uint32()));
1533
- continue;
1534
- }
1535
- case 17: {
1536
- if (tag !== 138) {
1537
- break;
1538
- }
1539
- message.CausedBy = AppendIdentity.decode(reader, reader.uint32());
1540
- continue;
1541
- }
1542
- case 18: {
1543
- if (tag !== 144) {
1544
- break;
1545
- }
1546
- message.ObservationState = reader.int32();
875
+ message.ConcurrencyViolations.push(ConcurrencyViolation.decode(reader, reader.uint32()));
1547
876
  continue;
1548
877
  }
1549
878
  }
@@ -1560,117 +889,81 @@ const AppendReceipt = {
1560
889
  },
1561
890
  fromJSON(object) {
1562
891
  return {
1563
- EventStore: isSet(object.EventStore) ? globalThis.String(object.EventStore) : "",
1564
- Namespace: isSet(object.Namespace) ? globalThis.String(object.Namespace) : "",
1565
- SequenceNumber: isSet(object.SequenceNumber) ? BigInt(object.SequenceNumber) : 0n,
1566
- EventTypeId: isSet(object.EventTypeId) ? globalThis.String(object.EventTypeId) : "",
1567
- Generation: isSet(object.Generation) ? globalThis.Number(object.Generation) : 0,
1568
- Tombstone: isSet(object.Tombstone) ? globalThis.Boolean(object.Tombstone) : false,
1569
- EventSourceType: isSet(object.EventSourceType) ? globalThis.String(object.EventSourceType) : "",
1570
- EventSourceId: isSet(object.EventSourceId) ? globalThis.String(object.EventSourceId) : "",
1571
- EventStreamType: isSet(object.EventStreamType) ? globalThis.String(object.EventStreamType) : "",
1572
- EventStreamId: isSet(object.EventStreamId) ? globalThis.String(object.EventStreamId) : "",
1573
- Occurred: isSet(object.Occurred) ? SerializableDateTimeOffset.fromJSON(object.Occurred) : undefined,
1574
892
  CorrelationId: isSet(object.CorrelationId) ? bcl.Guid.fromJSON(object.CorrelationId) : undefined,
1575
- Subject: isSet(object.Subject) ? globalThis.String(object.Subject) : "",
1576
- Tags: globalThis.Array.isArray(object?.Tags) ? object.Tags.map((e) => globalThis.String(e)) : [],
1577
- Hash: isSet(object.Hash) ? globalThis.String(object.Hash) : "",
1578
- Causation: globalThis.Array.isArray(object?.Causation)
1579
- ? object.Causation.map((e) => AppendCausation.fromJSON(e))
893
+ SequenceNumbers: globalThis.Array.isArray(object?.SequenceNumbers)
894
+ ? object.SequenceNumbers.map((e) => BigInt(e))
895
+ : [],
896
+ IsSuccess: isSet(object.IsSuccess) ? globalThis.Boolean(object.IsSuccess) : false,
897
+ HasConstraintViolations: isSet(object.HasConstraintViolations)
898
+ ? globalThis.Boolean(object.HasConstraintViolations)
899
+ : false,
900
+ HasConcurrencyViolations: isSet(object.HasConcurrencyViolations)
901
+ ? globalThis.Boolean(object.HasConcurrencyViolations)
902
+ : false,
903
+ HasErrors: isSet(object.HasErrors) ? globalThis.Boolean(object.HasErrors) : false,
904
+ ConcurrencyCheckPerformed: isSet(object.ConcurrencyCheckPerformed)
905
+ ? globalThis.Boolean(object.ConcurrencyCheckPerformed)
906
+ : false,
907
+ ConstraintViolations: globalThis.Array.isArray(object?.ConstraintViolations)
908
+ ? object.ConstraintViolations.map((e) => ConstraintViolation.fromJSON(e))
909
+ : [],
910
+ Errors: globalThis.Array.isArray(object?.Errors) ? object.Errors.map((e) => globalThis.String(e)) : [],
911
+ ConcurrencyViolations: globalThis.Array.isArray(object?.ConcurrencyViolations)
912
+ ? object.ConcurrencyViolations.map((e) => ConcurrencyViolation.fromJSON(e))
1580
913
  : [],
1581
- CausedBy: isSet(object.CausedBy) ? AppendIdentity.fromJSON(object.CausedBy) : undefined,
1582
- ObservationState: isSet(object.ObservationState) ? eventObservationStateFromJSON(object.ObservationState) : 0,
1583
914
  };
1584
915
  },
1585
916
  toJSON(message) {
1586
917
  const obj = {};
1587
- if (message.EventStore !== "") {
1588
- obj.EventStore = message.EventStore;
1589
- }
1590
- if (message.Namespace !== "") {
1591
- obj.Namespace = message.Namespace;
1592
- }
1593
- if (message.SequenceNumber !== 0n) {
1594
- obj.SequenceNumber = message.SequenceNumber.toString();
1595
- }
1596
- if (message.EventTypeId !== "") {
1597
- obj.EventTypeId = message.EventTypeId;
1598
- }
1599
- if (message.Generation !== 0) {
1600
- obj.Generation = Math.round(message.Generation);
1601
- }
1602
- if (message.Tombstone !== false) {
1603
- obj.Tombstone = message.Tombstone;
1604
- }
1605
- if (message.EventSourceType !== "") {
1606
- obj.EventSourceType = message.EventSourceType;
1607
- }
1608
- if (message.EventSourceId !== "") {
1609
- obj.EventSourceId = message.EventSourceId;
1610
- }
1611
- if (message.EventStreamType !== "") {
1612
- obj.EventStreamType = message.EventStreamType;
918
+ if (message.CorrelationId !== undefined) {
919
+ obj.CorrelationId = bcl.Guid.toJSON(message.CorrelationId);
1613
920
  }
1614
- if (message.EventStreamId !== "") {
1615
- obj.EventStreamId = message.EventStreamId;
921
+ if (message.SequenceNumbers?.length) {
922
+ obj.SequenceNumbers = message.SequenceNumbers.map((e) => e.toString());
1616
923
  }
1617
- if (message.Occurred !== undefined) {
1618
- obj.Occurred = SerializableDateTimeOffset.toJSON(message.Occurred);
924
+ if (message.IsSuccess !== false) {
925
+ obj.IsSuccess = message.IsSuccess;
1619
926
  }
1620
- if (message.CorrelationId !== undefined) {
1621
- obj.CorrelationId = bcl.Guid.toJSON(message.CorrelationId);
927
+ if (message.HasConstraintViolations !== false) {
928
+ obj.HasConstraintViolations = message.HasConstraintViolations;
1622
929
  }
1623
- if (message.Subject !== "") {
1624
- obj.Subject = message.Subject;
930
+ if (message.HasConcurrencyViolations !== false) {
931
+ obj.HasConcurrencyViolations = message.HasConcurrencyViolations;
1625
932
  }
1626
- if (message.Tags?.length) {
1627
- obj.Tags = message.Tags;
933
+ if (message.HasErrors !== false) {
934
+ obj.HasErrors = message.HasErrors;
1628
935
  }
1629
- if (message.Hash !== "") {
1630
- obj.Hash = message.Hash;
936
+ if (message.ConcurrencyCheckPerformed !== false) {
937
+ obj.ConcurrencyCheckPerformed = message.ConcurrencyCheckPerformed;
1631
938
  }
1632
- if (message.Causation?.length) {
1633
- obj.Causation = message.Causation.map((e) => AppendCausation.toJSON(e));
939
+ if (message.ConstraintViolations?.length) {
940
+ obj.ConstraintViolations = message.ConstraintViolations.map((e) => ConstraintViolation.toJSON(e));
1634
941
  }
1635
- if (message.CausedBy !== undefined) {
1636
- obj.CausedBy = AppendIdentity.toJSON(message.CausedBy);
942
+ if (message.Errors?.length) {
943
+ obj.Errors = message.Errors;
1637
944
  }
1638
- if (message.ObservationState !== 0) {
1639
- obj.ObservationState = eventObservationStateToJSON(message.ObservationState);
945
+ if (message.ConcurrencyViolations?.length) {
946
+ obj.ConcurrencyViolations = message.ConcurrencyViolations.map((e) => ConcurrencyViolation.toJSON(e));
1640
947
  }
1641
948
  return obj;
1642
949
  },
1643
950
  create(base) {
1644
- return AppendReceipt.fromPartial(base ?? {});
951
+ return AppendManyResponse.fromPartial(base ?? {});
1645
952
  },
1646
953
  fromPartial(object) {
1647
- const message = createBaseAppendReceipt();
1648
- message.EventStore = object.EventStore ?? "";
1649
- message.Namespace = object.Namespace ?? "";
1650
- message.SequenceNumber = (object.SequenceNumber !== undefined && object.SequenceNumber !== null)
1651
- ? BigInt(object.SequenceNumber)
1652
- : 0n;
1653
- message.EventTypeId = object.EventTypeId ?? "";
1654
- message.Generation = object.Generation ?? 0;
1655
- message.Tombstone = object.Tombstone ?? false;
1656
- message.EventSourceType = object.EventSourceType ?? "";
1657
- message.EventSourceId = object.EventSourceId ?? "";
1658
- message.EventStreamType = object.EventStreamType ?? "";
1659
- message.EventStreamId = object.EventStreamId ?? "";
1660
- message.Occurred = (object.Occurred !== undefined && object.Occurred !== null)
1661
- ? SerializableDateTimeOffset.fromPartial(object.Occurred)
1662
- : undefined;
954
+ const message = createBaseAppendManyResponse();
1663
955
  message.CorrelationId = (object.CorrelationId !== undefined && object.CorrelationId !== null)
1664
956
  ? bcl.Guid.fromPartial(object.CorrelationId)
1665
957
  : undefined;
1666
- message.Subject = object.Subject ?? "";
1667
- message.Tags = object.Tags?.map((e) => e) || [];
1668
- message.Hash = object.Hash ?? "";
1669
- message.Causation = object.Causation?.map((e) => AppendCausation.fromPartial(e)) || [];
1670
- message.CausedBy = (object.CausedBy !== undefined && object.CausedBy !== null)
1671
- ? AppendIdentity.fromPartial(object.CausedBy)
1672
- : undefined;
1673
- message.ObservationState = object.ObservationState ?? 0;
958
+ message.SequenceNumbers = object.SequenceNumbers?.map((e) => BigInt(e)) || [];
959
+ message.IsSuccess = object.IsSuccess ?? false;
960
+ message.HasConstraintViolations = object.HasConstraintViolations ?? false;
961
+ message.HasConcurrencyViolations = object.HasConcurrencyViolations ?? false;
962
+ message.HasErrors = object.HasErrors ?? false;
963
+ message.ConcurrencyCheckPerformed = object.ConcurrencyCheckPerformed ?? false;
964
+ message.ConstraintViolations = object.ConstraintViolations?.map((e) => ConstraintViolation.fromPartial(e)) || [];
965
+ message.Errors = object.Errors?.map((e) => e) || [];
966
+ message.ConcurrencyViolations = object.ConcurrencyViolations?.map((e) => ConcurrencyViolation.fromPartial(e)) || [];
1674
967
  return message;
1675
968
  },
1676
969
  };
@@ -1692,7 +985,6 @@ function createBaseAppendRequest() {
1692
985
  Causation: [],
1693
986
  CausedBy: undefined,
1694
987
  ConcurrencyScope: undefined,
1695
- IncludeReceipt: false,
1696
988
  };
1697
989
  }
1698
990
  const AppendRequest = {
@@ -1745,9 +1037,6 @@ const AppendRequest = {
1745
1037
  if (message.ConcurrencyScope !== undefined) {
1746
1038
  ConcurrencyScope.encode(message.ConcurrencyScope, writer.uint32(130).fork()).join();
1747
1039
  }
1748
- if (message.IncludeReceipt !== false) {
1749
- writer.uint32(136).bool(message.IncludeReceipt);
1750
- }
1751
1040
  return writer;
1752
1041
  },
1753
1042
  decode(input, length) {
@@ -1875,13 +1164,6 @@ const AppendRequest = {
1875
1164
  message.ConcurrencyScope = ConcurrencyScope.decode(reader, reader.uint32());
1876
1165
  continue;
1877
1166
  }
1878
- case 17: {
1879
- if (tag !== 136) {
1880
- break;
1881
- }
1882
- message.IncludeReceipt = reader.bool();
1883
- continue;
1884
- }
1885
1167
  }
1886
1168
  if ((tag & 7) === 4 || tag === 0) {
1887
1169
  break;
@@ -1914,7 +1196,6 @@ const AppendRequest = {
1914
1196
  : [],
1915
1197
  CausedBy: isSet(object.CausedBy) ? Identity.fromJSON(object.CausedBy) : undefined,
1916
1198
  ConcurrencyScope: isSet(object.ConcurrencyScope) ? ConcurrencyScope.fromJSON(object.ConcurrencyScope) : undefined,
1917
- IncludeReceipt: isSet(object.IncludeReceipt) ? globalThis.Boolean(object.IncludeReceipt) : false,
1918
1199
  };
1919
1200
  },
1920
1201
  toJSON(message) {
@@ -1967,9 +1248,6 @@ const AppendRequest = {
1967
1248
  if (message.ConcurrencyScope !== undefined) {
1968
1249
  obj.ConcurrencyScope = ConcurrencyScope.toJSON(message.ConcurrencyScope);
1969
1250
  }
1970
- if (message.IncludeReceipt !== false) {
1971
- obj.IncludeReceipt = message.IncludeReceipt;
1972
- }
1973
1251
  return obj;
1974
1252
  },
1975
1253
  create(base) {
@@ -2003,7 +1281,6 @@ const AppendRequest = {
2003
1281
  message.ConcurrencyScope = (object.ConcurrencyScope !== undefined && object.ConcurrencyScope !== null)
2004
1282
  ? ConcurrencyScope.fromPartial(object.ConcurrencyScope)
2005
1283
  : undefined;
2006
- message.IncludeReceipt = object.IncludeReceipt ?? false;
2007
1284
  return message;
2008
1285
  },
2009
1286
  };
@@ -2019,7 +1296,6 @@ function createBaseAppendResponse() {
2019
1296
  ConstraintViolations: [],
2020
1297
  Errors: [],
2021
1298
  ConcurrencyViolation: undefined,
2022
- Receipt: undefined,
2023
1299
  };
2024
1300
  }
2025
1301
  const AppendResponse = {
@@ -2057,9 +1333,6 @@ const AppendResponse = {
2057
1333
  if (message.ConcurrencyViolation !== undefined) {
2058
1334
  ConcurrencyViolation.encode(message.ConcurrencyViolation, writer.uint32(82).fork()).join();
2059
1335
  }
2060
- if (message.Receipt !== undefined) {
2061
- AppendReceipt.encode(message.Receipt, writer.uint32(90).fork()).join();
2062
- }
2063
1336
  return writer;
2064
1337
  },
2065
1338
  decode(input, length) {
@@ -2145,13 +1418,6 @@ const AppendResponse = {
2145
1418
  message.ConcurrencyViolation = ConcurrencyViolation.decode(reader, reader.uint32());
2146
1419
  continue;
2147
1420
  }
2148
- case 11: {
2149
- if (tag !== 90) {
2150
- break;
2151
- }
2152
- message.Receipt = AppendReceipt.decode(reader, reader.uint32());
2153
- continue;
2154
- }
2155
1421
  }
2156
1422
  if ((tag & 7) === 4 || tag === 0) {
2157
1423
  break;
@@ -2188,7 +1454,6 @@ const AppendResponse = {
2188
1454
  ConcurrencyViolation: isSet(object.ConcurrencyViolation)
2189
1455
  ? ConcurrencyViolation.fromJSON(object.ConcurrencyViolation)
2190
1456
  : undefined,
2191
- Receipt: isSet(object.Receipt) ? AppendReceipt.fromJSON(object.Receipt) : undefined,
2192
1457
  };
2193
1458
  },
2194
1459
  toJSON(message) {
@@ -2223,9 +1488,6 @@ const AppendResponse = {
2223
1488
  if (message.ConcurrencyViolation !== undefined) {
2224
1489
  obj.ConcurrencyViolation = ConcurrencyViolation.toJSON(message.ConcurrencyViolation);
2225
1490
  }
2226
- if (message.Receipt !== undefined) {
2227
- obj.Receipt = AppendReceipt.toJSON(message.Receipt);
2228
- }
2229
1491
  return obj;
2230
1492
  },
2231
1493
  create(base) {
@@ -2249,9 +1511,6 @@ const AppendResponse = {
2249
1511
  message.ConcurrencyViolation = (object.ConcurrencyViolation !== undefined && object.ConcurrencyViolation !== null)
2250
1512
  ? ConcurrencyViolation.fromPartial(object.ConcurrencyViolation)
2251
1513
  : undefined;
2252
- message.Receipt = (object.Receipt !== undefined && object.Receipt !== null)
2253
- ? AppendReceipt.fromPartial(object.Receipt)
2254
- : undefined;
2255
1514
  return message;
2256
1515
  },
2257
1516
  };
@@ -9199,13 +8458,9 @@ function isSet(value) {
9199
8458
  }
9200
8459
 
9201
8460
  exports.AllEventSequencesRequest = AllEventSequencesRequest;
9202
- exports.AppendCausation = AppendCausation;
9203
- exports.AppendCausation_PropertiesEntry = AppendCausation_PropertiesEntry;
9204
- exports.AppendIdentity = AppendIdentity;
9205
8461
  exports.AppendManyForEventSourcesRequest = AppendManyForEventSourcesRequest;
9206
8462
  exports.AppendManyRequest = AppendManyRequest;
9207
8463
  exports.AppendManyResponse = AppendManyResponse;
9208
- exports.AppendReceipt = AppendReceipt;
9209
8464
  exports.AppendRequest = AppendRequest;
9210
8465
  exports.AppendResponse = AppendResponse;
9211
8466
  exports.AppendedEventResponse = AppendedEventResponse;