@cratis/chronicle.contracts 17.1.1 → 18.0.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 +4 -35
  6. package/dist/cjs/generated/sequences.d.ts.map +1 -1
  7. package/dist/cjs/generated/sequences.js +36 -504
  8. package/dist/cjs/generated/sequences.js.map +1 -1
  9. package/dist/cjs/index.js +0 -5
  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 +4 -35
  16. package/dist/esm/generated/sequences.d.ts.map +1 -1
  17. package/dist/esm/generated/sequences.js +37 -500
  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 +4 -35
  27. package/dist/generated/sequences.d.ts.map +1 -1
  28. package/dist/generated/sequences.js +36 -499
  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 +40 -583
  34. package/package.json +1 -1
@@ -290,7 +290,7 @@ export interface AppendRequest {
290
290
  EventStreamType: string;
291
291
  EventStreamId: string;
292
292
  EventType: EventType | undefined;
293
- Content: { [key: string]: JsonNode };
293
+ Content: string;
294
294
  CorrelationId: Guid | undefined;
295
295
  Tags: string[];
296
296
  Occurred: SerializableDateTimeOffset | undefined;
@@ -300,11 +300,6 @@ export interface AppendRequest {
300
300
  ConcurrencyScope: ConcurrencyScope | undefined;
301
301
  }
302
302
 
303
- export interface AppendRequest_ContentEntry {
304
- key: string;
305
- value: JsonNode | undefined;
306
- }
307
-
308
303
  export interface AppendResponse {
309
304
  /** default value could not be applied: 00000000-0000-0000-0000-000000000000 */
310
305
  CorrelationId: Guid | undefined;
@@ -475,17 +470,12 @@ export interface EventForEventSourceId {
475
470
  EventStreamType: string;
476
471
  EventStreamId: string;
477
472
  EventType: EventType | undefined;
478
- Content: { [key: string]: JsonNode };
473
+ Content: string;
479
474
  Tags: string[];
480
475
  Occurred: SerializableDateTimeOffset | undefined;
481
476
  Subject: string;
482
477
  }
483
478
 
484
- export interface EventForEventSourceId_ContentEntry {
485
- key: string;
486
- value: JsonNode | undefined;
487
- }
488
-
489
479
  export interface EventRevision {
490
480
  Generation: number;
491
481
  CorrelationId: string;
@@ -514,15 +504,10 @@ export interface EventSourceEventsResponse {
514
504
 
515
505
  export interface EventToAppend {
516
506
  EventType: EventType | undefined;
517
- Content: { [key: string]: JsonNode };
507
+ Content: string;
518
508
  Subject: string;
519
509
  }
520
510
 
521
- export interface EventToAppend_ContentEntry {
522
- key: string;
523
- value: JsonNode | undefined;
524
- }
525
-
526
511
  export interface EventType {
527
512
  Id: string;
528
513
  Generation: number;
@@ -588,9 +573,6 @@ export interface Identity {
588
573
  OnBehalfOf: Identity | undefined;
589
574
  }
590
575
 
591
- export interface JsonNode {
592
- }
593
-
594
576
  export interface KeyValuePairInt32String {
595
577
  Key: number;
596
578
  Value: string;
@@ -745,16 +727,11 @@ export interface ReviseRequest {
745
727
  EventSequenceId: string;
746
728
  SequenceNumber: bigint;
747
729
  EventType: EventType | undefined;
748
- Content: { [key: string]: JsonNode };
730
+ Content: string;
749
731
  Causation: Causation[];
750
732
  CausedBy: Identity | undefined;
751
733
  }
752
734
 
753
- export interface ReviseRequest_ContentEntry {
754
- key: string;
755
- value: JsonNode | undefined;
756
- }
757
-
758
735
  export interface SequenceHistogramBucketResponse {
759
736
  From: SerializableDateTimeOffset | undefined;
760
737
  To: SerializableDateTimeOffset | undefined;
@@ -1613,7 +1590,7 @@ function createBaseAppendRequest(): AppendRequest {
1613
1590
  EventStreamType: "",
1614
1591
  EventStreamId: "",
1615
1592
  EventType: undefined,
1616
- Content: {},
1593
+ Content: "",
1617
1594
  CorrelationId: undefined,
1618
1595
  Tags: [],
1619
1596
  Occurred: undefined,
@@ -1650,9 +1627,9 @@ export const AppendRequest: MessageFns<AppendRequest> = {
1650
1627
  if (message.EventType !== undefined) {
1651
1628
  EventType.encode(message.EventType, writer.uint32(66).fork()).join();
1652
1629
  }
1653
- globalThis.Object.entries(message.Content).forEach(([key, value]: [string, JsonNode]) => {
1654
- AppendRequest_ContentEntry.encode({ key: key as any, value }, writer.uint32(74).fork()).join();
1655
- });
1630
+ if (message.Content !== "") {
1631
+ writer.uint32(74).string(message.Content);
1632
+ }
1656
1633
  if (message.CorrelationId !== undefined) {
1657
1634
  Guid.encode(message.CorrelationId, writer.uint32(82).fork()).join();
1658
1635
  }
@@ -1759,10 +1736,7 @@ export const AppendRequest: MessageFns<AppendRequest> = {
1759
1736
  break;
1760
1737
  }
1761
1738
 
1762
- const entry9 = AppendRequest_ContentEntry.decode(reader, reader.uint32());
1763
- if (entry9.value !== undefined) {
1764
- message.Content[entry9.key] = entry9.value;
1765
- }
1739
+ message.Content = reader.string();
1766
1740
  continue;
1767
1741
  }
1768
1742
  case 10: {
@@ -1843,20 +1817,7 @@ export const AppendRequest: MessageFns<AppendRequest> = {
1843
1817
  EventStreamType: isSet(object.EventStreamType) ? globalThis.String(object.EventStreamType) : "",
1844
1818
  EventStreamId: isSet(object.EventStreamId) ? globalThis.String(object.EventStreamId) : "",
1845
1819
  EventType: isSet(object.EventType) ? EventType.fromJSON(object.EventType) : undefined,
1846
- Content: isObject(object.Content)
1847
- ? (globalThis.Object.entries(object.Content) as [string, any][]).reduce(
1848
- (acc: { [key: string]: JsonNode }, [key, value]: [string, any]) => {
1849
- globalThis.Object.defineProperty(acc, key, {
1850
- value: JsonNode.fromJSON(value),
1851
- enumerable: true,
1852
- configurable: true,
1853
- writable: true,
1854
- });
1855
- return acc;
1856
- },
1857
- {},
1858
- )
1859
- : {},
1820
+ Content: isSet(object.Content) ? globalThis.String(object.Content) : "",
1860
1821
  CorrelationId: isSet(object.CorrelationId) ? Guid.fromJSON(object.CorrelationId) : undefined,
1861
1822
  Tags: globalThis.Array.isArray(object?.Tags) ? object.Tags.map((e: any) => globalThis.String(e)) : [],
1862
1823
  Occurred: isSet(object.Occurred) ? SerializableDateTimeOffset.fromJSON(object.Occurred) : undefined,
@@ -1895,14 +1856,8 @@ export const AppendRequest: MessageFns<AppendRequest> = {
1895
1856
  if (message.EventType !== undefined) {
1896
1857
  obj.EventType = EventType.toJSON(message.EventType);
1897
1858
  }
1898
- if (message.Content) {
1899
- const entries = globalThis.Object.entries(message.Content) as [string, JsonNode][];
1900
- if (entries.length > 0) {
1901
- obj.Content = {};
1902
- entries.forEach(([k, v]) => {
1903
- obj.Content[k] = JsonNode.toJSON(v);
1904
- });
1905
- }
1859
+ if (message.Content !== "") {
1860
+ obj.Content = message.Content;
1906
1861
  }
1907
1862
  if (message.CorrelationId !== undefined) {
1908
1863
  obj.CorrelationId = Guid.toJSON(message.CorrelationId);
@@ -1943,15 +1898,7 @@ export const AppendRequest: MessageFns<AppendRequest> = {
1943
1898
  message.EventType = (object.EventType !== undefined && object.EventType !== null)
1944
1899
  ? EventType.fromPartial(object.EventType)
1945
1900
  : undefined;
1946
- message.Content = (globalThis.Object.entries(object.Content ?? {}) as [string, JsonNode][]).reduce(
1947
- (acc: { [key: string]: JsonNode }, [key, value]: [string, JsonNode]) => {
1948
- if (value !== undefined) {
1949
- acc[key] = JsonNode.fromPartial(value);
1950
- }
1951
- return acc;
1952
- },
1953
- {},
1954
- );
1901
+ message.Content = object.Content ?? "";
1955
1902
  message.CorrelationId = (object.CorrelationId !== undefined && object.CorrelationId !== null)
1956
1903
  ? Guid.fromPartial(object.CorrelationId)
1957
1904
  : undefined;
@@ -1971,93 +1918,6 @@ export const AppendRequest: MessageFns<AppendRequest> = {
1971
1918
  },
1972
1919
  };
1973
1920
 
1974
- function createBaseAppendRequest_ContentEntry(): AppendRequest_ContentEntry {
1975
- return { key: "", value: undefined };
1976
- }
1977
-
1978
- export const AppendRequest_ContentEntry: MessageFns<AppendRequest_ContentEntry> = {
1979
- encode(message: AppendRequest_ContentEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
1980
- if (message.key !== "") {
1981
- writer.uint32(10).string(message.key);
1982
- }
1983
- if (message.value !== undefined) {
1984
- JsonNode.encode(message.value, writer.uint32(18).fork()).join();
1985
- }
1986
- return writer;
1987
- },
1988
-
1989
- decode(input: BinaryReader | Uint8Array, length?: number): AppendRequest_ContentEntry {
1990
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1991
- const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
1992
- if (previousRecursionDepth >= 100) {
1993
- throw new globalThis.Error("protobuf decode recursion limit exceeded");
1994
- }
1995
- (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
1996
- try {
1997
- const end = length === undefined ? reader.len : reader.pos + length;
1998
- const message = createBaseAppendRequest_ContentEntry();
1999
- while (reader.pos < end) {
2000
- const tag = reader.uint32();
2001
- switch (tag >>> 3) {
2002
- case 1: {
2003
- if (tag !== 10) {
2004
- break;
2005
- }
2006
-
2007
- message.key = reader.string();
2008
- continue;
2009
- }
2010
- case 2: {
2011
- if (tag !== 18) {
2012
- break;
2013
- }
2014
-
2015
- message.value = JsonNode.decode(reader, reader.uint32());
2016
- continue;
2017
- }
2018
- }
2019
- if ((tag & 7) === 4 || tag === 0) {
2020
- break;
2021
- }
2022
- reader.skip(tag & 7);
2023
- }
2024
- return message;
2025
- } finally {
2026
- (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
2027
- }
2028
- },
2029
-
2030
- fromJSON(object: any): AppendRequest_ContentEntry {
2031
- return {
2032
- key: isSet(object.key) ? globalThis.String(object.key) : "",
2033
- value: isSet(object.value) ? JsonNode.fromJSON(object.value) : undefined,
2034
- };
2035
- },
2036
-
2037
- toJSON(message: AppendRequest_ContentEntry): unknown {
2038
- const obj: any = {};
2039
- if (message.key !== "") {
2040
- obj.key = message.key;
2041
- }
2042
- if (message.value !== undefined) {
2043
- obj.value = JsonNode.toJSON(message.value);
2044
- }
2045
- return obj;
2046
- },
2047
-
2048
- create(base?: DeepPartial<AppendRequest_ContentEntry>): AppendRequest_ContentEntry {
2049
- return AppendRequest_ContentEntry.fromPartial(base ?? {});
2050
- },
2051
- fromPartial(object: DeepPartial<AppendRequest_ContentEntry>): AppendRequest_ContentEntry {
2052
- const message = createBaseAppendRequest_ContentEntry();
2053
- message.key = object.key ?? "";
2054
- message.value = (object.value !== undefined && object.value !== null)
2055
- ? JsonNode.fromPartial(object.value)
2056
- : undefined;
2057
- return message;
2058
- },
2059
- };
2060
-
2061
1921
  function createBaseAppendResponse(): AppendResponse {
2062
1922
  return {
2063
1923
  CorrelationId: undefined,
@@ -4692,7 +4552,7 @@ function createBaseEventForEventSourceId(): EventForEventSourceId {
4692
4552
  EventStreamType: "",
4693
4553
  EventStreamId: "",
4694
4554
  EventType: undefined,
4695
- Content: {},
4555
+ Content: "",
4696
4556
  Tags: [],
4697
4557
  Occurred: undefined,
4698
4558
  Subject: "",
@@ -4716,9 +4576,9 @@ export const EventForEventSourceId: MessageFns<EventForEventSourceId> = {
4716
4576
  if (message.EventType !== undefined) {
4717
4577
  EventType.encode(message.EventType, writer.uint32(42).fork()).join();
4718
4578
  }
4719
- globalThis.Object.entries(message.Content).forEach(([key, value]: [string, JsonNode]) => {
4720
- EventForEventSourceId_ContentEntry.encode({ key: key as any, value }, writer.uint32(50).fork()).join();
4721
- });
4579
+ if (message.Content !== "") {
4580
+ writer.uint32(50).string(message.Content);
4581
+ }
4722
4582
  for (const v of message.Tags) {
4723
4583
  writer.uint32(58).string(v!);
4724
4584
  }
@@ -4789,10 +4649,7 @@ export const EventForEventSourceId: MessageFns<EventForEventSourceId> = {
4789
4649
  break;
4790
4650
  }
4791
4651
 
4792
- const entry6 = EventForEventSourceId_ContentEntry.decode(reader, reader.uint32());
4793
- if (entry6.value !== undefined) {
4794
- message.Content[entry6.key] = entry6.value;
4795
- }
4652
+ message.Content = reader.string();
4796
4653
  continue;
4797
4654
  }
4798
4655
  case 7: {
@@ -4838,20 +4695,7 @@ export const EventForEventSourceId: MessageFns<EventForEventSourceId> = {
4838
4695
  EventStreamType: isSet(object.EventStreamType) ? globalThis.String(object.EventStreamType) : "",
4839
4696
  EventStreamId: isSet(object.EventStreamId) ? globalThis.String(object.EventStreamId) : "",
4840
4697
  EventType: isSet(object.EventType) ? EventType.fromJSON(object.EventType) : undefined,
4841
- Content: isObject(object.Content)
4842
- ? (globalThis.Object.entries(object.Content) as [string, any][]).reduce(
4843
- (acc: { [key: string]: JsonNode }, [key, value]: [string, any]) => {
4844
- globalThis.Object.defineProperty(acc, key, {
4845
- value: JsonNode.fromJSON(value),
4846
- enumerable: true,
4847
- configurable: true,
4848
- writable: true,
4849
- });
4850
- return acc;
4851
- },
4852
- {},
4853
- )
4854
- : {},
4698
+ Content: isSet(object.Content) ? globalThis.String(object.Content) : "",
4855
4699
  Tags: globalThis.Array.isArray(object?.Tags) ? object.Tags.map((e: any) => globalThis.String(e)) : [],
4856
4700
  Occurred: isSet(object.Occurred) ? SerializableDateTimeOffset.fromJSON(object.Occurred) : undefined,
4857
4701
  Subject: isSet(object.Subject) ? globalThis.String(object.Subject) : "",
@@ -4875,14 +4719,8 @@ export const EventForEventSourceId: MessageFns<EventForEventSourceId> = {
4875
4719
  if (message.EventType !== undefined) {
4876
4720
  obj.EventType = EventType.toJSON(message.EventType);
4877
4721
  }
4878
- if (message.Content) {
4879
- const entries = globalThis.Object.entries(message.Content) as [string, JsonNode][];
4880
- if (entries.length > 0) {
4881
- obj.Content = {};
4882
- entries.forEach(([k, v]) => {
4883
- obj.Content[k] = JsonNode.toJSON(v);
4884
- });
4885
- }
4722
+ if (message.Content !== "") {
4723
+ obj.Content = message.Content;
4886
4724
  }
4887
4725
  if (message.Tags?.length) {
4888
4726
  obj.Tags = message.Tags;
@@ -4908,15 +4746,7 @@ export const EventForEventSourceId: MessageFns<EventForEventSourceId> = {
4908
4746
  message.EventType = (object.EventType !== undefined && object.EventType !== null)
4909
4747
  ? EventType.fromPartial(object.EventType)
4910
4748
  : undefined;
4911
- message.Content = (globalThis.Object.entries(object.Content ?? {}) as [string, JsonNode][]).reduce(
4912
- (acc: { [key: string]: JsonNode }, [key, value]: [string, JsonNode]) => {
4913
- if (value !== undefined) {
4914
- acc[key] = JsonNode.fromPartial(value);
4915
- }
4916
- return acc;
4917
- },
4918
- {},
4919
- );
4749
+ message.Content = object.Content ?? "";
4920
4750
  message.Tags = object.Tags?.map((e) => e) || [];
4921
4751
  message.Occurred = (object.Occurred !== undefined && object.Occurred !== null)
4922
4752
  ? SerializableDateTimeOffset.fromPartial(object.Occurred)
@@ -4926,93 +4756,6 @@ export const EventForEventSourceId: MessageFns<EventForEventSourceId> = {
4926
4756
  },
4927
4757
  };
4928
4758
 
4929
- function createBaseEventForEventSourceId_ContentEntry(): EventForEventSourceId_ContentEntry {
4930
- return { key: "", value: undefined };
4931
- }
4932
-
4933
- export const EventForEventSourceId_ContentEntry: MessageFns<EventForEventSourceId_ContentEntry> = {
4934
- encode(message: EventForEventSourceId_ContentEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
4935
- if (message.key !== "") {
4936
- writer.uint32(10).string(message.key);
4937
- }
4938
- if (message.value !== undefined) {
4939
- JsonNode.encode(message.value, writer.uint32(18).fork()).join();
4940
- }
4941
- return writer;
4942
- },
4943
-
4944
- decode(input: BinaryReader | Uint8Array, length?: number): EventForEventSourceId_ContentEntry {
4945
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
4946
- const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
4947
- if (previousRecursionDepth >= 100) {
4948
- throw new globalThis.Error("protobuf decode recursion limit exceeded");
4949
- }
4950
- (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
4951
- try {
4952
- const end = length === undefined ? reader.len : reader.pos + length;
4953
- const message = createBaseEventForEventSourceId_ContentEntry();
4954
- while (reader.pos < end) {
4955
- const tag = reader.uint32();
4956
- switch (tag >>> 3) {
4957
- case 1: {
4958
- if (tag !== 10) {
4959
- break;
4960
- }
4961
-
4962
- message.key = reader.string();
4963
- continue;
4964
- }
4965
- case 2: {
4966
- if (tag !== 18) {
4967
- break;
4968
- }
4969
-
4970
- message.value = JsonNode.decode(reader, reader.uint32());
4971
- continue;
4972
- }
4973
- }
4974
- if ((tag & 7) === 4 || tag === 0) {
4975
- break;
4976
- }
4977
- reader.skip(tag & 7);
4978
- }
4979
- return message;
4980
- } finally {
4981
- (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
4982
- }
4983
- },
4984
-
4985
- fromJSON(object: any): EventForEventSourceId_ContentEntry {
4986
- return {
4987
- key: isSet(object.key) ? globalThis.String(object.key) : "",
4988
- value: isSet(object.value) ? JsonNode.fromJSON(object.value) : undefined,
4989
- };
4990
- },
4991
-
4992
- toJSON(message: EventForEventSourceId_ContentEntry): unknown {
4993
- const obj: any = {};
4994
- if (message.key !== "") {
4995
- obj.key = message.key;
4996
- }
4997
- if (message.value !== undefined) {
4998
- obj.value = JsonNode.toJSON(message.value);
4999
- }
5000
- return obj;
5001
- },
5002
-
5003
- create(base?: DeepPartial<EventForEventSourceId_ContentEntry>): EventForEventSourceId_ContentEntry {
5004
- return EventForEventSourceId_ContentEntry.fromPartial(base ?? {});
5005
- },
5006
- fromPartial(object: DeepPartial<EventForEventSourceId_ContentEntry>): EventForEventSourceId_ContentEntry {
5007
- const message = createBaseEventForEventSourceId_ContentEntry();
5008
- message.key = object.key ?? "";
5009
- message.value = (object.value !== undefined && object.value !== null)
5010
- ? JsonNode.fromPartial(object.value)
5011
- : undefined;
5012
- return message;
5013
- },
5014
- };
5015
-
5016
4759
  function createBaseEventRevision(): EventRevision {
5017
4760
  return { Generation: 0, CorrelationId: "", CausedBy: undefined, Occurred: undefined, Content: "" };
5018
4761
  }
@@ -5462,7 +5205,7 @@ export const EventSourceEventsResponse: MessageFns<EventSourceEventsResponse> =
5462
5205
  };
5463
5206
 
5464
5207
  function createBaseEventToAppend(): EventToAppend {
5465
- return { EventType: undefined, Content: {}, Subject: "" };
5208
+ return { EventType: undefined, Content: "", Subject: "" };
5466
5209
  }
5467
5210
 
5468
5211
  export const EventToAppend: MessageFns<EventToAppend> = {
@@ -5470,9 +5213,9 @@ export const EventToAppend: MessageFns<EventToAppend> = {
5470
5213
  if (message.EventType !== undefined) {
5471
5214
  EventType.encode(message.EventType, writer.uint32(10).fork()).join();
5472
5215
  }
5473
- globalThis.Object.entries(message.Content).forEach(([key, value]: [string, JsonNode]) => {
5474
- EventToAppend_ContentEntry.encode({ key: key as any, value }, writer.uint32(18).fork()).join();
5475
- });
5216
+ if (message.Content !== "") {
5217
+ writer.uint32(18).string(message.Content);
5218
+ }
5476
5219
  if (message.Subject !== "") {
5477
5220
  writer.uint32(26).string(message.Subject);
5478
5221
  }
@@ -5505,10 +5248,7 @@ export const EventToAppend: MessageFns<EventToAppend> = {
5505
5248
  break;
5506
5249
  }
5507
5250
 
5508
- const entry2 = EventToAppend_ContentEntry.decode(reader, reader.uint32());
5509
- if (entry2.value !== undefined) {
5510
- message.Content[entry2.key] = entry2.value;
5511
- }
5251
+ message.Content = reader.string();
5512
5252
  continue;
5513
5253
  }
5514
5254
  case 3: {
@@ -5534,20 +5274,7 @@ export const EventToAppend: MessageFns<EventToAppend> = {
5534
5274
  fromJSON(object: any): EventToAppend {
5535
5275
  return {
5536
5276
  EventType: isSet(object.EventType) ? EventType.fromJSON(object.EventType) : undefined,
5537
- Content: isObject(object.Content)
5538
- ? (globalThis.Object.entries(object.Content) as [string, any][]).reduce(
5539
- (acc: { [key: string]: JsonNode }, [key, value]: [string, any]) => {
5540
- globalThis.Object.defineProperty(acc, key, {
5541
- value: JsonNode.fromJSON(value),
5542
- enumerable: true,
5543
- configurable: true,
5544
- writable: true,
5545
- });
5546
- return acc;
5547
- },
5548
- {},
5549
- )
5550
- : {},
5277
+ Content: isSet(object.Content) ? globalThis.String(object.Content) : "",
5551
5278
  Subject: isSet(object.Subject) ? globalThis.String(object.Subject) : "",
5552
5279
  };
5553
5280
  },
@@ -5557,14 +5284,8 @@ export const EventToAppend: MessageFns<EventToAppend> = {
5557
5284
  if (message.EventType !== undefined) {
5558
5285
  obj.EventType = EventType.toJSON(message.EventType);
5559
5286
  }
5560
- if (message.Content) {
5561
- const entries = globalThis.Object.entries(message.Content) as [string, JsonNode][];
5562
- if (entries.length > 0) {
5563
- obj.Content = {};
5564
- entries.forEach(([k, v]) => {
5565
- obj.Content[k] = JsonNode.toJSON(v);
5566
- });
5567
- }
5287
+ if (message.Content !== "") {
5288
+ obj.Content = message.Content;
5568
5289
  }
5569
5290
  if (message.Subject !== "") {
5570
5291
  obj.Subject = message.Subject;
@@ -5580,107 +5301,12 @@ export const EventToAppend: MessageFns<EventToAppend> = {
5580
5301
  message.EventType = (object.EventType !== undefined && object.EventType !== null)
5581
5302
  ? EventType.fromPartial(object.EventType)
5582
5303
  : undefined;
5583
- message.Content = (globalThis.Object.entries(object.Content ?? {}) as [string, JsonNode][]).reduce(
5584
- (acc: { [key: string]: JsonNode }, [key, value]: [string, JsonNode]) => {
5585
- if (value !== undefined) {
5586
- acc[key] = JsonNode.fromPartial(value);
5587
- }
5588
- return acc;
5589
- },
5590
- {},
5591
- );
5304
+ message.Content = object.Content ?? "";
5592
5305
  message.Subject = object.Subject ?? "";
5593
5306
  return message;
5594
5307
  },
5595
5308
  };
5596
5309
 
5597
- function createBaseEventToAppend_ContentEntry(): EventToAppend_ContentEntry {
5598
- return { key: "", value: undefined };
5599
- }
5600
-
5601
- export const EventToAppend_ContentEntry: MessageFns<EventToAppend_ContentEntry> = {
5602
- encode(message: EventToAppend_ContentEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
5603
- if (message.key !== "") {
5604
- writer.uint32(10).string(message.key);
5605
- }
5606
- if (message.value !== undefined) {
5607
- JsonNode.encode(message.value, writer.uint32(18).fork()).join();
5608
- }
5609
- return writer;
5610
- },
5611
-
5612
- decode(input: BinaryReader | Uint8Array, length?: number): EventToAppend_ContentEntry {
5613
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
5614
- const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
5615
- if (previousRecursionDepth >= 100) {
5616
- throw new globalThis.Error("protobuf decode recursion limit exceeded");
5617
- }
5618
- (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
5619
- try {
5620
- const end = length === undefined ? reader.len : reader.pos + length;
5621
- const message = createBaseEventToAppend_ContentEntry();
5622
- while (reader.pos < end) {
5623
- const tag = reader.uint32();
5624
- switch (tag >>> 3) {
5625
- case 1: {
5626
- if (tag !== 10) {
5627
- break;
5628
- }
5629
-
5630
- message.key = reader.string();
5631
- continue;
5632
- }
5633
- case 2: {
5634
- if (tag !== 18) {
5635
- break;
5636
- }
5637
-
5638
- message.value = JsonNode.decode(reader, reader.uint32());
5639
- continue;
5640
- }
5641
- }
5642
- if ((tag & 7) === 4 || tag === 0) {
5643
- break;
5644
- }
5645
- reader.skip(tag & 7);
5646
- }
5647
- return message;
5648
- } finally {
5649
- (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
5650
- }
5651
- },
5652
-
5653
- fromJSON(object: any): EventToAppend_ContentEntry {
5654
- return {
5655
- key: isSet(object.key) ? globalThis.String(object.key) : "",
5656
- value: isSet(object.value) ? JsonNode.fromJSON(object.value) : undefined,
5657
- };
5658
- },
5659
-
5660
- toJSON(message: EventToAppend_ContentEntry): unknown {
5661
- const obj: any = {};
5662
- if (message.key !== "") {
5663
- obj.key = message.key;
5664
- }
5665
- if (message.value !== undefined) {
5666
- obj.value = JsonNode.toJSON(message.value);
5667
- }
5668
- return obj;
5669
- },
5670
-
5671
- create(base?: DeepPartial<EventToAppend_ContentEntry>): EventToAppend_ContentEntry {
5672
- return EventToAppend_ContentEntry.fromPartial(base ?? {});
5673
- },
5674
- fromPartial(object: DeepPartial<EventToAppend_ContentEntry>): EventToAppend_ContentEntry {
5675
- const message = createBaseEventToAppend_ContentEntry();
5676
- message.key = object.key ?? "";
5677
- message.value = (object.value !== undefined && object.value !== null)
5678
- ? JsonNode.fromPartial(object.value)
5679
- : undefined;
5680
- return message;
5681
- },
5682
- };
5683
-
5684
5310
  function createBaseEventType(): EventType {
5685
5311
  return { Id: "", Generation: 0, Tombstone: false };
5686
5312
  }
@@ -6812,58 +6438,6 @@ export const Identity: MessageFns<Identity> = {
6812
6438
  },
6813
6439
  };
6814
6440
 
6815
- function createBaseJsonNode(): JsonNode {
6816
- return {};
6817
- }
6818
-
6819
- export const JsonNode: MessageFns<JsonNode> = {
6820
- encode(_: JsonNode, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
6821
- return writer;
6822
- },
6823
-
6824
- decode(input: BinaryReader | Uint8Array, length?: number): JsonNode {
6825
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
6826
- const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
6827
- if (previousRecursionDepth >= 100) {
6828
- throw new globalThis.Error("protobuf decode recursion limit exceeded");
6829
- }
6830
- (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
6831
- try {
6832
- const end = length === undefined ? reader.len : reader.pos + length;
6833
- const message = createBaseJsonNode();
6834
- while (reader.pos < end) {
6835
- const tag = reader.uint32();
6836
- switch (tag >>> 3) {
6837
- }
6838
- if ((tag & 7) === 4 || tag === 0) {
6839
- break;
6840
- }
6841
- reader.skip(tag & 7);
6842
- }
6843
- return message;
6844
- } finally {
6845
- (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
6846
- }
6847
- },
6848
-
6849
- fromJSON(_: any): JsonNode {
6850
- return {};
6851
- },
6852
-
6853
- toJSON(_: JsonNode): unknown {
6854
- const obj: any = {};
6855
- return obj;
6856
- },
6857
-
6858
- create(base?: DeepPartial<JsonNode>): JsonNode {
6859
- return JsonNode.fromPartial(base ?? {});
6860
- },
6861
- fromPartial(_: DeepPartial<JsonNode>): JsonNode {
6862
- const message = createBaseJsonNode();
6863
- return message;
6864
- },
6865
- };
6866
-
6867
6441
  function createBaseKeyValuePairInt32String(): KeyValuePairInt32String {
6868
6442
  return { Key: 0, Value: "" };
6869
6443
  }
@@ -8984,7 +8558,7 @@ function createBaseReviseRequest(): ReviseRequest {
8984
8558
  EventSequenceId: "",
8985
8559
  SequenceNumber: 0n,
8986
8560
  EventType: undefined,
8987
- Content: {},
8561
+ Content: "",
8988
8562
  Causation: [],
8989
8563
  CausedBy: undefined,
8990
8564
  };
@@ -9010,9 +8584,9 @@ export const ReviseRequest: MessageFns<ReviseRequest> = {
9010
8584
  if (message.EventType !== undefined) {
9011
8585
  EventType.encode(message.EventType, writer.uint32(42).fork()).join();
9012
8586
  }
9013
- globalThis.Object.entries(message.Content).forEach(([key, value]: [string, JsonNode]) => {
9014
- ReviseRequest_ContentEntry.encode({ key: key as any, value }, writer.uint32(50).fork()).join();
9015
- });
8587
+ if (message.Content !== "") {
8588
+ writer.uint32(50).string(message.Content);
8589
+ }
9016
8590
  for (const v of message.Causation) {
9017
8591
  Causation.encode(v!, writer.uint32(58).fork()).join();
9018
8592
  }
@@ -9080,10 +8654,7 @@ export const ReviseRequest: MessageFns<ReviseRequest> = {
9080
8654
  break;
9081
8655
  }
9082
8656
 
9083
- const entry6 = ReviseRequest_ContentEntry.decode(reader, reader.uint32());
9084
- if (entry6.value !== undefined) {
9085
- message.Content[entry6.key] = entry6.value;
9086
- }
8657
+ message.Content = reader.string();
9087
8658
  continue;
9088
8659
  }
9089
8660
  case 7: {
@@ -9121,20 +8692,7 @@ export const ReviseRequest: MessageFns<ReviseRequest> = {
9121
8692
  EventSequenceId: isSet(object.EventSequenceId) ? globalThis.String(object.EventSequenceId) : "",
9122
8693
  SequenceNumber: isSet(object.SequenceNumber) ? BigInt(object.SequenceNumber) : 0n,
9123
8694
  EventType: isSet(object.EventType) ? EventType.fromJSON(object.EventType) : undefined,
9124
- Content: isObject(object.Content)
9125
- ? (globalThis.Object.entries(object.Content) as [string, any][]).reduce(
9126
- (acc: { [key: string]: JsonNode }, [key, value]: [string, any]) => {
9127
- globalThis.Object.defineProperty(acc, key, {
9128
- value: JsonNode.fromJSON(value),
9129
- enumerable: true,
9130
- configurable: true,
9131
- writable: true,
9132
- });
9133
- return acc;
9134
- },
9135
- {},
9136
- )
9137
- : {},
8695
+ Content: isSet(object.Content) ? globalThis.String(object.Content) : "",
9138
8696
  Causation: globalThis.Array.isArray(object?.Causation)
9139
8697
  ? object.Causation.map((e: any) => Causation.fromJSON(e))
9140
8698
  : [],
@@ -9159,14 +8717,8 @@ export const ReviseRequest: MessageFns<ReviseRequest> = {
9159
8717
  if (message.EventType !== undefined) {
9160
8718
  obj.EventType = EventType.toJSON(message.EventType);
9161
8719
  }
9162
- if (message.Content) {
9163
- const entries = globalThis.Object.entries(message.Content) as [string, JsonNode][];
9164
- if (entries.length > 0) {
9165
- obj.Content = {};
9166
- entries.forEach(([k, v]) => {
9167
- obj.Content[k] = JsonNode.toJSON(v);
9168
- });
9169
- }
8720
+ if (message.Content !== "") {
8721
+ obj.Content = message.Content;
9170
8722
  }
9171
8723
  if (message.Causation?.length) {
9172
8724
  obj.Causation = message.Causation.map((e) => Causation.toJSON(e));
@@ -9191,15 +8743,7 @@ export const ReviseRequest: MessageFns<ReviseRequest> = {
9191
8743
  message.EventType = (object.EventType !== undefined && object.EventType !== null)
9192
8744
  ? EventType.fromPartial(object.EventType)
9193
8745
  : undefined;
9194
- message.Content = (globalThis.Object.entries(object.Content ?? {}) as [string, JsonNode][]).reduce(
9195
- (acc: { [key: string]: JsonNode }, [key, value]: [string, JsonNode]) => {
9196
- if (value !== undefined) {
9197
- acc[key] = JsonNode.fromPartial(value);
9198
- }
9199
- return acc;
9200
- },
9201
- {},
9202
- );
8746
+ message.Content = object.Content ?? "";
9203
8747
  message.Causation = object.Causation?.map((e) => Causation.fromPartial(e)) || [];
9204
8748
  message.CausedBy = (object.CausedBy !== undefined && object.CausedBy !== null)
9205
8749
  ? Identity.fromPartial(object.CausedBy)
@@ -9208,93 +8752,6 @@ export const ReviseRequest: MessageFns<ReviseRequest> = {
9208
8752
  },
9209
8753
  };
9210
8754
 
9211
- function createBaseReviseRequest_ContentEntry(): ReviseRequest_ContentEntry {
9212
- return { key: "", value: undefined };
9213
- }
9214
-
9215
- export const ReviseRequest_ContentEntry: MessageFns<ReviseRequest_ContentEntry> = {
9216
- encode(message: ReviseRequest_ContentEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
9217
- if (message.key !== "") {
9218
- writer.uint32(10).string(message.key);
9219
- }
9220
- if (message.value !== undefined) {
9221
- JsonNode.encode(message.value, writer.uint32(18).fork()).join();
9222
- }
9223
- return writer;
9224
- },
9225
-
9226
- decode(input: BinaryReader | Uint8Array, length?: number): ReviseRequest_ContentEntry {
9227
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
9228
- const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
9229
- if (previousRecursionDepth >= 100) {
9230
- throw new globalThis.Error("protobuf decode recursion limit exceeded");
9231
- }
9232
- (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
9233
- try {
9234
- const end = length === undefined ? reader.len : reader.pos + length;
9235
- const message = createBaseReviseRequest_ContentEntry();
9236
- while (reader.pos < end) {
9237
- const tag = reader.uint32();
9238
- switch (tag >>> 3) {
9239
- case 1: {
9240
- if (tag !== 10) {
9241
- break;
9242
- }
9243
-
9244
- message.key = reader.string();
9245
- continue;
9246
- }
9247
- case 2: {
9248
- if (tag !== 18) {
9249
- break;
9250
- }
9251
-
9252
- message.value = JsonNode.decode(reader, reader.uint32());
9253
- continue;
9254
- }
9255
- }
9256
- if ((tag & 7) === 4 || tag === 0) {
9257
- break;
9258
- }
9259
- reader.skip(tag & 7);
9260
- }
9261
- return message;
9262
- } finally {
9263
- (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
9264
- }
9265
- },
9266
-
9267
- fromJSON(object: any): ReviseRequest_ContentEntry {
9268
- return {
9269
- key: isSet(object.key) ? globalThis.String(object.key) : "",
9270
- value: isSet(object.value) ? JsonNode.fromJSON(object.value) : undefined,
9271
- };
9272
- },
9273
-
9274
- toJSON(message: ReviseRequest_ContentEntry): unknown {
9275
- const obj: any = {};
9276
- if (message.key !== "") {
9277
- obj.key = message.key;
9278
- }
9279
- if (message.value !== undefined) {
9280
- obj.value = JsonNode.toJSON(message.value);
9281
- }
9282
- return obj;
9283
- },
9284
-
9285
- create(base?: DeepPartial<ReviseRequest_ContentEntry>): ReviseRequest_ContentEntry {
9286
- return ReviseRequest_ContentEntry.fromPartial(base ?? {});
9287
- },
9288
- fromPartial(object: DeepPartial<ReviseRequest_ContentEntry>): ReviseRequest_ContentEntry {
9289
- const message = createBaseReviseRequest_ContentEntry();
9290
- message.key = object.key ?? "";
9291
- message.value = (object.value !== undefined && object.value !== null)
9292
- ? JsonNode.fromPartial(object.value)
9293
- : undefined;
9294
- return message;
9295
- },
9296
- };
9297
-
9298
8755
  function createBaseSequenceHistogramBucketResponse(): SequenceHistogramBucketResponse {
9299
8756
  return { From: undefined, To: undefined, Count: 0n };
9300
8757
  }