@cratis/chronicle.contracts 19.128.1 → 19.130.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 (47) 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 +2 -2
  4. package/dist/cjs/generated/index.d.ts.map +1 -1
  5. package/dist/cjs/generated/observation_reducers.d.ts +7 -0
  6. package/dist/cjs/generated/observation_reducers.d.ts.map +1 -1
  7. package/dist/cjs/generated/observation_reducers.js +123 -2
  8. package/dist/cjs/generated/observation_reducers.js.map +1 -1
  9. package/dist/cjs/generated/projections.d.ts +96 -0
  10. package/dist/cjs/generated/projections.d.ts.map +1 -1
  11. package/dist/cjs/generated/projections.js +1471 -0
  12. package/dist/cjs/generated/projections.js.map +1 -1
  13. package/dist/cjs/index.js +16 -0
  14. package/dist/cjs/index.js.map +1 -1
  15. package/dist/esm/generated/descriptorSet.js +1 -1
  16. package/dist/esm/generated/descriptorSet.js.map +1 -1
  17. package/dist/esm/generated/index.d.ts +2 -2
  18. package/dist/esm/generated/index.d.ts.map +1 -1
  19. package/dist/esm/generated/observation_reducers.d.ts +7 -0
  20. package/dist/esm/generated/observation_reducers.d.ts.map +1 -1
  21. package/dist/esm/generated/observation_reducers.js +123 -3
  22. package/dist/esm/generated/observation_reducers.js.map +1 -1
  23. package/dist/esm/generated/projections.d.ts +96 -0
  24. package/dist/esm/generated/projections.d.ts.map +1 -1
  25. package/dist/esm/generated/projections.js +1457 -1
  26. package/dist/esm/generated/projections.js.map +1 -1
  27. package/dist/esm/index.js +2 -2
  28. package/dist/generated/descriptorSet.js +1 -1
  29. package/dist/generated/descriptorSet.js.map +1 -1
  30. package/dist/generated/index.d.ts +2 -2
  31. package/dist/generated/index.d.ts.map +1 -1
  32. package/dist/generated/index.js +2 -2
  33. package/dist/generated/index.js.map +1 -1
  34. package/dist/generated/observation_reducers.d.ts +7 -0
  35. package/dist/generated/observation_reducers.d.ts.map +1 -1
  36. package/dist/generated/observation_reducers.js +122 -2
  37. package/dist/generated/observation_reducers.js.map +1 -1
  38. package/dist/generated/projections.d.ts +96 -0
  39. package/dist/generated/projections.d.ts.map +1 -1
  40. package/dist/generated/projections.js +1456 -0
  41. package/dist/generated/projections.js.map +1 -1
  42. package/dist/tsconfig.tsbuildinfo +1 -1
  43. package/generated/descriptorSet.ts +1 -1
  44. package/generated/index.ts +2 -2
  45. package/generated/observation_reducers.ts +138 -2
  46. package/generated/projections.ts +1918 -194
  47. package/package.json +1 -1
@@ -338,6 +338,85 @@ export interface GetAllDefinitionsRequest {
338
338
  EventStore: string;
339
339
  }
340
340
 
341
+ export interface GraphEdgeFromDefinition {
342
+ SourceKey: string;
343
+ TargetKey: string;
344
+ Identity: string;
345
+ Properties: { [key: string]: string };
346
+ }
347
+
348
+ export interface GraphEdgeFromDefinition_PropertiesEntry {
349
+ key: string;
350
+ value: string;
351
+ }
352
+
353
+ export interface GraphEdgeProjectionDefinition {
354
+ From: { [key: string]: GraphEdgeFromDefinition };
355
+ RemovedWith: { [key: string]: GraphEdgeRemovedWithDefinition };
356
+ }
357
+
358
+ export interface GraphEdgeProjectionDefinition_FromEntry {
359
+ key: string;
360
+ value: GraphEdgeFromDefinition | undefined;
361
+ }
362
+
363
+ export interface GraphEdgeProjectionDefinition_RemovedWithEntry {
364
+ key: string;
365
+ value: GraphEdgeRemovedWithDefinition | undefined;
366
+ }
367
+
368
+ export interface GraphEdgeRemovedWithDefinition {
369
+ SourceKey: string;
370
+ TargetKey: string;
371
+ Identity: string;
372
+ }
373
+
374
+ export interface GraphNodeFromDefinition {
375
+ Key: string;
376
+ Properties: { [key: string]: string };
377
+ UpdateOnly: boolean;
378
+ }
379
+
380
+ export interface GraphNodeFromDefinition_PropertiesEntry {
381
+ key: string;
382
+ value: string;
383
+ }
384
+
385
+ export interface GraphNodeProjectionDefinition {
386
+ From: { [key: string]: GraphNodeFromDefinition };
387
+ RemovedWith: { [key: string]: GraphNodeRemovedWithDefinition };
388
+ }
389
+
390
+ export interface GraphNodeProjectionDefinition_FromEntry {
391
+ key: string;
392
+ value: GraphNodeFromDefinition | undefined;
393
+ }
394
+
395
+ export interface GraphNodeProjectionDefinition_RemovedWithEntry {
396
+ key: string;
397
+ value: GraphNodeRemovedWithDefinition | undefined;
398
+ }
399
+
400
+ export interface GraphNodeRemovedWithDefinition {
401
+ Key: string;
402
+ Detach: boolean;
403
+ }
404
+
405
+ export interface GraphProjectionDefinition {
406
+ Nodes: { [key: string]: GraphNodeProjectionDefinition };
407
+ Edges: { [key: string]: GraphEdgeProjectionDefinition };
408
+ }
409
+
410
+ export interface GraphProjectionDefinition_NodesEntry {
411
+ key: string;
412
+ value: GraphNodeProjectionDefinition | undefined;
413
+ }
414
+
415
+ export interface GraphProjectionDefinition_EdgesEntry {
416
+ key: string;
417
+ value: GraphEdgeProjectionDefinition | undefined;
418
+ }
419
+
341
420
  export interface IEnumerableProjectionDefinition {
342
421
  items: ProjectionDefinition[];
343
422
  }
@@ -434,6 +513,7 @@ export interface ProjectionDefinition {
434
513
  SubscribesToAllEvents: boolean;
435
514
  NoAutoMapProperties: string[];
436
515
  GenerationDelivery: EventGenerationDelivery;
516
+ Graph: GraphProjectionDefinition | undefined;
437
517
  }
438
518
 
439
519
  export interface ProjectionDefinition_ChildrenEntry {
@@ -1647,18 +1727,1686 @@ function createBaseFromEventPropertyDefinition(): FromEventPropertyDefinition {
1647
1727
  return { Event: undefined, PropertyExpression: "" };
1648
1728
  }
1649
1729
 
1650
- export const FromEventPropertyDefinition: MessageFns<FromEventPropertyDefinition> = {
1651
- encode(message: FromEventPropertyDefinition, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
1652
- if (message.Event !== undefined) {
1653
- EventType.encode(message.Event, writer.uint32(10).fork()).join();
1730
+ export const FromEventPropertyDefinition: MessageFns<FromEventPropertyDefinition> = {
1731
+ encode(message: FromEventPropertyDefinition, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
1732
+ if (message.Event !== undefined) {
1733
+ EventType.encode(message.Event, writer.uint32(10).fork()).join();
1734
+ }
1735
+ if (message.PropertyExpression !== "") {
1736
+ writer.uint32(18).string(message.PropertyExpression);
1737
+ }
1738
+ return writer;
1739
+ },
1740
+
1741
+ decode(input: BinaryReader | Uint8Array, length?: number): FromEventPropertyDefinition {
1742
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1743
+ const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
1744
+ if (previousRecursionDepth >= 100) {
1745
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
1746
+ }
1747
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
1748
+ try {
1749
+ const end = length === undefined ? reader.len : reader.pos + length;
1750
+ const message = createBaseFromEventPropertyDefinition();
1751
+ while (reader.pos < end) {
1752
+ const tag = reader.uint32();
1753
+ switch (tag >>> 3) {
1754
+ case 1: {
1755
+ if (tag !== 10) {
1756
+ break;
1757
+ }
1758
+
1759
+ message.Event = EventType.decode(reader, reader.uint32());
1760
+ continue;
1761
+ }
1762
+ case 2: {
1763
+ if (tag !== 18) {
1764
+ break;
1765
+ }
1766
+
1767
+ message.PropertyExpression = reader.string();
1768
+ continue;
1769
+ }
1770
+ }
1771
+ if ((tag & 7) === 4 || tag === 0) {
1772
+ break;
1773
+ }
1774
+ reader.skip(tag & 7);
1775
+ }
1776
+ return message;
1777
+ } finally {
1778
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
1779
+ }
1780
+ },
1781
+
1782
+ fromJSON(object: any): FromEventPropertyDefinition {
1783
+ return {
1784
+ Event: isSet(object.Event) ? EventType.fromJSON(object.Event) : undefined,
1785
+ PropertyExpression: isSet(object.PropertyExpression) ? globalThis.String(object.PropertyExpression) : "",
1786
+ };
1787
+ },
1788
+
1789
+ toJSON(message: FromEventPropertyDefinition): unknown {
1790
+ const obj: any = {};
1791
+ if (message.Event !== undefined) {
1792
+ obj.Event = EventType.toJSON(message.Event);
1793
+ }
1794
+ if (message.PropertyExpression !== "") {
1795
+ obj.PropertyExpression = message.PropertyExpression;
1796
+ }
1797
+ return obj;
1798
+ },
1799
+
1800
+ create(base?: DeepPartial<FromEventPropertyDefinition>): FromEventPropertyDefinition {
1801
+ return FromEventPropertyDefinition.fromPartial(base ?? {});
1802
+ },
1803
+ fromPartial(object: DeepPartial<FromEventPropertyDefinition>): FromEventPropertyDefinition {
1804
+ const message = createBaseFromEventPropertyDefinition();
1805
+ message.Event = (object.Event !== undefined && object.Event !== null)
1806
+ ? EventType.fromPartial(object.Event)
1807
+ : undefined;
1808
+ message.PropertyExpression = object.PropertyExpression ?? "";
1809
+ return message;
1810
+ },
1811
+ };
1812
+
1813
+ function createBaseFromEveryDefinition(): FromEveryDefinition {
1814
+ return { Properties: {}, IncludeChildren: false, AutoMap: 0, Key: "" };
1815
+ }
1816
+
1817
+ export const FromEveryDefinition: MessageFns<FromEveryDefinition> = {
1818
+ encode(message: FromEveryDefinition, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
1819
+ globalThis.Object.entries(message.Properties).forEach(([key, value]: [string, string]) => {
1820
+ FromEveryDefinition_PropertiesEntry.encode({ key: key as any, value }, writer.uint32(10).fork()).join();
1821
+ });
1822
+ if (message.IncludeChildren !== false) {
1823
+ writer.uint32(16).bool(message.IncludeChildren);
1824
+ }
1825
+ if (message.AutoMap !== 0) {
1826
+ writer.uint32(24).int32(message.AutoMap);
1827
+ }
1828
+ if (message.Key !== "") {
1829
+ writer.uint32(34).string(message.Key);
1830
+ }
1831
+ return writer;
1832
+ },
1833
+
1834
+ decode(input: BinaryReader | Uint8Array, length?: number): FromEveryDefinition {
1835
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1836
+ const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
1837
+ if (previousRecursionDepth >= 100) {
1838
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
1839
+ }
1840
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
1841
+ try {
1842
+ const end = length === undefined ? reader.len : reader.pos + length;
1843
+ const message = createBaseFromEveryDefinition();
1844
+ while (reader.pos < end) {
1845
+ const tag = reader.uint32();
1846
+ switch (tag >>> 3) {
1847
+ case 1: {
1848
+ if (tag !== 10) {
1849
+ break;
1850
+ }
1851
+
1852
+ const entry1 = FromEveryDefinition_PropertiesEntry.decode(reader, reader.uint32());
1853
+ if (entry1.value !== undefined) {
1854
+ message.Properties[entry1.key] = entry1.value;
1855
+ }
1856
+ continue;
1857
+ }
1858
+ case 2: {
1859
+ if (tag !== 16) {
1860
+ break;
1861
+ }
1862
+
1863
+ message.IncludeChildren = reader.bool();
1864
+ continue;
1865
+ }
1866
+ case 3: {
1867
+ if (tag !== 24) {
1868
+ break;
1869
+ }
1870
+
1871
+ message.AutoMap = reader.int32() as any;
1872
+ continue;
1873
+ }
1874
+ case 4: {
1875
+ if (tag !== 34) {
1876
+ break;
1877
+ }
1878
+
1879
+ message.Key = reader.string();
1880
+ continue;
1881
+ }
1882
+ }
1883
+ if ((tag & 7) === 4 || tag === 0) {
1884
+ break;
1885
+ }
1886
+ reader.skip(tag & 7);
1887
+ }
1888
+ return message;
1889
+ } finally {
1890
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
1891
+ }
1892
+ },
1893
+
1894
+ fromJSON(object: any): FromEveryDefinition {
1895
+ return {
1896
+ Properties: isObject(object.Properties)
1897
+ ? (globalThis.Object.entries(object.Properties) as [string, any][]).reduce(
1898
+ (acc: { [key: string]: string }, [key, value]: [string, any]) => {
1899
+ globalThis.Object.defineProperty(acc, key, {
1900
+ value: globalThis.String(value),
1901
+ enumerable: true,
1902
+ configurable: true,
1903
+ writable: true,
1904
+ });
1905
+ return acc;
1906
+ },
1907
+ {},
1908
+ )
1909
+ : {},
1910
+ IncludeChildren: isSet(object.IncludeChildren) ? globalThis.Boolean(object.IncludeChildren) : false,
1911
+ AutoMap: isSet(object.AutoMap) ? autoMapFromJSON(object.AutoMap) : 0,
1912
+ Key: isSet(object.Key) ? globalThis.String(object.Key) : "",
1913
+ };
1914
+ },
1915
+
1916
+ toJSON(message: FromEveryDefinition): unknown {
1917
+ const obj: any = {};
1918
+ if (message.Properties) {
1919
+ const entries = globalThis.Object.entries(message.Properties) as [string, string][];
1920
+ if (entries.length > 0) {
1921
+ obj.Properties = {};
1922
+ entries.forEach(([k, v]) => {
1923
+ obj.Properties[k] = v;
1924
+ });
1925
+ }
1926
+ }
1927
+ if (message.IncludeChildren !== false) {
1928
+ obj.IncludeChildren = message.IncludeChildren;
1929
+ }
1930
+ if (message.AutoMap !== 0) {
1931
+ obj.AutoMap = autoMapToJSON(message.AutoMap);
1932
+ }
1933
+ if (message.Key !== "") {
1934
+ obj.Key = message.Key;
1935
+ }
1936
+ return obj;
1937
+ },
1938
+
1939
+ create(base?: DeepPartial<FromEveryDefinition>): FromEveryDefinition {
1940
+ return FromEveryDefinition.fromPartial(base ?? {});
1941
+ },
1942
+ fromPartial(object: DeepPartial<FromEveryDefinition>): FromEveryDefinition {
1943
+ const message = createBaseFromEveryDefinition();
1944
+ message.Properties = (globalThis.Object.entries(object.Properties ?? {}) as [string, string][]).reduce(
1945
+ (acc: { [key: string]: string }, [key, value]: [string, string]) => {
1946
+ if (value !== undefined) {
1947
+ acc[key] = globalThis.String(value);
1948
+ }
1949
+ return acc;
1950
+ },
1951
+ {},
1952
+ );
1953
+ message.IncludeChildren = object.IncludeChildren ?? false;
1954
+ message.AutoMap = object.AutoMap ?? 0;
1955
+ message.Key = object.Key ?? "";
1956
+ return message;
1957
+ },
1958
+ };
1959
+
1960
+ function createBaseFromEveryDefinition_PropertiesEntry(): FromEveryDefinition_PropertiesEntry {
1961
+ return { key: "", value: "" };
1962
+ }
1963
+
1964
+ export const FromEveryDefinition_PropertiesEntry: MessageFns<FromEveryDefinition_PropertiesEntry> = {
1965
+ encode(message: FromEveryDefinition_PropertiesEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
1966
+ if (message.key !== "") {
1967
+ writer.uint32(10).string(message.key);
1968
+ }
1969
+ if (message.value !== "") {
1970
+ writer.uint32(18).string(message.value);
1971
+ }
1972
+ return writer;
1973
+ },
1974
+
1975
+ decode(input: BinaryReader | Uint8Array, length?: number): FromEveryDefinition_PropertiesEntry {
1976
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1977
+ const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
1978
+ if (previousRecursionDepth >= 100) {
1979
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
1980
+ }
1981
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
1982
+ try {
1983
+ const end = length === undefined ? reader.len : reader.pos + length;
1984
+ const message = createBaseFromEveryDefinition_PropertiesEntry();
1985
+ while (reader.pos < end) {
1986
+ const tag = reader.uint32();
1987
+ switch (tag >>> 3) {
1988
+ case 1: {
1989
+ if (tag !== 10) {
1990
+ break;
1991
+ }
1992
+
1993
+ message.key = reader.string();
1994
+ continue;
1995
+ }
1996
+ case 2: {
1997
+ if (tag !== 18) {
1998
+ break;
1999
+ }
2000
+
2001
+ message.value = reader.string();
2002
+ continue;
2003
+ }
2004
+ }
2005
+ if ((tag & 7) === 4 || tag === 0) {
2006
+ break;
2007
+ }
2008
+ reader.skip(tag & 7);
2009
+ }
2010
+ return message;
2011
+ } finally {
2012
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
2013
+ }
2014
+ },
2015
+
2016
+ fromJSON(object: any): FromEveryDefinition_PropertiesEntry {
2017
+ return {
2018
+ key: isSet(object.key) ? globalThis.String(object.key) : "",
2019
+ value: isSet(object.value) ? globalThis.String(object.value) : "",
2020
+ };
2021
+ },
2022
+
2023
+ toJSON(message: FromEveryDefinition_PropertiesEntry): unknown {
2024
+ const obj: any = {};
2025
+ if (message.key !== "") {
2026
+ obj.key = message.key;
2027
+ }
2028
+ if (message.value !== "") {
2029
+ obj.value = message.value;
2030
+ }
2031
+ return obj;
2032
+ },
2033
+
2034
+ create(base?: DeepPartial<FromEveryDefinition_PropertiesEntry>): FromEveryDefinition_PropertiesEntry {
2035
+ return FromEveryDefinition_PropertiesEntry.fromPartial(base ?? {});
2036
+ },
2037
+ fromPartial(object: DeepPartial<FromEveryDefinition_PropertiesEntry>): FromEveryDefinition_PropertiesEntry {
2038
+ const message = createBaseFromEveryDefinition_PropertiesEntry();
2039
+ message.key = object.key ?? "";
2040
+ message.value = object.value ?? "";
2041
+ return message;
2042
+ },
2043
+ };
2044
+
2045
+ function createBaseGetAllDeclarationsRequest(): GetAllDeclarationsRequest {
2046
+ return { EventStore: "" };
2047
+ }
2048
+
2049
+ export const GetAllDeclarationsRequest: MessageFns<GetAllDeclarationsRequest> = {
2050
+ encode(message: GetAllDeclarationsRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
2051
+ if (message.EventStore !== "") {
2052
+ writer.uint32(10).string(message.EventStore);
2053
+ }
2054
+ return writer;
2055
+ },
2056
+
2057
+ decode(input: BinaryReader | Uint8Array, length?: number): GetAllDeclarationsRequest {
2058
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2059
+ const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
2060
+ if (previousRecursionDepth >= 100) {
2061
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
2062
+ }
2063
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
2064
+ try {
2065
+ const end = length === undefined ? reader.len : reader.pos + length;
2066
+ const message = createBaseGetAllDeclarationsRequest();
2067
+ while (reader.pos < end) {
2068
+ const tag = reader.uint32();
2069
+ switch (tag >>> 3) {
2070
+ case 1: {
2071
+ if (tag !== 10) {
2072
+ break;
2073
+ }
2074
+
2075
+ message.EventStore = reader.string();
2076
+ continue;
2077
+ }
2078
+ }
2079
+ if ((tag & 7) === 4 || tag === 0) {
2080
+ break;
2081
+ }
2082
+ reader.skip(tag & 7);
2083
+ }
2084
+ return message;
2085
+ } finally {
2086
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
2087
+ }
2088
+ },
2089
+
2090
+ fromJSON(object: any): GetAllDeclarationsRequest {
2091
+ return { EventStore: isSet(object.EventStore) ? globalThis.String(object.EventStore) : "" };
2092
+ },
2093
+
2094
+ toJSON(message: GetAllDeclarationsRequest): unknown {
2095
+ const obj: any = {};
2096
+ if (message.EventStore !== "") {
2097
+ obj.EventStore = message.EventStore;
2098
+ }
2099
+ return obj;
2100
+ },
2101
+
2102
+ create(base?: DeepPartial<GetAllDeclarationsRequest>): GetAllDeclarationsRequest {
2103
+ return GetAllDeclarationsRequest.fromPartial(base ?? {});
2104
+ },
2105
+ fromPartial(object: DeepPartial<GetAllDeclarationsRequest>): GetAllDeclarationsRequest {
2106
+ const message = createBaseGetAllDeclarationsRequest();
2107
+ message.EventStore = object.EventStore ?? "";
2108
+ return message;
2109
+ },
2110
+ };
2111
+
2112
+ function createBaseGetAllDefinitionsRequest(): GetAllDefinitionsRequest {
2113
+ return { EventStore: "" };
2114
+ }
2115
+
2116
+ export const GetAllDefinitionsRequest: MessageFns<GetAllDefinitionsRequest> = {
2117
+ encode(message: GetAllDefinitionsRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
2118
+ if (message.EventStore !== "") {
2119
+ writer.uint32(10).string(message.EventStore);
2120
+ }
2121
+ return writer;
2122
+ },
2123
+
2124
+ decode(input: BinaryReader | Uint8Array, length?: number): GetAllDefinitionsRequest {
2125
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2126
+ const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
2127
+ if (previousRecursionDepth >= 100) {
2128
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
2129
+ }
2130
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
2131
+ try {
2132
+ const end = length === undefined ? reader.len : reader.pos + length;
2133
+ const message = createBaseGetAllDefinitionsRequest();
2134
+ while (reader.pos < end) {
2135
+ const tag = reader.uint32();
2136
+ switch (tag >>> 3) {
2137
+ case 1: {
2138
+ if (tag !== 10) {
2139
+ break;
2140
+ }
2141
+
2142
+ message.EventStore = reader.string();
2143
+ continue;
2144
+ }
2145
+ }
2146
+ if ((tag & 7) === 4 || tag === 0) {
2147
+ break;
2148
+ }
2149
+ reader.skip(tag & 7);
2150
+ }
2151
+ return message;
2152
+ } finally {
2153
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
2154
+ }
2155
+ },
2156
+
2157
+ fromJSON(object: any): GetAllDefinitionsRequest {
2158
+ return { EventStore: isSet(object.EventStore) ? globalThis.String(object.EventStore) : "" };
2159
+ },
2160
+
2161
+ toJSON(message: GetAllDefinitionsRequest): unknown {
2162
+ const obj: any = {};
2163
+ if (message.EventStore !== "") {
2164
+ obj.EventStore = message.EventStore;
2165
+ }
2166
+ return obj;
2167
+ },
2168
+
2169
+ create(base?: DeepPartial<GetAllDefinitionsRequest>): GetAllDefinitionsRequest {
2170
+ return GetAllDefinitionsRequest.fromPartial(base ?? {});
2171
+ },
2172
+ fromPartial(object: DeepPartial<GetAllDefinitionsRequest>): GetAllDefinitionsRequest {
2173
+ const message = createBaseGetAllDefinitionsRequest();
2174
+ message.EventStore = object.EventStore ?? "";
2175
+ return message;
2176
+ },
2177
+ };
2178
+
2179
+ function createBaseGraphEdgeFromDefinition(): GraphEdgeFromDefinition {
2180
+ return { SourceKey: "", TargetKey: "", Identity: "", Properties: {} };
2181
+ }
2182
+
2183
+ export const GraphEdgeFromDefinition: MessageFns<GraphEdgeFromDefinition> = {
2184
+ encode(message: GraphEdgeFromDefinition, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
2185
+ if (message.SourceKey !== "") {
2186
+ writer.uint32(10).string(message.SourceKey);
2187
+ }
2188
+ if (message.TargetKey !== "") {
2189
+ writer.uint32(18).string(message.TargetKey);
2190
+ }
2191
+ if (message.Identity !== "") {
2192
+ writer.uint32(26).string(message.Identity);
2193
+ }
2194
+ globalThis.Object.entries(message.Properties).forEach(([key, value]: [string, string]) => {
2195
+ GraphEdgeFromDefinition_PropertiesEntry.encode({ key: key as any, value }, writer.uint32(34).fork()).join();
2196
+ });
2197
+ return writer;
2198
+ },
2199
+
2200
+ decode(input: BinaryReader | Uint8Array, length?: number): GraphEdgeFromDefinition {
2201
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2202
+ const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
2203
+ if (previousRecursionDepth >= 100) {
2204
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
2205
+ }
2206
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
2207
+ try {
2208
+ const end = length === undefined ? reader.len : reader.pos + length;
2209
+ const message = createBaseGraphEdgeFromDefinition();
2210
+ while (reader.pos < end) {
2211
+ const tag = reader.uint32();
2212
+ switch (tag >>> 3) {
2213
+ case 1: {
2214
+ if (tag !== 10) {
2215
+ break;
2216
+ }
2217
+
2218
+ message.SourceKey = reader.string();
2219
+ continue;
2220
+ }
2221
+ case 2: {
2222
+ if (tag !== 18) {
2223
+ break;
2224
+ }
2225
+
2226
+ message.TargetKey = reader.string();
2227
+ continue;
2228
+ }
2229
+ case 3: {
2230
+ if (tag !== 26) {
2231
+ break;
2232
+ }
2233
+
2234
+ message.Identity = reader.string();
2235
+ continue;
2236
+ }
2237
+ case 4: {
2238
+ if (tag !== 34) {
2239
+ break;
2240
+ }
2241
+
2242
+ const entry4 = GraphEdgeFromDefinition_PropertiesEntry.decode(reader, reader.uint32());
2243
+ if (entry4.value !== undefined) {
2244
+ message.Properties[entry4.key] = entry4.value;
2245
+ }
2246
+ continue;
2247
+ }
2248
+ }
2249
+ if ((tag & 7) === 4 || tag === 0) {
2250
+ break;
2251
+ }
2252
+ reader.skip(tag & 7);
2253
+ }
2254
+ return message;
2255
+ } finally {
2256
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
2257
+ }
2258
+ },
2259
+
2260
+ fromJSON(object: any): GraphEdgeFromDefinition {
2261
+ return {
2262
+ SourceKey: isSet(object.SourceKey) ? globalThis.String(object.SourceKey) : "",
2263
+ TargetKey: isSet(object.TargetKey) ? globalThis.String(object.TargetKey) : "",
2264
+ Identity: isSet(object.Identity) ? globalThis.String(object.Identity) : "",
2265
+ Properties: isObject(object.Properties)
2266
+ ? (globalThis.Object.entries(object.Properties) as [string, any][]).reduce(
2267
+ (acc: { [key: string]: string }, [key, value]: [string, any]) => {
2268
+ globalThis.Object.defineProperty(acc, key, {
2269
+ value: globalThis.String(value),
2270
+ enumerable: true,
2271
+ configurable: true,
2272
+ writable: true,
2273
+ });
2274
+ return acc;
2275
+ },
2276
+ {},
2277
+ )
2278
+ : {},
2279
+ };
2280
+ },
2281
+
2282
+ toJSON(message: GraphEdgeFromDefinition): unknown {
2283
+ const obj: any = {};
2284
+ if (message.SourceKey !== "") {
2285
+ obj.SourceKey = message.SourceKey;
2286
+ }
2287
+ if (message.TargetKey !== "") {
2288
+ obj.TargetKey = message.TargetKey;
2289
+ }
2290
+ if (message.Identity !== "") {
2291
+ obj.Identity = message.Identity;
2292
+ }
2293
+ if (message.Properties) {
2294
+ const entries = globalThis.Object.entries(message.Properties) as [string, string][];
2295
+ if (entries.length > 0) {
2296
+ obj.Properties = {};
2297
+ entries.forEach(([k, v]) => {
2298
+ obj.Properties[k] = v;
2299
+ });
2300
+ }
2301
+ }
2302
+ return obj;
2303
+ },
2304
+
2305
+ create(base?: DeepPartial<GraphEdgeFromDefinition>): GraphEdgeFromDefinition {
2306
+ return GraphEdgeFromDefinition.fromPartial(base ?? {});
2307
+ },
2308
+ fromPartial(object: DeepPartial<GraphEdgeFromDefinition>): GraphEdgeFromDefinition {
2309
+ const message = createBaseGraphEdgeFromDefinition();
2310
+ message.SourceKey = object.SourceKey ?? "";
2311
+ message.TargetKey = object.TargetKey ?? "";
2312
+ message.Identity = object.Identity ?? "";
2313
+ message.Properties = (globalThis.Object.entries(object.Properties ?? {}) as [string, string][]).reduce(
2314
+ (acc: { [key: string]: string }, [key, value]: [string, string]) => {
2315
+ if (value !== undefined) {
2316
+ acc[key] = globalThis.String(value);
2317
+ }
2318
+ return acc;
2319
+ },
2320
+ {},
2321
+ );
2322
+ return message;
2323
+ },
2324
+ };
2325
+
2326
+ function createBaseGraphEdgeFromDefinition_PropertiesEntry(): GraphEdgeFromDefinition_PropertiesEntry {
2327
+ return { key: "", value: "" };
2328
+ }
2329
+
2330
+ export const GraphEdgeFromDefinition_PropertiesEntry: MessageFns<GraphEdgeFromDefinition_PropertiesEntry> = {
2331
+ encode(message: GraphEdgeFromDefinition_PropertiesEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
2332
+ if (message.key !== "") {
2333
+ writer.uint32(10).string(message.key);
2334
+ }
2335
+ if (message.value !== "") {
2336
+ writer.uint32(18).string(message.value);
2337
+ }
2338
+ return writer;
2339
+ },
2340
+
2341
+ decode(input: BinaryReader | Uint8Array, length?: number): GraphEdgeFromDefinition_PropertiesEntry {
2342
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2343
+ const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
2344
+ if (previousRecursionDepth >= 100) {
2345
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
2346
+ }
2347
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
2348
+ try {
2349
+ const end = length === undefined ? reader.len : reader.pos + length;
2350
+ const message = createBaseGraphEdgeFromDefinition_PropertiesEntry();
2351
+ while (reader.pos < end) {
2352
+ const tag = reader.uint32();
2353
+ switch (tag >>> 3) {
2354
+ case 1: {
2355
+ if (tag !== 10) {
2356
+ break;
2357
+ }
2358
+
2359
+ message.key = reader.string();
2360
+ continue;
2361
+ }
2362
+ case 2: {
2363
+ if (tag !== 18) {
2364
+ break;
2365
+ }
2366
+
2367
+ message.value = reader.string();
2368
+ continue;
2369
+ }
2370
+ }
2371
+ if ((tag & 7) === 4 || tag === 0) {
2372
+ break;
2373
+ }
2374
+ reader.skip(tag & 7);
2375
+ }
2376
+ return message;
2377
+ } finally {
2378
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
2379
+ }
2380
+ },
2381
+
2382
+ fromJSON(object: any): GraphEdgeFromDefinition_PropertiesEntry {
2383
+ return {
2384
+ key: isSet(object.key) ? globalThis.String(object.key) : "",
2385
+ value: isSet(object.value) ? globalThis.String(object.value) : "",
2386
+ };
2387
+ },
2388
+
2389
+ toJSON(message: GraphEdgeFromDefinition_PropertiesEntry): unknown {
2390
+ const obj: any = {};
2391
+ if (message.key !== "") {
2392
+ obj.key = message.key;
2393
+ }
2394
+ if (message.value !== "") {
2395
+ obj.value = message.value;
2396
+ }
2397
+ return obj;
2398
+ },
2399
+
2400
+ create(base?: DeepPartial<GraphEdgeFromDefinition_PropertiesEntry>): GraphEdgeFromDefinition_PropertiesEntry {
2401
+ return GraphEdgeFromDefinition_PropertiesEntry.fromPartial(base ?? {});
2402
+ },
2403
+ fromPartial(object: DeepPartial<GraphEdgeFromDefinition_PropertiesEntry>): GraphEdgeFromDefinition_PropertiesEntry {
2404
+ const message = createBaseGraphEdgeFromDefinition_PropertiesEntry();
2405
+ message.key = object.key ?? "";
2406
+ message.value = object.value ?? "";
2407
+ return message;
2408
+ },
2409
+ };
2410
+
2411
+ function createBaseGraphEdgeProjectionDefinition(): GraphEdgeProjectionDefinition {
2412
+ return { From: {}, RemovedWith: {} };
2413
+ }
2414
+
2415
+ export const GraphEdgeProjectionDefinition: MessageFns<GraphEdgeProjectionDefinition> = {
2416
+ encode(message: GraphEdgeProjectionDefinition, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
2417
+ globalThis.Object.entries(message.From).forEach(([key, value]: [string, GraphEdgeFromDefinition]) => {
2418
+ GraphEdgeProjectionDefinition_FromEntry.encode({ key: key as any, value }, writer.uint32(10).fork()).join();
2419
+ });
2420
+ globalThis.Object.entries(message.RemovedWith).forEach(([key, value]: [string, GraphEdgeRemovedWithDefinition]) => {
2421
+ GraphEdgeProjectionDefinition_RemovedWithEntry.encode({ key: key as any, value }, writer.uint32(18).fork())
2422
+ .join();
2423
+ });
2424
+ return writer;
2425
+ },
2426
+
2427
+ decode(input: BinaryReader | Uint8Array, length?: number): GraphEdgeProjectionDefinition {
2428
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2429
+ const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
2430
+ if (previousRecursionDepth >= 100) {
2431
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
2432
+ }
2433
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
2434
+ try {
2435
+ const end = length === undefined ? reader.len : reader.pos + length;
2436
+ const message = createBaseGraphEdgeProjectionDefinition();
2437
+ while (reader.pos < end) {
2438
+ const tag = reader.uint32();
2439
+ switch (tag >>> 3) {
2440
+ case 1: {
2441
+ if (tag !== 10) {
2442
+ break;
2443
+ }
2444
+
2445
+ const entry1 = GraphEdgeProjectionDefinition_FromEntry.decode(reader, reader.uint32());
2446
+ if (entry1.value !== undefined) {
2447
+ message.From[entry1.key] = entry1.value;
2448
+ }
2449
+ continue;
2450
+ }
2451
+ case 2: {
2452
+ if (tag !== 18) {
2453
+ break;
2454
+ }
2455
+
2456
+ const entry2 = GraphEdgeProjectionDefinition_RemovedWithEntry.decode(reader, reader.uint32());
2457
+ if (entry2.value !== undefined) {
2458
+ message.RemovedWith[entry2.key] = entry2.value;
2459
+ }
2460
+ continue;
2461
+ }
2462
+ }
2463
+ if ((tag & 7) === 4 || tag === 0) {
2464
+ break;
2465
+ }
2466
+ reader.skip(tag & 7);
2467
+ }
2468
+ return message;
2469
+ } finally {
2470
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
2471
+ }
2472
+ },
2473
+
2474
+ fromJSON(object: any): GraphEdgeProjectionDefinition {
2475
+ return {
2476
+ From: isObject(object.From)
2477
+ ? (globalThis.Object.entries(object.From) as [string, any][]).reduce(
2478
+ (acc: { [key: string]: GraphEdgeFromDefinition }, [key, value]: [string, any]) => {
2479
+ globalThis.Object.defineProperty(acc, key, {
2480
+ value: GraphEdgeFromDefinition.fromJSON(value),
2481
+ enumerable: true,
2482
+ configurable: true,
2483
+ writable: true,
2484
+ });
2485
+ return acc;
2486
+ },
2487
+ {},
2488
+ )
2489
+ : {},
2490
+ RemovedWith: isObject(object.RemovedWith)
2491
+ ? (globalThis.Object.entries(object.RemovedWith) as [string, any][]).reduce(
2492
+ (acc: { [key: string]: GraphEdgeRemovedWithDefinition }, [key, value]: [string, any]) => {
2493
+ globalThis.Object.defineProperty(acc, key, {
2494
+ value: GraphEdgeRemovedWithDefinition.fromJSON(value),
2495
+ enumerable: true,
2496
+ configurable: true,
2497
+ writable: true,
2498
+ });
2499
+ return acc;
2500
+ },
2501
+ {},
2502
+ )
2503
+ : {},
2504
+ };
2505
+ },
2506
+
2507
+ toJSON(message: GraphEdgeProjectionDefinition): unknown {
2508
+ const obj: any = {};
2509
+ if (message.From) {
2510
+ const entries = globalThis.Object.entries(message.From) as [string, GraphEdgeFromDefinition][];
2511
+ if (entries.length > 0) {
2512
+ obj.From = {};
2513
+ entries.forEach(([k, v]) => {
2514
+ obj.From[k] = GraphEdgeFromDefinition.toJSON(v);
2515
+ });
2516
+ }
2517
+ }
2518
+ if (message.RemovedWith) {
2519
+ const entries = globalThis.Object.entries(message.RemovedWith) as [string, GraphEdgeRemovedWithDefinition][];
2520
+ if (entries.length > 0) {
2521
+ obj.RemovedWith = {};
2522
+ entries.forEach(([k, v]) => {
2523
+ obj.RemovedWith[k] = GraphEdgeRemovedWithDefinition.toJSON(v);
2524
+ });
2525
+ }
2526
+ }
2527
+ return obj;
2528
+ },
2529
+
2530
+ create(base?: DeepPartial<GraphEdgeProjectionDefinition>): GraphEdgeProjectionDefinition {
2531
+ return GraphEdgeProjectionDefinition.fromPartial(base ?? {});
2532
+ },
2533
+ fromPartial(object: DeepPartial<GraphEdgeProjectionDefinition>): GraphEdgeProjectionDefinition {
2534
+ const message = createBaseGraphEdgeProjectionDefinition();
2535
+ message.From = (globalThis.Object.entries(object.From ?? {}) as [string, GraphEdgeFromDefinition][]).reduce(
2536
+ (acc: { [key: string]: GraphEdgeFromDefinition }, [key, value]: [string, GraphEdgeFromDefinition]) => {
2537
+ if (value !== undefined) {
2538
+ acc[key] = GraphEdgeFromDefinition.fromPartial(value);
2539
+ }
2540
+ return acc;
2541
+ },
2542
+ {},
2543
+ );
2544
+ message.RemovedWith =
2545
+ (globalThis.Object.entries(object.RemovedWith ?? {}) as [string, GraphEdgeRemovedWithDefinition][]).reduce(
2546
+ (
2547
+ acc: { [key: string]: GraphEdgeRemovedWithDefinition },
2548
+ [key, value]: [string, GraphEdgeRemovedWithDefinition],
2549
+ ) => {
2550
+ if (value !== undefined) {
2551
+ acc[key] = GraphEdgeRemovedWithDefinition.fromPartial(value);
2552
+ }
2553
+ return acc;
2554
+ },
2555
+ {},
2556
+ );
2557
+ return message;
2558
+ },
2559
+ };
2560
+
2561
+ function createBaseGraphEdgeProjectionDefinition_FromEntry(): GraphEdgeProjectionDefinition_FromEntry {
2562
+ return { key: "", value: undefined };
2563
+ }
2564
+
2565
+ export const GraphEdgeProjectionDefinition_FromEntry: MessageFns<GraphEdgeProjectionDefinition_FromEntry> = {
2566
+ encode(message: GraphEdgeProjectionDefinition_FromEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
2567
+ if (message.key !== "") {
2568
+ writer.uint32(10).string(message.key);
2569
+ }
2570
+ if (message.value !== undefined) {
2571
+ GraphEdgeFromDefinition.encode(message.value, writer.uint32(18).fork()).join();
2572
+ }
2573
+ return writer;
2574
+ },
2575
+
2576
+ decode(input: BinaryReader | Uint8Array, length?: number): GraphEdgeProjectionDefinition_FromEntry {
2577
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2578
+ const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
2579
+ if (previousRecursionDepth >= 100) {
2580
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
2581
+ }
2582
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
2583
+ try {
2584
+ const end = length === undefined ? reader.len : reader.pos + length;
2585
+ const message = createBaseGraphEdgeProjectionDefinition_FromEntry();
2586
+ while (reader.pos < end) {
2587
+ const tag = reader.uint32();
2588
+ switch (tag >>> 3) {
2589
+ case 1: {
2590
+ if (tag !== 10) {
2591
+ break;
2592
+ }
2593
+
2594
+ message.key = reader.string();
2595
+ continue;
2596
+ }
2597
+ case 2: {
2598
+ if (tag !== 18) {
2599
+ break;
2600
+ }
2601
+
2602
+ message.value = GraphEdgeFromDefinition.decode(reader, reader.uint32());
2603
+ continue;
2604
+ }
2605
+ }
2606
+ if ((tag & 7) === 4 || tag === 0) {
2607
+ break;
2608
+ }
2609
+ reader.skip(tag & 7);
2610
+ }
2611
+ return message;
2612
+ } finally {
2613
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
2614
+ }
2615
+ },
2616
+
2617
+ fromJSON(object: any): GraphEdgeProjectionDefinition_FromEntry {
2618
+ return {
2619
+ key: isSet(object.key) ? globalThis.String(object.key) : "",
2620
+ value: isSet(object.value) ? GraphEdgeFromDefinition.fromJSON(object.value) : undefined,
2621
+ };
2622
+ },
2623
+
2624
+ toJSON(message: GraphEdgeProjectionDefinition_FromEntry): unknown {
2625
+ const obj: any = {};
2626
+ if (message.key !== "") {
2627
+ obj.key = message.key;
2628
+ }
2629
+ if (message.value !== undefined) {
2630
+ obj.value = GraphEdgeFromDefinition.toJSON(message.value);
2631
+ }
2632
+ return obj;
2633
+ },
2634
+
2635
+ create(base?: DeepPartial<GraphEdgeProjectionDefinition_FromEntry>): GraphEdgeProjectionDefinition_FromEntry {
2636
+ return GraphEdgeProjectionDefinition_FromEntry.fromPartial(base ?? {});
2637
+ },
2638
+ fromPartial(object: DeepPartial<GraphEdgeProjectionDefinition_FromEntry>): GraphEdgeProjectionDefinition_FromEntry {
2639
+ const message = createBaseGraphEdgeProjectionDefinition_FromEntry();
2640
+ message.key = object.key ?? "";
2641
+ message.value = (object.value !== undefined && object.value !== null)
2642
+ ? GraphEdgeFromDefinition.fromPartial(object.value)
2643
+ : undefined;
2644
+ return message;
2645
+ },
2646
+ };
2647
+
2648
+ function createBaseGraphEdgeProjectionDefinition_RemovedWithEntry(): GraphEdgeProjectionDefinition_RemovedWithEntry {
2649
+ return { key: "", value: undefined };
2650
+ }
2651
+
2652
+ export const GraphEdgeProjectionDefinition_RemovedWithEntry: MessageFns<
2653
+ GraphEdgeProjectionDefinition_RemovedWithEntry
2654
+ > = {
2655
+ encode(
2656
+ message: GraphEdgeProjectionDefinition_RemovedWithEntry,
2657
+ writer: BinaryWriter = new BinaryWriter(),
2658
+ ): BinaryWriter {
2659
+ if (message.key !== "") {
2660
+ writer.uint32(10).string(message.key);
2661
+ }
2662
+ if (message.value !== undefined) {
2663
+ GraphEdgeRemovedWithDefinition.encode(message.value, writer.uint32(18).fork()).join();
2664
+ }
2665
+ return writer;
2666
+ },
2667
+
2668
+ decode(input: BinaryReader | Uint8Array, length?: number): GraphEdgeProjectionDefinition_RemovedWithEntry {
2669
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2670
+ const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
2671
+ if (previousRecursionDepth >= 100) {
2672
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
2673
+ }
2674
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
2675
+ try {
2676
+ const end = length === undefined ? reader.len : reader.pos + length;
2677
+ const message = createBaseGraphEdgeProjectionDefinition_RemovedWithEntry();
2678
+ while (reader.pos < end) {
2679
+ const tag = reader.uint32();
2680
+ switch (tag >>> 3) {
2681
+ case 1: {
2682
+ if (tag !== 10) {
2683
+ break;
2684
+ }
2685
+
2686
+ message.key = reader.string();
2687
+ continue;
2688
+ }
2689
+ case 2: {
2690
+ if (tag !== 18) {
2691
+ break;
2692
+ }
2693
+
2694
+ message.value = GraphEdgeRemovedWithDefinition.decode(reader, reader.uint32());
2695
+ continue;
2696
+ }
2697
+ }
2698
+ if ((tag & 7) === 4 || tag === 0) {
2699
+ break;
2700
+ }
2701
+ reader.skip(tag & 7);
2702
+ }
2703
+ return message;
2704
+ } finally {
2705
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
2706
+ }
2707
+ },
2708
+
2709
+ fromJSON(object: any): GraphEdgeProjectionDefinition_RemovedWithEntry {
2710
+ return {
2711
+ key: isSet(object.key) ? globalThis.String(object.key) : "",
2712
+ value: isSet(object.value) ? GraphEdgeRemovedWithDefinition.fromJSON(object.value) : undefined,
2713
+ };
2714
+ },
2715
+
2716
+ toJSON(message: GraphEdgeProjectionDefinition_RemovedWithEntry): unknown {
2717
+ const obj: any = {};
2718
+ if (message.key !== "") {
2719
+ obj.key = message.key;
2720
+ }
2721
+ if (message.value !== undefined) {
2722
+ obj.value = GraphEdgeRemovedWithDefinition.toJSON(message.value);
2723
+ }
2724
+ return obj;
2725
+ },
2726
+
2727
+ create(
2728
+ base?: DeepPartial<GraphEdgeProjectionDefinition_RemovedWithEntry>,
2729
+ ): GraphEdgeProjectionDefinition_RemovedWithEntry {
2730
+ return GraphEdgeProjectionDefinition_RemovedWithEntry.fromPartial(base ?? {});
2731
+ },
2732
+ fromPartial(
2733
+ object: DeepPartial<GraphEdgeProjectionDefinition_RemovedWithEntry>,
2734
+ ): GraphEdgeProjectionDefinition_RemovedWithEntry {
2735
+ const message = createBaseGraphEdgeProjectionDefinition_RemovedWithEntry();
2736
+ message.key = object.key ?? "";
2737
+ message.value = (object.value !== undefined && object.value !== null)
2738
+ ? GraphEdgeRemovedWithDefinition.fromPartial(object.value)
2739
+ : undefined;
2740
+ return message;
2741
+ },
2742
+ };
2743
+
2744
+ function createBaseGraphEdgeRemovedWithDefinition(): GraphEdgeRemovedWithDefinition {
2745
+ return { SourceKey: "", TargetKey: "", Identity: "" };
2746
+ }
2747
+
2748
+ export const GraphEdgeRemovedWithDefinition: MessageFns<GraphEdgeRemovedWithDefinition> = {
2749
+ encode(message: GraphEdgeRemovedWithDefinition, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
2750
+ if (message.SourceKey !== "") {
2751
+ writer.uint32(10).string(message.SourceKey);
2752
+ }
2753
+ if (message.TargetKey !== "") {
2754
+ writer.uint32(18).string(message.TargetKey);
2755
+ }
2756
+ if (message.Identity !== "") {
2757
+ writer.uint32(26).string(message.Identity);
2758
+ }
2759
+ return writer;
2760
+ },
2761
+
2762
+ decode(input: BinaryReader | Uint8Array, length?: number): GraphEdgeRemovedWithDefinition {
2763
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2764
+ const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
2765
+ if (previousRecursionDepth >= 100) {
2766
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
2767
+ }
2768
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
2769
+ try {
2770
+ const end = length === undefined ? reader.len : reader.pos + length;
2771
+ const message = createBaseGraphEdgeRemovedWithDefinition();
2772
+ while (reader.pos < end) {
2773
+ const tag = reader.uint32();
2774
+ switch (tag >>> 3) {
2775
+ case 1: {
2776
+ if (tag !== 10) {
2777
+ break;
2778
+ }
2779
+
2780
+ message.SourceKey = reader.string();
2781
+ continue;
2782
+ }
2783
+ case 2: {
2784
+ if (tag !== 18) {
2785
+ break;
2786
+ }
2787
+
2788
+ message.TargetKey = reader.string();
2789
+ continue;
2790
+ }
2791
+ case 3: {
2792
+ if (tag !== 26) {
2793
+ break;
2794
+ }
2795
+
2796
+ message.Identity = reader.string();
2797
+ continue;
2798
+ }
2799
+ }
2800
+ if ((tag & 7) === 4 || tag === 0) {
2801
+ break;
2802
+ }
2803
+ reader.skip(tag & 7);
2804
+ }
2805
+ return message;
2806
+ } finally {
2807
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
2808
+ }
2809
+ },
2810
+
2811
+ fromJSON(object: any): GraphEdgeRemovedWithDefinition {
2812
+ return {
2813
+ SourceKey: isSet(object.SourceKey) ? globalThis.String(object.SourceKey) : "",
2814
+ TargetKey: isSet(object.TargetKey) ? globalThis.String(object.TargetKey) : "",
2815
+ Identity: isSet(object.Identity) ? globalThis.String(object.Identity) : "",
2816
+ };
2817
+ },
2818
+
2819
+ toJSON(message: GraphEdgeRemovedWithDefinition): unknown {
2820
+ const obj: any = {};
2821
+ if (message.SourceKey !== "") {
2822
+ obj.SourceKey = message.SourceKey;
2823
+ }
2824
+ if (message.TargetKey !== "") {
2825
+ obj.TargetKey = message.TargetKey;
2826
+ }
2827
+ if (message.Identity !== "") {
2828
+ obj.Identity = message.Identity;
2829
+ }
2830
+ return obj;
2831
+ },
2832
+
2833
+ create(base?: DeepPartial<GraphEdgeRemovedWithDefinition>): GraphEdgeRemovedWithDefinition {
2834
+ return GraphEdgeRemovedWithDefinition.fromPartial(base ?? {});
2835
+ },
2836
+ fromPartial(object: DeepPartial<GraphEdgeRemovedWithDefinition>): GraphEdgeRemovedWithDefinition {
2837
+ const message = createBaseGraphEdgeRemovedWithDefinition();
2838
+ message.SourceKey = object.SourceKey ?? "";
2839
+ message.TargetKey = object.TargetKey ?? "";
2840
+ message.Identity = object.Identity ?? "";
2841
+ return message;
2842
+ },
2843
+ };
2844
+
2845
+ function createBaseGraphNodeFromDefinition(): GraphNodeFromDefinition {
2846
+ return { Key: "", Properties: {}, UpdateOnly: false };
2847
+ }
2848
+
2849
+ export const GraphNodeFromDefinition: MessageFns<GraphNodeFromDefinition> = {
2850
+ encode(message: GraphNodeFromDefinition, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
2851
+ if (message.Key !== "") {
2852
+ writer.uint32(10).string(message.Key);
2853
+ }
2854
+ globalThis.Object.entries(message.Properties).forEach(([key, value]: [string, string]) => {
2855
+ GraphNodeFromDefinition_PropertiesEntry.encode({ key: key as any, value }, writer.uint32(18).fork()).join();
2856
+ });
2857
+ if (message.UpdateOnly !== false) {
2858
+ writer.uint32(24).bool(message.UpdateOnly);
2859
+ }
2860
+ return writer;
2861
+ },
2862
+
2863
+ decode(input: BinaryReader | Uint8Array, length?: number): GraphNodeFromDefinition {
2864
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2865
+ const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
2866
+ if (previousRecursionDepth >= 100) {
2867
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
2868
+ }
2869
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
2870
+ try {
2871
+ const end = length === undefined ? reader.len : reader.pos + length;
2872
+ const message = createBaseGraphNodeFromDefinition();
2873
+ while (reader.pos < end) {
2874
+ const tag = reader.uint32();
2875
+ switch (tag >>> 3) {
2876
+ case 1: {
2877
+ if (tag !== 10) {
2878
+ break;
2879
+ }
2880
+
2881
+ message.Key = reader.string();
2882
+ continue;
2883
+ }
2884
+ case 2: {
2885
+ if (tag !== 18) {
2886
+ break;
2887
+ }
2888
+
2889
+ const entry2 = GraphNodeFromDefinition_PropertiesEntry.decode(reader, reader.uint32());
2890
+ if (entry2.value !== undefined) {
2891
+ message.Properties[entry2.key] = entry2.value;
2892
+ }
2893
+ continue;
2894
+ }
2895
+ case 3: {
2896
+ if (tag !== 24) {
2897
+ break;
2898
+ }
2899
+
2900
+ message.UpdateOnly = reader.bool();
2901
+ continue;
2902
+ }
2903
+ }
2904
+ if ((tag & 7) === 4 || tag === 0) {
2905
+ break;
2906
+ }
2907
+ reader.skip(tag & 7);
2908
+ }
2909
+ return message;
2910
+ } finally {
2911
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
2912
+ }
2913
+ },
2914
+
2915
+ fromJSON(object: any): GraphNodeFromDefinition {
2916
+ return {
2917
+ Key: isSet(object.Key) ? globalThis.String(object.Key) : "",
2918
+ Properties: isObject(object.Properties)
2919
+ ? (globalThis.Object.entries(object.Properties) as [string, any][]).reduce(
2920
+ (acc: { [key: string]: string }, [key, value]: [string, any]) => {
2921
+ globalThis.Object.defineProperty(acc, key, {
2922
+ value: globalThis.String(value),
2923
+ enumerable: true,
2924
+ configurable: true,
2925
+ writable: true,
2926
+ });
2927
+ return acc;
2928
+ },
2929
+ {},
2930
+ )
2931
+ : {},
2932
+ UpdateOnly: isSet(object.UpdateOnly) ? globalThis.Boolean(object.UpdateOnly) : false,
2933
+ };
2934
+ },
2935
+
2936
+ toJSON(message: GraphNodeFromDefinition): unknown {
2937
+ const obj: any = {};
2938
+ if (message.Key !== "") {
2939
+ obj.Key = message.Key;
2940
+ }
2941
+ if (message.Properties) {
2942
+ const entries = globalThis.Object.entries(message.Properties) as [string, string][];
2943
+ if (entries.length > 0) {
2944
+ obj.Properties = {};
2945
+ entries.forEach(([k, v]) => {
2946
+ obj.Properties[k] = v;
2947
+ });
2948
+ }
2949
+ }
2950
+ if (message.UpdateOnly !== false) {
2951
+ obj.UpdateOnly = message.UpdateOnly;
2952
+ }
2953
+ return obj;
2954
+ },
2955
+
2956
+ create(base?: DeepPartial<GraphNodeFromDefinition>): GraphNodeFromDefinition {
2957
+ return GraphNodeFromDefinition.fromPartial(base ?? {});
2958
+ },
2959
+ fromPartial(object: DeepPartial<GraphNodeFromDefinition>): GraphNodeFromDefinition {
2960
+ const message = createBaseGraphNodeFromDefinition();
2961
+ message.Key = object.Key ?? "";
2962
+ message.Properties = (globalThis.Object.entries(object.Properties ?? {}) as [string, string][]).reduce(
2963
+ (acc: { [key: string]: string }, [key, value]: [string, string]) => {
2964
+ if (value !== undefined) {
2965
+ acc[key] = globalThis.String(value);
2966
+ }
2967
+ return acc;
2968
+ },
2969
+ {},
2970
+ );
2971
+ message.UpdateOnly = object.UpdateOnly ?? false;
2972
+ return message;
2973
+ },
2974
+ };
2975
+
2976
+ function createBaseGraphNodeFromDefinition_PropertiesEntry(): GraphNodeFromDefinition_PropertiesEntry {
2977
+ return { key: "", value: "" };
2978
+ }
2979
+
2980
+ export const GraphNodeFromDefinition_PropertiesEntry: MessageFns<GraphNodeFromDefinition_PropertiesEntry> = {
2981
+ encode(message: GraphNodeFromDefinition_PropertiesEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
2982
+ if (message.key !== "") {
2983
+ writer.uint32(10).string(message.key);
2984
+ }
2985
+ if (message.value !== "") {
2986
+ writer.uint32(18).string(message.value);
2987
+ }
2988
+ return writer;
2989
+ },
2990
+
2991
+ decode(input: BinaryReader | Uint8Array, length?: number): GraphNodeFromDefinition_PropertiesEntry {
2992
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2993
+ const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
2994
+ if (previousRecursionDepth >= 100) {
2995
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
2996
+ }
2997
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
2998
+ try {
2999
+ const end = length === undefined ? reader.len : reader.pos + length;
3000
+ const message = createBaseGraphNodeFromDefinition_PropertiesEntry();
3001
+ while (reader.pos < end) {
3002
+ const tag = reader.uint32();
3003
+ switch (tag >>> 3) {
3004
+ case 1: {
3005
+ if (tag !== 10) {
3006
+ break;
3007
+ }
3008
+
3009
+ message.key = reader.string();
3010
+ continue;
3011
+ }
3012
+ case 2: {
3013
+ if (tag !== 18) {
3014
+ break;
3015
+ }
3016
+
3017
+ message.value = reader.string();
3018
+ continue;
3019
+ }
3020
+ }
3021
+ if ((tag & 7) === 4 || tag === 0) {
3022
+ break;
3023
+ }
3024
+ reader.skip(tag & 7);
3025
+ }
3026
+ return message;
3027
+ } finally {
3028
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
3029
+ }
3030
+ },
3031
+
3032
+ fromJSON(object: any): GraphNodeFromDefinition_PropertiesEntry {
3033
+ return {
3034
+ key: isSet(object.key) ? globalThis.String(object.key) : "",
3035
+ value: isSet(object.value) ? globalThis.String(object.value) : "",
3036
+ };
3037
+ },
3038
+
3039
+ toJSON(message: GraphNodeFromDefinition_PropertiesEntry): unknown {
3040
+ const obj: any = {};
3041
+ if (message.key !== "") {
3042
+ obj.key = message.key;
3043
+ }
3044
+ if (message.value !== "") {
3045
+ obj.value = message.value;
3046
+ }
3047
+ return obj;
3048
+ },
3049
+
3050
+ create(base?: DeepPartial<GraphNodeFromDefinition_PropertiesEntry>): GraphNodeFromDefinition_PropertiesEntry {
3051
+ return GraphNodeFromDefinition_PropertiesEntry.fromPartial(base ?? {});
3052
+ },
3053
+ fromPartial(object: DeepPartial<GraphNodeFromDefinition_PropertiesEntry>): GraphNodeFromDefinition_PropertiesEntry {
3054
+ const message = createBaseGraphNodeFromDefinition_PropertiesEntry();
3055
+ message.key = object.key ?? "";
3056
+ message.value = object.value ?? "";
3057
+ return message;
3058
+ },
3059
+ };
3060
+
3061
+ function createBaseGraphNodeProjectionDefinition(): GraphNodeProjectionDefinition {
3062
+ return { From: {}, RemovedWith: {} };
3063
+ }
3064
+
3065
+ export const GraphNodeProjectionDefinition: MessageFns<GraphNodeProjectionDefinition> = {
3066
+ encode(message: GraphNodeProjectionDefinition, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
3067
+ globalThis.Object.entries(message.From).forEach(([key, value]: [string, GraphNodeFromDefinition]) => {
3068
+ GraphNodeProjectionDefinition_FromEntry.encode({ key: key as any, value }, writer.uint32(10).fork()).join();
3069
+ });
3070
+ globalThis.Object.entries(message.RemovedWith).forEach(([key, value]: [string, GraphNodeRemovedWithDefinition]) => {
3071
+ GraphNodeProjectionDefinition_RemovedWithEntry.encode({ key: key as any, value }, writer.uint32(18).fork())
3072
+ .join();
3073
+ });
3074
+ return writer;
3075
+ },
3076
+
3077
+ decode(input: BinaryReader | Uint8Array, length?: number): GraphNodeProjectionDefinition {
3078
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
3079
+ const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
3080
+ if (previousRecursionDepth >= 100) {
3081
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
3082
+ }
3083
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
3084
+ try {
3085
+ const end = length === undefined ? reader.len : reader.pos + length;
3086
+ const message = createBaseGraphNodeProjectionDefinition();
3087
+ while (reader.pos < end) {
3088
+ const tag = reader.uint32();
3089
+ switch (tag >>> 3) {
3090
+ case 1: {
3091
+ if (tag !== 10) {
3092
+ break;
3093
+ }
3094
+
3095
+ const entry1 = GraphNodeProjectionDefinition_FromEntry.decode(reader, reader.uint32());
3096
+ if (entry1.value !== undefined) {
3097
+ message.From[entry1.key] = entry1.value;
3098
+ }
3099
+ continue;
3100
+ }
3101
+ case 2: {
3102
+ if (tag !== 18) {
3103
+ break;
3104
+ }
3105
+
3106
+ const entry2 = GraphNodeProjectionDefinition_RemovedWithEntry.decode(reader, reader.uint32());
3107
+ if (entry2.value !== undefined) {
3108
+ message.RemovedWith[entry2.key] = entry2.value;
3109
+ }
3110
+ continue;
3111
+ }
3112
+ }
3113
+ if ((tag & 7) === 4 || tag === 0) {
3114
+ break;
3115
+ }
3116
+ reader.skip(tag & 7);
3117
+ }
3118
+ return message;
3119
+ } finally {
3120
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
3121
+ }
3122
+ },
3123
+
3124
+ fromJSON(object: any): GraphNodeProjectionDefinition {
3125
+ return {
3126
+ From: isObject(object.From)
3127
+ ? (globalThis.Object.entries(object.From) as [string, any][]).reduce(
3128
+ (acc: { [key: string]: GraphNodeFromDefinition }, [key, value]: [string, any]) => {
3129
+ globalThis.Object.defineProperty(acc, key, {
3130
+ value: GraphNodeFromDefinition.fromJSON(value),
3131
+ enumerable: true,
3132
+ configurable: true,
3133
+ writable: true,
3134
+ });
3135
+ return acc;
3136
+ },
3137
+ {},
3138
+ )
3139
+ : {},
3140
+ RemovedWith: isObject(object.RemovedWith)
3141
+ ? (globalThis.Object.entries(object.RemovedWith) as [string, any][]).reduce(
3142
+ (acc: { [key: string]: GraphNodeRemovedWithDefinition }, [key, value]: [string, any]) => {
3143
+ globalThis.Object.defineProperty(acc, key, {
3144
+ value: GraphNodeRemovedWithDefinition.fromJSON(value),
3145
+ enumerable: true,
3146
+ configurable: true,
3147
+ writable: true,
3148
+ });
3149
+ return acc;
3150
+ },
3151
+ {},
3152
+ )
3153
+ : {},
3154
+ };
3155
+ },
3156
+
3157
+ toJSON(message: GraphNodeProjectionDefinition): unknown {
3158
+ const obj: any = {};
3159
+ if (message.From) {
3160
+ const entries = globalThis.Object.entries(message.From) as [string, GraphNodeFromDefinition][];
3161
+ if (entries.length > 0) {
3162
+ obj.From = {};
3163
+ entries.forEach(([k, v]) => {
3164
+ obj.From[k] = GraphNodeFromDefinition.toJSON(v);
3165
+ });
3166
+ }
3167
+ }
3168
+ if (message.RemovedWith) {
3169
+ const entries = globalThis.Object.entries(message.RemovedWith) as [string, GraphNodeRemovedWithDefinition][];
3170
+ if (entries.length > 0) {
3171
+ obj.RemovedWith = {};
3172
+ entries.forEach(([k, v]) => {
3173
+ obj.RemovedWith[k] = GraphNodeRemovedWithDefinition.toJSON(v);
3174
+ });
3175
+ }
3176
+ }
3177
+ return obj;
3178
+ },
3179
+
3180
+ create(base?: DeepPartial<GraphNodeProjectionDefinition>): GraphNodeProjectionDefinition {
3181
+ return GraphNodeProjectionDefinition.fromPartial(base ?? {});
3182
+ },
3183
+ fromPartial(object: DeepPartial<GraphNodeProjectionDefinition>): GraphNodeProjectionDefinition {
3184
+ const message = createBaseGraphNodeProjectionDefinition();
3185
+ message.From = (globalThis.Object.entries(object.From ?? {}) as [string, GraphNodeFromDefinition][]).reduce(
3186
+ (acc: { [key: string]: GraphNodeFromDefinition }, [key, value]: [string, GraphNodeFromDefinition]) => {
3187
+ if (value !== undefined) {
3188
+ acc[key] = GraphNodeFromDefinition.fromPartial(value);
3189
+ }
3190
+ return acc;
3191
+ },
3192
+ {},
3193
+ );
3194
+ message.RemovedWith =
3195
+ (globalThis.Object.entries(object.RemovedWith ?? {}) as [string, GraphNodeRemovedWithDefinition][]).reduce(
3196
+ (
3197
+ acc: { [key: string]: GraphNodeRemovedWithDefinition },
3198
+ [key, value]: [string, GraphNodeRemovedWithDefinition],
3199
+ ) => {
3200
+ if (value !== undefined) {
3201
+ acc[key] = GraphNodeRemovedWithDefinition.fromPartial(value);
3202
+ }
3203
+ return acc;
3204
+ },
3205
+ {},
3206
+ );
3207
+ return message;
3208
+ },
3209
+ };
3210
+
3211
+ function createBaseGraphNodeProjectionDefinition_FromEntry(): GraphNodeProjectionDefinition_FromEntry {
3212
+ return { key: "", value: undefined };
3213
+ }
3214
+
3215
+ export const GraphNodeProjectionDefinition_FromEntry: MessageFns<GraphNodeProjectionDefinition_FromEntry> = {
3216
+ encode(message: GraphNodeProjectionDefinition_FromEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
3217
+ if (message.key !== "") {
3218
+ writer.uint32(10).string(message.key);
3219
+ }
3220
+ if (message.value !== undefined) {
3221
+ GraphNodeFromDefinition.encode(message.value, writer.uint32(18).fork()).join();
3222
+ }
3223
+ return writer;
3224
+ },
3225
+
3226
+ decode(input: BinaryReader | Uint8Array, length?: number): GraphNodeProjectionDefinition_FromEntry {
3227
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
3228
+ const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
3229
+ if (previousRecursionDepth >= 100) {
3230
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
3231
+ }
3232
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
3233
+ try {
3234
+ const end = length === undefined ? reader.len : reader.pos + length;
3235
+ const message = createBaseGraphNodeProjectionDefinition_FromEntry();
3236
+ while (reader.pos < end) {
3237
+ const tag = reader.uint32();
3238
+ switch (tag >>> 3) {
3239
+ case 1: {
3240
+ if (tag !== 10) {
3241
+ break;
3242
+ }
3243
+
3244
+ message.key = reader.string();
3245
+ continue;
3246
+ }
3247
+ case 2: {
3248
+ if (tag !== 18) {
3249
+ break;
3250
+ }
3251
+
3252
+ message.value = GraphNodeFromDefinition.decode(reader, reader.uint32());
3253
+ continue;
3254
+ }
3255
+ }
3256
+ if ((tag & 7) === 4 || tag === 0) {
3257
+ break;
3258
+ }
3259
+ reader.skip(tag & 7);
3260
+ }
3261
+ return message;
3262
+ } finally {
3263
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
3264
+ }
3265
+ },
3266
+
3267
+ fromJSON(object: any): GraphNodeProjectionDefinition_FromEntry {
3268
+ return {
3269
+ key: isSet(object.key) ? globalThis.String(object.key) : "",
3270
+ value: isSet(object.value) ? GraphNodeFromDefinition.fromJSON(object.value) : undefined,
3271
+ };
3272
+ },
3273
+
3274
+ toJSON(message: GraphNodeProjectionDefinition_FromEntry): unknown {
3275
+ const obj: any = {};
3276
+ if (message.key !== "") {
3277
+ obj.key = message.key;
3278
+ }
3279
+ if (message.value !== undefined) {
3280
+ obj.value = GraphNodeFromDefinition.toJSON(message.value);
3281
+ }
3282
+ return obj;
3283
+ },
3284
+
3285
+ create(base?: DeepPartial<GraphNodeProjectionDefinition_FromEntry>): GraphNodeProjectionDefinition_FromEntry {
3286
+ return GraphNodeProjectionDefinition_FromEntry.fromPartial(base ?? {});
3287
+ },
3288
+ fromPartial(object: DeepPartial<GraphNodeProjectionDefinition_FromEntry>): GraphNodeProjectionDefinition_FromEntry {
3289
+ const message = createBaseGraphNodeProjectionDefinition_FromEntry();
3290
+ message.key = object.key ?? "";
3291
+ message.value = (object.value !== undefined && object.value !== null)
3292
+ ? GraphNodeFromDefinition.fromPartial(object.value)
3293
+ : undefined;
3294
+ return message;
3295
+ },
3296
+ };
3297
+
3298
+ function createBaseGraphNodeProjectionDefinition_RemovedWithEntry(): GraphNodeProjectionDefinition_RemovedWithEntry {
3299
+ return { key: "", value: undefined };
3300
+ }
3301
+
3302
+ export const GraphNodeProjectionDefinition_RemovedWithEntry: MessageFns<
3303
+ GraphNodeProjectionDefinition_RemovedWithEntry
3304
+ > = {
3305
+ encode(
3306
+ message: GraphNodeProjectionDefinition_RemovedWithEntry,
3307
+ writer: BinaryWriter = new BinaryWriter(),
3308
+ ): BinaryWriter {
3309
+ if (message.key !== "") {
3310
+ writer.uint32(10).string(message.key);
3311
+ }
3312
+ if (message.value !== undefined) {
3313
+ GraphNodeRemovedWithDefinition.encode(message.value, writer.uint32(18).fork()).join();
3314
+ }
3315
+ return writer;
3316
+ },
3317
+
3318
+ decode(input: BinaryReader | Uint8Array, length?: number): GraphNodeProjectionDefinition_RemovedWithEntry {
3319
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
3320
+ const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
3321
+ if (previousRecursionDepth >= 100) {
3322
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
3323
+ }
3324
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
3325
+ try {
3326
+ const end = length === undefined ? reader.len : reader.pos + length;
3327
+ const message = createBaseGraphNodeProjectionDefinition_RemovedWithEntry();
3328
+ while (reader.pos < end) {
3329
+ const tag = reader.uint32();
3330
+ switch (tag >>> 3) {
3331
+ case 1: {
3332
+ if (tag !== 10) {
3333
+ break;
3334
+ }
3335
+
3336
+ message.key = reader.string();
3337
+ continue;
3338
+ }
3339
+ case 2: {
3340
+ if (tag !== 18) {
3341
+ break;
3342
+ }
3343
+
3344
+ message.value = GraphNodeRemovedWithDefinition.decode(reader, reader.uint32());
3345
+ continue;
3346
+ }
3347
+ }
3348
+ if ((tag & 7) === 4 || tag === 0) {
3349
+ break;
3350
+ }
3351
+ reader.skip(tag & 7);
3352
+ }
3353
+ return message;
3354
+ } finally {
3355
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
3356
+ }
3357
+ },
3358
+
3359
+ fromJSON(object: any): GraphNodeProjectionDefinition_RemovedWithEntry {
3360
+ return {
3361
+ key: isSet(object.key) ? globalThis.String(object.key) : "",
3362
+ value: isSet(object.value) ? GraphNodeRemovedWithDefinition.fromJSON(object.value) : undefined,
3363
+ };
3364
+ },
3365
+
3366
+ toJSON(message: GraphNodeProjectionDefinition_RemovedWithEntry): unknown {
3367
+ const obj: any = {};
3368
+ if (message.key !== "") {
3369
+ obj.key = message.key;
3370
+ }
3371
+ if (message.value !== undefined) {
3372
+ obj.value = GraphNodeRemovedWithDefinition.toJSON(message.value);
3373
+ }
3374
+ return obj;
3375
+ },
3376
+
3377
+ create(
3378
+ base?: DeepPartial<GraphNodeProjectionDefinition_RemovedWithEntry>,
3379
+ ): GraphNodeProjectionDefinition_RemovedWithEntry {
3380
+ return GraphNodeProjectionDefinition_RemovedWithEntry.fromPartial(base ?? {});
3381
+ },
3382
+ fromPartial(
3383
+ object: DeepPartial<GraphNodeProjectionDefinition_RemovedWithEntry>,
3384
+ ): GraphNodeProjectionDefinition_RemovedWithEntry {
3385
+ const message = createBaseGraphNodeProjectionDefinition_RemovedWithEntry();
3386
+ message.key = object.key ?? "";
3387
+ message.value = (object.value !== undefined && object.value !== null)
3388
+ ? GraphNodeRemovedWithDefinition.fromPartial(object.value)
3389
+ : undefined;
3390
+ return message;
3391
+ },
3392
+ };
3393
+
3394
+ function createBaseGraphNodeRemovedWithDefinition(): GraphNodeRemovedWithDefinition {
3395
+ return { Key: "", Detach: false };
3396
+ }
3397
+
3398
+ export const GraphNodeRemovedWithDefinition: MessageFns<GraphNodeRemovedWithDefinition> = {
3399
+ encode(message: GraphNodeRemovedWithDefinition, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
3400
+ if (message.Key !== "") {
3401
+ writer.uint32(10).string(message.Key);
1654
3402
  }
1655
- if (message.PropertyExpression !== "") {
1656
- writer.uint32(18).string(message.PropertyExpression);
3403
+ if (message.Detach !== false) {
3404
+ writer.uint32(16).bool(message.Detach);
1657
3405
  }
1658
3406
  return writer;
1659
3407
  },
1660
3408
 
1661
- decode(input: BinaryReader | Uint8Array, length?: number): FromEventPropertyDefinition {
3409
+ decode(input: BinaryReader | Uint8Array, length?: number): GraphNodeRemovedWithDefinition {
1662
3410
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1663
3411
  const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
1664
3412
  if (previousRecursionDepth >= 100) {
@@ -1667,7 +3415,7 @@ export const FromEventPropertyDefinition: MessageFns<FromEventPropertyDefinition
1667
3415
  (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
1668
3416
  try {
1669
3417
  const end = length === undefined ? reader.len : reader.pos + length;
1670
- const message = createBaseFromEventPropertyDefinition();
3418
+ const message = createBaseGraphNodeRemovedWithDefinition();
1671
3419
  while (reader.pos < end) {
1672
3420
  const tag = reader.uint32();
1673
3421
  switch (tag >>> 3) {
@@ -1676,15 +3424,15 @@ export const FromEventPropertyDefinition: MessageFns<FromEventPropertyDefinition
1676
3424
  break;
1677
3425
  }
1678
3426
 
1679
- message.Event = EventType.decode(reader, reader.uint32());
3427
+ message.Key = reader.string();
1680
3428
  continue;
1681
3429
  }
1682
3430
  case 2: {
1683
- if (tag !== 18) {
3431
+ if (tag !== 16) {
1684
3432
  break;
1685
3433
  }
1686
3434
 
1687
- message.PropertyExpression = reader.string();
3435
+ message.Detach = reader.bool();
1688
3436
  continue;
1689
3437
  }
1690
3438
  }
@@ -1699,59 +3447,51 @@ export const FromEventPropertyDefinition: MessageFns<FromEventPropertyDefinition
1699
3447
  }
1700
3448
  },
1701
3449
 
1702
- fromJSON(object: any): FromEventPropertyDefinition {
3450
+ fromJSON(object: any): GraphNodeRemovedWithDefinition {
1703
3451
  return {
1704
- Event: isSet(object.Event) ? EventType.fromJSON(object.Event) : undefined,
1705
- PropertyExpression: isSet(object.PropertyExpression) ? globalThis.String(object.PropertyExpression) : "",
3452
+ Key: isSet(object.Key) ? globalThis.String(object.Key) : "",
3453
+ Detach: isSet(object.Detach) ? globalThis.Boolean(object.Detach) : false,
1706
3454
  };
1707
3455
  },
1708
3456
 
1709
- toJSON(message: FromEventPropertyDefinition): unknown {
3457
+ toJSON(message: GraphNodeRemovedWithDefinition): unknown {
1710
3458
  const obj: any = {};
1711
- if (message.Event !== undefined) {
1712
- obj.Event = EventType.toJSON(message.Event);
3459
+ if (message.Key !== "") {
3460
+ obj.Key = message.Key;
1713
3461
  }
1714
- if (message.PropertyExpression !== "") {
1715
- obj.PropertyExpression = message.PropertyExpression;
3462
+ if (message.Detach !== false) {
3463
+ obj.Detach = message.Detach;
1716
3464
  }
1717
3465
  return obj;
1718
3466
  },
1719
3467
 
1720
- create(base?: DeepPartial<FromEventPropertyDefinition>): FromEventPropertyDefinition {
1721
- return FromEventPropertyDefinition.fromPartial(base ?? {});
3468
+ create(base?: DeepPartial<GraphNodeRemovedWithDefinition>): GraphNodeRemovedWithDefinition {
3469
+ return GraphNodeRemovedWithDefinition.fromPartial(base ?? {});
1722
3470
  },
1723
- fromPartial(object: DeepPartial<FromEventPropertyDefinition>): FromEventPropertyDefinition {
1724
- const message = createBaseFromEventPropertyDefinition();
1725
- message.Event = (object.Event !== undefined && object.Event !== null)
1726
- ? EventType.fromPartial(object.Event)
1727
- : undefined;
1728
- message.PropertyExpression = object.PropertyExpression ?? "";
3471
+ fromPartial(object: DeepPartial<GraphNodeRemovedWithDefinition>): GraphNodeRemovedWithDefinition {
3472
+ const message = createBaseGraphNodeRemovedWithDefinition();
3473
+ message.Key = object.Key ?? "";
3474
+ message.Detach = object.Detach ?? false;
1729
3475
  return message;
1730
3476
  },
1731
3477
  };
1732
3478
 
1733
- function createBaseFromEveryDefinition(): FromEveryDefinition {
1734
- return { Properties: {}, IncludeChildren: false, AutoMap: 0, Key: "" };
3479
+ function createBaseGraphProjectionDefinition(): GraphProjectionDefinition {
3480
+ return { Nodes: {}, Edges: {} };
1735
3481
  }
1736
3482
 
1737
- export const FromEveryDefinition: MessageFns<FromEveryDefinition> = {
1738
- encode(message: FromEveryDefinition, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
1739
- globalThis.Object.entries(message.Properties).forEach(([key, value]: [string, string]) => {
1740
- FromEveryDefinition_PropertiesEntry.encode({ key: key as any, value }, writer.uint32(10).fork()).join();
3483
+ export const GraphProjectionDefinition: MessageFns<GraphProjectionDefinition> = {
3484
+ encode(message: GraphProjectionDefinition, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
3485
+ globalThis.Object.entries(message.Nodes).forEach(([key, value]: [string, GraphNodeProjectionDefinition]) => {
3486
+ GraphProjectionDefinition_NodesEntry.encode({ key: key as any, value }, writer.uint32(10).fork()).join();
3487
+ });
3488
+ globalThis.Object.entries(message.Edges).forEach(([key, value]: [string, GraphEdgeProjectionDefinition]) => {
3489
+ GraphProjectionDefinition_EdgesEntry.encode({ key: key as any, value }, writer.uint32(18).fork()).join();
1741
3490
  });
1742
- if (message.IncludeChildren !== false) {
1743
- writer.uint32(16).bool(message.IncludeChildren);
1744
- }
1745
- if (message.AutoMap !== 0) {
1746
- writer.uint32(24).int32(message.AutoMap);
1747
- }
1748
- if (message.Key !== "") {
1749
- writer.uint32(34).string(message.Key);
1750
- }
1751
3491
  return writer;
1752
3492
  },
1753
3493
 
1754
- decode(input: BinaryReader | Uint8Array, length?: number): FromEveryDefinition {
3494
+ decode(input: BinaryReader | Uint8Array, length?: number): GraphProjectionDefinition {
1755
3495
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1756
3496
  const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
1757
3497
  if (previousRecursionDepth >= 100) {
@@ -1760,7 +3500,7 @@ export const FromEveryDefinition: MessageFns<FromEveryDefinition> = {
1760
3500
  (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
1761
3501
  try {
1762
3502
  const end = length === undefined ? reader.len : reader.pos + length;
1763
- const message = createBaseFromEveryDefinition();
3503
+ const message = createBaseGraphProjectionDefinition();
1764
3504
  while (reader.pos < end) {
1765
3505
  const tag = reader.uint32();
1766
3506
  switch (tag >>> 3) {
@@ -1769,34 +3509,21 @@ export const FromEveryDefinition: MessageFns<FromEveryDefinition> = {
1769
3509
  break;
1770
3510
  }
1771
3511
 
1772
- const entry1 = FromEveryDefinition_PropertiesEntry.decode(reader, reader.uint32());
3512
+ const entry1 = GraphProjectionDefinition_NodesEntry.decode(reader, reader.uint32());
1773
3513
  if (entry1.value !== undefined) {
1774
- message.Properties[entry1.key] = entry1.value;
3514
+ message.Nodes[entry1.key] = entry1.value;
1775
3515
  }
1776
3516
  continue;
1777
3517
  }
1778
3518
  case 2: {
1779
- if (tag !== 16) {
1780
- break;
1781
- }
1782
-
1783
- message.IncludeChildren = reader.bool();
1784
- continue;
1785
- }
1786
- case 3: {
1787
- if (tag !== 24) {
3519
+ if (tag !== 18) {
1788
3520
  break;
1789
3521
  }
1790
3522
 
1791
- message.AutoMap = reader.int32() as any;
1792
- continue;
1793
- }
1794
- case 4: {
1795
- if (tag !== 34) {
1796
- break;
3523
+ const entry2 = GraphProjectionDefinition_EdgesEntry.decode(reader, reader.uint32());
3524
+ if (entry2.value !== undefined) {
3525
+ message.Edges[entry2.key] = entry2.value;
1797
3526
  }
1798
-
1799
- message.Key = reader.string();
1800
3527
  continue;
1801
3528
  }
1802
3529
  }
@@ -1811,13 +3538,27 @@ export const FromEveryDefinition: MessageFns<FromEveryDefinition> = {
1811
3538
  }
1812
3539
  },
1813
3540
 
1814
- fromJSON(object: any): FromEveryDefinition {
3541
+ fromJSON(object: any): GraphProjectionDefinition {
1815
3542
  return {
1816
- Properties: isObject(object.Properties)
1817
- ? (globalThis.Object.entries(object.Properties) as [string, any][]).reduce(
1818
- (acc: { [key: string]: string }, [key, value]: [string, any]) => {
3543
+ Nodes: isObject(object.Nodes)
3544
+ ? (globalThis.Object.entries(object.Nodes) as [string, any][]).reduce(
3545
+ (acc: { [key: string]: GraphNodeProjectionDefinition }, [key, value]: [string, any]) => {
1819
3546
  globalThis.Object.defineProperty(acc, key, {
1820
- value: globalThis.String(value),
3547
+ value: GraphNodeProjectionDefinition.fromJSON(value),
3548
+ enumerable: true,
3549
+ configurable: true,
3550
+ writable: true,
3551
+ });
3552
+ return acc;
3553
+ },
3554
+ {},
3555
+ )
3556
+ : {},
3557
+ Edges: isObject(object.Edges)
3558
+ ? (globalThis.Object.entries(object.Edges) as [string, any][]).reduce(
3559
+ (acc: { [key: string]: GraphEdgeProjectionDefinition }, [key, value]: [string, any]) => {
3560
+ globalThis.Object.defineProperty(acc, key, {
3561
+ value: GraphEdgeProjectionDefinition.fromJSON(value),
1821
3562
  enumerable: true,
1822
3563
  configurable: true,
1823
3564
  writable: true,
@@ -1827,72 +3568,81 @@ export const FromEveryDefinition: MessageFns<FromEveryDefinition> = {
1827
3568
  {},
1828
3569
  )
1829
3570
  : {},
1830
- IncludeChildren: isSet(object.IncludeChildren) ? globalThis.Boolean(object.IncludeChildren) : false,
1831
- AutoMap: isSet(object.AutoMap) ? autoMapFromJSON(object.AutoMap) : 0,
1832
- Key: isSet(object.Key) ? globalThis.String(object.Key) : "",
1833
3571
  };
1834
3572
  },
1835
3573
 
1836
- toJSON(message: FromEveryDefinition): unknown {
3574
+ toJSON(message: GraphProjectionDefinition): unknown {
1837
3575
  const obj: any = {};
1838
- if (message.Properties) {
1839
- const entries = globalThis.Object.entries(message.Properties) as [string, string][];
3576
+ if (message.Nodes) {
3577
+ const entries = globalThis.Object.entries(message.Nodes) as [string, GraphNodeProjectionDefinition][];
1840
3578
  if (entries.length > 0) {
1841
- obj.Properties = {};
3579
+ obj.Nodes = {};
1842
3580
  entries.forEach(([k, v]) => {
1843
- obj.Properties[k] = v;
3581
+ obj.Nodes[k] = GraphNodeProjectionDefinition.toJSON(v);
1844
3582
  });
1845
3583
  }
1846
3584
  }
1847
- if (message.IncludeChildren !== false) {
1848
- obj.IncludeChildren = message.IncludeChildren;
1849
- }
1850
- if (message.AutoMap !== 0) {
1851
- obj.AutoMap = autoMapToJSON(message.AutoMap);
1852
- }
1853
- if (message.Key !== "") {
1854
- obj.Key = message.Key;
3585
+ if (message.Edges) {
3586
+ const entries = globalThis.Object.entries(message.Edges) as [string, GraphEdgeProjectionDefinition][];
3587
+ if (entries.length > 0) {
3588
+ obj.Edges = {};
3589
+ entries.forEach(([k, v]) => {
3590
+ obj.Edges[k] = GraphEdgeProjectionDefinition.toJSON(v);
3591
+ });
3592
+ }
1855
3593
  }
1856
3594
  return obj;
1857
3595
  },
1858
3596
 
1859
- create(base?: DeepPartial<FromEveryDefinition>): FromEveryDefinition {
1860
- return FromEveryDefinition.fromPartial(base ?? {});
3597
+ create(base?: DeepPartial<GraphProjectionDefinition>): GraphProjectionDefinition {
3598
+ return GraphProjectionDefinition.fromPartial(base ?? {});
1861
3599
  },
1862
- fromPartial(object: DeepPartial<FromEveryDefinition>): FromEveryDefinition {
1863
- const message = createBaseFromEveryDefinition();
1864
- message.Properties = (globalThis.Object.entries(object.Properties ?? {}) as [string, string][]).reduce(
1865
- (acc: { [key: string]: string }, [key, value]: [string, string]) => {
3600
+ fromPartial(object: DeepPartial<GraphProjectionDefinition>): GraphProjectionDefinition {
3601
+ const message = createBaseGraphProjectionDefinition();
3602
+ message.Nodes = (globalThis.Object.entries(object.Nodes ?? {}) as [string, GraphNodeProjectionDefinition][]).reduce(
3603
+ (
3604
+ acc: { [key: string]: GraphNodeProjectionDefinition },
3605
+ [key, value]: [string, GraphNodeProjectionDefinition],
3606
+ ) => {
1866
3607
  if (value !== undefined) {
1867
- acc[key] = globalThis.String(value);
3608
+ acc[key] = GraphNodeProjectionDefinition.fromPartial(value);
3609
+ }
3610
+ return acc;
3611
+ },
3612
+ {},
3613
+ );
3614
+ message.Edges = (globalThis.Object.entries(object.Edges ?? {}) as [string, GraphEdgeProjectionDefinition][]).reduce(
3615
+ (
3616
+ acc: { [key: string]: GraphEdgeProjectionDefinition },
3617
+ [key, value]: [string, GraphEdgeProjectionDefinition],
3618
+ ) => {
3619
+ if (value !== undefined) {
3620
+ acc[key] = GraphEdgeProjectionDefinition.fromPartial(value);
1868
3621
  }
1869
3622
  return acc;
1870
3623
  },
1871
3624
  {},
1872
3625
  );
1873
- message.IncludeChildren = object.IncludeChildren ?? false;
1874
- message.AutoMap = object.AutoMap ?? 0;
1875
- message.Key = object.Key ?? "";
1876
3626
  return message;
1877
3627
  },
1878
3628
  };
1879
3629
 
1880
- function createBaseFromEveryDefinition_PropertiesEntry(): FromEveryDefinition_PropertiesEntry {
1881
- return { key: "", value: "" };
3630
+ function createBaseGraphProjectionDefinition_NodesEntry(): GraphProjectionDefinition_NodesEntry {
3631
+ return { key: "", value: undefined };
1882
3632
  }
1883
3633
 
1884
- export const FromEveryDefinition_PropertiesEntry: MessageFns<FromEveryDefinition_PropertiesEntry> = {
1885
- encode(message: FromEveryDefinition_PropertiesEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
3634
+ export const GraphProjectionDefinition_NodesEntry: MessageFns<GraphProjectionDefinition_NodesEntry> = {
3635
+ encode(message: GraphProjectionDefinition_NodesEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
1886
3636
  if (message.key !== "") {
1887
3637
  writer.uint32(10).string(message.key);
1888
3638
  }
1889
- if (message.value !== "") {
1890
- writer.uint32(18).string(message.value);
3639
+ if (message.value !== undefined) {
3640
+ GraphNodeProjectionDefinition.encode(message.value, writer.uint32(18).fork()).join();
1891
3641
  }
1892
3642
  return writer;
1893
3643
  },
1894
3644
 
1895
- decode(input: BinaryReader | Uint8Array, length?: number): FromEveryDefinition_PropertiesEntry {
3645
+ decode(input: BinaryReader | Uint8Array, length?: number): GraphProjectionDefinition_NodesEntry {
1896
3646
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1897
3647
  const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
1898
3648
  if (previousRecursionDepth >= 100) {
@@ -1901,7 +3651,7 @@ export const FromEveryDefinition_PropertiesEntry: MessageFns<FromEveryDefinition
1901
3651
  (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
1902
3652
  try {
1903
3653
  const end = length === undefined ? reader.len : reader.pos + length;
1904
- const message = createBaseFromEveryDefinition_PropertiesEntry();
3654
+ const message = createBaseGraphProjectionDefinition_NodesEntry();
1905
3655
  while (reader.pos < end) {
1906
3656
  const tag = reader.uint32();
1907
3657
  switch (tag >>> 3) {
@@ -1918,7 +3668,7 @@ export const FromEveryDefinition_PropertiesEntry: MessageFns<FromEveryDefinition
1918
3668
  break;
1919
3669
  }
1920
3670
 
1921
- message.value = reader.string();
3671
+ message.value = GraphNodeProjectionDefinition.decode(reader, reader.uint32());
1922
3672
  continue;
1923
3673
  }
1924
3674
  }
@@ -1933,48 +3683,53 @@ export const FromEveryDefinition_PropertiesEntry: MessageFns<FromEveryDefinition
1933
3683
  }
1934
3684
  },
1935
3685
 
1936
- fromJSON(object: any): FromEveryDefinition_PropertiesEntry {
3686
+ fromJSON(object: any): GraphProjectionDefinition_NodesEntry {
1937
3687
  return {
1938
3688
  key: isSet(object.key) ? globalThis.String(object.key) : "",
1939
- value: isSet(object.value) ? globalThis.String(object.value) : "",
3689
+ value: isSet(object.value) ? GraphNodeProjectionDefinition.fromJSON(object.value) : undefined,
1940
3690
  };
1941
3691
  },
1942
3692
 
1943
- toJSON(message: FromEveryDefinition_PropertiesEntry): unknown {
3693
+ toJSON(message: GraphProjectionDefinition_NodesEntry): unknown {
1944
3694
  const obj: any = {};
1945
3695
  if (message.key !== "") {
1946
3696
  obj.key = message.key;
1947
3697
  }
1948
- if (message.value !== "") {
1949
- obj.value = message.value;
3698
+ if (message.value !== undefined) {
3699
+ obj.value = GraphNodeProjectionDefinition.toJSON(message.value);
1950
3700
  }
1951
3701
  return obj;
1952
3702
  },
1953
3703
 
1954
- create(base?: DeepPartial<FromEveryDefinition_PropertiesEntry>): FromEveryDefinition_PropertiesEntry {
1955
- return FromEveryDefinition_PropertiesEntry.fromPartial(base ?? {});
3704
+ create(base?: DeepPartial<GraphProjectionDefinition_NodesEntry>): GraphProjectionDefinition_NodesEntry {
3705
+ return GraphProjectionDefinition_NodesEntry.fromPartial(base ?? {});
1956
3706
  },
1957
- fromPartial(object: DeepPartial<FromEveryDefinition_PropertiesEntry>): FromEveryDefinition_PropertiesEntry {
1958
- const message = createBaseFromEveryDefinition_PropertiesEntry();
3707
+ fromPartial(object: DeepPartial<GraphProjectionDefinition_NodesEntry>): GraphProjectionDefinition_NodesEntry {
3708
+ const message = createBaseGraphProjectionDefinition_NodesEntry();
1959
3709
  message.key = object.key ?? "";
1960
- message.value = object.value ?? "";
3710
+ message.value = (object.value !== undefined && object.value !== null)
3711
+ ? GraphNodeProjectionDefinition.fromPartial(object.value)
3712
+ : undefined;
1961
3713
  return message;
1962
3714
  },
1963
3715
  };
1964
3716
 
1965
- function createBaseGetAllDeclarationsRequest(): GetAllDeclarationsRequest {
1966
- return { EventStore: "" };
3717
+ function createBaseGraphProjectionDefinition_EdgesEntry(): GraphProjectionDefinition_EdgesEntry {
3718
+ return { key: "", value: undefined };
1967
3719
  }
1968
3720
 
1969
- export const GetAllDeclarationsRequest: MessageFns<GetAllDeclarationsRequest> = {
1970
- encode(message: GetAllDeclarationsRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
1971
- if (message.EventStore !== "") {
1972
- writer.uint32(10).string(message.EventStore);
3721
+ export const GraphProjectionDefinition_EdgesEntry: MessageFns<GraphProjectionDefinition_EdgesEntry> = {
3722
+ encode(message: GraphProjectionDefinition_EdgesEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
3723
+ if (message.key !== "") {
3724
+ writer.uint32(10).string(message.key);
3725
+ }
3726
+ if (message.value !== undefined) {
3727
+ GraphEdgeProjectionDefinition.encode(message.value, writer.uint32(18).fork()).join();
1973
3728
  }
1974
3729
  return writer;
1975
3730
  },
1976
3731
 
1977
- decode(input: BinaryReader | Uint8Array, length?: number): GetAllDeclarationsRequest {
3732
+ decode(input: BinaryReader | Uint8Array, length?: number): GraphProjectionDefinition_EdgesEntry {
1978
3733
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1979
3734
  const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
1980
3735
  if (previousRecursionDepth >= 100) {
@@ -1983,7 +3738,7 @@ export const GetAllDeclarationsRequest: MessageFns<GetAllDeclarationsRequest> =
1983
3738
  (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
1984
3739
  try {
1985
3740
  const end = length === undefined ? reader.len : reader.pos + length;
1986
- const message = createBaseGetAllDeclarationsRequest();
3741
+ const message = createBaseGraphProjectionDefinition_EdgesEntry();
1987
3742
  while (reader.pos < end) {
1988
3743
  const tag = reader.uint32();
1989
3744
  switch (tag >>> 3) {
@@ -1992,74 +3747,15 @@ export const GetAllDeclarationsRequest: MessageFns<GetAllDeclarationsRequest> =
1992
3747
  break;
1993
3748
  }
1994
3749
 
1995
- message.EventStore = reader.string();
3750
+ message.key = reader.string();
1996
3751
  continue;
1997
3752
  }
1998
- }
1999
- if ((tag & 7) === 4 || tag === 0) {
2000
- break;
2001
- }
2002
- reader.skip(tag & 7);
2003
- }
2004
- return message;
2005
- } finally {
2006
- (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
2007
- }
2008
- },
2009
-
2010
- fromJSON(object: any): GetAllDeclarationsRequest {
2011
- return { EventStore: isSet(object.EventStore) ? globalThis.String(object.EventStore) : "" };
2012
- },
2013
-
2014
- toJSON(message: GetAllDeclarationsRequest): unknown {
2015
- const obj: any = {};
2016
- if (message.EventStore !== "") {
2017
- obj.EventStore = message.EventStore;
2018
- }
2019
- return obj;
2020
- },
2021
-
2022
- create(base?: DeepPartial<GetAllDeclarationsRequest>): GetAllDeclarationsRequest {
2023
- return GetAllDeclarationsRequest.fromPartial(base ?? {});
2024
- },
2025
- fromPartial(object: DeepPartial<GetAllDeclarationsRequest>): GetAllDeclarationsRequest {
2026
- const message = createBaseGetAllDeclarationsRequest();
2027
- message.EventStore = object.EventStore ?? "";
2028
- return message;
2029
- },
2030
- };
2031
-
2032
- function createBaseGetAllDefinitionsRequest(): GetAllDefinitionsRequest {
2033
- return { EventStore: "" };
2034
- }
2035
-
2036
- export const GetAllDefinitionsRequest: MessageFns<GetAllDefinitionsRequest> = {
2037
- encode(message: GetAllDefinitionsRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
2038
- if (message.EventStore !== "") {
2039
- writer.uint32(10).string(message.EventStore);
2040
- }
2041
- return writer;
2042
- },
2043
-
2044
- decode(input: BinaryReader | Uint8Array, length?: number): GetAllDefinitionsRequest {
2045
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2046
- const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
2047
- if (previousRecursionDepth >= 100) {
2048
- throw new globalThis.Error("protobuf decode recursion limit exceeded");
2049
- }
2050
- (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
2051
- try {
2052
- const end = length === undefined ? reader.len : reader.pos + length;
2053
- const message = createBaseGetAllDefinitionsRequest();
2054
- while (reader.pos < end) {
2055
- const tag = reader.uint32();
2056
- switch (tag >>> 3) {
2057
- case 1: {
2058
- if (tag !== 10) {
3753
+ case 2: {
3754
+ if (tag !== 18) {
2059
3755
  break;
2060
3756
  }
2061
3757
 
2062
- message.EventStore = reader.string();
3758
+ message.value = GraphEdgeProjectionDefinition.decode(reader, reader.uint32());
2063
3759
  continue;
2064
3760
  }
2065
3761
  }
@@ -2074,24 +3770,33 @@ export const GetAllDefinitionsRequest: MessageFns<GetAllDefinitionsRequest> = {
2074
3770
  }
2075
3771
  },
2076
3772
 
2077
- fromJSON(object: any): GetAllDefinitionsRequest {
2078
- return { EventStore: isSet(object.EventStore) ? globalThis.String(object.EventStore) : "" };
3773
+ fromJSON(object: any): GraphProjectionDefinition_EdgesEntry {
3774
+ return {
3775
+ key: isSet(object.key) ? globalThis.String(object.key) : "",
3776
+ value: isSet(object.value) ? GraphEdgeProjectionDefinition.fromJSON(object.value) : undefined,
3777
+ };
2079
3778
  },
2080
3779
 
2081
- toJSON(message: GetAllDefinitionsRequest): unknown {
3780
+ toJSON(message: GraphProjectionDefinition_EdgesEntry): unknown {
2082
3781
  const obj: any = {};
2083
- if (message.EventStore !== "") {
2084
- obj.EventStore = message.EventStore;
3782
+ if (message.key !== "") {
3783
+ obj.key = message.key;
3784
+ }
3785
+ if (message.value !== undefined) {
3786
+ obj.value = GraphEdgeProjectionDefinition.toJSON(message.value);
2085
3787
  }
2086
3788
  return obj;
2087
3789
  },
2088
3790
 
2089
- create(base?: DeepPartial<GetAllDefinitionsRequest>): GetAllDefinitionsRequest {
2090
- return GetAllDefinitionsRequest.fromPartial(base ?? {});
3791
+ create(base?: DeepPartial<GraphProjectionDefinition_EdgesEntry>): GraphProjectionDefinition_EdgesEntry {
3792
+ return GraphProjectionDefinition_EdgesEntry.fromPartial(base ?? {});
2091
3793
  },
2092
- fromPartial(object: DeepPartial<GetAllDefinitionsRequest>): GetAllDefinitionsRequest {
2093
- const message = createBaseGetAllDefinitionsRequest();
2094
- message.EventStore = object.EventStore ?? "";
3794
+ fromPartial(object: DeepPartial<GraphProjectionDefinition_EdgesEntry>): GraphProjectionDefinition_EdgesEntry {
3795
+ const message = createBaseGraphProjectionDefinition_EdgesEntry();
3796
+ message.key = object.key ?? "";
3797
+ message.value = (object.value !== undefined && object.value !== null)
3798
+ ? GraphEdgeProjectionDefinition.fromPartial(object.value)
3799
+ : undefined;
2095
3800
  return message;
2096
3801
  },
2097
3802
  };
@@ -3431,6 +5136,7 @@ function createBaseProjectionDefinition(): ProjectionDefinition {
3431
5136
  SubscribesToAllEvents: false,
3432
5137
  NoAutoMapProperties: [],
3433
5138
  GenerationDelivery: 0,
5139
+ Graph: undefined,
3434
5140
  };
3435
5141
  }
3436
5142
 
@@ -3499,6 +5205,9 @@ export const ProjectionDefinition: MessageFns<ProjectionDefinition> = {
3499
5205
  if (message.GenerationDelivery !== 0) {
3500
5206
  writer.uint32(168).int32(message.GenerationDelivery);
3501
5207
  }
5208
+ if (message.Graph !== undefined) {
5209
+ GraphProjectionDefinition.encode(message.Graph, writer.uint32(178).fork()).join();
5210
+ }
3502
5211
  return writer;
3503
5212
  },
3504
5213
 
@@ -3691,6 +5400,14 @@ export const ProjectionDefinition: MessageFns<ProjectionDefinition> = {
3691
5400
  message.GenerationDelivery = reader.int32() as any;
3692
5401
  continue;
3693
5402
  }
5403
+ case 22: {
5404
+ if (tag !== 178) {
5405
+ break;
5406
+ }
5407
+
5408
+ message.Graph = GraphProjectionDefinition.decode(reader, reader.uint32());
5409
+ continue;
5410
+ }
3694
5411
  }
3695
5412
  if ((tag & 7) === 4 || tag === 0) {
3696
5413
  break;
@@ -3770,6 +5487,7 @@ export const ProjectionDefinition: MessageFns<ProjectionDefinition> = {
3770
5487
  GenerationDelivery: isSet(object.GenerationDelivery)
3771
5488
  ? eventGenerationDeliveryFromJSON(object.GenerationDelivery)
3772
5489
  : 0,
5490
+ Graph: isSet(object.Graph) ? GraphProjectionDefinition.fromJSON(object.Graph) : undefined,
3773
5491
  };
3774
5492
  },
3775
5493
 
@@ -3852,6 +5570,9 @@ export const ProjectionDefinition: MessageFns<ProjectionDefinition> = {
3852
5570
  if (message.GenerationDelivery !== 0) {
3853
5571
  obj.GenerationDelivery = eventGenerationDeliveryToJSON(message.GenerationDelivery);
3854
5572
  }
5573
+ if (message.Graph !== undefined) {
5574
+ obj.Graph = GraphProjectionDefinition.toJSON(message.Graph);
5575
+ }
3855
5576
  return obj;
3856
5577
  },
3857
5578
 
@@ -3905,6 +5626,9 @@ export const ProjectionDefinition: MessageFns<ProjectionDefinition> = {
3905
5626
  message.SubscribesToAllEvents = object.SubscribesToAllEvents ?? false;
3906
5627
  message.NoAutoMapProperties = object.NoAutoMapProperties?.map((e) => e) || [];
3907
5628
  message.GenerationDelivery = object.GenerationDelivery ?? 0;
5629
+ message.Graph = (object.Graph !== undefined && object.Graph !== null)
5630
+ ? GraphProjectionDefinition.fromPartial(object.Graph)
5631
+ : undefined;
3908
5632
  return message;
3909
5633
  },
3910
5634
  };