@cratis/chronicle 3.0.0 → 3.1.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/EventStore.ts +17 -1
- package/IEventStore.ts +16 -0
- package/auditing/CausationType.ts +10 -0
- package/compliance/ComplianceContracts.ts +84 -0
- package/compliance/IPIIManager.ts +17 -0
- package/compliance/PIIManager.ts +31 -0
- package/compliance/index.ts +2 -0
- package/connection/ChronicleConnection.ts +7 -1
- package/connection/ChronicleServices.ts +2 -0
- package/connection/Guid.ts +18 -0
- package/dist/EventStore.d.ts +8 -0
- package/dist/EventStore.d.ts.map +1 -1
- package/dist/EventStore.js +13 -1
- package/dist/EventStore.js.map +1 -1
- package/dist/IEventStore.d.ts +12 -0
- package/dist/IEventStore.d.ts.map +1 -1
- package/dist/auditing/CausationType.d.ts +8 -0
- package/dist/auditing/CausationType.d.ts.map +1 -1
- package/dist/auditing/CausationType.js +8 -0
- package/dist/auditing/CausationType.js.map +1 -1
- package/dist/compliance/ComplianceContracts.d.ts +40 -0
- package/dist/compliance/ComplianceContracts.d.ts.map +1 -1
- package/dist/compliance/ComplianceContracts.js +71 -0
- package/dist/compliance/ComplianceContracts.js.map +1 -1
- package/dist/compliance/IPIIManager.d.ts +15 -0
- package/dist/compliance/IPIIManager.d.ts.map +1 -0
- package/dist/compliance/IPIIManager.js +4 -0
- package/dist/compliance/IPIIManager.js.map +1 -0
- package/dist/compliance/PIIManager.d.ts +20 -0
- package/dist/compliance/PIIManager.d.ts.map +1 -0
- package/dist/compliance/PIIManager.js +30 -0
- package/dist/compliance/PIIManager.js.map +1 -0
- package/dist/compliance/index.d.ts +2 -0
- package/dist/compliance/index.d.ts.map +1 -1
- package/dist/compliance/index.js +1 -0
- package/dist/compliance/index.js.map +1 -1
- package/dist/connection/ChronicleConnection.d.ts +1 -0
- package/dist/connection/ChronicleConnection.d.ts.map +1 -1
- package/dist/connection/ChronicleConnection.js +6 -1
- package/dist/connection/ChronicleConnection.js.map +1 -1
- package/dist/connection/ChronicleServices.d.ts +2 -0
- package/dist/connection/ChronicleServices.d.ts.map +1 -1
- package/dist/connection/Guid.d.ts +5 -0
- package/dist/connection/Guid.d.ts.map +1 -1
- package/dist/connection/Guid.js +15 -0
- package/dist/connection/Guid.js.map +1 -1
- package/dist/eventSequences/AppendOperationsBroadcaster.d.ts +16 -0
- package/dist/eventSequences/AppendOperationsBroadcaster.d.ts.map +1 -0
- package/dist/eventSequences/AppendOperationsBroadcaster.js +77 -0
- package/dist/eventSequences/AppendOperationsBroadcaster.js.map +1 -0
- package/dist/eventSequences/AppendOptions.d.ts +7 -0
- package/dist/eventSequences/AppendOptions.d.ts.map +1 -1
- package/dist/eventSequences/AppendResult.d.ts +14 -0
- package/dist/eventSequences/AppendResult.d.ts.map +1 -1
- package/dist/eventSequences/AppendedEventWithResult.d.ts +13 -0
- package/dist/eventSequences/AppendedEventWithResult.d.ts.map +1 -0
- package/dist/eventSequences/AppendedEventWithResult.js +4 -0
- package/dist/eventSequences/AppendedEventWithResult.js.map +1 -0
- package/dist/eventSequences/CompleteStreamError.d.ts +17 -0
- package/dist/eventSequences/CompleteStreamError.d.ts.map +1 -0
- package/dist/eventSequences/CompleteStreamError.js +20 -0
- package/dist/eventSequences/CompleteStreamError.js.map +1 -0
- package/dist/eventSequences/CompleteStreamResult.d.ts +14 -0
- package/dist/eventSequences/CompleteStreamResult.d.ts.map +1 -0
- package/dist/eventSequences/CompleteStreamResult.js +4 -0
- package/dist/eventSequences/CompleteStreamResult.js.map +1 -0
- package/dist/eventSequences/ConcurrencyViolation.d.ts +13 -0
- package/dist/eventSequences/ConcurrencyViolation.d.ts.map +1 -0
- package/dist/eventSequences/ConcurrencyViolation.js +4 -0
- package/dist/eventSequences/ConcurrencyViolation.js.map +1 -0
- package/dist/eventSequences/EventForEventSourceId.d.ts +8 -0
- package/dist/eventSequences/EventForEventSourceId.d.ts.map +1 -1
- package/dist/eventSequences/EventSequence.d.ts +35 -1
- package/dist/eventSequences/EventSequence.d.ts.map +1 -1
- package/dist/eventSequences/EventSequence.js +350 -19
- package/dist/eventSequences/EventSequence.js.map +1 -1
- package/dist/eventSequences/IEventSequence.d.ts +85 -1
- package/dist/eventSequences/IEventSequence.d.ts.map +1 -1
- package/dist/eventSequences/WaitForCompletionResult.d.ts +11 -0
- package/dist/eventSequences/WaitForCompletionResult.d.ts.map +1 -0
- package/dist/eventSequences/WaitForCompletionResult.js +4 -0
- package/dist/eventSequences/WaitForCompletionResult.js.map +1 -0
- package/dist/eventSequences/index.d.ts +5 -0
- package/dist/eventSequences/index.d.ts.map +1 -1
- package/dist/eventSequences/index.js +1 -0
- package/dist/eventSequences/index.js.map +1 -1
- package/dist/eventStoreSubscriptions/EventStoreSubscriptions.d.ts +3 -0
- package/dist/eventStoreSubscriptions/EventStoreSubscriptions.d.ts.map +1 -1
- package/dist/eventStoreSubscriptions/EventStoreSubscriptions.js +9 -0
- package/dist/eventStoreSubscriptions/EventStoreSubscriptions.js.map +1 -1
- package/dist/eventStoreSubscriptions/IEventStoreSubscriptions.d.ts +6 -0
- package/dist/eventStoreSubscriptions/IEventStoreSubscriptions.d.ts.map +1 -1
- package/dist/eventStoreSubscriptions/contracts.d.ts +18 -0
- package/dist/eventStoreSubscriptions/contracts.d.ts.map +1 -1
- package/dist/eventStoreSubscriptions/contracts.js +106 -0
- package/dist/eventStoreSubscriptions/contracts.js.map +1 -1
- package/dist/events/constraints/Constraints.js +1 -1
- package/dist/events/constraints/Constraints.js.map +1 -1
- package/dist/externalServices/ExternalServiceBuilder.d.ts +42 -0
- package/dist/externalServices/ExternalServiceBuilder.d.ts.map +1 -0
- package/dist/externalServices/ExternalServiceBuilder.js +110 -0
- package/dist/externalServices/ExternalServiceBuilder.js.map +1 -0
- package/dist/externalServices/ExternalServices.d.ts +19 -0
- package/dist/externalServices/ExternalServices.d.ts.map +1 -0
- package/dist/externalServices/ExternalServices.js +30 -0
- package/dist/externalServices/ExternalServices.js.map +1 -0
- package/dist/externalServices/ExternalServicesContracts.d.ts +137 -0
- package/dist/externalServices/ExternalServicesContracts.d.ts.map +1 -0
- package/dist/externalServices/ExternalServicesContracts.js +654 -0
- package/dist/externalServices/ExternalServicesContracts.js.map +1 -0
- package/dist/externalServices/IExternalServiceBuilder.d.ts +67 -0
- package/dist/externalServices/IExternalServiceBuilder.d.ts.map +1 -0
- package/dist/externalServices/IExternalServiceBuilder.js +4 -0
- package/dist/externalServices/IExternalServiceBuilder.js.map +1 -0
- package/dist/externalServices/IExternalServices.d.ts +13 -0
- package/dist/externalServices/IExternalServices.d.ts.map +1 -0
- package/dist/externalServices/IExternalServices.js +4 -0
- package/dist/externalServices/IExternalServices.js.map +1 -0
- package/dist/externalServices/index.d.ts +5 -0
- package/dist/externalServices/index.d.ts.map +1 -0
- package/dist/externalServices/index.js +5 -0
- package/dist/externalServices/index.js.map +1 -0
- package/dist/identities/IIdentityManager.d.ts +17 -0
- package/dist/identities/IIdentityManager.d.ts.map +1 -0
- package/dist/identities/IIdentityManager.js +4 -0
- package/dist/identities/IIdentityManager.js.map +1 -0
- package/dist/identities/IdentityManager.d.ts +20 -0
- package/dist/identities/IdentityManager.d.ts.map +1 -0
- package/dist/identities/IdentityManager.js +31 -0
- package/dist/identities/IdentityManager.js.map +1 -0
- package/dist/identities/index.d.ts +3 -0
- package/dist/identities/index.d.ts.map +1 -0
- package/dist/identities/index.js +4 -0
- package/dist/identities/index.js.map +1 -0
- package/dist/index.d.ts +5 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/observation/FailedPartition.d.ts +15 -0
- package/dist/observation/FailedPartition.d.ts.map +1 -0
- package/dist/observation/FailedPartition.js +4 -0
- package/dist/observation/FailedPartition.js.map +1 -0
- package/dist/observation/FailedPartitionAttempt.d.ts +15 -0
- package/dist/observation/FailedPartitionAttempt.d.ts.map +1 -0
- package/dist/observation/FailedPartitionAttempt.js +4 -0
- package/dist/observation/FailedPartitionAttempt.js.map +1 -0
- package/dist/observation/FailedPartitions.d.ts +24 -0
- package/dist/observation/FailedPartitions.d.ts.map +1 -0
- package/dist/observation/FailedPartitions.js +39 -0
- package/dist/observation/FailedPartitions.js.map +1 -0
- package/dist/observation/ICanBeNotifiedWhenPartitionReplayed.d.ts +19 -0
- package/dist/observation/ICanBeNotifiedWhenPartitionReplayed.d.ts.map +1 -0
- package/dist/observation/ICanBeNotifiedWhenPartitionReplayed.js +4 -0
- package/dist/observation/ICanBeNotifiedWhenPartitionReplayed.js.map +1 -0
- package/dist/observation/ICanBeNotifiedWhenReplay.d.ts +17 -0
- package/dist/observation/ICanBeNotifiedWhenReplay.d.ts.map +1 -0
- package/dist/observation/ICanBeNotifiedWhenReplay.js +4 -0
- package/dist/observation/ICanBeNotifiedWhenReplay.js.map +1 -0
- package/dist/observation/IFailedPartitions.d.ts +18 -0
- package/dist/observation/IFailedPartitions.d.ts.map +1 -0
- package/dist/observation/IFailedPartitions.js +4 -0
- package/dist/observation/IFailedPartitions.js.map +1 -0
- package/dist/observation/index.d.ts +6 -0
- package/dist/observation/index.d.ts.map +1 -1
- package/dist/observation/index.js +1 -0
- package/dist/observation/index.js.map +1 -1
- package/dist/observation/notifyReplayLifecycle.d.ts +13 -0
- package/dist/observation/notifyReplayLifecycle.d.ts.map +1 -0
- package/dist/observation/notifyReplayLifecycle.js +54 -0
- package/dist/observation/notifyReplayLifecycle.js.map +1 -0
- package/dist/observation/toClientFailedPartition.d.ts +9 -0
- package/dist/observation/toClientFailedPartition.d.ts.map +1 -0
- package/dist/observation/toClientFailedPartition.js +23 -0
- package/dist/observation/toClientFailedPartition.js.map +1 -0
- package/dist/projections/Projections.d.ts +0 -4
- package/dist/projections/Projections.d.ts.map +1 -1
- package/dist/projections/Projections.js +25 -103
- package/dist/projections/Projections.js.map +1 -1
- package/dist/projections/declarative/AddBuilder.d.ts +17 -0
- package/dist/projections/declarative/AddBuilder.d.ts.map +1 -0
- package/dist/projections/declarative/AddBuilder.js +28 -0
- package/dist/projections/declarative/AddBuilder.js.map +1 -0
- package/dist/projections/declarative/AddChildBuilder.d.ts +56 -0
- package/dist/projections/declarative/AddChildBuilder.d.ts.map +1 -0
- package/dist/projections/declarative/AddChildBuilder.js +72 -0
- package/dist/projections/declarative/AddChildBuilder.js.map +1 -0
- package/dist/projections/declarative/ChildrenBuilder.d.ts +28 -0
- package/dist/projections/declarative/ChildrenBuilder.d.ts.map +1 -0
- package/dist/projections/declarative/ChildrenBuilder.js +72 -0
- package/dist/projections/declarative/ChildrenBuilder.js.map +1 -0
- package/dist/projections/declarative/CompositeKeyBuilder.d.ts +16 -0
- package/dist/projections/declarative/CompositeKeyBuilder.d.ts.map +1 -0
- package/dist/projections/declarative/CompositeKeyBuilder.js +29 -0
- package/dist/projections/declarative/CompositeKeyBuilder.js.map +1 -0
- package/dist/projections/declarative/FromBuilder.d.ts +8 -6
- package/dist/projections/declarative/FromBuilder.d.ts.map +1 -1
- package/dist/projections/declarative/FromBuilder.js +44 -14
- package/dist/projections/declarative/FromBuilder.js.map +1 -1
- package/dist/projections/declarative/ICompositeKeyBuilder.d.ts +5 -0
- package/dist/projections/declarative/ICompositeKeyBuilder.d.ts.map +1 -1
- package/dist/projections/declarative/JoinBuilder.d.ts +7 -5
- package/dist/projections/declarative/JoinBuilder.d.ts.map +1 -1
- package/dist/projections/declarative/JoinBuilder.js +50 -16
- package/dist/projections/declarative/JoinBuilder.js.map +1 -1
- package/dist/projections/declarative/NestedBuilder.d.ts +24 -0
- package/dist/projections/declarative/NestedBuilder.d.ts.map +1 -0
- package/dist/projections/declarative/NestedBuilder.js +60 -0
- package/dist/projections/declarative/NestedBuilder.js.map +1 -0
- package/dist/projections/declarative/ProjectionBuilderCore.d.ts +127 -0
- package/dist/projections/declarative/ProjectionBuilderCore.d.ts.map +1 -0
- package/dist/projections/declarative/ProjectionBuilderCore.js +180 -0
- package/dist/projections/declarative/ProjectionBuilderCore.js.map +1 -0
- package/dist/projections/declarative/ProjectionBuilderFor.d.ts +6 -32
- package/dist/projections/declarative/ProjectionBuilderFor.d.ts.map +1 -1
- package/dist/projections/declarative/ProjectionBuilderFor.js +24 -118
- package/dist/projections/declarative/ProjectionBuilderFor.js.map +1 -1
- package/dist/projections/declarative/SubtractBuilder.d.ts +17 -0
- package/dist/projections/declarative/SubtractBuilder.d.ts.map +1 -0
- package/dist/projections/declarative/SubtractBuilder.js +28 -0
- package/dist/projections/declarative/SubtractBuilder.js.map +1 -0
- package/dist/projections/declarative/index.d.ts +9 -0
- package/dist/projections/declarative/index.d.ts.map +1 -1
- package/dist/projections/declarative/index.js +8 -0
- package/dist/projections/declarative/index.js.map +1 -1
- package/dist/projections/modelBound/childrenAndNestedBuilder.d.ts +90 -0
- package/dist/projections/modelBound/childrenAndNestedBuilder.d.ts.map +1 -0
- package/dist/projections/modelBound/childrenAndNestedBuilder.js +290 -0
- package/dist/projections/modelBound/childrenAndNestedBuilder.js.map +1 -0
- package/dist/reactors/ReactorSideEffects.d.ts +29 -0
- package/dist/reactors/ReactorSideEffects.d.ts.map +1 -0
- package/dist/reactors/ReactorSideEffects.js +70 -0
- package/dist/reactors/ReactorSideEffects.js.map +1 -0
- package/dist/reactors/Reactors.d.ts +4 -1
- package/dist/reactors/Reactors.d.ts.map +1 -1
- package/dist/reactors/Reactors.js +23 -4
- package/dist/reactors/Reactors.js.map +1 -1
- package/dist/reducers/Reducers.d.ts.map +1 -1
- package/dist/reducers/Reducers.js +15 -3
- package/dist/reducers/Reducers.js.map +1 -1
- package/dist/reducers/reducer.d.ts +9 -1
- package/dist/reducers/reducer.d.ts.map +1 -1
- package/dist/reducers/reducer.js +4 -2
- package/dist/reducers/reducer.js.map +1 -1
- package/dist/transactions/IUnitOfWork.d.ts +18 -0
- package/dist/transactions/IUnitOfWork.d.ts.map +1 -1
- package/dist/transactions/UnitOfWork.d.ts +9 -0
- package/dist/transactions/UnitOfWork.d.ts.map +1 -1
- package/dist/transactions/UnitOfWork.js +14 -0
- package/dist/transactions/UnitOfWork.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/eventSequences/AppendOperationsBroadcaster.ts +83 -0
- package/eventSequences/AppendOptions.ts +8 -0
- package/eventSequences/AppendResult.ts +16 -0
- package/eventSequences/AppendedEventWithResult.ts +17 -0
- package/eventSequences/CompleteStreamError.ts +20 -0
- package/eventSequences/CompleteStreamResult.ts +13 -0
- package/eventSequences/ConcurrencyViolation.ts +18 -0
- package/eventSequences/EventForEventSourceId.ts +12 -0
- package/eventSequences/EventSequence.spec.ts +588 -0
- package/eventSequences/EventSequence.ts +406 -20
- package/eventSequences/IEventSequence.ts +109 -1
- package/eventSequences/WaitForCompletionResult.ts +15 -0
- package/eventSequences/index.ts +5 -0
- package/eventStoreSubscriptions/EventStoreSubscriptions.spec.ts +52 -0
- package/eventStoreSubscriptions/EventStoreSubscriptions.ts +19 -1
- package/eventStoreSubscriptions/IEventStoreSubscriptions.ts +7 -0
- package/eventStoreSubscriptions/contracts.ts +126 -0
- package/events/constraints/Constraints.ts +1 -1
- package/externalServices/ExternalServiceBuilder.ts +128 -0
- package/externalServices/ExternalServices.ts +34 -0
- package/externalServices/ExternalServicesContracts.ts +709 -0
- package/externalServices/IExternalServiceBuilder.ts +76 -0
- package/externalServices/IExternalServices.ts +16 -0
- package/externalServices/index.ts +7 -0
- package/identities/IIdentityManager.ts +19 -0
- package/identities/IdentityManager.ts +32 -0
- package/identities/index.ts +5 -0
- package/index.ts +6 -0
- package/observation/FailedPartition.ts +21 -0
- package/observation/FailedPartitionAttempt.ts +21 -0
- package/observation/FailedPartitions.spec.ts +75 -0
- package/observation/FailedPartitions.ts +44 -0
- package/observation/ICanBeNotifiedWhenPartitionReplayed.ts +22 -0
- package/observation/ICanBeNotifiedWhenReplay.ts +20 -0
- package/observation/IFailedPartitions.ts +22 -0
- package/observation/index.ts +6 -0
- package/observation/notifyReplayLifecycle.spec.ts +98 -0
- package/observation/notifyReplayLifecycle.ts +61 -0
- package/observation/toClientFailedPartition.ts +26 -0
- package/package.json +12 -2
- package/projections/Projections.childrenAndNested.spec.ts +188 -0
- package/projections/Projections.spec.ts +131 -0
- package/projections/Projections.ts +37 -119
- package/projections/declarative/AddBuilder.ts +28 -0
- package/projections/declarative/AddChildBuilder.ts +97 -0
- package/projections/declarative/ChildrenBuilder.spec.ts +157 -0
- package/projections/declarative/ChildrenBuilder.ts +90 -0
- package/projections/declarative/CompositeKeyBuilder.spec.ts +117 -0
- package/projections/declarative/CompositeKeyBuilder.ts +38 -0
- package/projections/declarative/FromBuilder.ts +60 -15
- package/projections/declarative/ICompositeKeyBuilder.ts +6 -0
- package/projections/declarative/JoinBuilder.ts +66 -17
- package/projections/declarative/NestedBuilder.ts +76 -0
- package/projections/declarative/ProjectionBuilderCore.ts +257 -0
- package/projections/declarative/ProjectionBuilderFor.spec.ts +115 -0
- package/projections/declarative/ProjectionBuilderFor.ts +29 -168
- package/projections/declarative/SubtractBuilder.ts +28 -0
- package/projections/declarative/index.ts +9 -0
- package/projections/modelBound/childrenAndNestedBuilder.ts +354 -0
- package/reactors/ReactorSideEffects.spec.ts +182 -0
- package/reactors/ReactorSideEffects.ts +97 -0
- package/reactors/Reactors.ts +29 -4
- package/reducers/Reducers.spec.ts +87 -0
- package/reducers/Reducers.ts +15 -3
- package/reducers/reducer.spec.ts +40 -0
- package/reducers/reducer.ts +11 -2
- package/transactions/IUnitOfWork.ts +21 -0
- package/transactions/UnitOfWork.spec.ts +82 -0
- package/transactions/UnitOfWork.ts +20 -0
|
@@ -0,0 +1,654 @@
|
|
|
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
|