@cratis/chronicle.contracts 18.4.0 → 18.5.0

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