@cratis/chronicle 6.9.0 → 6.10.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.
- package/ChronicleClient.ts +52 -13
- package/ChronicleOptions.spec.ts +54 -0
- package/ChronicleOptions.ts +20 -5
- package/EventStore.ts +7 -1
- package/README.md +2 -3
- package/artifacts/DefaultClientArtifactsProvider.ts +4 -1
- package/connection/ChronicleConnection.auth.spec.ts +219 -0
- package/connection/ChronicleConnection.ts +70 -31
- package/connection/ChronicleServices.ts +1 -1
- package/connection/CompatibilityPreflight.ts +1 -1
- package/connection/RejectedChronicleCredentials.ts +10 -0
- package/connection/TokenProvider.spec.ts +5 -6
- package/connection/TokenProvider.ts +26 -17
- package/connection/clientVersion.spec.ts +27 -0
- package/connection/clientVersion.ts +9 -0
- package/connection/describeRequestError.spec.ts +22 -0
- package/connection/fetchOAuthAccessToken.ts +33 -2
- package/dist/ChronicleClient.d.ts +3 -0
- package/dist/ChronicleClient.d.ts.map +1 -1
- package/dist/ChronicleClient.js +55 -13
- package/dist/ChronicleClient.js.map +1 -1
- package/dist/ChronicleOptions.d.ts +5 -1
- package/dist/ChronicleOptions.d.ts.map +1 -1
- package/dist/ChronicleOptions.js +20 -5
- package/dist/ChronicleOptions.js.map +1 -1
- package/dist/EventStore.d.ts +2 -0
- package/dist/EventStore.d.ts.map +1 -1
- package/dist/EventStore.js +6 -1
- package/dist/EventStore.js.map +1 -1
- package/dist/artifacts/DefaultClientArtifactsProvider.d.ts.map +1 -1
- package/dist/artifacts/DefaultClientArtifactsProvider.js +4 -1
- package/dist/artifacts/DefaultClientArtifactsProvider.js.map +1 -1
- package/dist/connection/ChronicleConnection.d.ts +3 -3
- package/dist/connection/ChronicleConnection.d.ts.map +1 -1
- package/dist/connection/ChronicleConnection.js +74 -26
- package/dist/connection/ChronicleConnection.js.map +1 -1
- package/dist/connection/ChronicleServices.d.ts +1 -2
- package/dist/connection/ChronicleServices.d.ts.map +1 -1
- package/dist/connection/CompatibilityPreflight.js +1 -1
- package/dist/connection/CompatibilityPreflight.js.map +1 -1
- package/dist/connection/RejectedChronicleCredentials.d.ts +5 -0
- package/dist/connection/RejectedChronicleCredentials.d.ts.map +1 -0
- package/dist/connection/RejectedChronicleCredentials.js +10 -0
- package/dist/connection/RejectedChronicleCredentials.js.map +1 -0
- package/dist/connection/TokenProvider.d.ts +8 -6
- package/dist/connection/TokenProvider.d.ts.map +1 -1
- package/dist/connection/TokenProvider.js +25 -11
- package/dist/connection/TokenProvider.js.map +1 -1
- package/dist/connection/clientVersion.d.ts +3 -0
- package/dist/connection/clientVersion.d.ts.map +1 -0
- package/dist/connection/clientVersion.js +7 -0
- package/dist/connection/clientVersion.js.map +1 -0
- package/dist/connection/fetchOAuthAccessToken.d.ts +12 -0
- package/dist/connection/fetchOAuthAccessToken.d.ts.map +1 -1
- package/dist/connection/fetchOAuthAccessToken.js +37 -2
- package/dist/connection/fetchOAuthAccessToken.js.map +1 -1
- package/dist/externalServices/ExternalServiceBuilder.d.ts +1 -1
- package/dist/externalServices/ExternalServiceBuilder.d.ts.map +1 -1
- package/dist/externalServices/ExternalServiceBuilder.js +1 -1
- package/dist/externalServices/ExternalServiceBuilder.js.map +1 -1
- package/dist/externalServices/ExternalServices.d.ts.map +1 -1
- package/dist/externalServices/ExternalServices.js +3 -1
- package/dist/externalServices/ExternalServices.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/projections/Projections.d.ts.map +1 -1
- package/dist/projections/Projections.js +9 -7
- package/dist/projections/Projections.js.map +1 -1
- package/dist/projections/constantValueExpression.d.ts +3 -0
- package/dist/projections/constantValueExpression.d.ts.map +1 -0
- package/dist/projections/constantValueExpression.js +26 -0
- package/dist/projections/constantValueExpression.js.map +1 -0
- package/dist/projections/declarative/ChildrenBuilder.d.ts +2 -0
- package/dist/projections/declarative/ChildrenBuilder.d.ts.map +1 -1
- package/dist/projections/declarative/ChildrenBuilder.js +5 -0
- package/dist/projections/declarative/ChildrenBuilder.js.map +1 -1
- package/dist/projections/declarative/FromBuilder.d.ts.map +1 -1
- package/dist/projections/declarative/FromBuilder.js +3 -2
- package/dist/projections/declarative/FromBuilder.js.map +1 -1
- package/dist/projections/declarative/JoinBuilder.d.ts.map +1 -1
- package/dist/projections/declarative/JoinBuilder.js +2 -1
- package/dist/projections/declarative/JoinBuilder.js.map +1 -1
- package/dist/projections/declarative/NestedBuilder.d.ts.map +1 -1
- package/dist/projections/declarative/NestedBuilder.js +3 -1
- package/dist/projections/declarative/NestedBuilder.js.map +1 -1
- package/dist/projections/declarative/ProjectionBuilderCore.d.ts +5 -0
- package/dist/projections/declarative/ProjectionBuilderCore.d.ts.map +1 -1
- package/dist/projections/declarative/ProjectionBuilderCore.js +18 -2
- package/dist/projections/declarative/ProjectionBuilderCore.js.map +1 -1
- package/dist/projections/declarative/ProjectionBuilderFor.d.ts +6 -0
- package/dist/projections/declarative/ProjectionBuilderFor.d.ts.map +1 -1
- package/dist/projections/declarative/ProjectionBuilderFor.js +5 -0
- package/dist/projections/declarative/ProjectionBuilderFor.js.map +1 -1
- package/dist/projections/declarative/SetBuilder.d.ts.map +1 -1
- package/dist/projections/declarative/SetBuilder.js +2 -1
- package/dist/projections/declarative/SetBuilder.js.map +1 -1
- package/dist/projections/modelBound/addFrom.d.ts.map +1 -1
- package/dist/projections/modelBound/addFrom.js +3 -2
- package/dist/projections/modelBound/addFrom.js.map +1 -1
- package/dist/projections/modelBound/childrenAndNestedBuilder.d.ts +20 -0
- package/dist/projections/modelBound/childrenAndNestedBuilder.d.ts.map +1 -1
- package/dist/projections/modelBound/childrenAndNestedBuilder.js +14 -11
- package/dist/projections/modelBound/childrenAndNestedBuilder.js.map +1 -1
- package/dist/projections/modelBound/childrenFrom.d.ts +4 -2
- package/dist/projections/modelBound/childrenFrom.d.ts.map +1 -1
- package/dist/projections/modelBound/childrenFrom.js +8 -4
- package/dist/projections/modelBound/childrenFrom.js.map +1 -1
- package/dist/projections/modelBound/clearWith.d.ts.map +1 -1
- package/dist/projections/modelBound/clearWith.js +3 -2
- package/dist/projections/modelBound/clearWith.js.map +1 -1
- package/dist/projections/modelBound/count.d.ts.map +1 -1
- package/dist/projections/modelBound/count.js +3 -2
- package/dist/projections/modelBound/count.js.map +1 -1
- package/dist/projections/modelBound/decrement.d.ts.map +1 -1
- package/dist/projections/modelBound/decrement.js +3 -2
- package/dist/projections/modelBound/decrement.js.map +1 -1
- package/dist/projections/modelBound/fromAll.d.ts.map +1 -1
- package/dist/projections/modelBound/fromAll.js +3 -2
- package/dist/projections/modelBound/fromAll.js.map +1 -1
- package/dist/projections/modelBound/fromEvery.d.ts.map +1 -1
- package/dist/projections/modelBound/fromEvery.js +3 -2
- package/dist/projections/modelBound/fromEvery.js.map +1 -1
- package/dist/projections/modelBound/increment.d.ts.map +1 -1
- package/dist/projections/modelBound/increment.js +3 -2
- package/dist/projections/modelBound/increment.js.map +1 -1
- package/dist/projections/modelBound/join.d.ts.map +1 -1
- package/dist/projections/modelBound/join.js +3 -2
- package/dist/projections/modelBound/join.js.map +1 -1
- package/dist/projections/modelBound/nested.d.ts.map +1 -1
- package/dist/projections/modelBound/nested.js +3 -2
- package/dist/projections/modelBound/nested.js.map +1 -1
- package/dist/projections/modelBound/noAutoMap.d.ts.map +1 -1
- package/dist/projections/modelBound/noAutoMap.js +3 -2
- package/dist/projections/modelBound/noAutoMap.js.map +1 -1
- package/dist/projections/modelBound/removedWith.d.ts.map +1 -1
- package/dist/projections/modelBound/removedWith.js +3 -2
- package/dist/projections/modelBound/removedWith.js.map +1 -1
- package/dist/projections/modelBound/removedWithJoin.d.ts.map +1 -1
- package/dist/projections/modelBound/removedWithJoin.js +3 -2
- package/dist/projections/modelBound/removedWithJoin.js.map +1 -1
- package/dist/projections/modelBound/setFrom.d.ts.map +1 -1
- package/dist/projections/modelBound/setFrom.js +3 -2
- package/dist/projections/modelBound/setFrom.js.map +1 -1
- package/dist/projections/modelBound/setFromContext.d.ts.map +1 -1
- package/dist/projections/modelBound/setFromContext.js +3 -2
- package/dist/projections/modelBound/setFromContext.js.map +1 -1
- package/dist/projections/modelBound/setValue.d.ts.map +1 -1
- package/dist/projections/modelBound/setValue.js +3 -2
- package/dist/projections/modelBound/setValue.js.map +1 -1
- package/dist/projections/modelBound/subtractFrom.d.ts.map +1 -1
- package/dist/projections/modelBound/subtractFrom.js +3 -2
- package/dist/projections/modelBound/subtractFrom.js.map +1 -1
- package/dist/projections/notSetPropertyPath.d.ts +3 -0
- package/dist/projections/notSetPropertyPath.d.ts.map +1 -0
- package/dist/projections/notSetPropertyPath.js +5 -0
- package/dist/projections/notSetPropertyPath.js.map +1 -0
- package/dist/reactors/Reactors.d.ts +4 -0
- package/dist/reactors/Reactors.d.ts.map +1 -1
- package/dist/reactors/Reactors.js +24 -6
- package/dist/reactors/Reactors.js.map +1 -1
- package/dist/reactors/reactor.d.ts +2 -2
- package/dist/reactors/reactor.js +2 -2
- package/dist/readModels/MaterializedReadModels.d.ts.map +1 -1
- package/dist/readModels/MaterializedReadModels.js +2 -4
- package/dist/readModels/MaterializedReadModels.js.map +1 -1
- package/dist/readModels/ReadModels.d.ts +2 -1
- package/dist/readModels/ReadModels.d.ts.map +1 -1
- package/dist/readModels/ReadModels.js +19 -10
- package/dist/readModels/ReadModels.js.map +1 -1
- package/dist/readModels/deserializeReadModel.d.ts +5 -0
- package/dist/readModels/deserializeReadModel.d.ts.map +1 -0
- package/dist/readModels/deserializeReadModel.js +84 -0
- package/dist/readModels/deserializeReadModel.js.map +1 -0
- package/dist/readModels/rootReadModelTypes.d.ts +5 -0
- package/dist/readModels/rootReadModelTypes.d.ts.map +1 -0
- package/dist/readModels/rootReadModelTypes.js +69 -0
- package/dist/readModels/rootReadModelTypes.js.map +1 -0
- package/dist/reducers/Reducers.d.ts +4 -0
- package/dist/reducers/Reducers.d.ts.map +1 -1
- package/dist/reducers/Reducers.js +24 -6
- package/dist/reducers/Reducers.js.map +1 -1
- package/dist/schemas/JsonSchemaGenerator.d.ts.map +1 -1
- package/dist/schemas/JsonSchemaGenerator.js +4 -4
- package/dist/schemas/JsonSchemaGenerator.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/TypeDiscoverer.d.ts +8 -1
- package/dist/types/TypeDiscoverer.d.ts.map +1 -1
- package/dist/types/TypeDiscoverer.js +25 -5
- package/dist/types/TypeDiscoverer.js.map +1 -1
- package/dist/types/TypeIntrospector.d.ts.map +1 -1
- package/dist/types/TypeIntrospector.js +3 -2
- package/dist/types/TypeIntrospector.js.map +1 -1
- package/dist/types/conceptValueType.d.ts +4 -0
- package/dist/types/conceptValueType.d.ts.map +1 -0
- package/dist/types/conceptValueType.js +10 -0
- package/dist/types/conceptValueType.js.map +1 -0
- package/dist/types/modelBoundProperty.d.ts +6 -0
- package/dist/types/modelBoundProperty.d.ts.map +1 -0
- package/dist/types/modelBoundProperty.js +53 -0
- package/dist/types/modelBoundProperty.js.map +1 -0
- package/externalServices/ExternalServiceBuilder.ts +4 -4
- package/externalServices/ExternalServices.spec.ts +87 -0
- package/externalServices/ExternalServices.ts +3 -1
- package/for_ChronicleClient/connectionAuthentication.spec.ts +67 -0
- package/index.ts +1 -0
- package/observation/observationDisposal.spec.ts +74 -0
- package/package.json +2 -1
- package/projections/Projections.childrenAndNested.spec.ts +2 -0
- package/projections/Projections.modelBoundCompleteness.spec.ts +47 -0
- package/projections/Projections.ts +9 -7
- package/projections/constantValueExpression.spec.ts +31 -0
- package/projections/constantValueExpression.ts +28 -0
- package/projections/declarative/ChildrenBuilder.spec.ts +46 -1
- package/projections/declarative/ChildrenBuilder.ts +6 -0
- package/projections/declarative/FromBuilder.ts +3 -2
- package/projections/declarative/JoinBuilder.ts +2 -1
- package/projections/declarative/NestedBuilder.ts +3 -1
- package/projections/declarative/ProjectionBuilderCore.ts +20 -2
- package/projections/declarative/ProjectionBuilderFor.spec.ts +61 -4
- package/projections/declarative/ProjectionBuilderFor.ts +7 -0
- package/projections/declarative/SetBuilder.ts +2 -1
- package/projections/modelBound/addFrom.ts +3 -2
- package/projections/modelBound/childrenAndNestedBuilder.ts +14 -11
- package/projections/modelBound/childrenFrom.ts +11 -5
- package/projections/modelBound/clearWith.ts +3 -2
- package/projections/modelBound/count.ts +3 -2
- package/projections/modelBound/decorators.standard.spec.ts +45 -0
- package/projections/modelBound/decrement.ts +3 -2
- package/projections/modelBound/fromAll.ts +3 -2
- package/projections/modelBound/fromEvery.ts +3 -2
- package/projections/modelBound/increment.ts +3 -2
- package/projections/modelBound/join.ts +3 -2
- package/projections/modelBound/nested.ts +3 -2
- package/projections/modelBound/noAutoMap.ts +3 -2
- package/projections/modelBound/removedWith.ts +3 -2
- package/projections/modelBound/removedWithJoin.ts +3 -2
- package/projections/modelBound/setFrom.ts +3 -2
- package/projections/modelBound/setFromContext.ts +3 -2
- package/projections/modelBound/setValue.ts +3 -2
- package/projections/modelBound/subtractFrom.ts +3 -2
- package/projections/notSetPropertyPath.ts +5 -0
- package/reactors/Reactors.ts +22 -7
- package/reactors/reactor.ts +2 -2
- package/readModels/MaterializedReadModels.spec.ts +22 -0
- package/readModels/MaterializedReadModels.ts +2 -4
- package/readModels/ReadModels.spec.ts +109 -1
- package/readModels/ReadModels.ts +21 -11
- package/readModels/conceptValueType.spec.ts +20 -0
- package/readModels/deserializeReadModel.spec.ts +84 -0
- package/readModels/deserializeReadModel.ts +82 -0
- package/readModels/discovery.spec.ts +27 -0
- package/readModels/rootReadModelTypes.spec.ts +115 -0
- package/readModels/rootReadModelTypes.ts +65 -0
- package/reducers/Reducers.ts +22 -7
- package/schemas/JsonSchemaGenerator.ts +4 -4
- package/schemas/legacyDesignMetadata.spec.ts +24 -2
- package/types/TypeDiscoverer.spec.ts +57 -0
- package/types/TypeDiscoverer.ts +27 -6
- package/types/TypeIntrospector.ts +3 -2
- package/types/conceptValueType.ts +11 -0
- package/types/modelBoundProperty.ts +53 -0
- package/dist/externalServices/ExternalServicesContracts.d.ts +0 -137
- package/dist/externalServices/ExternalServicesContracts.d.ts.map +0 -1
- package/dist/externalServices/ExternalServicesContracts.js +0 -654
- package/dist/externalServices/ExternalServicesContracts.js.map +0 -1
- package/externalServices/ExternalServicesContracts.ts +0 -709
|
@@ -1,654 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
-
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
-
import { BinaryReader, BinaryWriter } from '@bufbuild/protobuf/wire';
|
|
4
|
-
// The generated `@cratis/chronicle.contracts` package does not (yet) re-export its
|
|
5
|
-
// `externalservices` proto module from its public barrel, so the wire types are mirrored
|
|
6
|
-
// here - the same approach used for `Source/compliance/ComplianceContracts.ts` and
|
|
7
|
-
// `Source/eventStoreSubscriptions/contracts.ts`.
|
|
8
|
-
/**
|
|
9
|
-
* The type of endpoint an external service exposes.
|
|
10
|
-
*/
|
|
11
|
-
export var ExternalServiceEndpointType;
|
|
12
|
-
(function (ExternalServiceEndpointType) {
|
|
13
|
-
ExternalServiceEndpointType[ExternalServiceEndpointType["Http"] = 0] = "Http";
|
|
14
|
-
ExternalServiceEndpointType[ExternalServiceEndpointType["MsSql"] = 1] = "MsSql";
|
|
15
|
-
ExternalServiceEndpointType[ExternalServiceEndpointType["PostgreSql"] = 2] = "PostgreSql";
|
|
16
|
-
})(ExternalServiceEndpointType || (ExternalServiceEndpointType = {}));
|
|
17
|
-
function isSet(value) {
|
|
18
|
-
return value !== null && value !== undefined;
|
|
19
|
-
}
|
|
20
|
-
function encodeStringMapEntry(entry, writer) {
|
|
21
|
-
if (entry.key !== '') {
|
|
22
|
-
writer.uint32(10).string(entry.key);
|
|
23
|
-
}
|
|
24
|
-
if (entry.value !== '') {
|
|
25
|
-
writer.uint32(18).string(entry.value);
|
|
26
|
-
}
|
|
27
|
-
return writer;
|
|
28
|
-
}
|
|
29
|
-
function decodeStringMapEntry(reader, length) {
|
|
30
|
-
const end = reader.pos + length;
|
|
31
|
-
const entry = { key: '', value: '' };
|
|
32
|
-
while (reader.pos < end) {
|
|
33
|
-
const tag = reader.uint32();
|
|
34
|
-
switch (tag >>> 3) {
|
|
35
|
-
case 1:
|
|
36
|
-
entry.key = reader.string();
|
|
37
|
-
continue;
|
|
38
|
-
case 2:
|
|
39
|
-
entry.value = reader.string();
|
|
40
|
-
continue;
|
|
41
|
-
}
|
|
42
|
-
if ((tag & 7) === 4 || tag === 0)
|
|
43
|
-
break;
|
|
44
|
-
reader.skip(tag & 7);
|
|
45
|
-
}
|
|
46
|
-
return entry;
|
|
47
|
-
}
|
|
48
|
-
function encodeStringMap(map, writer, fieldNumber) {
|
|
49
|
-
for (const [key, value] of Object.entries(map)) {
|
|
50
|
-
encodeStringMapEntry({ key, value }, writer.uint32((fieldNumber << 3) | 2).fork()).join();
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
function decodeStringMapEntryInto(reader, map) {
|
|
54
|
-
const entry = decodeStringMapEntry(reader, reader.uint32());
|
|
55
|
-
map[entry.key] = entry.value;
|
|
56
|
-
}
|
|
57
|
-
function stringMapFromJSON(value) {
|
|
58
|
-
if (typeof value !== 'object' || value === null) {
|
|
59
|
-
return {};
|
|
60
|
-
}
|
|
61
|
-
return Object.fromEntries(Object.entries(value).map(([key, entryValue]) => [key, String(entryValue)]));
|
|
62
|
-
}
|
|
63
|
-
function stringMapFromPartial(value) {
|
|
64
|
-
return Object.entries(value ?? {}).reduce((accumulator, [key, entryValue]) => {
|
|
65
|
-
if (entryValue !== undefined) {
|
|
66
|
-
accumulator[key] = entryValue;
|
|
67
|
-
}
|
|
68
|
-
return accumulator;
|
|
69
|
-
}, {});
|
|
70
|
-
}
|
|
71
|
-
export const EmptyMessage = {
|
|
72
|
-
encode(_, writer = new BinaryWriter()) {
|
|
73
|
-
return writer;
|
|
74
|
-
},
|
|
75
|
-
decode(input, length) {
|
|
76
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
77
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
78
|
-
while (reader.pos < end) {
|
|
79
|
-
const tag = reader.uint32();
|
|
80
|
-
if ((tag & 7) === 4 || tag === 0)
|
|
81
|
-
break;
|
|
82
|
-
reader.skip(tag & 7);
|
|
83
|
-
}
|
|
84
|
-
return {};
|
|
85
|
-
},
|
|
86
|
-
fromJSON(_) {
|
|
87
|
-
return {};
|
|
88
|
-
},
|
|
89
|
-
toJSON(_) {
|
|
90
|
-
return {};
|
|
91
|
-
},
|
|
92
|
-
create(base) {
|
|
93
|
-
return EmptyMessage.fromPartial(base ?? {});
|
|
94
|
-
},
|
|
95
|
-
fromPartial(_) {
|
|
96
|
-
return {};
|
|
97
|
-
}
|
|
98
|
-
};
|
|
99
|
-
function createBaseBasicAuthorization() {
|
|
100
|
-
return { Username: '', Password: '' };
|
|
101
|
-
}
|
|
102
|
-
export const BasicAuthorizationMessage = {
|
|
103
|
-
encode(message, writer = new BinaryWriter()) {
|
|
104
|
-
if (message.Username !== '')
|
|
105
|
-
writer.uint32(10).string(message.Username);
|
|
106
|
-
if (message.Password !== '')
|
|
107
|
-
writer.uint32(18).string(message.Password);
|
|
108
|
-
return writer;
|
|
109
|
-
},
|
|
110
|
-
decode(input, length) {
|
|
111
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
112
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
113
|
-
const message = createBaseBasicAuthorization();
|
|
114
|
-
while (reader.pos < end) {
|
|
115
|
-
const tag = reader.uint32();
|
|
116
|
-
switch (tag >>> 3) {
|
|
117
|
-
case 1:
|
|
118
|
-
message.Username = reader.string();
|
|
119
|
-
continue;
|
|
120
|
-
case 2:
|
|
121
|
-
message.Password = reader.string();
|
|
122
|
-
continue;
|
|
123
|
-
}
|
|
124
|
-
if ((tag & 7) === 4 || tag === 0)
|
|
125
|
-
break;
|
|
126
|
-
reader.skip(tag & 7);
|
|
127
|
-
}
|
|
128
|
-
return message;
|
|
129
|
-
},
|
|
130
|
-
fromJSON(object) {
|
|
131
|
-
const value = object;
|
|
132
|
-
return {
|
|
133
|
-
Username: typeof value.Username === 'string' ? value.Username : '',
|
|
134
|
-
Password: typeof value.Password === 'string' ? value.Password : ''
|
|
135
|
-
};
|
|
136
|
-
},
|
|
137
|
-
toJSON(message) {
|
|
138
|
-
return { Username: message.Username, Password: message.Password };
|
|
139
|
-
},
|
|
140
|
-
create(base) {
|
|
141
|
-
return BasicAuthorizationMessage.fromPartial(base ?? {});
|
|
142
|
-
},
|
|
143
|
-
fromPartial(object) {
|
|
144
|
-
return { Username: object.Username ?? '', Password: object.Password ?? '' };
|
|
145
|
-
}
|
|
146
|
-
};
|
|
147
|
-
function createBaseBearerTokenAuthorization() {
|
|
148
|
-
return { Token: '' };
|
|
149
|
-
}
|
|
150
|
-
export const BearerTokenAuthorizationMessage = {
|
|
151
|
-
encode(message, writer = new BinaryWriter()) {
|
|
152
|
-
if (message.Token !== '')
|
|
153
|
-
writer.uint32(10).string(message.Token);
|
|
154
|
-
return writer;
|
|
155
|
-
},
|
|
156
|
-
decode(input, length) {
|
|
157
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
158
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
159
|
-
const message = createBaseBearerTokenAuthorization();
|
|
160
|
-
while (reader.pos < end) {
|
|
161
|
-
const tag = reader.uint32();
|
|
162
|
-
switch (tag >>> 3) {
|
|
163
|
-
case 1:
|
|
164
|
-
message.Token = reader.string();
|
|
165
|
-
continue;
|
|
166
|
-
}
|
|
167
|
-
if ((tag & 7) === 4 || tag === 0)
|
|
168
|
-
break;
|
|
169
|
-
reader.skip(tag & 7);
|
|
170
|
-
}
|
|
171
|
-
return message;
|
|
172
|
-
},
|
|
173
|
-
fromJSON(object) {
|
|
174
|
-
const value = object;
|
|
175
|
-
return { Token: typeof value.Token === 'string' ? value.Token : '' };
|
|
176
|
-
},
|
|
177
|
-
toJSON(message) {
|
|
178
|
-
return { Token: message.Token };
|
|
179
|
-
},
|
|
180
|
-
create(base) {
|
|
181
|
-
return BearerTokenAuthorizationMessage.fromPartial(base ?? {});
|
|
182
|
-
},
|
|
183
|
-
fromPartial(object) {
|
|
184
|
-
return { Token: object.Token ?? '' };
|
|
185
|
-
}
|
|
186
|
-
};
|
|
187
|
-
function createBaseOAuthAuthorization() {
|
|
188
|
-
return { Authority: '', ClientId: '', ClientSecret: '' };
|
|
189
|
-
}
|
|
190
|
-
export const OAuthAuthorizationMessage = {
|
|
191
|
-
encode(message, writer = new BinaryWriter()) {
|
|
192
|
-
if (message.Authority !== '')
|
|
193
|
-
writer.uint32(10).string(message.Authority);
|
|
194
|
-
if (message.ClientId !== '')
|
|
195
|
-
writer.uint32(18).string(message.ClientId);
|
|
196
|
-
if (message.ClientSecret !== '')
|
|
197
|
-
writer.uint32(26).string(message.ClientSecret);
|
|
198
|
-
return writer;
|
|
199
|
-
},
|
|
200
|
-
decode(input, length) {
|
|
201
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
202
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
203
|
-
const message = createBaseOAuthAuthorization();
|
|
204
|
-
while (reader.pos < end) {
|
|
205
|
-
const tag = reader.uint32();
|
|
206
|
-
switch (tag >>> 3) {
|
|
207
|
-
case 1:
|
|
208
|
-
message.Authority = reader.string();
|
|
209
|
-
continue;
|
|
210
|
-
case 2:
|
|
211
|
-
message.ClientId = reader.string();
|
|
212
|
-
continue;
|
|
213
|
-
case 3:
|
|
214
|
-
message.ClientSecret = reader.string();
|
|
215
|
-
continue;
|
|
216
|
-
}
|
|
217
|
-
if ((tag & 7) === 4 || tag === 0)
|
|
218
|
-
break;
|
|
219
|
-
reader.skip(tag & 7);
|
|
220
|
-
}
|
|
221
|
-
return message;
|
|
222
|
-
},
|
|
223
|
-
fromJSON(object) {
|
|
224
|
-
const value = object;
|
|
225
|
-
return {
|
|
226
|
-
Authority: typeof value.Authority === 'string' ? value.Authority : '',
|
|
227
|
-
ClientId: typeof value.ClientId === 'string' ? value.ClientId : '',
|
|
228
|
-
ClientSecret: typeof value.ClientSecret === 'string' ? value.ClientSecret : ''
|
|
229
|
-
};
|
|
230
|
-
},
|
|
231
|
-
toJSON(message) {
|
|
232
|
-
return { Authority: message.Authority, ClientId: message.ClientId, ClientSecret: message.ClientSecret };
|
|
233
|
-
},
|
|
234
|
-
create(base) {
|
|
235
|
-
return OAuthAuthorizationMessage.fromPartial(base ?? {});
|
|
236
|
-
},
|
|
237
|
-
fromPartial(object) {
|
|
238
|
-
return {
|
|
239
|
-
Authority: object.Authority ?? '',
|
|
240
|
-
ClientId: object.ClientId ?? '',
|
|
241
|
-
ClientSecret: object.ClientSecret ?? ''
|
|
242
|
-
};
|
|
243
|
-
}
|
|
244
|
-
};
|
|
245
|
-
function createBaseOneOfAuthorization() {
|
|
246
|
-
return { Value0: undefined, Value1: undefined, Value2: undefined };
|
|
247
|
-
}
|
|
248
|
-
export const OneOfBasicAuthorizationBearerTokenAuthorizationOAuthAuthorizationMessage = {
|
|
249
|
-
encode(message, writer = new BinaryWriter()) {
|
|
250
|
-
if (message.Value0 !== undefined)
|
|
251
|
-
BasicAuthorizationMessage.encode(message.Value0, writer.uint32(10).fork()).join();
|
|
252
|
-
if (message.Value1 !== undefined)
|
|
253
|
-
BearerTokenAuthorizationMessage.encode(message.Value1, writer.uint32(18).fork()).join();
|
|
254
|
-
if (message.Value2 !== undefined)
|
|
255
|
-
OAuthAuthorizationMessage.encode(message.Value2, writer.uint32(26).fork()).join();
|
|
256
|
-
return writer;
|
|
257
|
-
},
|
|
258
|
-
decode(input, length) {
|
|
259
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
260
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
261
|
-
const message = createBaseOneOfAuthorization();
|
|
262
|
-
while (reader.pos < end) {
|
|
263
|
-
const tag = reader.uint32();
|
|
264
|
-
switch (tag >>> 3) {
|
|
265
|
-
case 1:
|
|
266
|
-
message.Value0 = BasicAuthorizationMessage.decode(reader, reader.uint32());
|
|
267
|
-
continue;
|
|
268
|
-
case 2:
|
|
269
|
-
message.Value1 = BearerTokenAuthorizationMessage.decode(reader, reader.uint32());
|
|
270
|
-
continue;
|
|
271
|
-
case 3:
|
|
272
|
-
message.Value2 = OAuthAuthorizationMessage.decode(reader, reader.uint32());
|
|
273
|
-
continue;
|
|
274
|
-
}
|
|
275
|
-
if ((tag & 7) === 4 || tag === 0)
|
|
276
|
-
break;
|
|
277
|
-
reader.skip(tag & 7);
|
|
278
|
-
}
|
|
279
|
-
return message;
|
|
280
|
-
},
|
|
281
|
-
fromJSON(object) {
|
|
282
|
-
const value = object;
|
|
283
|
-
return {
|
|
284
|
-
Value0: isSet(value.Value0) ? BasicAuthorizationMessage.fromJSON(value.Value0) : undefined,
|
|
285
|
-
Value1: isSet(value.Value1) ? BearerTokenAuthorizationMessage.fromJSON(value.Value1) : undefined,
|
|
286
|
-
Value2: isSet(value.Value2) ? OAuthAuthorizationMessage.fromJSON(value.Value2) : undefined
|
|
287
|
-
};
|
|
288
|
-
},
|
|
289
|
-
toJSON(message) {
|
|
290
|
-
return {
|
|
291
|
-
Value0: message.Value0 !== undefined ? BasicAuthorizationMessage.toJSON(message.Value0) : undefined,
|
|
292
|
-
Value1: message.Value1 !== undefined ? BearerTokenAuthorizationMessage.toJSON(message.Value1) : undefined,
|
|
293
|
-
Value2: message.Value2 !== undefined ? OAuthAuthorizationMessage.toJSON(message.Value2) : undefined
|
|
294
|
-
};
|
|
295
|
-
},
|
|
296
|
-
create(base) {
|
|
297
|
-
return OneOfBasicAuthorizationBearerTokenAuthorizationOAuthAuthorizationMessage.fromPartial(base ?? {});
|
|
298
|
-
},
|
|
299
|
-
fromPartial(object) {
|
|
300
|
-
return {
|
|
301
|
-
Value0: object.Value0 !== undefined && object.Value0 !== null ? BasicAuthorizationMessage.fromPartial(object.Value0) : undefined,
|
|
302
|
-
Value1: object.Value1 !== undefined && object.Value1 !== null ? BearerTokenAuthorizationMessage.fromPartial(object.Value1) : undefined,
|
|
303
|
-
Value2: object.Value2 !== undefined && object.Value2 !== null ? OAuthAuthorizationMessage.fromPartial(object.Value2) : undefined
|
|
304
|
-
};
|
|
305
|
-
}
|
|
306
|
-
};
|
|
307
|
-
function createBaseHttpEndpointConfiguration() {
|
|
308
|
-
return { Url: '', Authorization: undefined, Headers: {} };
|
|
309
|
-
}
|
|
310
|
-
export const HttpEndpointConfigurationMessage = {
|
|
311
|
-
encode(message, writer = new BinaryWriter()) {
|
|
312
|
-
if (message.Url !== '')
|
|
313
|
-
writer.uint32(10).string(message.Url);
|
|
314
|
-
if (message.Authorization !== undefined) {
|
|
315
|
-
OneOfBasicAuthorizationBearerTokenAuthorizationOAuthAuthorizationMessage.encode(message.Authorization, writer.uint32(18).fork()).join();
|
|
316
|
-
}
|
|
317
|
-
encodeStringMap(message.Headers, writer, 3);
|
|
318
|
-
return writer;
|
|
319
|
-
},
|
|
320
|
-
decode(input, length) {
|
|
321
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
322
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
323
|
-
const message = createBaseHttpEndpointConfiguration();
|
|
324
|
-
while (reader.pos < end) {
|
|
325
|
-
const tag = reader.uint32();
|
|
326
|
-
switch (tag >>> 3) {
|
|
327
|
-
case 1:
|
|
328
|
-
message.Url = reader.string();
|
|
329
|
-
continue;
|
|
330
|
-
case 2:
|
|
331
|
-
message.Authorization = OneOfBasicAuthorizationBearerTokenAuthorizationOAuthAuthorizationMessage.decode(reader, reader.uint32());
|
|
332
|
-
continue;
|
|
333
|
-
case 3:
|
|
334
|
-
decodeStringMapEntryInto(reader, message.Headers);
|
|
335
|
-
continue;
|
|
336
|
-
}
|
|
337
|
-
if ((tag & 7) === 4 || tag === 0)
|
|
338
|
-
break;
|
|
339
|
-
reader.skip(tag & 7);
|
|
340
|
-
}
|
|
341
|
-
return message;
|
|
342
|
-
},
|
|
343
|
-
fromJSON(object) {
|
|
344
|
-
const value = object;
|
|
345
|
-
return {
|
|
346
|
-
Url: typeof value.Url === 'string' ? value.Url : '',
|
|
347
|
-
Authorization: isSet(value.Authorization) ? OneOfBasicAuthorizationBearerTokenAuthorizationOAuthAuthorizationMessage.fromJSON(value.Authorization) : undefined,
|
|
348
|
-
Headers: stringMapFromJSON(value.Headers)
|
|
349
|
-
};
|
|
350
|
-
},
|
|
351
|
-
toJSON(message) {
|
|
352
|
-
return {
|
|
353
|
-
Url: message.Url,
|
|
354
|
-
Authorization: message.Authorization !== undefined ? OneOfBasicAuthorizationBearerTokenAuthorizationOAuthAuthorizationMessage.toJSON(message.Authorization) : undefined,
|
|
355
|
-
Headers: message.Headers
|
|
356
|
-
};
|
|
357
|
-
},
|
|
358
|
-
create(base) {
|
|
359
|
-
return HttpEndpointConfigurationMessage.fromPartial(base ?? {});
|
|
360
|
-
},
|
|
361
|
-
fromPartial(object) {
|
|
362
|
-
return {
|
|
363
|
-
Url: object.Url ?? '',
|
|
364
|
-
Authorization: object.Authorization !== undefined && object.Authorization !== null
|
|
365
|
-
? OneOfBasicAuthorizationBearerTokenAuthorizationOAuthAuthorizationMessage.fromPartial(object.Authorization)
|
|
366
|
-
: undefined,
|
|
367
|
-
Headers: stringMapFromPartial(object.Headers)
|
|
368
|
-
};
|
|
369
|
-
}
|
|
370
|
-
};
|
|
371
|
-
function createBaseDatabaseEndpointConfiguration() {
|
|
372
|
-
return { Host: '', Port: 0, Database: '', Username: '', Password: '', Options: {} };
|
|
373
|
-
}
|
|
374
|
-
export const DatabaseEndpointConfigurationMessage = {
|
|
375
|
-
encode(message, writer = new BinaryWriter()) {
|
|
376
|
-
if (message.Host !== '')
|
|
377
|
-
writer.uint32(10).string(message.Host);
|
|
378
|
-
if (message.Port !== 0)
|
|
379
|
-
writer.uint32(16).int32(message.Port);
|
|
380
|
-
if (message.Database !== '')
|
|
381
|
-
writer.uint32(26).string(message.Database);
|
|
382
|
-
if (message.Username !== '')
|
|
383
|
-
writer.uint32(34).string(message.Username);
|
|
384
|
-
if (message.Password !== '')
|
|
385
|
-
writer.uint32(42).string(message.Password);
|
|
386
|
-
encodeStringMap(message.Options, writer, 6);
|
|
387
|
-
return writer;
|
|
388
|
-
},
|
|
389
|
-
decode(input, length) {
|
|
390
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
391
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
392
|
-
const message = createBaseDatabaseEndpointConfiguration();
|
|
393
|
-
while (reader.pos < end) {
|
|
394
|
-
const tag = reader.uint32();
|
|
395
|
-
switch (tag >>> 3) {
|
|
396
|
-
case 1:
|
|
397
|
-
message.Host = reader.string();
|
|
398
|
-
continue;
|
|
399
|
-
case 2:
|
|
400
|
-
message.Port = reader.int32();
|
|
401
|
-
continue;
|
|
402
|
-
case 3:
|
|
403
|
-
message.Database = reader.string();
|
|
404
|
-
continue;
|
|
405
|
-
case 4:
|
|
406
|
-
message.Username = reader.string();
|
|
407
|
-
continue;
|
|
408
|
-
case 5:
|
|
409
|
-
message.Password = reader.string();
|
|
410
|
-
continue;
|
|
411
|
-
case 6:
|
|
412
|
-
decodeStringMapEntryInto(reader, message.Options);
|
|
413
|
-
continue;
|
|
414
|
-
}
|
|
415
|
-
if ((tag & 7) === 4 || tag === 0)
|
|
416
|
-
break;
|
|
417
|
-
reader.skip(tag & 7);
|
|
418
|
-
}
|
|
419
|
-
return message;
|
|
420
|
-
},
|
|
421
|
-
fromJSON(object) {
|
|
422
|
-
const value = object;
|
|
423
|
-
return {
|
|
424
|
-
Host: typeof value.Host === 'string' ? value.Host : '',
|
|
425
|
-
Port: typeof value.Port === 'number' ? value.Port : 0,
|
|
426
|
-
Database: typeof value.Database === 'string' ? value.Database : '',
|
|
427
|
-
Username: typeof value.Username === 'string' ? value.Username : '',
|
|
428
|
-
Password: typeof value.Password === 'string' ? value.Password : '',
|
|
429
|
-
Options: stringMapFromJSON(value.Options)
|
|
430
|
-
};
|
|
431
|
-
},
|
|
432
|
-
toJSON(message) {
|
|
433
|
-
return {
|
|
434
|
-
Host: message.Host,
|
|
435
|
-
Port: Math.round(message.Port),
|
|
436
|
-
Database: message.Database,
|
|
437
|
-
Username: message.Username,
|
|
438
|
-
Password: message.Password,
|
|
439
|
-
Options: message.Options
|
|
440
|
-
};
|
|
441
|
-
},
|
|
442
|
-
create(base) {
|
|
443
|
-
return DatabaseEndpointConfigurationMessage.fromPartial(base ?? {});
|
|
444
|
-
},
|
|
445
|
-
fromPartial(object) {
|
|
446
|
-
return {
|
|
447
|
-
Host: object.Host ?? '',
|
|
448
|
-
Port: object.Port ?? 0,
|
|
449
|
-
Database: object.Database ?? '',
|
|
450
|
-
Username: object.Username ?? '',
|
|
451
|
-
Password: object.Password ?? '',
|
|
452
|
-
Options: stringMapFromPartial(object.Options)
|
|
453
|
-
};
|
|
454
|
-
}
|
|
455
|
-
};
|
|
456
|
-
function createBaseExternalServiceEndpoint() {
|
|
457
|
-
return { Type: ExternalServiceEndpointType.Http, Http: undefined, Database: undefined };
|
|
458
|
-
}
|
|
459
|
-
export const ExternalServiceEndpointMessage = {
|
|
460
|
-
encode(message, writer = new BinaryWriter()) {
|
|
461
|
-
if (message.Type !== ExternalServiceEndpointType.Http)
|
|
462
|
-
writer.uint32(8).int32(message.Type);
|
|
463
|
-
if (message.Http !== undefined)
|
|
464
|
-
HttpEndpointConfigurationMessage.encode(message.Http, writer.uint32(18).fork()).join();
|
|
465
|
-
if (message.Database !== undefined)
|
|
466
|
-
DatabaseEndpointConfigurationMessage.encode(message.Database, writer.uint32(26).fork()).join();
|
|
467
|
-
return writer;
|
|
468
|
-
},
|
|
469
|
-
decode(input, length) {
|
|
470
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
471
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
472
|
-
const message = createBaseExternalServiceEndpoint();
|
|
473
|
-
while (reader.pos < end) {
|
|
474
|
-
const tag = reader.uint32();
|
|
475
|
-
switch (tag >>> 3) {
|
|
476
|
-
case 1:
|
|
477
|
-
message.Type = reader.int32();
|
|
478
|
-
continue;
|
|
479
|
-
case 2:
|
|
480
|
-
message.Http = HttpEndpointConfigurationMessage.decode(reader, reader.uint32());
|
|
481
|
-
continue;
|
|
482
|
-
case 3:
|
|
483
|
-
message.Database = DatabaseEndpointConfigurationMessage.decode(reader, reader.uint32());
|
|
484
|
-
continue;
|
|
485
|
-
}
|
|
486
|
-
if ((tag & 7) === 4 || tag === 0)
|
|
487
|
-
break;
|
|
488
|
-
reader.skip(tag & 7);
|
|
489
|
-
}
|
|
490
|
-
return message;
|
|
491
|
-
},
|
|
492
|
-
fromJSON(object) {
|
|
493
|
-
const value = object;
|
|
494
|
-
return {
|
|
495
|
-
Type: typeof value.Type === 'number' ? value.Type : ExternalServiceEndpointType.Http,
|
|
496
|
-
Http: isSet(value.Http) ? HttpEndpointConfigurationMessage.fromJSON(value.Http) : undefined,
|
|
497
|
-
Database: isSet(value.Database) ? DatabaseEndpointConfigurationMessage.fromJSON(value.Database) : undefined
|
|
498
|
-
};
|
|
499
|
-
},
|
|
500
|
-
toJSON(message) {
|
|
501
|
-
return {
|
|
502
|
-
Type: message.Type,
|
|
503
|
-
Http: message.Http !== undefined ? HttpEndpointConfigurationMessage.toJSON(message.Http) : undefined,
|
|
504
|
-
Database: message.Database !== undefined ? DatabaseEndpointConfigurationMessage.toJSON(message.Database) : undefined
|
|
505
|
-
};
|
|
506
|
-
},
|
|
507
|
-
create(base) {
|
|
508
|
-
return ExternalServiceEndpointMessage.fromPartial(base ?? {});
|
|
509
|
-
},
|
|
510
|
-
fromPartial(object) {
|
|
511
|
-
return {
|
|
512
|
-
Type: object.Type ?? ExternalServiceEndpointType.Http,
|
|
513
|
-
Http: object.Http !== undefined && object.Http !== null ? HttpEndpointConfigurationMessage.fromPartial(object.Http) : undefined,
|
|
514
|
-
Database: object.Database !== undefined && object.Database !== null ? DatabaseEndpointConfigurationMessage.fromPartial(object.Database) : undefined
|
|
515
|
-
};
|
|
516
|
-
}
|
|
517
|
-
};
|
|
518
|
-
function createBaseExternalServiceDefinition() {
|
|
519
|
-
return { Id: '', Name: '', Endpoint: undefined };
|
|
520
|
-
}
|
|
521
|
-
export const ExternalServiceDefinitionMessage = {
|
|
522
|
-
encode(message, writer = new BinaryWriter()) {
|
|
523
|
-
if (message.Id !== '')
|
|
524
|
-
writer.uint32(10).string(message.Id);
|
|
525
|
-
if (message.Name !== '')
|
|
526
|
-
writer.uint32(18).string(message.Name);
|
|
527
|
-
if (message.Endpoint !== undefined)
|
|
528
|
-
ExternalServiceEndpointMessage.encode(message.Endpoint, writer.uint32(26).fork()).join();
|
|
529
|
-
return writer;
|
|
530
|
-
},
|
|
531
|
-
decode(input, length) {
|
|
532
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
533
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
534
|
-
const message = createBaseExternalServiceDefinition();
|
|
535
|
-
while (reader.pos < end) {
|
|
536
|
-
const tag = reader.uint32();
|
|
537
|
-
switch (tag >>> 3) {
|
|
538
|
-
case 1:
|
|
539
|
-
message.Id = reader.string();
|
|
540
|
-
continue;
|
|
541
|
-
case 2:
|
|
542
|
-
message.Name = reader.string();
|
|
543
|
-
continue;
|
|
544
|
-
case 3:
|
|
545
|
-
message.Endpoint = ExternalServiceEndpointMessage.decode(reader, reader.uint32());
|
|
546
|
-
continue;
|
|
547
|
-
}
|
|
548
|
-
if ((tag & 7) === 4 || tag === 0)
|
|
549
|
-
break;
|
|
550
|
-
reader.skip(tag & 7);
|
|
551
|
-
}
|
|
552
|
-
return message;
|
|
553
|
-
},
|
|
554
|
-
fromJSON(object) {
|
|
555
|
-
const value = object;
|
|
556
|
-
return {
|
|
557
|
-
Id: typeof value.Id === 'string' ? value.Id : '',
|
|
558
|
-
Name: typeof value.Name === 'string' ? value.Name : '',
|
|
559
|
-
Endpoint: isSet(value.Endpoint) ? ExternalServiceEndpointMessage.fromJSON(value.Endpoint) : undefined
|
|
560
|
-
};
|
|
561
|
-
},
|
|
562
|
-
toJSON(message) {
|
|
563
|
-
return {
|
|
564
|
-
Id: message.Id,
|
|
565
|
-
Name: message.Name,
|
|
566
|
-
Endpoint: message.Endpoint !== undefined ? ExternalServiceEndpointMessage.toJSON(message.Endpoint) : undefined
|
|
567
|
-
};
|
|
568
|
-
},
|
|
569
|
-
create(base) {
|
|
570
|
-
return ExternalServiceDefinitionMessage.fromPartial(base ?? {});
|
|
571
|
-
},
|
|
572
|
-
fromPartial(object) {
|
|
573
|
-
return {
|
|
574
|
-
Id: object.Id ?? '',
|
|
575
|
-
Name: object.Name ?? '',
|
|
576
|
-
Endpoint: object.Endpoint !== undefined && object.Endpoint !== null ? ExternalServiceEndpointMessage.fromPartial(object.Endpoint) : undefined
|
|
577
|
-
};
|
|
578
|
-
}
|
|
579
|
-
};
|
|
580
|
-
function createBaseAddExternalServices() {
|
|
581
|
-
return { EventStore: '', ExternalServices: [] };
|
|
582
|
-
}
|
|
583
|
-
export const AddExternalServicesMessage = {
|
|
584
|
-
encode(message, writer = new BinaryWriter()) {
|
|
585
|
-
if (message.EventStore !== '')
|
|
586
|
-
writer.uint32(10).string(message.EventStore);
|
|
587
|
-
for (const externalService of message.ExternalServices) {
|
|
588
|
-
ExternalServiceDefinitionMessage.encode(externalService, writer.uint32(18).fork()).join();
|
|
589
|
-
}
|
|
590
|
-
return writer;
|
|
591
|
-
},
|
|
592
|
-
decode(input, length) {
|
|
593
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
594
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
595
|
-
const message = createBaseAddExternalServices();
|
|
596
|
-
while (reader.pos < end) {
|
|
597
|
-
const tag = reader.uint32();
|
|
598
|
-
switch (tag >>> 3) {
|
|
599
|
-
case 1:
|
|
600
|
-
message.EventStore = reader.string();
|
|
601
|
-
continue;
|
|
602
|
-
case 2:
|
|
603
|
-
message.ExternalServices.push(ExternalServiceDefinitionMessage.decode(reader, reader.uint32()));
|
|
604
|
-
continue;
|
|
605
|
-
}
|
|
606
|
-
if ((tag & 7) === 4 || tag === 0)
|
|
607
|
-
break;
|
|
608
|
-
reader.skip(tag & 7);
|
|
609
|
-
}
|
|
610
|
-
return message;
|
|
611
|
-
},
|
|
612
|
-
fromJSON(object) {
|
|
613
|
-
const value = object;
|
|
614
|
-
return {
|
|
615
|
-
EventStore: typeof value.EventStore === 'string' ? value.EventStore : '',
|
|
616
|
-
ExternalServices: Array.isArray(value.ExternalServices)
|
|
617
|
-
? value.ExternalServices.map(externalService => ExternalServiceDefinitionMessage.fromJSON(externalService))
|
|
618
|
-
: []
|
|
619
|
-
};
|
|
620
|
-
},
|
|
621
|
-
toJSON(message) {
|
|
622
|
-
return {
|
|
623
|
-
EventStore: message.EventStore,
|
|
624
|
-
ExternalServices: message.ExternalServices.map(externalService => ExternalServiceDefinitionMessage.toJSON(externalService))
|
|
625
|
-
};
|
|
626
|
-
},
|
|
627
|
-
create(base) {
|
|
628
|
-
return AddExternalServicesMessage.fromPartial(base ?? {});
|
|
629
|
-
},
|
|
630
|
-
fromPartial(object) {
|
|
631
|
-
return {
|
|
632
|
-
EventStore: object.EventStore ?? '',
|
|
633
|
-
ExternalServices: object.ExternalServices?.map(externalService => ExternalServiceDefinitionMessage.fromPartial(externalService)) ?? []
|
|
634
|
-
};
|
|
635
|
-
}
|
|
636
|
-
};
|
|
637
|
-
/**
|
|
638
|
-
* External services gRPC service definition, for use with nice-grpc's client factory.
|
|
639
|
-
*/
|
|
640
|
-
export const ExternalServicesDefinition = {
|
|
641
|
-
name: 'ExternalServices',
|
|
642
|
-
fullName: 'Cratis.Chronicle.Contracts.ExternalServices.ExternalServices',
|
|
643
|
-
methods: {
|
|
644
|
-
add: {
|
|
645
|
-
name: 'Add',
|
|
646
|
-
requestType: AddExternalServicesMessage,
|
|
647
|
-
requestStream: false,
|
|
648
|
-
responseType: EmptyMessage,
|
|
649
|
-
responseStream: false,
|
|
650
|
-
options: {}
|
|
651
|
-
}
|
|
652
|
-
}
|
|
653
|
-
};
|
|
654
|
-
//# sourceMappingURL=ExternalServicesContracts.js.map
|