@cratis/chronicle.contracts 18.4.0 → 18.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/generated/descriptorSet.js +1 -1
- package/dist/cjs/generated/descriptorSet.js.map +1 -1
- package/dist/cjs/generated/index.d.ts +1 -1
- package/dist/cjs/generated/index.d.ts.map +1 -1
- package/dist/cjs/generated/sequences.d.ts +0 -46
- package/dist/cjs/generated/sequences.d.ts.map +1 -1
- package/dist/cjs/generated/sequences.js +205 -950
- package/dist/cjs/generated/sequences.js.map +1 -1
- package/dist/cjs/index.js +0 -4
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/generated/descriptorSet.js +1 -1
- package/dist/esm/generated/descriptorSet.js.map +1 -1
- package/dist/esm/generated/index.d.ts +1 -1
- package/dist/esm/generated/index.d.ts.map +1 -1
- package/dist/esm/generated/sequences.d.ts +0 -46
- package/dist/esm/generated/sequences.d.ts.map +1 -1
- package/dist/esm/generated/sequences.js +206 -947
- package/dist/esm/generated/sequences.js.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/generated/descriptorSet.js +1 -1
- package/dist/generated/descriptorSet.js.map +1 -1
- package/dist/generated/index.d.ts +1 -1
- package/dist/generated/index.d.ts.map +1 -1
- package/dist/generated/index.js +1 -1
- package/dist/generated/index.js.map +1 -1
- package/dist/generated/sequences.d.ts +0 -46
- package/dist/generated/sequences.d.ts.map +1 -1
- package/dist/generated/sequences.js +205 -946
- package/dist/generated/sequences.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/generated/descriptorSet.ts +1 -1
- package/generated/index.ts +1 -1
- package/generated/sequences.ts +304 -1150
- package/package.json +1 -1
package/generated/sequences.ts
CHANGED
|
@@ -241,24 +241,6 @@ export interface AllEventSequencesRequest {
|
|
|
241
241
|
Namespace: string;
|
|
242
242
|
}
|
|
243
243
|
|
|
244
|
-
export interface AppendCausation {
|
|
245
|
-
Occurred: SerializableDateTimeOffset | undefined;
|
|
246
|
-
Type: string;
|
|
247
|
-
Properties: { [key: string]: string };
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
export interface AppendCausation_PropertiesEntry {
|
|
251
|
-
key: string;
|
|
252
|
-
value: string;
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
export interface AppendIdentity {
|
|
256
|
-
Subject: string;
|
|
257
|
-
Name: string;
|
|
258
|
-
UserName: string;
|
|
259
|
-
OnBehalfOf: AppendIdentity | undefined;
|
|
260
|
-
}
|
|
261
|
-
|
|
262
244
|
export interface AppendManyForEventSourcesRequest {
|
|
263
245
|
EventStore: string;
|
|
264
246
|
Namespace: string;
|
|
@@ -269,7 +251,6 @@ export interface AppendManyForEventSourcesRequest {
|
|
|
269
251
|
Causation: Causation[];
|
|
270
252
|
CausedBy: Identity | undefined;
|
|
271
253
|
ConcurrencyScopes: EventSourceConcurrencyScope[];
|
|
272
|
-
IncludeReceipts: boolean;
|
|
273
254
|
}
|
|
274
255
|
|
|
275
256
|
export interface AppendManyRequest {
|
|
@@ -284,7 +265,6 @@ export interface AppendManyRequest {
|
|
|
284
265
|
CausedBy: Identity | undefined;
|
|
285
266
|
ConcurrencyScope: ConcurrencyScope | undefined;
|
|
286
267
|
Occurred: SerializableDateTimeOffset | undefined;
|
|
287
|
-
IncludeReceipts: boolean;
|
|
288
268
|
}
|
|
289
269
|
|
|
290
270
|
export interface AppendManyResponse {
|
|
@@ -299,31 +279,6 @@ export interface AppendManyResponse {
|
|
|
299
279
|
ConstraintViolations: ConstraintViolation[];
|
|
300
280
|
Errors: string[];
|
|
301
281
|
ConcurrencyViolations: ConcurrencyViolation[];
|
|
302
|
-
Receipts: AppendReceipt[];
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
export interface AppendReceipt {
|
|
306
|
-
EventStore: string;
|
|
307
|
-
Namespace: string;
|
|
308
|
-
SequenceNumber: bigint;
|
|
309
|
-
EventTypeId: string;
|
|
310
|
-
Generation: number;
|
|
311
|
-
Tombstone: boolean;
|
|
312
|
-
EventSourceType: string;
|
|
313
|
-
EventSourceId: string;
|
|
314
|
-
EventStreamType: string;
|
|
315
|
-
EventStreamId: string;
|
|
316
|
-
Occurred:
|
|
317
|
-
| SerializableDateTimeOffset
|
|
318
|
-
| undefined;
|
|
319
|
-
/** default value could not be applied: 00000000-0000-0000-0000-000000000000 */
|
|
320
|
-
CorrelationId: Guid | undefined;
|
|
321
|
-
Subject: string;
|
|
322
|
-
Tags: string[];
|
|
323
|
-
Hash: string;
|
|
324
|
-
Causation: AppendCausation[];
|
|
325
|
-
CausedBy: AppendIdentity | undefined;
|
|
326
|
-
ObservationState: EventObservationState;
|
|
327
282
|
}
|
|
328
283
|
|
|
329
284
|
export interface AppendRequest {
|
|
@@ -343,7 +298,6 @@ export interface AppendRequest {
|
|
|
343
298
|
Causation: Causation[];
|
|
344
299
|
CausedBy: Identity | undefined;
|
|
345
300
|
ConcurrencyScope: ConcurrencyScope | undefined;
|
|
346
|
-
IncludeReceipt: boolean;
|
|
347
301
|
}
|
|
348
302
|
|
|
349
303
|
export interface AppendResponse {
|
|
@@ -358,7 +312,6 @@ export interface AppendResponse {
|
|
|
358
312
|
ConstraintViolations: ConstraintViolation[];
|
|
359
313
|
Errors: string[];
|
|
360
314
|
ConcurrencyViolation: ConcurrencyViolation | undefined;
|
|
361
|
-
Receipt: AppendReceipt | undefined;
|
|
362
315
|
}
|
|
363
316
|
|
|
364
317
|
export interface AppendedEventResponse {
|
|
@@ -873,25 +826,53 @@ export const AllEventSequencesRequest: MessageFns<AllEventSequencesRequest> = {
|
|
|
873
826
|
},
|
|
874
827
|
};
|
|
875
828
|
|
|
876
|
-
function
|
|
877
|
-
return {
|
|
829
|
+
function createBaseAppendManyForEventSourcesRequest(): AppendManyForEventSourcesRequest {
|
|
830
|
+
return {
|
|
831
|
+
EventStore: "",
|
|
832
|
+
Namespace: "",
|
|
833
|
+
EventSequenceId: "",
|
|
834
|
+
Events: [],
|
|
835
|
+
CorrelationId: undefined,
|
|
836
|
+
Tags: [],
|
|
837
|
+
Causation: [],
|
|
838
|
+
CausedBy: undefined,
|
|
839
|
+
ConcurrencyScopes: [],
|
|
840
|
+
};
|
|
878
841
|
}
|
|
879
842
|
|
|
880
|
-
export const
|
|
881
|
-
encode(message:
|
|
882
|
-
if (message.
|
|
883
|
-
|
|
843
|
+
export const AppendManyForEventSourcesRequest: MessageFns<AppendManyForEventSourcesRequest> = {
|
|
844
|
+
encode(message: AppendManyForEventSourcesRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
845
|
+
if (message.EventStore !== "") {
|
|
846
|
+
writer.uint32(10).string(message.EventStore);
|
|
884
847
|
}
|
|
885
|
-
if (message.
|
|
886
|
-
writer.uint32(18).string(message.
|
|
848
|
+
if (message.Namespace !== "") {
|
|
849
|
+
writer.uint32(18).string(message.Namespace);
|
|
850
|
+
}
|
|
851
|
+
if (message.EventSequenceId !== "") {
|
|
852
|
+
writer.uint32(26).string(message.EventSequenceId);
|
|
853
|
+
}
|
|
854
|
+
for (const v of message.Events) {
|
|
855
|
+
EventForEventSourceId.encode(v!, writer.uint32(34).fork()).join();
|
|
856
|
+
}
|
|
857
|
+
if (message.CorrelationId !== undefined) {
|
|
858
|
+
Guid.encode(message.CorrelationId, writer.uint32(42).fork()).join();
|
|
859
|
+
}
|
|
860
|
+
for (const v of message.Tags) {
|
|
861
|
+
writer.uint32(50).string(v!);
|
|
862
|
+
}
|
|
863
|
+
for (const v of message.Causation) {
|
|
864
|
+
Causation.encode(v!, writer.uint32(58).fork()).join();
|
|
865
|
+
}
|
|
866
|
+
if (message.CausedBy !== undefined) {
|
|
867
|
+
Identity.encode(message.CausedBy, writer.uint32(66).fork()).join();
|
|
868
|
+
}
|
|
869
|
+
for (const v of message.ConcurrencyScopes) {
|
|
870
|
+
EventSourceConcurrencyScope.encode(v!, writer.uint32(74).fork()).join();
|
|
887
871
|
}
|
|
888
|
-
globalThis.Object.entries(message.Properties).forEach(([key, value]: [string, string]) => {
|
|
889
|
-
AppendCausation_PropertiesEntry.encode({ key: key as any, value }, writer.uint32(26).fork()).join();
|
|
890
|
-
});
|
|
891
872
|
return writer;
|
|
892
873
|
},
|
|
893
874
|
|
|
894
|
-
decode(input: BinaryReader | Uint8Array, length?: number):
|
|
875
|
+
decode(input: BinaryReader | Uint8Array, length?: number): AppendManyForEventSourcesRequest {
|
|
895
876
|
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
896
877
|
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
897
878
|
if (previousRecursionDepth >= 100) {
|
|
@@ -900,7 +881,7 @@ export const AppendCausation: MessageFns<AppendCausation> = {
|
|
|
900
881
|
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
901
882
|
try {
|
|
902
883
|
const end = length === undefined ? reader.len : reader.pos + length;
|
|
903
|
-
const message =
|
|
884
|
+
const message = createBaseAppendManyForEventSourcesRequest();
|
|
904
885
|
while (reader.pos < end) {
|
|
905
886
|
const tag = reader.uint32();
|
|
906
887
|
switch (tag >>> 3) {
|
|
@@ -909,7 +890,7 @@ export const AppendCausation: MessageFns<AppendCausation> = {
|
|
|
909
890
|
break;
|
|
910
891
|
}
|
|
911
892
|
|
|
912
|
-
message.
|
|
893
|
+
message.EventStore = reader.string();
|
|
913
894
|
continue;
|
|
914
895
|
}
|
|
915
896
|
case 2: {
|
|
@@ -917,7 +898,7 @@ export const AppendCausation: MessageFns<AppendCausation> = {
|
|
|
917
898
|
break;
|
|
918
899
|
}
|
|
919
900
|
|
|
920
|
-
message.
|
|
901
|
+
message.Namespace = reader.string();
|
|
921
902
|
continue;
|
|
922
903
|
}
|
|
923
904
|
case 3: {
|
|
@@ -925,129 +906,55 @@ export const AppendCausation: MessageFns<AppendCausation> = {
|
|
|
925
906
|
break;
|
|
926
907
|
}
|
|
927
908
|
|
|
928
|
-
|
|
929
|
-
if (entry3.value !== undefined) {
|
|
930
|
-
message.Properties[entry3.key] = entry3.value;
|
|
931
|
-
}
|
|
909
|
+
message.EventSequenceId = reader.string();
|
|
932
910
|
continue;
|
|
933
911
|
}
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
reader.skip(tag & 7);
|
|
939
|
-
}
|
|
940
|
-
return message;
|
|
941
|
-
} finally {
|
|
942
|
-
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
943
|
-
}
|
|
944
|
-
},
|
|
945
|
-
|
|
946
|
-
fromJSON(object: any): AppendCausation {
|
|
947
|
-
return {
|
|
948
|
-
Occurred: isSet(object.Occurred) ? SerializableDateTimeOffset.fromJSON(object.Occurred) : undefined,
|
|
949
|
-
Type: isSet(object.Type) ? globalThis.String(object.Type) : "",
|
|
950
|
-
Properties: isObject(object.Properties)
|
|
951
|
-
? (globalThis.Object.entries(object.Properties) as [string, any][]).reduce(
|
|
952
|
-
(acc: { [key: string]: string }, [key, value]: [string, any]) => {
|
|
953
|
-
globalThis.Object.defineProperty(acc, key, {
|
|
954
|
-
value: globalThis.String(value),
|
|
955
|
-
enumerable: true,
|
|
956
|
-
configurable: true,
|
|
957
|
-
writable: true,
|
|
958
|
-
});
|
|
959
|
-
return acc;
|
|
960
|
-
},
|
|
961
|
-
{},
|
|
962
|
-
)
|
|
963
|
-
: {},
|
|
964
|
-
};
|
|
965
|
-
},
|
|
966
|
-
|
|
967
|
-
toJSON(message: AppendCausation): unknown {
|
|
968
|
-
const obj: any = {};
|
|
969
|
-
if (message.Occurred !== undefined) {
|
|
970
|
-
obj.Occurred = SerializableDateTimeOffset.toJSON(message.Occurred);
|
|
971
|
-
}
|
|
972
|
-
if (message.Type !== "") {
|
|
973
|
-
obj.Type = message.Type;
|
|
974
|
-
}
|
|
975
|
-
if (message.Properties) {
|
|
976
|
-
const entries = globalThis.Object.entries(message.Properties) as [string, string][];
|
|
977
|
-
if (entries.length > 0) {
|
|
978
|
-
obj.Properties = {};
|
|
979
|
-
entries.forEach(([k, v]) => {
|
|
980
|
-
obj.Properties[k] = v;
|
|
981
|
-
});
|
|
982
|
-
}
|
|
983
|
-
}
|
|
984
|
-
return obj;
|
|
985
|
-
},
|
|
912
|
+
case 4: {
|
|
913
|
+
if (tag !== 34) {
|
|
914
|
+
break;
|
|
915
|
+
}
|
|
986
916
|
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
: undefined;
|
|
995
|
-
message.Type = object.Type ?? "";
|
|
996
|
-
message.Properties = (globalThis.Object.entries(object.Properties ?? {}) as [string, string][]).reduce(
|
|
997
|
-
(acc: { [key: string]: string }, [key, value]: [string, string]) => {
|
|
998
|
-
if (value !== undefined) {
|
|
999
|
-
acc[key] = globalThis.String(value);
|
|
1000
|
-
}
|
|
1001
|
-
return acc;
|
|
1002
|
-
},
|
|
1003
|
-
{},
|
|
1004
|
-
);
|
|
1005
|
-
return message;
|
|
1006
|
-
},
|
|
1007
|
-
};
|
|
917
|
+
message.Events.push(EventForEventSourceId.decode(reader, reader.uint32()));
|
|
918
|
+
continue;
|
|
919
|
+
}
|
|
920
|
+
case 5: {
|
|
921
|
+
if (tag !== 42) {
|
|
922
|
+
break;
|
|
923
|
+
}
|
|
1008
924
|
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
}
|
|
925
|
+
message.CorrelationId = Guid.decode(reader, reader.uint32());
|
|
926
|
+
continue;
|
|
927
|
+
}
|
|
928
|
+
case 6: {
|
|
929
|
+
if (tag !== 50) {
|
|
930
|
+
break;
|
|
931
|
+
}
|
|
1012
932
|
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
}
|
|
1021
|
-
return writer;
|
|
1022
|
-
},
|
|
933
|
+
message.Tags.push(reader.string());
|
|
934
|
+
continue;
|
|
935
|
+
}
|
|
936
|
+
case 7: {
|
|
937
|
+
if (tag !== 58) {
|
|
938
|
+
break;
|
|
939
|
+
}
|
|
1023
940
|
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
}
|
|
1030
|
-
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
1031
|
-
try {
|
|
1032
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1033
|
-
const message = createBaseAppendCausation_PropertiesEntry();
|
|
1034
|
-
while (reader.pos < end) {
|
|
1035
|
-
const tag = reader.uint32();
|
|
1036
|
-
switch (tag >>> 3) {
|
|
1037
|
-
case 1: {
|
|
1038
|
-
if (tag !== 10) {
|
|
941
|
+
message.Causation.push(Causation.decode(reader, reader.uint32()));
|
|
942
|
+
continue;
|
|
943
|
+
}
|
|
944
|
+
case 8: {
|
|
945
|
+
if (tag !== 66) {
|
|
1039
946
|
break;
|
|
1040
947
|
}
|
|
1041
948
|
|
|
1042
|
-
message.
|
|
949
|
+
message.CausedBy = Identity.decode(reader, reader.uint32());
|
|
1043
950
|
continue;
|
|
1044
951
|
}
|
|
1045
|
-
case
|
|
1046
|
-
if (tag !==
|
|
952
|
+
case 9: {
|
|
953
|
+
if (tag !== 74) {
|
|
1047
954
|
break;
|
|
1048
955
|
}
|
|
1049
956
|
|
|
1050
|
-
message.
|
|
957
|
+
message.ConcurrencyScopes.push(EventSourceConcurrencyScope.decode(reader, reader.uint32()));
|
|
1051
958
|
continue;
|
|
1052
959
|
}
|
|
1053
960
|
}
|
|
@@ -1062,171 +969,98 @@ export const AppendCausation_PropertiesEntry: MessageFns<AppendCausation_Propert
|
|
|
1062
969
|
}
|
|
1063
970
|
},
|
|
1064
971
|
|
|
1065
|
-
fromJSON(object: any):
|
|
972
|
+
fromJSON(object: any): AppendManyForEventSourcesRequest {
|
|
1066
973
|
return {
|
|
1067
|
-
|
|
1068
|
-
|
|
974
|
+
EventStore: isSet(object.EventStore) ? globalThis.String(object.EventStore) : "",
|
|
975
|
+
Namespace: isSet(object.Namespace) ? globalThis.String(object.Namespace) : "",
|
|
976
|
+
EventSequenceId: isSet(object.EventSequenceId) ? globalThis.String(object.EventSequenceId) : "",
|
|
977
|
+
Events: globalThis.Array.isArray(object?.Events)
|
|
978
|
+
? object.Events.map((e: any) => EventForEventSourceId.fromJSON(e))
|
|
979
|
+
: [],
|
|
980
|
+
CorrelationId: isSet(object.CorrelationId) ? Guid.fromJSON(object.CorrelationId) : undefined,
|
|
981
|
+
Tags: globalThis.Array.isArray(object?.Tags) ? object.Tags.map((e: any) => globalThis.String(e)) : [],
|
|
982
|
+
Causation: globalThis.Array.isArray(object?.Causation)
|
|
983
|
+
? object.Causation.map((e: any) => Causation.fromJSON(e))
|
|
984
|
+
: [],
|
|
985
|
+
CausedBy: isSet(object.CausedBy) ? Identity.fromJSON(object.CausedBy) : undefined,
|
|
986
|
+
ConcurrencyScopes: globalThis.Array.isArray(object?.ConcurrencyScopes)
|
|
987
|
+
? object.ConcurrencyScopes.map((e: any) => EventSourceConcurrencyScope.fromJSON(e))
|
|
988
|
+
: [],
|
|
1069
989
|
};
|
|
1070
990
|
},
|
|
1071
991
|
|
|
1072
|
-
toJSON(message:
|
|
992
|
+
toJSON(message: AppendManyForEventSourcesRequest): unknown {
|
|
1073
993
|
const obj: any = {};
|
|
1074
|
-
if (message.
|
|
1075
|
-
obj.
|
|
994
|
+
if (message.EventStore !== "") {
|
|
995
|
+
obj.EventStore = message.EventStore;
|
|
1076
996
|
}
|
|
1077
|
-
if (message.
|
|
1078
|
-
obj.
|
|
997
|
+
if (message.Namespace !== "") {
|
|
998
|
+
obj.Namespace = message.Namespace;
|
|
1079
999
|
}
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
create(base?: DeepPartial<AppendCausation_PropertiesEntry>): AppendCausation_PropertiesEntry {
|
|
1084
|
-
return AppendCausation_PropertiesEntry.fromPartial(base ?? {});
|
|
1085
|
-
},
|
|
1086
|
-
fromPartial(object: DeepPartial<AppendCausation_PropertiesEntry>): AppendCausation_PropertiesEntry {
|
|
1087
|
-
const message = createBaseAppendCausation_PropertiesEntry();
|
|
1088
|
-
message.key = object.key ?? "";
|
|
1089
|
-
message.value = object.value ?? "";
|
|
1090
|
-
return message;
|
|
1091
|
-
},
|
|
1092
|
-
};
|
|
1093
|
-
|
|
1094
|
-
function createBaseAppendIdentity(): AppendIdentity {
|
|
1095
|
-
return { Subject: "", Name: "", UserName: "", OnBehalfOf: undefined };
|
|
1096
|
-
}
|
|
1097
|
-
|
|
1098
|
-
export const AppendIdentity: MessageFns<AppendIdentity> = {
|
|
1099
|
-
encode(message: AppendIdentity, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1100
|
-
if (message.Subject !== "") {
|
|
1101
|
-
writer.uint32(10).string(message.Subject);
|
|
1102
|
-
}
|
|
1103
|
-
if (message.Name !== "") {
|
|
1104
|
-
writer.uint32(18).string(message.Name);
|
|
1105
|
-
}
|
|
1106
|
-
if (message.UserName !== "") {
|
|
1107
|
-
writer.uint32(26).string(message.UserName);
|
|
1108
|
-
}
|
|
1109
|
-
if (message.OnBehalfOf !== undefined) {
|
|
1110
|
-
AppendIdentity.encode(message.OnBehalfOf, writer.uint32(34).fork()).join();
|
|
1000
|
+
if (message.EventSequenceId !== "") {
|
|
1001
|
+
obj.EventSequenceId = message.EventSequenceId;
|
|
1111
1002
|
}
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
decode(input: BinaryReader | Uint8Array, length?: number): AppendIdentity {
|
|
1116
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1117
|
-
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
1118
|
-
if (previousRecursionDepth >= 100) {
|
|
1119
|
-
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
1003
|
+
if (message.Events?.length) {
|
|
1004
|
+
obj.Events = message.Events.map((e) => EventForEventSourceId.toJSON(e));
|
|
1120
1005
|
}
|
|
1121
|
-
(
|
|
1122
|
-
|
|
1123
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1124
|
-
const message = createBaseAppendIdentity();
|
|
1125
|
-
while (reader.pos < end) {
|
|
1126
|
-
const tag = reader.uint32();
|
|
1127
|
-
switch (tag >>> 3) {
|
|
1128
|
-
case 1: {
|
|
1129
|
-
if (tag !== 10) {
|
|
1130
|
-
break;
|
|
1131
|
-
}
|
|
1132
|
-
|
|
1133
|
-
message.Subject = reader.string();
|
|
1134
|
-
continue;
|
|
1135
|
-
}
|
|
1136
|
-
case 2: {
|
|
1137
|
-
if (tag !== 18) {
|
|
1138
|
-
break;
|
|
1139
|
-
}
|
|
1140
|
-
|
|
1141
|
-
message.Name = reader.string();
|
|
1142
|
-
continue;
|
|
1143
|
-
}
|
|
1144
|
-
case 3: {
|
|
1145
|
-
if (tag !== 26) {
|
|
1146
|
-
break;
|
|
1147
|
-
}
|
|
1148
|
-
|
|
1149
|
-
message.UserName = reader.string();
|
|
1150
|
-
continue;
|
|
1151
|
-
}
|
|
1152
|
-
case 4: {
|
|
1153
|
-
if (tag !== 34) {
|
|
1154
|
-
break;
|
|
1155
|
-
}
|
|
1156
|
-
|
|
1157
|
-
message.OnBehalfOf = AppendIdentity.decode(reader, reader.uint32());
|
|
1158
|
-
continue;
|
|
1159
|
-
}
|
|
1160
|
-
}
|
|
1161
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
1162
|
-
break;
|
|
1163
|
-
}
|
|
1164
|
-
reader.skip(tag & 7);
|
|
1165
|
-
}
|
|
1166
|
-
return message;
|
|
1167
|
-
} finally {
|
|
1168
|
-
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
1006
|
+
if (message.CorrelationId !== undefined) {
|
|
1007
|
+
obj.CorrelationId = Guid.toJSON(message.CorrelationId);
|
|
1169
1008
|
}
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
fromJSON(object: any): AppendIdentity {
|
|
1173
|
-
return {
|
|
1174
|
-
Subject: isSet(object.Subject) ? globalThis.String(object.Subject) : "",
|
|
1175
|
-
Name: isSet(object.Name) ? globalThis.String(object.Name) : "",
|
|
1176
|
-
UserName: isSet(object.UserName) ? globalThis.String(object.UserName) : "",
|
|
1177
|
-
OnBehalfOf: isSet(object.OnBehalfOf) ? AppendIdentity.fromJSON(object.OnBehalfOf) : undefined,
|
|
1178
|
-
};
|
|
1179
|
-
},
|
|
1180
|
-
|
|
1181
|
-
toJSON(message: AppendIdentity): unknown {
|
|
1182
|
-
const obj: any = {};
|
|
1183
|
-
if (message.Subject !== "") {
|
|
1184
|
-
obj.Subject = message.Subject;
|
|
1009
|
+
if (message.Tags?.length) {
|
|
1010
|
+
obj.Tags = message.Tags;
|
|
1185
1011
|
}
|
|
1186
|
-
if (message.
|
|
1187
|
-
obj.
|
|
1012
|
+
if (message.Causation?.length) {
|
|
1013
|
+
obj.Causation = message.Causation.map((e) => Causation.toJSON(e));
|
|
1188
1014
|
}
|
|
1189
|
-
if (message.
|
|
1190
|
-
obj.
|
|
1015
|
+
if (message.CausedBy !== undefined) {
|
|
1016
|
+
obj.CausedBy = Identity.toJSON(message.CausedBy);
|
|
1191
1017
|
}
|
|
1192
|
-
if (message.
|
|
1193
|
-
obj.
|
|
1018
|
+
if (message.ConcurrencyScopes?.length) {
|
|
1019
|
+
obj.ConcurrencyScopes = message.ConcurrencyScopes.map((e) => EventSourceConcurrencyScope.toJSON(e));
|
|
1194
1020
|
}
|
|
1195
1021
|
return obj;
|
|
1196
1022
|
},
|
|
1197
1023
|
|
|
1198
|
-
create(base?: DeepPartial<
|
|
1199
|
-
return
|
|
1024
|
+
create(base?: DeepPartial<AppendManyForEventSourcesRequest>): AppendManyForEventSourcesRequest {
|
|
1025
|
+
return AppendManyForEventSourcesRequest.fromPartial(base ?? {});
|
|
1200
1026
|
},
|
|
1201
|
-
fromPartial(object: DeepPartial<
|
|
1202
|
-
const message =
|
|
1203
|
-
message.
|
|
1204
|
-
message.
|
|
1205
|
-
message.
|
|
1206
|
-
message.
|
|
1207
|
-
|
|
1027
|
+
fromPartial(object: DeepPartial<AppendManyForEventSourcesRequest>): AppendManyForEventSourcesRequest {
|
|
1028
|
+
const message = createBaseAppendManyForEventSourcesRequest();
|
|
1029
|
+
message.EventStore = object.EventStore ?? "";
|
|
1030
|
+
message.Namespace = object.Namespace ?? "";
|
|
1031
|
+
message.EventSequenceId = object.EventSequenceId ?? "";
|
|
1032
|
+
message.Events = object.Events?.map((e) => EventForEventSourceId.fromPartial(e)) || [];
|
|
1033
|
+
message.CorrelationId = (object.CorrelationId !== undefined && object.CorrelationId !== null)
|
|
1034
|
+
? Guid.fromPartial(object.CorrelationId)
|
|
1035
|
+
: undefined;
|
|
1036
|
+
message.Tags = object.Tags?.map((e) => e) || [];
|
|
1037
|
+
message.Causation = object.Causation?.map((e) => Causation.fromPartial(e)) || [];
|
|
1038
|
+
message.CausedBy = (object.CausedBy !== undefined && object.CausedBy !== null)
|
|
1039
|
+
? Identity.fromPartial(object.CausedBy)
|
|
1208
1040
|
: undefined;
|
|
1041
|
+
message.ConcurrencyScopes = object.ConcurrencyScopes?.map((e) => EventSourceConcurrencyScope.fromPartial(e)) || [];
|
|
1209
1042
|
return message;
|
|
1210
1043
|
},
|
|
1211
1044
|
};
|
|
1212
1045
|
|
|
1213
|
-
function
|
|
1046
|
+
function createBaseAppendManyRequest(): AppendManyRequest {
|
|
1214
1047
|
return {
|
|
1215
1048
|
EventStore: "",
|
|
1216
1049
|
Namespace: "",
|
|
1217
1050
|
EventSequenceId: "",
|
|
1051
|
+
EventSourceId: "",
|
|
1218
1052
|
Events: [],
|
|
1219
1053
|
CorrelationId: undefined,
|
|
1220
1054
|
Tags: [],
|
|
1221
1055
|
Causation: [],
|
|
1222
1056
|
CausedBy: undefined,
|
|
1223
|
-
|
|
1224
|
-
|
|
1057
|
+
ConcurrencyScope: undefined,
|
|
1058
|
+
Occurred: undefined,
|
|
1225
1059
|
};
|
|
1226
1060
|
}
|
|
1227
1061
|
|
|
1228
|
-
export const
|
|
1229
|
-
encode(message:
|
|
1062
|
+
export const AppendManyRequest: MessageFns<AppendManyRequest> = {
|
|
1063
|
+
encode(message: AppendManyRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1230
1064
|
if (message.EventStore !== "") {
|
|
1231
1065
|
writer.uint32(10).string(message.EventStore);
|
|
1232
1066
|
}
|
|
@@ -1236,31 +1070,34 @@ export const AppendManyForEventSourcesRequest: MessageFns<AppendManyForEventSour
|
|
|
1236
1070
|
if (message.EventSequenceId !== "") {
|
|
1237
1071
|
writer.uint32(26).string(message.EventSequenceId);
|
|
1238
1072
|
}
|
|
1073
|
+
if (message.EventSourceId !== "") {
|
|
1074
|
+
writer.uint32(34).string(message.EventSourceId);
|
|
1075
|
+
}
|
|
1239
1076
|
for (const v of message.Events) {
|
|
1240
|
-
|
|
1077
|
+
EventToAppend.encode(v!, writer.uint32(42).fork()).join();
|
|
1241
1078
|
}
|
|
1242
1079
|
if (message.CorrelationId !== undefined) {
|
|
1243
|
-
Guid.encode(message.CorrelationId, writer.uint32(
|
|
1080
|
+
Guid.encode(message.CorrelationId, writer.uint32(50).fork()).join();
|
|
1244
1081
|
}
|
|
1245
1082
|
for (const v of message.Tags) {
|
|
1246
|
-
writer.uint32(
|
|
1083
|
+
writer.uint32(58).string(v!);
|
|
1247
1084
|
}
|
|
1248
1085
|
for (const v of message.Causation) {
|
|
1249
|
-
Causation.encode(v!, writer.uint32(
|
|
1086
|
+
Causation.encode(v!, writer.uint32(66).fork()).join();
|
|
1250
1087
|
}
|
|
1251
1088
|
if (message.CausedBy !== undefined) {
|
|
1252
|
-
Identity.encode(message.CausedBy, writer.uint32(
|
|
1089
|
+
Identity.encode(message.CausedBy, writer.uint32(74).fork()).join();
|
|
1253
1090
|
}
|
|
1254
|
-
|
|
1255
|
-
|
|
1091
|
+
if (message.ConcurrencyScope !== undefined) {
|
|
1092
|
+
ConcurrencyScope.encode(message.ConcurrencyScope, writer.uint32(82).fork()).join();
|
|
1256
1093
|
}
|
|
1257
|
-
if (message.
|
|
1258
|
-
writer.uint32(
|
|
1094
|
+
if (message.Occurred !== undefined) {
|
|
1095
|
+
SerializableDateTimeOffset.encode(message.Occurred, writer.uint32(90).fork()).join();
|
|
1259
1096
|
}
|
|
1260
1097
|
return writer;
|
|
1261
1098
|
},
|
|
1262
1099
|
|
|
1263
|
-
decode(input: BinaryReader | Uint8Array, length?: number):
|
|
1100
|
+
decode(input: BinaryReader | Uint8Array, length?: number): AppendManyRequest {
|
|
1264
1101
|
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1265
1102
|
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
1266
1103
|
if (previousRecursionDepth >= 100) {
|
|
@@ -1269,7 +1106,7 @@ export const AppendManyForEventSourcesRequest: MessageFns<AppendManyForEventSour
|
|
|
1269
1106
|
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
1270
1107
|
try {
|
|
1271
1108
|
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1272
|
-
const message =
|
|
1109
|
+
const message = createBaseAppendManyRequest();
|
|
1273
1110
|
while (reader.pos < end) {
|
|
1274
1111
|
const tag = reader.uint32();
|
|
1275
1112
|
switch (tag >>> 3) {
|
|
@@ -1302,7 +1139,7 @@ export const AppendManyForEventSourcesRequest: MessageFns<AppendManyForEventSour
|
|
|
1302
1139
|
break;
|
|
1303
1140
|
}
|
|
1304
1141
|
|
|
1305
|
-
message.
|
|
1142
|
+
message.EventSourceId = reader.string();
|
|
1306
1143
|
continue;
|
|
1307
1144
|
}
|
|
1308
1145
|
case 5: {
|
|
@@ -1310,7 +1147,7 @@ export const AppendManyForEventSourcesRequest: MessageFns<AppendManyForEventSour
|
|
|
1310
1147
|
break;
|
|
1311
1148
|
}
|
|
1312
1149
|
|
|
1313
|
-
message.
|
|
1150
|
+
message.Events.push(EventToAppend.decode(reader, reader.uint32()));
|
|
1314
1151
|
continue;
|
|
1315
1152
|
}
|
|
1316
1153
|
case 6: {
|
|
@@ -1318,7 +1155,7 @@ export const AppendManyForEventSourcesRequest: MessageFns<AppendManyForEventSour
|
|
|
1318
1155
|
break;
|
|
1319
1156
|
}
|
|
1320
1157
|
|
|
1321
|
-
message.
|
|
1158
|
+
message.CorrelationId = Guid.decode(reader, reader.uint32());
|
|
1322
1159
|
continue;
|
|
1323
1160
|
}
|
|
1324
1161
|
case 7: {
|
|
@@ -1326,7 +1163,7 @@ export const AppendManyForEventSourcesRequest: MessageFns<AppendManyForEventSour
|
|
|
1326
1163
|
break;
|
|
1327
1164
|
}
|
|
1328
1165
|
|
|
1329
|
-
message.
|
|
1166
|
+
message.Tags.push(reader.string());
|
|
1330
1167
|
continue;
|
|
1331
1168
|
}
|
|
1332
1169
|
case 8: {
|
|
@@ -1334,7 +1171,7 @@ export const AppendManyForEventSourcesRequest: MessageFns<AppendManyForEventSour
|
|
|
1334
1171
|
break;
|
|
1335
1172
|
}
|
|
1336
1173
|
|
|
1337
|
-
message.
|
|
1174
|
+
message.Causation.push(Causation.decode(reader, reader.uint32()));
|
|
1338
1175
|
continue;
|
|
1339
1176
|
}
|
|
1340
1177
|
case 9: {
|
|
@@ -1342,15 +1179,23 @@ export const AppendManyForEventSourcesRequest: MessageFns<AppendManyForEventSour
|
|
|
1342
1179
|
break;
|
|
1343
1180
|
}
|
|
1344
1181
|
|
|
1345
|
-
message.
|
|
1182
|
+
message.CausedBy = Identity.decode(reader, reader.uint32());
|
|
1346
1183
|
continue;
|
|
1347
1184
|
}
|
|
1348
1185
|
case 10: {
|
|
1349
|
-
if (tag !==
|
|
1186
|
+
if (tag !== 82) {
|
|
1187
|
+
break;
|
|
1188
|
+
}
|
|
1189
|
+
|
|
1190
|
+
message.ConcurrencyScope = ConcurrencyScope.decode(reader, reader.uint32());
|
|
1191
|
+
continue;
|
|
1192
|
+
}
|
|
1193
|
+
case 11: {
|
|
1194
|
+
if (tag !== 90) {
|
|
1350
1195
|
break;
|
|
1351
1196
|
}
|
|
1352
1197
|
|
|
1353
|
-
message.
|
|
1198
|
+
message.Occurred = SerializableDateTimeOffset.decode(reader, reader.uint32());
|
|
1354
1199
|
continue;
|
|
1355
1200
|
}
|
|
1356
1201
|
}
|
|
@@ -1365,28 +1210,25 @@ export const AppendManyForEventSourcesRequest: MessageFns<AppendManyForEventSour
|
|
|
1365
1210
|
}
|
|
1366
1211
|
},
|
|
1367
1212
|
|
|
1368
|
-
fromJSON(object: any):
|
|
1213
|
+
fromJSON(object: any): AppendManyRequest {
|
|
1369
1214
|
return {
|
|
1370
1215
|
EventStore: isSet(object.EventStore) ? globalThis.String(object.EventStore) : "",
|
|
1371
1216
|
Namespace: isSet(object.Namespace) ? globalThis.String(object.Namespace) : "",
|
|
1372
1217
|
EventSequenceId: isSet(object.EventSequenceId) ? globalThis.String(object.EventSequenceId) : "",
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
: [],
|
|
1218
|
+
EventSourceId: isSet(object.EventSourceId) ? globalThis.String(object.EventSourceId) : "",
|
|
1219
|
+
Events: globalThis.Array.isArray(object?.Events) ? object.Events.map((e: any) => EventToAppend.fromJSON(e)) : [],
|
|
1376
1220
|
CorrelationId: isSet(object.CorrelationId) ? Guid.fromJSON(object.CorrelationId) : undefined,
|
|
1377
1221
|
Tags: globalThis.Array.isArray(object?.Tags) ? object.Tags.map((e: any) => globalThis.String(e)) : [],
|
|
1378
1222
|
Causation: globalThis.Array.isArray(object?.Causation)
|
|
1379
1223
|
? object.Causation.map((e: any) => Causation.fromJSON(e))
|
|
1380
1224
|
: [],
|
|
1381
1225
|
CausedBy: isSet(object.CausedBy) ? Identity.fromJSON(object.CausedBy) : undefined,
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
: [],
|
|
1385
|
-
IncludeReceipts: isSet(object.IncludeReceipts) ? globalThis.Boolean(object.IncludeReceipts) : false,
|
|
1226
|
+
ConcurrencyScope: isSet(object.ConcurrencyScope) ? ConcurrencyScope.fromJSON(object.ConcurrencyScope) : undefined,
|
|
1227
|
+
Occurred: isSet(object.Occurred) ? SerializableDateTimeOffset.fromJSON(object.Occurred) : undefined,
|
|
1386
1228
|
};
|
|
1387
1229
|
},
|
|
1388
1230
|
|
|
1389
|
-
toJSON(message:
|
|
1231
|
+
toJSON(message: AppendManyRequest): unknown {
|
|
1390
1232
|
const obj: any = {};
|
|
1391
1233
|
if (message.EventStore !== "") {
|
|
1392
1234
|
obj.EventStore = message.EventStore;
|
|
@@ -1397,8 +1239,11 @@ export const AppendManyForEventSourcesRequest: MessageFns<AppendManyForEventSour
|
|
|
1397
1239
|
if (message.EventSequenceId !== "") {
|
|
1398
1240
|
obj.EventSequenceId = message.EventSequenceId;
|
|
1399
1241
|
}
|
|
1242
|
+
if (message.EventSourceId !== "") {
|
|
1243
|
+
obj.EventSourceId = message.EventSourceId;
|
|
1244
|
+
}
|
|
1400
1245
|
if (message.Events?.length) {
|
|
1401
|
-
obj.Events = message.Events.map((e) =>
|
|
1246
|
+
obj.Events = message.Events.map((e) => EventToAppend.toJSON(e));
|
|
1402
1247
|
}
|
|
1403
1248
|
if (message.CorrelationId !== undefined) {
|
|
1404
1249
|
obj.CorrelationId = Guid.toJSON(message.CorrelationId);
|
|
@@ -1412,24 +1257,25 @@ export const AppendManyForEventSourcesRequest: MessageFns<AppendManyForEventSour
|
|
|
1412
1257
|
if (message.CausedBy !== undefined) {
|
|
1413
1258
|
obj.CausedBy = Identity.toJSON(message.CausedBy);
|
|
1414
1259
|
}
|
|
1415
|
-
if (message.
|
|
1416
|
-
obj.
|
|
1260
|
+
if (message.ConcurrencyScope !== undefined) {
|
|
1261
|
+
obj.ConcurrencyScope = ConcurrencyScope.toJSON(message.ConcurrencyScope);
|
|
1417
1262
|
}
|
|
1418
|
-
if (message.
|
|
1419
|
-
obj.
|
|
1263
|
+
if (message.Occurred !== undefined) {
|
|
1264
|
+
obj.Occurred = SerializableDateTimeOffset.toJSON(message.Occurred);
|
|
1420
1265
|
}
|
|
1421
1266
|
return obj;
|
|
1422
1267
|
},
|
|
1423
1268
|
|
|
1424
|
-
create(base?: DeepPartial<
|
|
1425
|
-
return
|
|
1269
|
+
create(base?: DeepPartial<AppendManyRequest>): AppendManyRequest {
|
|
1270
|
+
return AppendManyRequest.fromPartial(base ?? {});
|
|
1426
1271
|
},
|
|
1427
|
-
fromPartial(object: DeepPartial<
|
|
1428
|
-
const message =
|
|
1272
|
+
fromPartial(object: DeepPartial<AppendManyRequest>): AppendManyRequest {
|
|
1273
|
+
const message = createBaseAppendManyRequest();
|
|
1429
1274
|
message.EventStore = object.EventStore ?? "";
|
|
1430
1275
|
message.Namespace = object.Namespace ?? "";
|
|
1431
1276
|
message.EventSequenceId = object.EventSequenceId ?? "";
|
|
1432
|
-
message.
|
|
1277
|
+
message.EventSourceId = object.EventSourceId ?? "";
|
|
1278
|
+
message.Events = object.Events?.map((e) => EventToAppend.fromPartial(e)) || [];
|
|
1433
1279
|
message.CorrelationId = (object.CorrelationId !== undefined && object.CorrelationId !== null)
|
|
1434
1280
|
? Guid.fromPartial(object.CorrelationId)
|
|
1435
1281
|
: undefined;
|
|
@@ -1438,636 +1284,70 @@ export const AppendManyForEventSourcesRequest: MessageFns<AppendManyForEventSour
|
|
|
1438
1284
|
message.CausedBy = (object.CausedBy !== undefined && object.CausedBy !== null)
|
|
1439
1285
|
? Identity.fromPartial(object.CausedBy)
|
|
1440
1286
|
: undefined;
|
|
1441
|
-
message.
|
|
1442
|
-
|
|
1287
|
+
message.ConcurrencyScope = (object.ConcurrencyScope !== undefined && object.ConcurrencyScope !== null)
|
|
1288
|
+
? ConcurrencyScope.fromPartial(object.ConcurrencyScope)
|
|
1289
|
+
: undefined;
|
|
1290
|
+
message.Occurred = (object.Occurred !== undefined && object.Occurred !== null)
|
|
1291
|
+
? SerializableDateTimeOffset.fromPartial(object.Occurred)
|
|
1292
|
+
: undefined;
|
|
1443
1293
|
return message;
|
|
1444
1294
|
},
|
|
1445
1295
|
};
|
|
1446
1296
|
|
|
1447
|
-
function
|
|
1297
|
+
function createBaseAppendManyResponse(): AppendManyResponse {
|
|
1448
1298
|
return {
|
|
1449
|
-
EventStore: "",
|
|
1450
|
-
Namespace: "",
|
|
1451
|
-
EventSequenceId: "",
|
|
1452
|
-
EventSourceId: "",
|
|
1453
|
-
Events: [],
|
|
1454
1299
|
CorrelationId: undefined,
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1300
|
+
SequenceNumbers: [],
|
|
1301
|
+
IsSuccess: false,
|
|
1302
|
+
HasConstraintViolations: false,
|
|
1303
|
+
HasConcurrencyViolations: false,
|
|
1304
|
+
HasErrors: false,
|
|
1305
|
+
ConcurrencyCheckPerformed: false,
|
|
1306
|
+
ConstraintViolations: [],
|
|
1307
|
+
Errors: [],
|
|
1308
|
+
ConcurrencyViolations: [],
|
|
1461
1309
|
};
|
|
1462
1310
|
}
|
|
1463
1311
|
|
|
1464
|
-
export const
|
|
1465
|
-
encode(message:
|
|
1466
|
-
if (message.
|
|
1467
|
-
writer.uint32(10).
|
|
1312
|
+
export const AppendManyResponse: MessageFns<AppendManyResponse> = {
|
|
1313
|
+
encode(message: AppendManyResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1314
|
+
if (message.CorrelationId !== undefined) {
|
|
1315
|
+
Guid.encode(message.CorrelationId, writer.uint32(10).fork()).join();
|
|
1468
1316
|
}
|
|
1469
|
-
|
|
1470
|
-
|
|
1317
|
+
for (const v of message.SequenceNumbers) {
|
|
1318
|
+
if (BigInt.asUintN(64, v!) !== v!) {
|
|
1319
|
+
throw new globalThis.Error("value provided for field v! of type uint64 too large");
|
|
1320
|
+
}
|
|
1321
|
+
writer.uint32(16).uint64(v!);
|
|
1471
1322
|
}
|
|
1472
|
-
if (message.
|
|
1473
|
-
writer.uint32(
|
|
1474
|
-
}
|
|
1475
|
-
if (message.EventSourceId !== "") {
|
|
1476
|
-
writer.uint32(34).string(message.EventSourceId);
|
|
1477
|
-
}
|
|
1478
|
-
for (const v of message.Events) {
|
|
1479
|
-
EventToAppend.encode(v!, writer.uint32(42).fork()).join();
|
|
1480
|
-
}
|
|
1481
|
-
if (message.CorrelationId !== undefined) {
|
|
1482
|
-
Guid.encode(message.CorrelationId, writer.uint32(50).fork()).join();
|
|
1483
|
-
}
|
|
1484
|
-
for (const v of message.Tags) {
|
|
1485
|
-
writer.uint32(58).string(v!);
|
|
1486
|
-
}
|
|
1487
|
-
for (const v of message.Causation) {
|
|
1488
|
-
Causation.encode(v!, writer.uint32(66).fork()).join();
|
|
1489
|
-
}
|
|
1490
|
-
if (message.CausedBy !== undefined) {
|
|
1491
|
-
Identity.encode(message.CausedBy, writer.uint32(74).fork()).join();
|
|
1492
|
-
}
|
|
1493
|
-
if (message.ConcurrencyScope !== undefined) {
|
|
1494
|
-
ConcurrencyScope.encode(message.ConcurrencyScope, writer.uint32(82).fork()).join();
|
|
1495
|
-
}
|
|
1496
|
-
if (message.Occurred !== undefined) {
|
|
1497
|
-
SerializableDateTimeOffset.encode(message.Occurred, writer.uint32(90).fork()).join();
|
|
1498
|
-
}
|
|
1499
|
-
if (message.IncludeReceipts !== false) {
|
|
1500
|
-
writer.uint32(96).bool(message.IncludeReceipts);
|
|
1501
|
-
}
|
|
1502
|
-
return writer;
|
|
1503
|
-
},
|
|
1504
|
-
|
|
1505
|
-
decode(input: BinaryReader | Uint8Array, length?: number): AppendManyRequest {
|
|
1506
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1507
|
-
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
1508
|
-
if (previousRecursionDepth >= 100) {
|
|
1509
|
-
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
1510
|
-
}
|
|
1511
|
-
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
1512
|
-
try {
|
|
1513
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1514
|
-
const message = createBaseAppendManyRequest();
|
|
1515
|
-
while (reader.pos < end) {
|
|
1516
|
-
const tag = reader.uint32();
|
|
1517
|
-
switch (tag >>> 3) {
|
|
1518
|
-
case 1: {
|
|
1519
|
-
if (tag !== 10) {
|
|
1520
|
-
break;
|
|
1521
|
-
}
|
|
1522
|
-
|
|
1523
|
-
message.EventStore = reader.string();
|
|
1524
|
-
continue;
|
|
1525
|
-
}
|
|
1526
|
-
case 2: {
|
|
1527
|
-
if (tag !== 18) {
|
|
1528
|
-
break;
|
|
1529
|
-
}
|
|
1530
|
-
|
|
1531
|
-
message.Namespace = reader.string();
|
|
1532
|
-
continue;
|
|
1533
|
-
}
|
|
1534
|
-
case 3: {
|
|
1535
|
-
if (tag !== 26) {
|
|
1536
|
-
break;
|
|
1537
|
-
}
|
|
1538
|
-
|
|
1539
|
-
message.EventSequenceId = reader.string();
|
|
1540
|
-
continue;
|
|
1541
|
-
}
|
|
1542
|
-
case 4: {
|
|
1543
|
-
if (tag !== 34) {
|
|
1544
|
-
break;
|
|
1545
|
-
}
|
|
1546
|
-
|
|
1547
|
-
message.EventSourceId = reader.string();
|
|
1548
|
-
continue;
|
|
1549
|
-
}
|
|
1550
|
-
case 5: {
|
|
1551
|
-
if (tag !== 42) {
|
|
1552
|
-
break;
|
|
1553
|
-
}
|
|
1554
|
-
|
|
1555
|
-
message.Events.push(EventToAppend.decode(reader, reader.uint32()));
|
|
1556
|
-
continue;
|
|
1557
|
-
}
|
|
1558
|
-
case 6: {
|
|
1559
|
-
if (tag !== 50) {
|
|
1560
|
-
break;
|
|
1561
|
-
}
|
|
1562
|
-
|
|
1563
|
-
message.CorrelationId = Guid.decode(reader, reader.uint32());
|
|
1564
|
-
continue;
|
|
1565
|
-
}
|
|
1566
|
-
case 7: {
|
|
1567
|
-
if (tag !== 58) {
|
|
1568
|
-
break;
|
|
1569
|
-
}
|
|
1570
|
-
|
|
1571
|
-
message.Tags.push(reader.string());
|
|
1572
|
-
continue;
|
|
1573
|
-
}
|
|
1574
|
-
case 8: {
|
|
1575
|
-
if (tag !== 66) {
|
|
1576
|
-
break;
|
|
1577
|
-
}
|
|
1578
|
-
|
|
1579
|
-
message.Causation.push(Causation.decode(reader, reader.uint32()));
|
|
1580
|
-
continue;
|
|
1581
|
-
}
|
|
1582
|
-
case 9: {
|
|
1583
|
-
if (tag !== 74) {
|
|
1584
|
-
break;
|
|
1585
|
-
}
|
|
1586
|
-
|
|
1587
|
-
message.CausedBy = Identity.decode(reader, reader.uint32());
|
|
1588
|
-
continue;
|
|
1589
|
-
}
|
|
1590
|
-
case 10: {
|
|
1591
|
-
if (tag !== 82) {
|
|
1592
|
-
break;
|
|
1593
|
-
}
|
|
1594
|
-
|
|
1595
|
-
message.ConcurrencyScope = ConcurrencyScope.decode(reader, reader.uint32());
|
|
1596
|
-
continue;
|
|
1597
|
-
}
|
|
1598
|
-
case 11: {
|
|
1599
|
-
if (tag !== 90) {
|
|
1600
|
-
break;
|
|
1601
|
-
}
|
|
1602
|
-
|
|
1603
|
-
message.Occurred = SerializableDateTimeOffset.decode(reader, reader.uint32());
|
|
1604
|
-
continue;
|
|
1605
|
-
}
|
|
1606
|
-
case 12: {
|
|
1607
|
-
if (tag !== 96) {
|
|
1608
|
-
break;
|
|
1609
|
-
}
|
|
1610
|
-
|
|
1611
|
-
message.IncludeReceipts = reader.bool();
|
|
1612
|
-
continue;
|
|
1613
|
-
}
|
|
1614
|
-
}
|
|
1615
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
1616
|
-
break;
|
|
1617
|
-
}
|
|
1618
|
-
reader.skip(tag & 7);
|
|
1619
|
-
}
|
|
1620
|
-
return message;
|
|
1621
|
-
} finally {
|
|
1622
|
-
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
1623
|
-
}
|
|
1624
|
-
},
|
|
1625
|
-
|
|
1626
|
-
fromJSON(object: any): AppendManyRequest {
|
|
1627
|
-
return {
|
|
1628
|
-
EventStore: isSet(object.EventStore) ? globalThis.String(object.EventStore) : "",
|
|
1629
|
-
Namespace: isSet(object.Namespace) ? globalThis.String(object.Namespace) : "",
|
|
1630
|
-
EventSequenceId: isSet(object.EventSequenceId) ? globalThis.String(object.EventSequenceId) : "",
|
|
1631
|
-
EventSourceId: isSet(object.EventSourceId) ? globalThis.String(object.EventSourceId) : "",
|
|
1632
|
-
Events: globalThis.Array.isArray(object?.Events) ? object.Events.map((e: any) => EventToAppend.fromJSON(e)) : [],
|
|
1633
|
-
CorrelationId: isSet(object.CorrelationId) ? Guid.fromJSON(object.CorrelationId) : undefined,
|
|
1634
|
-
Tags: globalThis.Array.isArray(object?.Tags) ? object.Tags.map((e: any) => globalThis.String(e)) : [],
|
|
1635
|
-
Causation: globalThis.Array.isArray(object?.Causation)
|
|
1636
|
-
? object.Causation.map((e: any) => Causation.fromJSON(e))
|
|
1637
|
-
: [],
|
|
1638
|
-
CausedBy: isSet(object.CausedBy) ? Identity.fromJSON(object.CausedBy) : undefined,
|
|
1639
|
-
ConcurrencyScope: isSet(object.ConcurrencyScope) ? ConcurrencyScope.fromJSON(object.ConcurrencyScope) : undefined,
|
|
1640
|
-
Occurred: isSet(object.Occurred) ? SerializableDateTimeOffset.fromJSON(object.Occurred) : undefined,
|
|
1641
|
-
IncludeReceipts: isSet(object.IncludeReceipts) ? globalThis.Boolean(object.IncludeReceipts) : false,
|
|
1642
|
-
};
|
|
1643
|
-
},
|
|
1644
|
-
|
|
1645
|
-
toJSON(message: AppendManyRequest): unknown {
|
|
1646
|
-
const obj: any = {};
|
|
1647
|
-
if (message.EventStore !== "") {
|
|
1648
|
-
obj.EventStore = message.EventStore;
|
|
1649
|
-
}
|
|
1650
|
-
if (message.Namespace !== "") {
|
|
1651
|
-
obj.Namespace = message.Namespace;
|
|
1652
|
-
}
|
|
1653
|
-
if (message.EventSequenceId !== "") {
|
|
1654
|
-
obj.EventSequenceId = message.EventSequenceId;
|
|
1655
|
-
}
|
|
1656
|
-
if (message.EventSourceId !== "") {
|
|
1657
|
-
obj.EventSourceId = message.EventSourceId;
|
|
1658
|
-
}
|
|
1659
|
-
if (message.Events?.length) {
|
|
1660
|
-
obj.Events = message.Events.map((e) => EventToAppend.toJSON(e));
|
|
1661
|
-
}
|
|
1662
|
-
if (message.CorrelationId !== undefined) {
|
|
1663
|
-
obj.CorrelationId = Guid.toJSON(message.CorrelationId);
|
|
1664
|
-
}
|
|
1665
|
-
if (message.Tags?.length) {
|
|
1666
|
-
obj.Tags = message.Tags;
|
|
1667
|
-
}
|
|
1668
|
-
if (message.Causation?.length) {
|
|
1669
|
-
obj.Causation = message.Causation.map((e) => Causation.toJSON(e));
|
|
1670
|
-
}
|
|
1671
|
-
if (message.CausedBy !== undefined) {
|
|
1672
|
-
obj.CausedBy = Identity.toJSON(message.CausedBy);
|
|
1673
|
-
}
|
|
1674
|
-
if (message.ConcurrencyScope !== undefined) {
|
|
1675
|
-
obj.ConcurrencyScope = ConcurrencyScope.toJSON(message.ConcurrencyScope);
|
|
1676
|
-
}
|
|
1677
|
-
if (message.Occurred !== undefined) {
|
|
1678
|
-
obj.Occurred = SerializableDateTimeOffset.toJSON(message.Occurred);
|
|
1679
|
-
}
|
|
1680
|
-
if (message.IncludeReceipts !== false) {
|
|
1681
|
-
obj.IncludeReceipts = message.IncludeReceipts;
|
|
1682
|
-
}
|
|
1683
|
-
return obj;
|
|
1684
|
-
},
|
|
1685
|
-
|
|
1686
|
-
create(base?: DeepPartial<AppendManyRequest>): AppendManyRequest {
|
|
1687
|
-
return AppendManyRequest.fromPartial(base ?? {});
|
|
1688
|
-
},
|
|
1689
|
-
fromPartial(object: DeepPartial<AppendManyRequest>): AppendManyRequest {
|
|
1690
|
-
const message = createBaseAppendManyRequest();
|
|
1691
|
-
message.EventStore = object.EventStore ?? "";
|
|
1692
|
-
message.Namespace = object.Namespace ?? "";
|
|
1693
|
-
message.EventSequenceId = object.EventSequenceId ?? "";
|
|
1694
|
-
message.EventSourceId = object.EventSourceId ?? "";
|
|
1695
|
-
message.Events = object.Events?.map((e) => EventToAppend.fromPartial(e)) || [];
|
|
1696
|
-
message.CorrelationId = (object.CorrelationId !== undefined && object.CorrelationId !== null)
|
|
1697
|
-
? Guid.fromPartial(object.CorrelationId)
|
|
1698
|
-
: undefined;
|
|
1699
|
-
message.Tags = object.Tags?.map((e) => e) || [];
|
|
1700
|
-
message.Causation = object.Causation?.map((e) => Causation.fromPartial(e)) || [];
|
|
1701
|
-
message.CausedBy = (object.CausedBy !== undefined && object.CausedBy !== null)
|
|
1702
|
-
? Identity.fromPartial(object.CausedBy)
|
|
1703
|
-
: undefined;
|
|
1704
|
-
message.ConcurrencyScope = (object.ConcurrencyScope !== undefined && object.ConcurrencyScope !== null)
|
|
1705
|
-
? ConcurrencyScope.fromPartial(object.ConcurrencyScope)
|
|
1706
|
-
: undefined;
|
|
1707
|
-
message.Occurred = (object.Occurred !== undefined && object.Occurred !== null)
|
|
1708
|
-
? SerializableDateTimeOffset.fromPartial(object.Occurred)
|
|
1709
|
-
: undefined;
|
|
1710
|
-
message.IncludeReceipts = object.IncludeReceipts ?? false;
|
|
1711
|
-
return message;
|
|
1712
|
-
},
|
|
1713
|
-
};
|
|
1714
|
-
|
|
1715
|
-
function createBaseAppendManyResponse(): AppendManyResponse {
|
|
1716
|
-
return {
|
|
1717
|
-
CorrelationId: undefined,
|
|
1718
|
-
SequenceNumbers: [],
|
|
1719
|
-
IsSuccess: false,
|
|
1720
|
-
HasConstraintViolations: false,
|
|
1721
|
-
HasConcurrencyViolations: false,
|
|
1722
|
-
HasErrors: false,
|
|
1723
|
-
ConcurrencyCheckPerformed: false,
|
|
1724
|
-
ConstraintViolations: [],
|
|
1725
|
-
Errors: [],
|
|
1726
|
-
ConcurrencyViolations: [],
|
|
1727
|
-
Receipts: [],
|
|
1728
|
-
};
|
|
1729
|
-
}
|
|
1730
|
-
|
|
1731
|
-
export const AppendManyResponse: MessageFns<AppendManyResponse> = {
|
|
1732
|
-
encode(message: AppendManyResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1733
|
-
if (message.CorrelationId !== undefined) {
|
|
1734
|
-
Guid.encode(message.CorrelationId, writer.uint32(10).fork()).join();
|
|
1735
|
-
}
|
|
1736
|
-
for (const v of message.SequenceNumbers) {
|
|
1737
|
-
if (BigInt.asUintN(64, v!) !== v!) {
|
|
1738
|
-
throw new globalThis.Error("value provided for field v! of type uint64 too large");
|
|
1739
|
-
}
|
|
1740
|
-
writer.uint32(16).uint64(v!);
|
|
1741
|
-
}
|
|
1742
|
-
if (message.IsSuccess !== false) {
|
|
1743
|
-
writer.uint32(24).bool(message.IsSuccess);
|
|
1744
|
-
}
|
|
1745
|
-
if (message.HasConstraintViolations !== false) {
|
|
1746
|
-
writer.uint32(32).bool(message.HasConstraintViolations);
|
|
1747
|
-
}
|
|
1748
|
-
if (message.HasConcurrencyViolations !== false) {
|
|
1749
|
-
writer.uint32(40).bool(message.HasConcurrencyViolations);
|
|
1750
|
-
}
|
|
1751
|
-
if (message.HasErrors !== false) {
|
|
1752
|
-
writer.uint32(48).bool(message.HasErrors);
|
|
1753
|
-
}
|
|
1754
|
-
if (message.ConcurrencyCheckPerformed !== false) {
|
|
1755
|
-
writer.uint32(56).bool(message.ConcurrencyCheckPerformed);
|
|
1756
|
-
}
|
|
1757
|
-
for (const v of message.ConstraintViolations) {
|
|
1758
|
-
ConstraintViolation.encode(v!, writer.uint32(66).fork()).join();
|
|
1759
|
-
}
|
|
1760
|
-
for (const v of message.Errors) {
|
|
1761
|
-
writer.uint32(74).string(v!);
|
|
1762
|
-
}
|
|
1763
|
-
for (const v of message.ConcurrencyViolations) {
|
|
1764
|
-
ConcurrencyViolation.encode(v!, writer.uint32(82).fork()).join();
|
|
1765
|
-
}
|
|
1766
|
-
for (const v of message.Receipts) {
|
|
1767
|
-
AppendReceipt.encode(v!, writer.uint32(90).fork()).join();
|
|
1768
|
-
}
|
|
1769
|
-
return writer;
|
|
1770
|
-
},
|
|
1771
|
-
|
|
1772
|
-
decode(input: BinaryReader | Uint8Array, length?: number): AppendManyResponse {
|
|
1773
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1774
|
-
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
1775
|
-
if (previousRecursionDepth >= 100) {
|
|
1776
|
-
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
1777
|
-
}
|
|
1778
|
-
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
1779
|
-
try {
|
|
1780
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1781
|
-
const message = createBaseAppendManyResponse();
|
|
1782
|
-
while (reader.pos < end) {
|
|
1783
|
-
const tag = reader.uint32();
|
|
1784
|
-
switch (tag >>> 3) {
|
|
1785
|
-
case 1: {
|
|
1786
|
-
if (tag !== 10) {
|
|
1787
|
-
break;
|
|
1788
|
-
}
|
|
1789
|
-
|
|
1790
|
-
message.CorrelationId = Guid.decode(reader, reader.uint32());
|
|
1791
|
-
continue;
|
|
1792
|
-
}
|
|
1793
|
-
case 2: {
|
|
1794
|
-
if (tag === 16) {
|
|
1795
|
-
message.SequenceNumbers.push(reader.uint64() as bigint);
|
|
1796
|
-
|
|
1797
|
-
continue;
|
|
1798
|
-
}
|
|
1799
|
-
|
|
1800
|
-
if (tag === 18) {
|
|
1801
|
-
const end2 = reader.uint32() + reader.pos;
|
|
1802
|
-
while (reader.pos < end2) {
|
|
1803
|
-
message.SequenceNumbers.push(reader.uint64() as bigint);
|
|
1804
|
-
}
|
|
1805
|
-
|
|
1806
|
-
continue;
|
|
1807
|
-
}
|
|
1808
|
-
|
|
1809
|
-
break;
|
|
1810
|
-
}
|
|
1811
|
-
case 3: {
|
|
1812
|
-
if (tag !== 24) {
|
|
1813
|
-
break;
|
|
1814
|
-
}
|
|
1815
|
-
|
|
1816
|
-
message.IsSuccess = reader.bool();
|
|
1817
|
-
continue;
|
|
1818
|
-
}
|
|
1819
|
-
case 4: {
|
|
1820
|
-
if (tag !== 32) {
|
|
1821
|
-
break;
|
|
1822
|
-
}
|
|
1823
|
-
|
|
1824
|
-
message.HasConstraintViolations = reader.bool();
|
|
1825
|
-
continue;
|
|
1826
|
-
}
|
|
1827
|
-
case 5: {
|
|
1828
|
-
if (tag !== 40) {
|
|
1829
|
-
break;
|
|
1830
|
-
}
|
|
1831
|
-
|
|
1832
|
-
message.HasConcurrencyViolations = reader.bool();
|
|
1833
|
-
continue;
|
|
1834
|
-
}
|
|
1835
|
-
case 6: {
|
|
1836
|
-
if (tag !== 48) {
|
|
1837
|
-
break;
|
|
1838
|
-
}
|
|
1839
|
-
|
|
1840
|
-
message.HasErrors = reader.bool();
|
|
1841
|
-
continue;
|
|
1842
|
-
}
|
|
1843
|
-
case 7: {
|
|
1844
|
-
if (tag !== 56) {
|
|
1845
|
-
break;
|
|
1846
|
-
}
|
|
1847
|
-
|
|
1848
|
-
message.ConcurrencyCheckPerformed = reader.bool();
|
|
1849
|
-
continue;
|
|
1850
|
-
}
|
|
1851
|
-
case 8: {
|
|
1852
|
-
if (tag !== 66) {
|
|
1853
|
-
break;
|
|
1854
|
-
}
|
|
1855
|
-
|
|
1856
|
-
message.ConstraintViolations.push(ConstraintViolation.decode(reader, reader.uint32()));
|
|
1857
|
-
continue;
|
|
1858
|
-
}
|
|
1859
|
-
case 9: {
|
|
1860
|
-
if (tag !== 74) {
|
|
1861
|
-
break;
|
|
1862
|
-
}
|
|
1863
|
-
|
|
1864
|
-
message.Errors.push(reader.string());
|
|
1865
|
-
continue;
|
|
1866
|
-
}
|
|
1867
|
-
case 10: {
|
|
1868
|
-
if (tag !== 82) {
|
|
1869
|
-
break;
|
|
1870
|
-
}
|
|
1871
|
-
|
|
1872
|
-
message.ConcurrencyViolations.push(ConcurrencyViolation.decode(reader, reader.uint32()));
|
|
1873
|
-
continue;
|
|
1874
|
-
}
|
|
1875
|
-
case 11: {
|
|
1876
|
-
if (tag !== 90) {
|
|
1877
|
-
break;
|
|
1878
|
-
}
|
|
1879
|
-
|
|
1880
|
-
message.Receipts.push(AppendReceipt.decode(reader, reader.uint32()));
|
|
1881
|
-
continue;
|
|
1882
|
-
}
|
|
1883
|
-
}
|
|
1884
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
1885
|
-
break;
|
|
1886
|
-
}
|
|
1887
|
-
reader.skip(tag & 7);
|
|
1888
|
-
}
|
|
1889
|
-
return message;
|
|
1890
|
-
} finally {
|
|
1891
|
-
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
1892
|
-
}
|
|
1893
|
-
},
|
|
1894
|
-
|
|
1895
|
-
fromJSON(object: any): AppendManyResponse {
|
|
1896
|
-
return {
|
|
1897
|
-
CorrelationId: isSet(object.CorrelationId) ? Guid.fromJSON(object.CorrelationId) : undefined,
|
|
1898
|
-
SequenceNumbers: globalThis.Array.isArray(object?.SequenceNumbers)
|
|
1899
|
-
? object.SequenceNumbers.map((e: any) => BigInt(e))
|
|
1900
|
-
: [],
|
|
1901
|
-
IsSuccess: isSet(object.IsSuccess) ? globalThis.Boolean(object.IsSuccess) : false,
|
|
1902
|
-
HasConstraintViolations: isSet(object.HasConstraintViolations)
|
|
1903
|
-
? globalThis.Boolean(object.HasConstraintViolations)
|
|
1904
|
-
: false,
|
|
1905
|
-
HasConcurrencyViolations: isSet(object.HasConcurrencyViolations)
|
|
1906
|
-
? globalThis.Boolean(object.HasConcurrencyViolations)
|
|
1907
|
-
: false,
|
|
1908
|
-
HasErrors: isSet(object.HasErrors) ? globalThis.Boolean(object.HasErrors) : false,
|
|
1909
|
-
ConcurrencyCheckPerformed: isSet(object.ConcurrencyCheckPerformed)
|
|
1910
|
-
? globalThis.Boolean(object.ConcurrencyCheckPerformed)
|
|
1911
|
-
: false,
|
|
1912
|
-
ConstraintViolations: globalThis.Array.isArray(object?.ConstraintViolations)
|
|
1913
|
-
? object.ConstraintViolations.map((e: any) => ConstraintViolation.fromJSON(e))
|
|
1914
|
-
: [],
|
|
1915
|
-
Errors: globalThis.Array.isArray(object?.Errors) ? object.Errors.map((e: any) => globalThis.String(e)) : [],
|
|
1916
|
-
ConcurrencyViolations: globalThis.Array.isArray(object?.ConcurrencyViolations)
|
|
1917
|
-
? object.ConcurrencyViolations.map((e: any) => ConcurrencyViolation.fromJSON(e))
|
|
1918
|
-
: [],
|
|
1919
|
-
Receipts: globalThis.Array.isArray(object?.Receipts)
|
|
1920
|
-
? object.Receipts.map((e: any) => AppendReceipt.fromJSON(e))
|
|
1921
|
-
: [],
|
|
1922
|
-
};
|
|
1923
|
-
},
|
|
1924
|
-
|
|
1925
|
-
toJSON(message: AppendManyResponse): unknown {
|
|
1926
|
-
const obj: any = {};
|
|
1927
|
-
if (message.CorrelationId !== undefined) {
|
|
1928
|
-
obj.CorrelationId = Guid.toJSON(message.CorrelationId);
|
|
1929
|
-
}
|
|
1930
|
-
if (message.SequenceNumbers?.length) {
|
|
1931
|
-
obj.SequenceNumbers = message.SequenceNumbers.map((e) => e.toString());
|
|
1932
|
-
}
|
|
1933
|
-
if (message.IsSuccess !== false) {
|
|
1934
|
-
obj.IsSuccess = message.IsSuccess;
|
|
1323
|
+
if (message.IsSuccess !== false) {
|
|
1324
|
+
writer.uint32(24).bool(message.IsSuccess);
|
|
1935
1325
|
}
|
|
1936
1326
|
if (message.HasConstraintViolations !== false) {
|
|
1937
|
-
|
|
1327
|
+
writer.uint32(32).bool(message.HasConstraintViolations);
|
|
1938
1328
|
}
|
|
1939
1329
|
if (message.HasConcurrencyViolations !== false) {
|
|
1940
|
-
|
|
1330
|
+
writer.uint32(40).bool(message.HasConcurrencyViolations);
|
|
1941
1331
|
}
|
|
1942
1332
|
if (message.HasErrors !== false) {
|
|
1943
|
-
|
|
1333
|
+
writer.uint32(48).bool(message.HasErrors);
|
|
1944
1334
|
}
|
|
1945
1335
|
if (message.ConcurrencyCheckPerformed !== false) {
|
|
1946
|
-
|
|
1947
|
-
}
|
|
1948
|
-
if (message.ConstraintViolations?.length) {
|
|
1949
|
-
obj.ConstraintViolations = message.ConstraintViolations.map((e) => ConstraintViolation.toJSON(e));
|
|
1950
|
-
}
|
|
1951
|
-
if (message.Errors?.length) {
|
|
1952
|
-
obj.Errors = message.Errors;
|
|
1953
|
-
}
|
|
1954
|
-
if (message.ConcurrencyViolations?.length) {
|
|
1955
|
-
obj.ConcurrencyViolations = message.ConcurrencyViolations.map((e) => ConcurrencyViolation.toJSON(e));
|
|
1956
|
-
}
|
|
1957
|
-
if (message.Receipts?.length) {
|
|
1958
|
-
obj.Receipts = message.Receipts.map((e) => AppendReceipt.toJSON(e));
|
|
1959
|
-
}
|
|
1960
|
-
return obj;
|
|
1961
|
-
},
|
|
1962
|
-
|
|
1963
|
-
create(base?: DeepPartial<AppendManyResponse>): AppendManyResponse {
|
|
1964
|
-
return AppendManyResponse.fromPartial(base ?? {});
|
|
1965
|
-
},
|
|
1966
|
-
fromPartial(object: DeepPartial<AppendManyResponse>): AppendManyResponse {
|
|
1967
|
-
const message = createBaseAppendManyResponse();
|
|
1968
|
-
message.CorrelationId = (object.CorrelationId !== undefined && object.CorrelationId !== null)
|
|
1969
|
-
? Guid.fromPartial(object.CorrelationId)
|
|
1970
|
-
: undefined;
|
|
1971
|
-
message.SequenceNumbers = object.SequenceNumbers?.map((e) => BigInt(e)) || [];
|
|
1972
|
-
message.IsSuccess = object.IsSuccess ?? false;
|
|
1973
|
-
message.HasConstraintViolations = object.HasConstraintViolations ?? false;
|
|
1974
|
-
message.HasConcurrencyViolations = object.HasConcurrencyViolations ?? false;
|
|
1975
|
-
message.HasErrors = object.HasErrors ?? false;
|
|
1976
|
-
message.ConcurrencyCheckPerformed = object.ConcurrencyCheckPerformed ?? false;
|
|
1977
|
-
message.ConstraintViolations = object.ConstraintViolations?.map((e) => ConstraintViolation.fromPartial(e)) || [];
|
|
1978
|
-
message.Errors = object.Errors?.map((e) => e) || [];
|
|
1979
|
-
message.ConcurrencyViolations = object.ConcurrencyViolations?.map((e) => ConcurrencyViolation.fromPartial(e)) || [];
|
|
1980
|
-
message.Receipts = object.Receipts?.map((e) => AppendReceipt.fromPartial(e)) || [];
|
|
1981
|
-
return message;
|
|
1982
|
-
},
|
|
1983
|
-
};
|
|
1984
|
-
|
|
1985
|
-
function createBaseAppendReceipt(): AppendReceipt {
|
|
1986
|
-
return {
|
|
1987
|
-
EventStore: "",
|
|
1988
|
-
Namespace: "",
|
|
1989
|
-
SequenceNumber: 0n,
|
|
1990
|
-
EventTypeId: "",
|
|
1991
|
-
Generation: 0,
|
|
1992
|
-
Tombstone: false,
|
|
1993
|
-
EventSourceType: "",
|
|
1994
|
-
EventSourceId: "",
|
|
1995
|
-
EventStreamType: "",
|
|
1996
|
-
EventStreamId: "",
|
|
1997
|
-
Occurred: undefined,
|
|
1998
|
-
CorrelationId: undefined,
|
|
1999
|
-
Subject: "",
|
|
2000
|
-
Tags: [],
|
|
2001
|
-
Hash: "",
|
|
2002
|
-
Causation: [],
|
|
2003
|
-
CausedBy: undefined,
|
|
2004
|
-
ObservationState: 0,
|
|
2005
|
-
};
|
|
2006
|
-
}
|
|
2007
|
-
|
|
2008
|
-
export const AppendReceipt: MessageFns<AppendReceipt> = {
|
|
2009
|
-
encode(message: AppendReceipt, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
2010
|
-
if (message.EventStore !== "") {
|
|
2011
|
-
writer.uint32(10).string(message.EventStore);
|
|
2012
|
-
}
|
|
2013
|
-
if (message.Namespace !== "") {
|
|
2014
|
-
writer.uint32(18).string(message.Namespace);
|
|
2015
|
-
}
|
|
2016
|
-
if (message.SequenceNumber !== 0n) {
|
|
2017
|
-
if (BigInt.asUintN(64, message.SequenceNumber) !== message.SequenceNumber) {
|
|
2018
|
-
throw new globalThis.Error("value provided for field message.SequenceNumber of type uint64 too large");
|
|
2019
|
-
}
|
|
2020
|
-
writer.uint32(24).uint64(message.SequenceNumber);
|
|
2021
|
-
}
|
|
2022
|
-
if (message.EventTypeId !== "") {
|
|
2023
|
-
writer.uint32(34).string(message.EventTypeId);
|
|
2024
|
-
}
|
|
2025
|
-
if (message.Generation !== 0) {
|
|
2026
|
-
writer.uint32(40).uint32(message.Generation);
|
|
2027
|
-
}
|
|
2028
|
-
if (message.Tombstone !== false) {
|
|
2029
|
-
writer.uint32(48).bool(message.Tombstone);
|
|
2030
|
-
}
|
|
2031
|
-
if (message.EventSourceType !== "") {
|
|
2032
|
-
writer.uint32(58).string(message.EventSourceType);
|
|
2033
|
-
}
|
|
2034
|
-
if (message.EventSourceId !== "") {
|
|
2035
|
-
writer.uint32(66).string(message.EventSourceId);
|
|
2036
|
-
}
|
|
2037
|
-
if (message.EventStreamType !== "") {
|
|
2038
|
-
writer.uint32(74).string(message.EventStreamType);
|
|
2039
|
-
}
|
|
2040
|
-
if (message.EventStreamId !== "") {
|
|
2041
|
-
writer.uint32(82).string(message.EventStreamId);
|
|
2042
|
-
}
|
|
2043
|
-
if (message.Occurred !== undefined) {
|
|
2044
|
-
SerializableDateTimeOffset.encode(message.Occurred, writer.uint32(90).fork()).join();
|
|
2045
|
-
}
|
|
2046
|
-
if (message.CorrelationId !== undefined) {
|
|
2047
|
-
Guid.encode(message.CorrelationId, writer.uint32(98).fork()).join();
|
|
2048
|
-
}
|
|
2049
|
-
if (message.Subject !== "") {
|
|
2050
|
-
writer.uint32(106).string(message.Subject);
|
|
2051
|
-
}
|
|
2052
|
-
for (const v of message.Tags) {
|
|
2053
|
-
writer.uint32(114).string(v!);
|
|
2054
|
-
}
|
|
2055
|
-
if (message.Hash !== "") {
|
|
2056
|
-
writer.uint32(122).string(message.Hash);
|
|
1336
|
+
writer.uint32(56).bool(message.ConcurrencyCheckPerformed);
|
|
2057
1337
|
}
|
|
2058
|
-
for (const v of message.
|
|
2059
|
-
|
|
1338
|
+
for (const v of message.ConstraintViolations) {
|
|
1339
|
+
ConstraintViolation.encode(v!, writer.uint32(66).fork()).join();
|
|
2060
1340
|
}
|
|
2061
|
-
|
|
2062
|
-
|
|
1341
|
+
for (const v of message.Errors) {
|
|
1342
|
+
writer.uint32(74).string(v!);
|
|
2063
1343
|
}
|
|
2064
|
-
|
|
2065
|
-
writer.uint32(
|
|
1344
|
+
for (const v of message.ConcurrencyViolations) {
|
|
1345
|
+
ConcurrencyViolation.encode(v!, writer.uint32(82).fork()).join();
|
|
2066
1346
|
}
|
|
2067
1347
|
return writer;
|
|
2068
1348
|
},
|
|
2069
1349
|
|
|
2070
|
-
decode(input: BinaryReader | Uint8Array, length?: number):
|
|
1350
|
+
decode(input: BinaryReader | Uint8Array, length?: number): AppendManyResponse {
|
|
2071
1351
|
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2072
1352
|
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
2073
1353
|
if (previousRecursionDepth >= 100) {
|
|
@@ -2076,7 +1356,7 @@ export const AppendReceipt: MessageFns<AppendReceipt> = {
|
|
|
2076
1356
|
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
2077
1357
|
try {
|
|
2078
1358
|
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2079
|
-
const message =
|
|
1359
|
+
const message = createBaseAppendManyResponse();
|
|
2080
1360
|
while (reader.pos < end) {
|
|
2081
1361
|
const tag = reader.uint32();
|
|
2082
1362
|
switch (tag >>> 3) {
|
|
@@ -2085,31 +1365,41 @@ export const AppendReceipt: MessageFns<AppendReceipt> = {
|
|
|
2085
1365
|
break;
|
|
2086
1366
|
}
|
|
2087
1367
|
|
|
2088
|
-
message.
|
|
1368
|
+
message.CorrelationId = Guid.decode(reader, reader.uint32());
|
|
2089
1369
|
continue;
|
|
2090
1370
|
}
|
|
2091
1371
|
case 2: {
|
|
2092
|
-
if (tag
|
|
2093
|
-
|
|
1372
|
+
if (tag === 16) {
|
|
1373
|
+
message.SequenceNumbers.push(reader.uint64() as bigint);
|
|
1374
|
+
|
|
1375
|
+
continue;
|
|
2094
1376
|
}
|
|
2095
1377
|
|
|
2096
|
-
|
|
2097
|
-
|
|
1378
|
+
if (tag === 18) {
|
|
1379
|
+
const end2 = reader.uint32() + reader.pos;
|
|
1380
|
+
while (reader.pos < end2) {
|
|
1381
|
+
message.SequenceNumbers.push(reader.uint64() as bigint);
|
|
1382
|
+
}
|
|
1383
|
+
|
|
1384
|
+
continue;
|
|
1385
|
+
}
|
|
1386
|
+
|
|
1387
|
+
break;
|
|
2098
1388
|
}
|
|
2099
1389
|
case 3: {
|
|
2100
1390
|
if (tag !== 24) {
|
|
2101
1391
|
break;
|
|
2102
1392
|
}
|
|
2103
1393
|
|
|
2104
|
-
message.
|
|
1394
|
+
message.IsSuccess = reader.bool();
|
|
2105
1395
|
continue;
|
|
2106
1396
|
}
|
|
2107
1397
|
case 4: {
|
|
2108
|
-
if (tag !==
|
|
1398
|
+
if (tag !== 32) {
|
|
2109
1399
|
break;
|
|
2110
1400
|
}
|
|
2111
1401
|
|
|
2112
|
-
message.
|
|
1402
|
+
message.HasConstraintViolations = reader.bool();
|
|
2113
1403
|
continue;
|
|
2114
1404
|
}
|
|
2115
1405
|
case 5: {
|
|
@@ -2117,7 +1407,7 @@ export const AppendReceipt: MessageFns<AppendReceipt> = {
|
|
|
2117
1407
|
break;
|
|
2118
1408
|
}
|
|
2119
1409
|
|
|
2120
|
-
message.
|
|
1410
|
+
message.HasConcurrencyViolations = reader.bool();
|
|
2121
1411
|
continue;
|
|
2122
1412
|
}
|
|
2123
1413
|
case 6: {
|
|
@@ -2125,15 +1415,15 @@ export const AppendReceipt: MessageFns<AppendReceipt> = {
|
|
|
2125
1415
|
break;
|
|
2126
1416
|
}
|
|
2127
1417
|
|
|
2128
|
-
message.
|
|
1418
|
+
message.HasErrors = reader.bool();
|
|
2129
1419
|
continue;
|
|
2130
1420
|
}
|
|
2131
1421
|
case 7: {
|
|
2132
|
-
if (tag !==
|
|
1422
|
+
if (tag !== 56) {
|
|
2133
1423
|
break;
|
|
2134
1424
|
}
|
|
2135
1425
|
|
|
2136
|
-
message.
|
|
1426
|
+
message.ConcurrencyCheckPerformed = reader.bool();
|
|
2137
1427
|
continue;
|
|
2138
1428
|
}
|
|
2139
1429
|
case 8: {
|
|
@@ -2141,7 +1431,7 @@ export const AppendReceipt: MessageFns<AppendReceipt> = {
|
|
|
2141
1431
|
break;
|
|
2142
1432
|
}
|
|
2143
1433
|
|
|
2144
|
-
message.
|
|
1434
|
+
message.ConstraintViolations.push(ConstraintViolation.decode(reader, reader.uint32()));
|
|
2145
1435
|
continue;
|
|
2146
1436
|
}
|
|
2147
1437
|
case 9: {
|
|
@@ -2149,7 +1439,7 @@ export const AppendReceipt: MessageFns<AppendReceipt> = {
|
|
|
2149
1439
|
break;
|
|
2150
1440
|
}
|
|
2151
1441
|
|
|
2152
|
-
message.
|
|
1442
|
+
message.Errors.push(reader.string());
|
|
2153
1443
|
continue;
|
|
2154
1444
|
}
|
|
2155
1445
|
case 10: {
|
|
@@ -2157,71 +1447,7 @@ export const AppendReceipt: MessageFns<AppendReceipt> = {
|
|
|
2157
1447
|
break;
|
|
2158
1448
|
}
|
|
2159
1449
|
|
|
2160
|
-
message.
|
|
2161
|
-
continue;
|
|
2162
|
-
}
|
|
2163
|
-
case 11: {
|
|
2164
|
-
if (tag !== 90) {
|
|
2165
|
-
break;
|
|
2166
|
-
}
|
|
2167
|
-
|
|
2168
|
-
message.Occurred = SerializableDateTimeOffset.decode(reader, reader.uint32());
|
|
2169
|
-
continue;
|
|
2170
|
-
}
|
|
2171
|
-
case 12: {
|
|
2172
|
-
if (tag !== 98) {
|
|
2173
|
-
break;
|
|
2174
|
-
}
|
|
2175
|
-
|
|
2176
|
-
message.CorrelationId = Guid.decode(reader, reader.uint32());
|
|
2177
|
-
continue;
|
|
2178
|
-
}
|
|
2179
|
-
case 13: {
|
|
2180
|
-
if (tag !== 106) {
|
|
2181
|
-
break;
|
|
2182
|
-
}
|
|
2183
|
-
|
|
2184
|
-
message.Subject = reader.string();
|
|
2185
|
-
continue;
|
|
2186
|
-
}
|
|
2187
|
-
case 14: {
|
|
2188
|
-
if (tag !== 114) {
|
|
2189
|
-
break;
|
|
2190
|
-
}
|
|
2191
|
-
|
|
2192
|
-
message.Tags.push(reader.string());
|
|
2193
|
-
continue;
|
|
2194
|
-
}
|
|
2195
|
-
case 15: {
|
|
2196
|
-
if (tag !== 122) {
|
|
2197
|
-
break;
|
|
2198
|
-
}
|
|
2199
|
-
|
|
2200
|
-
message.Hash = reader.string();
|
|
2201
|
-
continue;
|
|
2202
|
-
}
|
|
2203
|
-
case 16: {
|
|
2204
|
-
if (tag !== 130) {
|
|
2205
|
-
break;
|
|
2206
|
-
}
|
|
2207
|
-
|
|
2208
|
-
message.Causation.push(AppendCausation.decode(reader, reader.uint32()));
|
|
2209
|
-
continue;
|
|
2210
|
-
}
|
|
2211
|
-
case 17: {
|
|
2212
|
-
if (tag !== 138) {
|
|
2213
|
-
break;
|
|
2214
|
-
}
|
|
2215
|
-
|
|
2216
|
-
message.CausedBy = AppendIdentity.decode(reader, reader.uint32());
|
|
2217
|
-
continue;
|
|
2218
|
-
}
|
|
2219
|
-
case 18: {
|
|
2220
|
-
if (tag !== 144) {
|
|
2221
|
-
break;
|
|
2222
|
-
}
|
|
2223
|
-
|
|
2224
|
-
message.ObservationState = reader.int32() as any;
|
|
1450
|
+
message.ConcurrencyViolations.push(ConcurrencyViolation.decode(reader, reader.uint32()));
|
|
2225
1451
|
continue;
|
|
2226
1452
|
}
|
|
2227
1453
|
}
|
|
@@ -2236,121 +1462,85 @@ export const AppendReceipt: MessageFns<AppendReceipt> = {
|
|
|
2236
1462
|
}
|
|
2237
1463
|
},
|
|
2238
1464
|
|
|
2239
|
-
fromJSON(object: any):
|
|
1465
|
+
fromJSON(object: any): AppendManyResponse {
|
|
2240
1466
|
return {
|
|
2241
|
-
EventStore: isSet(object.EventStore) ? globalThis.String(object.EventStore) : "",
|
|
2242
|
-
Namespace: isSet(object.Namespace) ? globalThis.String(object.Namespace) : "",
|
|
2243
|
-
SequenceNumber: isSet(object.SequenceNumber) ? BigInt(object.SequenceNumber) : 0n,
|
|
2244
|
-
EventTypeId: isSet(object.EventTypeId) ? globalThis.String(object.EventTypeId) : "",
|
|
2245
|
-
Generation: isSet(object.Generation) ? globalThis.Number(object.Generation) : 0,
|
|
2246
|
-
Tombstone: isSet(object.Tombstone) ? globalThis.Boolean(object.Tombstone) : false,
|
|
2247
|
-
EventSourceType: isSet(object.EventSourceType) ? globalThis.String(object.EventSourceType) : "",
|
|
2248
|
-
EventSourceId: isSet(object.EventSourceId) ? globalThis.String(object.EventSourceId) : "",
|
|
2249
|
-
EventStreamType: isSet(object.EventStreamType) ? globalThis.String(object.EventStreamType) : "",
|
|
2250
|
-
EventStreamId: isSet(object.EventStreamId) ? globalThis.String(object.EventStreamId) : "",
|
|
2251
|
-
Occurred: isSet(object.Occurred) ? SerializableDateTimeOffset.fromJSON(object.Occurred) : undefined,
|
|
2252
1467
|
CorrelationId: isSet(object.CorrelationId) ? Guid.fromJSON(object.CorrelationId) : undefined,
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
1468
|
+
SequenceNumbers: globalThis.Array.isArray(object?.SequenceNumbers)
|
|
1469
|
+
? object.SequenceNumbers.map((e: any) => BigInt(e))
|
|
1470
|
+
: [],
|
|
1471
|
+
IsSuccess: isSet(object.IsSuccess) ? globalThis.Boolean(object.IsSuccess) : false,
|
|
1472
|
+
HasConstraintViolations: isSet(object.HasConstraintViolations)
|
|
1473
|
+
? globalThis.Boolean(object.HasConstraintViolations)
|
|
1474
|
+
: false,
|
|
1475
|
+
HasConcurrencyViolations: isSet(object.HasConcurrencyViolations)
|
|
1476
|
+
? globalThis.Boolean(object.HasConcurrencyViolations)
|
|
1477
|
+
: false,
|
|
1478
|
+
HasErrors: isSet(object.HasErrors) ? globalThis.Boolean(object.HasErrors) : false,
|
|
1479
|
+
ConcurrencyCheckPerformed: isSet(object.ConcurrencyCheckPerformed)
|
|
1480
|
+
? globalThis.Boolean(object.ConcurrencyCheckPerformed)
|
|
1481
|
+
: false,
|
|
1482
|
+
ConstraintViolations: globalThis.Array.isArray(object?.ConstraintViolations)
|
|
1483
|
+
? object.ConstraintViolations.map((e: any) => ConstraintViolation.fromJSON(e))
|
|
1484
|
+
: [],
|
|
1485
|
+
Errors: globalThis.Array.isArray(object?.Errors) ? object.Errors.map((e: any) => globalThis.String(e)) : [],
|
|
1486
|
+
ConcurrencyViolations: globalThis.Array.isArray(object?.ConcurrencyViolations)
|
|
1487
|
+
? object.ConcurrencyViolations.map((e: any) => ConcurrencyViolation.fromJSON(e))
|
|
2258
1488
|
: [],
|
|
2259
|
-
CausedBy: isSet(object.CausedBy) ? AppendIdentity.fromJSON(object.CausedBy) : undefined,
|
|
2260
|
-
ObservationState: isSet(object.ObservationState) ? eventObservationStateFromJSON(object.ObservationState) : 0,
|
|
2261
1489
|
};
|
|
2262
1490
|
},
|
|
2263
1491
|
|
|
2264
|
-
toJSON(message:
|
|
1492
|
+
toJSON(message: AppendManyResponse): unknown {
|
|
2265
1493
|
const obj: any = {};
|
|
2266
|
-
if (message.
|
|
2267
|
-
obj.
|
|
2268
|
-
}
|
|
2269
|
-
if (message.Namespace !== "") {
|
|
2270
|
-
obj.Namespace = message.Namespace;
|
|
2271
|
-
}
|
|
2272
|
-
if (message.SequenceNumber !== 0n) {
|
|
2273
|
-
obj.SequenceNumber = message.SequenceNumber.toString();
|
|
2274
|
-
}
|
|
2275
|
-
if (message.EventTypeId !== "") {
|
|
2276
|
-
obj.EventTypeId = message.EventTypeId;
|
|
2277
|
-
}
|
|
2278
|
-
if (message.Generation !== 0) {
|
|
2279
|
-
obj.Generation = Math.round(message.Generation);
|
|
2280
|
-
}
|
|
2281
|
-
if (message.Tombstone !== false) {
|
|
2282
|
-
obj.Tombstone = message.Tombstone;
|
|
2283
|
-
}
|
|
2284
|
-
if (message.EventSourceType !== "") {
|
|
2285
|
-
obj.EventSourceType = message.EventSourceType;
|
|
2286
|
-
}
|
|
2287
|
-
if (message.EventSourceId !== "") {
|
|
2288
|
-
obj.EventSourceId = message.EventSourceId;
|
|
2289
|
-
}
|
|
2290
|
-
if (message.EventStreamType !== "") {
|
|
2291
|
-
obj.EventStreamType = message.EventStreamType;
|
|
1494
|
+
if (message.CorrelationId !== undefined) {
|
|
1495
|
+
obj.CorrelationId = Guid.toJSON(message.CorrelationId);
|
|
2292
1496
|
}
|
|
2293
|
-
if (message.
|
|
2294
|
-
obj.
|
|
1497
|
+
if (message.SequenceNumbers?.length) {
|
|
1498
|
+
obj.SequenceNumbers = message.SequenceNumbers.map((e) => e.toString());
|
|
2295
1499
|
}
|
|
2296
|
-
if (message.
|
|
2297
|
-
obj.
|
|
1500
|
+
if (message.IsSuccess !== false) {
|
|
1501
|
+
obj.IsSuccess = message.IsSuccess;
|
|
2298
1502
|
}
|
|
2299
|
-
if (message.
|
|
2300
|
-
obj.
|
|
1503
|
+
if (message.HasConstraintViolations !== false) {
|
|
1504
|
+
obj.HasConstraintViolations = message.HasConstraintViolations;
|
|
2301
1505
|
}
|
|
2302
|
-
if (message.
|
|
2303
|
-
obj.
|
|
1506
|
+
if (message.HasConcurrencyViolations !== false) {
|
|
1507
|
+
obj.HasConcurrencyViolations = message.HasConcurrencyViolations;
|
|
2304
1508
|
}
|
|
2305
|
-
if (message.
|
|
2306
|
-
obj.
|
|
1509
|
+
if (message.HasErrors !== false) {
|
|
1510
|
+
obj.HasErrors = message.HasErrors;
|
|
2307
1511
|
}
|
|
2308
|
-
if (message.
|
|
2309
|
-
obj.
|
|
1512
|
+
if (message.ConcurrencyCheckPerformed !== false) {
|
|
1513
|
+
obj.ConcurrencyCheckPerformed = message.ConcurrencyCheckPerformed;
|
|
2310
1514
|
}
|
|
2311
|
-
if (message.
|
|
2312
|
-
obj.
|
|
1515
|
+
if (message.ConstraintViolations?.length) {
|
|
1516
|
+
obj.ConstraintViolations = message.ConstraintViolations.map((e) => ConstraintViolation.toJSON(e));
|
|
2313
1517
|
}
|
|
2314
|
-
if (message.
|
|
2315
|
-
obj.
|
|
1518
|
+
if (message.Errors?.length) {
|
|
1519
|
+
obj.Errors = message.Errors;
|
|
2316
1520
|
}
|
|
2317
|
-
if (message.
|
|
2318
|
-
obj.
|
|
1521
|
+
if (message.ConcurrencyViolations?.length) {
|
|
1522
|
+
obj.ConcurrencyViolations = message.ConcurrencyViolations.map((e) => ConcurrencyViolation.toJSON(e));
|
|
2319
1523
|
}
|
|
2320
1524
|
return obj;
|
|
2321
1525
|
},
|
|
2322
1526
|
|
|
2323
|
-
create(base?: DeepPartial<
|
|
2324
|
-
return
|
|
1527
|
+
create(base?: DeepPartial<AppendManyResponse>): AppendManyResponse {
|
|
1528
|
+
return AppendManyResponse.fromPartial(base ?? {});
|
|
2325
1529
|
},
|
|
2326
|
-
fromPartial(object: DeepPartial<
|
|
2327
|
-
const message =
|
|
2328
|
-
message.EventStore = object.EventStore ?? "";
|
|
2329
|
-
message.Namespace = object.Namespace ?? "";
|
|
2330
|
-
message.SequenceNumber = (object.SequenceNumber !== undefined && object.SequenceNumber !== null)
|
|
2331
|
-
? BigInt(object.SequenceNumber)
|
|
2332
|
-
: 0n;
|
|
2333
|
-
message.EventTypeId = object.EventTypeId ?? "";
|
|
2334
|
-
message.Generation = object.Generation ?? 0;
|
|
2335
|
-
message.Tombstone = object.Tombstone ?? false;
|
|
2336
|
-
message.EventSourceType = object.EventSourceType ?? "";
|
|
2337
|
-
message.EventSourceId = object.EventSourceId ?? "";
|
|
2338
|
-
message.EventStreamType = object.EventStreamType ?? "";
|
|
2339
|
-
message.EventStreamId = object.EventStreamId ?? "";
|
|
2340
|
-
message.Occurred = (object.Occurred !== undefined && object.Occurred !== null)
|
|
2341
|
-
? SerializableDateTimeOffset.fromPartial(object.Occurred)
|
|
2342
|
-
: undefined;
|
|
1530
|
+
fromPartial(object: DeepPartial<AppendManyResponse>): AppendManyResponse {
|
|
1531
|
+
const message = createBaseAppendManyResponse();
|
|
2343
1532
|
message.CorrelationId = (object.CorrelationId !== undefined && object.CorrelationId !== null)
|
|
2344
1533
|
? Guid.fromPartial(object.CorrelationId)
|
|
2345
1534
|
: undefined;
|
|
2346
|
-
message.
|
|
2347
|
-
message.
|
|
2348
|
-
message.
|
|
2349
|
-
message.
|
|
2350
|
-
message.
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
message.
|
|
1535
|
+
message.SequenceNumbers = object.SequenceNumbers?.map((e) => BigInt(e)) || [];
|
|
1536
|
+
message.IsSuccess = object.IsSuccess ?? false;
|
|
1537
|
+
message.HasConstraintViolations = object.HasConstraintViolations ?? false;
|
|
1538
|
+
message.HasConcurrencyViolations = object.HasConcurrencyViolations ?? false;
|
|
1539
|
+
message.HasErrors = object.HasErrors ?? false;
|
|
1540
|
+
message.ConcurrencyCheckPerformed = object.ConcurrencyCheckPerformed ?? false;
|
|
1541
|
+
message.ConstraintViolations = object.ConstraintViolations?.map((e) => ConstraintViolation.fromPartial(e)) || [];
|
|
1542
|
+
message.Errors = object.Errors?.map((e) => e) || [];
|
|
1543
|
+
message.ConcurrencyViolations = object.ConcurrencyViolations?.map((e) => ConcurrencyViolation.fromPartial(e)) || [];
|
|
2354
1544
|
return message;
|
|
2355
1545
|
},
|
|
2356
1546
|
};
|
|
@@ -2373,7 +1563,6 @@ function createBaseAppendRequest(): AppendRequest {
|
|
|
2373
1563
|
Causation: [],
|
|
2374
1564
|
CausedBy: undefined,
|
|
2375
1565
|
ConcurrencyScope: undefined,
|
|
2376
|
-
IncludeReceipt: false,
|
|
2377
1566
|
};
|
|
2378
1567
|
}
|
|
2379
1568
|
|
|
@@ -2427,9 +1616,6 @@ export const AppendRequest: MessageFns<AppendRequest> = {
|
|
|
2427
1616
|
if (message.ConcurrencyScope !== undefined) {
|
|
2428
1617
|
ConcurrencyScope.encode(message.ConcurrencyScope, writer.uint32(130).fork()).join();
|
|
2429
1618
|
}
|
|
2430
|
-
if (message.IncludeReceipt !== false) {
|
|
2431
|
-
writer.uint32(136).bool(message.IncludeReceipt);
|
|
2432
|
-
}
|
|
2433
1619
|
return writer;
|
|
2434
1620
|
},
|
|
2435
1621
|
|
|
@@ -2574,14 +1760,6 @@ export const AppendRequest: MessageFns<AppendRequest> = {
|
|
|
2574
1760
|
message.ConcurrencyScope = ConcurrencyScope.decode(reader, reader.uint32());
|
|
2575
1761
|
continue;
|
|
2576
1762
|
}
|
|
2577
|
-
case 17: {
|
|
2578
|
-
if (tag !== 136) {
|
|
2579
|
-
break;
|
|
2580
|
-
}
|
|
2581
|
-
|
|
2582
|
-
message.IncludeReceipt = reader.bool();
|
|
2583
|
-
continue;
|
|
2584
|
-
}
|
|
2585
1763
|
}
|
|
2586
1764
|
if ((tag & 7) === 4 || tag === 0) {
|
|
2587
1765
|
break;
|
|
@@ -2614,7 +1792,6 @@ export const AppendRequest: MessageFns<AppendRequest> = {
|
|
|
2614
1792
|
: [],
|
|
2615
1793
|
CausedBy: isSet(object.CausedBy) ? Identity.fromJSON(object.CausedBy) : undefined,
|
|
2616
1794
|
ConcurrencyScope: isSet(object.ConcurrencyScope) ? ConcurrencyScope.fromJSON(object.ConcurrencyScope) : undefined,
|
|
2617
|
-
IncludeReceipt: isSet(object.IncludeReceipt) ? globalThis.Boolean(object.IncludeReceipt) : false,
|
|
2618
1795
|
};
|
|
2619
1796
|
},
|
|
2620
1797
|
|
|
@@ -2668,9 +1845,6 @@ export const AppendRequest: MessageFns<AppendRequest> = {
|
|
|
2668
1845
|
if (message.ConcurrencyScope !== undefined) {
|
|
2669
1846
|
obj.ConcurrencyScope = ConcurrencyScope.toJSON(message.ConcurrencyScope);
|
|
2670
1847
|
}
|
|
2671
|
-
if (message.IncludeReceipt !== false) {
|
|
2672
|
-
obj.IncludeReceipt = message.IncludeReceipt;
|
|
2673
|
-
}
|
|
2674
1848
|
return obj;
|
|
2675
1849
|
},
|
|
2676
1850
|
|
|
@@ -2705,7 +1879,6 @@ export const AppendRequest: MessageFns<AppendRequest> = {
|
|
|
2705
1879
|
message.ConcurrencyScope = (object.ConcurrencyScope !== undefined && object.ConcurrencyScope !== null)
|
|
2706
1880
|
? ConcurrencyScope.fromPartial(object.ConcurrencyScope)
|
|
2707
1881
|
: undefined;
|
|
2708
|
-
message.IncludeReceipt = object.IncludeReceipt ?? false;
|
|
2709
1882
|
return message;
|
|
2710
1883
|
},
|
|
2711
1884
|
};
|
|
@@ -2722,7 +1895,6 @@ function createBaseAppendResponse(): AppendResponse {
|
|
|
2722
1895
|
ConstraintViolations: [],
|
|
2723
1896
|
Errors: [],
|
|
2724
1897
|
ConcurrencyViolation: undefined,
|
|
2725
|
-
Receipt: undefined,
|
|
2726
1898
|
};
|
|
2727
1899
|
}
|
|
2728
1900
|
|
|
@@ -2761,9 +1933,6 @@ export const AppendResponse: MessageFns<AppendResponse> = {
|
|
|
2761
1933
|
if (message.ConcurrencyViolation !== undefined) {
|
|
2762
1934
|
ConcurrencyViolation.encode(message.ConcurrencyViolation, writer.uint32(82).fork()).join();
|
|
2763
1935
|
}
|
|
2764
|
-
if (message.Receipt !== undefined) {
|
|
2765
|
-
AppendReceipt.encode(message.Receipt, writer.uint32(90).fork()).join();
|
|
2766
|
-
}
|
|
2767
1936
|
return writer;
|
|
2768
1937
|
},
|
|
2769
1938
|
|
|
@@ -2860,14 +2029,6 @@ export const AppendResponse: MessageFns<AppendResponse> = {
|
|
|
2860
2029
|
message.ConcurrencyViolation = ConcurrencyViolation.decode(reader, reader.uint32());
|
|
2861
2030
|
continue;
|
|
2862
2031
|
}
|
|
2863
|
-
case 11: {
|
|
2864
|
-
if (tag !== 90) {
|
|
2865
|
-
break;
|
|
2866
|
-
}
|
|
2867
|
-
|
|
2868
|
-
message.Receipt = AppendReceipt.decode(reader, reader.uint32());
|
|
2869
|
-
continue;
|
|
2870
|
-
}
|
|
2871
2032
|
}
|
|
2872
2033
|
if ((tag & 7) === 4 || tag === 0) {
|
|
2873
2034
|
break;
|
|
@@ -2904,7 +2065,6 @@ export const AppendResponse: MessageFns<AppendResponse> = {
|
|
|
2904
2065
|
ConcurrencyViolation: isSet(object.ConcurrencyViolation)
|
|
2905
2066
|
? ConcurrencyViolation.fromJSON(object.ConcurrencyViolation)
|
|
2906
2067
|
: undefined,
|
|
2907
|
-
Receipt: isSet(object.Receipt) ? AppendReceipt.fromJSON(object.Receipt) : undefined,
|
|
2908
2068
|
};
|
|
2909
2069
|
},
|
|
2910
2070
|
|
|
@@ -2940,9 +2100,6 @@ export const AppendResponse: MessageFns<AppendResponse> = {
|
|
|
2940
2100
|
if (message.ConcurrencyViolation !== undefined) {
|
|
2941
2101
|
obj.ConcurrencyViolation = ConcurrencyViolation.toJSON(message.ConcurrencyViolation);
|
|
2942
2102
|
}
|
|
2943
|
-
if (message.Receipt !== undefined) {
|
|
2944
|
-
obj.Receipt = AppendReceipt.toJSON(message.Receipt);
|
|
2945
|
-
}
|
|
2946
2103
|
return obj;
|
|
2947
2104
|
},
|
|
2948
2105
|
|
|
@@ -2967,9 +2124,6 @@ export const AppendResponse: MessageFns<AppendResponse> = {
|
|
|
2967
2124
|
message.ConcurrencyViolation = (object.ConcurrencyViolation !== undefined && object.ConcurrencyViolation !== null)
|
|
2968
2125
|
? ConcurrencyViolation.fromPartial(object.ConcurrencyViolation)
|
|
2969
2126
|
: undefined;
|
|
2970
|
-
message.Receipt = (object.Receipt !== undefined && object.Receipt !== null)
|
|
2971
|
-
? AppendReceipt.fromPartial(object.Receipt)
|
|
2972
|
-
: undefined;
|
|
2973
2127
|
return message;
|
|
2974
2128
|
},
|
|
2975
2129
|
};
|