@kurrent/kurrentdb-client 1.0.4 → 1.2.0-alpha.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/dist/Client/ServerFeatures.d.ts +2 -2
- package/dist/Client/ServerFeatures.js +2 -2
- package/dist/Client/ServerFeatures.js.map +1 -1
- package/dist/Client/discovery.js +2 -2
- package/dist/Client/discovery.js.map +1 -1
- package/dist/constants.d.ts +1 -0
- package/dist/constants.js +2 -1
- package/dist/constants.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/persistentSubscription/createPersistentSubscriptionToAll.js +22 -12
- package/dist/persistentSubscription/createPersistentSubscriptionToAll.js.map +1 -1
- package/dist/persistentSubscription/createPersistentSubscriptionToStream.js +16 -6
- package/dist/persistentSubscription/createPersistentSubscriptionToStream.js.map +1 -1
- package/dist/persistentSubscription/deletePersistentSubscriptionToAll.js +7 -7
- package/dist/persistentSubscription/deletePersistentSubscriptionToAll.js.map +1 -1
- package/dist/persistentSubscription/deletePersistentSubscriptionToStream.js +5 -5
- package/dist/persistentSubscription/deletePersistentSubscriptionToStream.js.map +1 -1
- package/dist/persistentSubscription/getPersistentSubscriptionToAllInfo.js +7 -7
- package/dist/persistentSubscription/getPersistentSubscriptionToAllInfo.js.map +1 -1
- package/dist/persistentSubscription/getPersistentSubscriptionToStreamInfo.js +6 -6
- package/dist/persistentSubscription/getPersistentSubscriptionToStreamInfo.js.map +1 -1
- package/dist/persistentSubscription/listAllPersistentSubscriptions.js +7 -7
- package/dist/persistentSubscription/listAllPersistentSubscriptions.js.map +1 -1
- package/dist/persistentSubscription/listPersistentSubscriptionsToAll.js +8 -8
- package/dist/persistentSubscription/listPersistentSubscriptionsToAll.js.map +1 -1
- package/dist/persistentSubscription/listPersistentSubscriptionsToStream.js +7 -7
- package/dist/persistentSubscription/listPersistentSubscriptionsToStream.js.map +1 -1
- package/dist/persistentSubscription/replayParkedMessagesToAll.js +7 -7
- package/dist/persistentSubscription/replayParkedMessagesToAll.js.map +1 -1
- package/dist/persistentSubscription/replayParkedMessagesToStream.js +7 -7
- package/dist/persistentSubscription/replayParkedMessagesToStream.js.map +1 -1
- package/dist/persistentSubscription/restartPersistentSubscriptionSubsystem.js +4 -4
- package/dist/persistentSubscription/restartPersistentSubscriptionSubsystem.js.map +1 -1
- package/dist/persistentSubscription/subscribeToPersistentSubscriptionToAll.js +8 -8
- package/dist/persistentSubscription/subscribeToPersistentSubscriptionToAll.js.map +1 -1
- package/dist/persistentSubscription/subscribeToPersistentSubscriptionToStream.js +7 -7
- package/dist/persistentSubscription/subscribeToPersistentSubscriptionToStream.js.map +1 -1
- package/dist/persistentSubscription/updatePersistentSubscriptionToAll.js +10 -10
- package/dist/persistentSubscription/updatePersistentSubscriptionToAll.js.map +1 -1
- package/dist/persistentSubscription/updatePersistentSubscriptionToStream.js +6 -6
- package/dist/persistentSubscription/updatePersistentSubscriptionToStream.js.map +1 -1
- package/dist/persistentSubscription/utils/PersistentSubscriptionImpl.d.ts +1 -1
- package/dist/persistentSubscription/utils/PersistentSubscriptionImpl.js +9 -9
- package/dist/persistentSubscription/utils/PersistentSubscriptionImpl.js.map +1 -1
- package/dist/persistentSubscription/utils/mapPersistentSubscriptionInfo.d.ts +1 -1
- package/dist/persistentSubscription/utils/settingsToGRPC.d.ts +1 -1
- package/dist/persistentSubscription/utils/settingsToGRPC.js +13 -4
- package/dist/persistentSubscription/utils/settingsToGRPC.js.map +1 -1
- package/dist/projections/createProjection.js +7 -7
- package/dist/projections/createProjection.js.map +1 -1
- package/dist/projections/deleteProjection.js +5 -5
- package/dist/projections/deleteProjection.js.map +1 -1
- package/dist/projections/disableProjection.js +5 -5
- package/dist/projections/disableProjection.js.map +1 -1
- package/dist/projections/enableProjection.js +5 -5
- package/dist/projections/enableProjection.js.map +1 -1
- package/dist/projections/getProjectionResult.js +5 -5
- package/dist/projections/getProjectionResult.js.map +1 -1
- package/dist/projections/getProjectionState.js +5 -5
- package/dist/projections/getProjectionState.js.map +1 -1
- package/dist/projections/getProjectionStatus.js +5 -5
- package/dist/projections/getProjectionStatus.js.map +1 -1
- package/dist/projections/listProjections.js +6 -6
- package/dist/projections/listProjections.js.map +1 -1
- package/dist/projections/resetProjection.js +5 -5
- package/dist/projections/resetProjection.js.map +1 -1
- package/dist/projections/restartSubsystem.js +3 -3
- package/dist/projections/restartSubsystem.js.map +1 -1
- package/dist/projections/updateProjection.js +6 -6
- package/dist/projections/updateProjection.js.map +1 -1
- package/dist/projections/utils/mapGrpcProjectionDetails.d.ts +1 -1
- package/dist/schemaRegistry/checkSchemaCompatibility.d.ts +12 -0
- package/dist/schemaRegistry/checkSchemaCompatibility.js +60 -0
- package/dist/schemaRegistry/checkSchemaCompatibility.js.map +1 -0
- package/dist/schemaRegistry/createSchema.d.ts +13 -0
- package/dist/schemaRegistry/createSchema.js +36 -0
- package/dist/schemaRegistry/createSchema.js.map +1 -0
- package/dist/schemaRegistry/deleteSchema.d.ts +11 -0
- package/dist/schemaRegistry/deleteSchema.js +23 -0
- package/dist/schemaRegistry/deleteSchema.js.map +1 -0
- package/dist/schemaRegistry/deleteSchemaVersions.d.ts +13 -0
- package/dist/schemaRegistry/deleteSchemaVersions.js +29 -0
- package/dist/schemaRegistry/deleteSchemaVersions.js.map +1 -0
- package/dist/schemaRegistry/getSchema.d.ts +12 -0
- package/dist/schemaRegistry/getSchema.js +28 -0
- package/dist/schemaRegistry/getSchema.js.map +1 -0
- package/dist/schemaRegistry/getSchemaVersion.d.ts +12 -0
- package/dist/schemaRegistry/getSchemaVersion.js +33 -0
- package/dist/schemaRegistry/getSchemaVersion.js.map +1 -0
- package/dist/schemaRegistry/getSchemaVersionById.d.ts +12 -0
- package/dist/schemaRegistry/getSchemaVersionById.js +28 -0
- package/dist/schemaRegistry/getSchemaVersionById.js.map +1 -0
- package/dist/schemaRegistry/index.d.ts +14 -0
- package/dist/schemaRegistry/index.js +35 -0
- package/dist/schemaRegistry/index.js.map +1 -0
- package/dist/schemaRegistry/listRegisteredSchemas.d.ts +11 -0
- package/dist/schemaRegistry/listRegisteredSchemas.js +41 -0
- package/dist/schemaRegistry/listRegisteredSchemas.js.map +1 -0
- package/dist/schemaRegistry/listSchemaVersions.d.ts +12 -0
- package/dist/schemaRegistry/listSchemaVersions.js +28 -0
- package/dist/schemaRegistry/listSchemaVersions.js.map +1 -0
- package/dist/schemaRegistry/listSchemas.d.ts +11 -0
- package/dist/schemaRegistry/listSchemas.js +35 -0
- package/dist/schemaRegistry/listSchemas.js.map +1 -0
- package/dist/schemaRegistry/lookupSchemaName.d.ts +12 -0
- package/dist/schemaRegistry/lookupSchemaName.js +23 -0
- package/dist/schemaRegistry/lookupSchemaName.js.map +1 -0
- package/dist/schemaRegistry/registerSchemaVersion.d.ts +13 -0
- package/dist/schemaRegistry/registerSchemaVersion.js +31 -0
- package/dist/schemaRegistry/registerSchemaVersion.js.map +1 -0
- package/dist/schemaRegistry/types.d.ts +347 -0
- package/dist/schemaRegistry/types.js +3 -0
- package/dist/schemaRegistry/types.js.map +1 -0
- package/dist/schemaRegistry/updateSchema.d.ts +11 -0
- package/dist/schemaRegistry/updateSchema.js +51 -0
- package/dist/schemaRegistry/updateSchema.js.map +1 -0
- package/dist/schemaRegistry/utils/index.d.ts +1 -0
- package/dist/schemaRegistry/utils/index.js +18 -0
- package/dist/schemaRegistry/utils/index.js.map +1 -0
- package/dist/schemaRegistry/utils/mappers.d.ts +24 -0
- package/dist/schemaRegistry/utils/mappers.js +198 -0
- package/dist/schemaRegistry/utils/mappers.js.map +1 -0
- package/dist/streams/appendToStream/append.js +3 -3
- package/dist/streams/appendToStream/append.js.map +1 -1
- package/dist/streams/appendToStream/batchAppend.js +3 -3
- package/dist/streams/appendToStream/batchAppend.js.map +1 -1
- package/dist/streams/appendToStream/index.d.ts +2 -1
- package/dist/streams/appendToStream/index.js +10 -1
- package/dist/streams/appendToStream/index.js.map +1 -1
- package/dist/streams/appendToStream/multiStreamAppend.d.ts +3 -0
- package/dist/streams/appendToStream/multiStreamAppend.js +130 -0
- package/dist/streams/appendToStream/multiStreamAppend.js.map +1 -0
- package/dist/streams/appendToStream/unpackError.d.ts +2 -2
- package/dist/streams/appendToStream/unpackError.js +1 -1
- package/dist/streams/appendToStream/unpackError.js.map +1 -1
- package/dist/streams/deleteStream.js +3 -3
- package/dist/streams/deleteStream.js.map +1 -1
- package/dist/streams/subscribeToAll.js +3 -3
- package/dist/streams/subscribeToAll.js.map +1 -1
- package/dist/streams/subscribeToStream.js +3 -3
- package/dist/streams/subscribeToStream.js.map +1 -1
- package/dist/streams/tombstoneStream.js +3 -3
- package/dist/streams/tombstoneStream.js.map +1 -1
- package/dist/streams/utils/ReadStream.d.ts +1 -1
- package/dist/streams/utils/Subscription.d.ts +1 -1
- package/dist/types/index.d.ts +35 -4
- package/dist/types/index.js +5 -2
- package/dist/types/index.js.map +1 -1
- package/dist/utils/CommandError.d.ts +26 -2
- package/dist/utils/CommandError.js +100 -3
- package/dist/utils/CommandError.js.map +1 -1
- package/dist/utils/convertGrpcEvent.d.ts +2 -2
- package/dist/utils/getGrpcStatusDetails.d.ts +5 -0
- package/dist/utils/getGrpcStatusDetails.js +17 -0
- package/dist/utils/getGrpcStatusDetails.js.map +1 -0
- package/dist/utils/grpcStreamIdentifier.d.ts +1 -1
- package/dist/utils/grpcStreamIdentifier.js +1 -1
- package/dist/utils/grpcStreamIdentifier.js.map +1 -1
- package/dist/utils/grpcUUID.d.ts +1 -1
- package/dist/utils/grpcUUID.js +1 -1
- package/dist/utils/grpcUUID.js.map +1 -1
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.js +3 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/mapToValue.d.ts +3 -0
- package/dist/utils/mapToValue.js +19 -0
- package/dist/utils/mapToValue.js.map +1 -0
- package/dist/utils/schema.d.ts +7 -0
- package/dist/utils/schema.js +21 -0
- package/dist/utils/schema.js.map +1 -0
- package/generated/{code_pb.d.ts → kurrentdb/protocols/v1/code_pb.d.ts} +1 -1
- package/generated/{code_pb.js → kurrentdb/protocols/v1/code_pb.js} +1 -1
- package/generated/kurrentdb/protocols/v1/gossip_grpc_pb.d.ts +42 -0
- package/generated/{gossip_grpc_pb.js → kurrentdb/protocols/v1/gossip_grpc_pb.js} +8 -8
- package/generated/{gossip_pb.d.ts → kurrentdb/protocols/v1/gossip_pb.d.ts} +5 -5
- package/generated/{gossip_pb.js → kurrentdb/protocols/v1/gossip_pb.js} +8 -8
- package/generated/kurrentdb/protocols/v1/operations_grpc_pb.d.ts +144 -0
- package/generated/{operations_grpc_pb.js → kurrentdb/protocols/v1/operations_grpc_pb.js} +26 -26
- package/generated/{operations_pb.d.ts → kurrentdb/protocols/v1/operations_pb.d.ts} +2 -2
- package/generated/{operations_pb.js → kurrentdb/protocols/v1/operations_pb.js} +3 -3
- package/generated/kurrentdb/protocols/v1/persistentsubscriptions_grpc_pb.d.ts +160 -0
- package/generated/{persistent_grpc_pb.js → kurrentdb/protocols/v1/persistentsubscriptions_grpc_pb.js} +48 -48
- package/generated/{persistent_pb.d.ts → kurrentdb/protocols/v1/persistentsubscriptions_pb.d.ts} +106 -106
- package/generated/{persistent_pb.js → kurrentdb/protocols/v1/persistentsubscriptions_pb.js} +173 -173
- package/generated/kurrentdb/protocols/v1/projectionmanagement_grpc_pb.d.ts +194 -0
- package/generated/{projections_grpc_pb.js → kurrentdb/protocols/v1/projectionmanagement_grpc_pb.js} +60 -60
- package/generated/{projections_pb.d.ts → kurrentdb/protocols/v1/projectionmanagement_pb.d.ts} +20 -20
- package/generated/{projections_pb.js → kurrentdb/protocols/v1/projectionmanagement_pb.js} +33 -33
- package/generated/kurrentdb/protocols/v1/serverfeatures_grpc_pb.d.ts +42 -0
- package/generated/{serverfeatures_grpc_pb.js → kurrentdb/protocols/v1/serverfeatures_grpc_pb.js} +8 -8
- package/generated/{serverfeatures_pb.d.ts → kurrentdb/protocols/v1/serverfeatures_pb.d.ts} +2 -2
- package/generated/{serverfeatures_pb.js → kurrentdb/protocols/v1/serverfeatures_pb.js} +3 -3
- package/generated/{shared_pb.d.ts → kurrentdb/protocols/v1/shared_pb.d.ts} +1 -1
- package/generated/{shared_pb.js → kurrentdb/protocols/v1/shared_pb.js} +1 -1
- package/generated/{status_pb.d.ts → kurrentdb/protocols/v1/status_pb.d.ts} +5 -5
- package/generated/{status_pb.js → kurrentdb/protocols/v1/status_pb.js} +3 -3
- package/generated/kurrentdb/protocols/v1/streams_grpc_pb.d.ts +113 -0
- package/generated/{streams_grpc_pb.js → kurrentdb/protocols/v1/streams_grpc_pb.js} +33 -33
- package/generated/{streams_pb.d.ts → kurrentdb/protocols/v1/streams_pb.d.ts} +138 -138
- package/generated/{streams_pb.js → kurrentdb/protocols/v1/streams_pb.js} +230 -230
- package/generated/kurrentdb/protocols/v1/usermanagement_grpc_pb.d.ts +158 -0
- package/generated/{users_grpc_pb.js → kurrentdb/protocols/v1/usermanagement_grpc_pb.js} +49 -49
- package/generated/{users_pb.d.ts → kurrentdb/protocols/v1/usermanagement_pb.d.ts} +1 -1
- package/generated/{users_pb.js → kurrentdb/protocols/v1/usermanagement_pb.js} +1 -1
- package/generated/kurrentdb/protocols/v2/core_grpc_pb.js +1 -0
- package/generated/kurrentdb/protocols/v2/core_pb.d.ts +188 -0
- package/generated/kurrentdb/protocols/v2/core_pb.js +1301 -0
- package/generated/kurrentdb/protocols/v2/errors_grpc_pb.js +1 -0
- package/generated/kurrentdb/protocols/v2/errors_pb.d.ts +105 -0
- package/generated/kurrentdb/protocols/v2/errors_pb.js +692 -0
- package/generated/kurrentdb/protocols/v2/features/service_grpc_pb.d.ts +43 -0
- package/generated/kurrentdb/protocols/v2/features/service_grpc_pb.js +50 -0
- package/generated/kurrentdb/protocols/v2/features/service_pb.d.ts +227 -0
- package/generated/kurrentdb/protocols/v2/features/service_pb.js +1753 -0
- package/generated/kurrentdb/protocols/v2/registry/errors_grpc_pb.js +1 -0
- package/generated/kurrentdb/protocols/v2/registry/errors_pb.d.ts +75 -0
- package/generated/kurrentdb/protocols/v2/registry/errors_pb.js +493 -0
- package/generated/kurrentdb/protocols/v2/registry/events_grpc_pb.js +1 -0
- package/generated/kurrentdb/protocols/v2/registry/events_pb.d.ts +255 -0
- package/generated/kurrentdb/protocols/v2/registry/events_pb.js +2057 -0
- package/generated/kurrentdb/protocols/v2/registry/groups_grpc_pb.js +1 -0
- package/generated/kurrentdb/protocols/v2/registry/groups_pb.d.ts +474 -0
- package/generated/kurrentdb/protocols/v2/registry/groups_pb.js +3593 -0
- package/generated/kurrentdb/protocols/v2/registry/schemas_grpc_pb.js +1 -0
- package/generated/kurrentdb/protocols/v2/registry/schemas_pb.d.ts +825 -0
- package/generated/kurrentdb/protocols/v2/registry/schemas_pb.js +6500 -0
- package/generated/kurrentdb/protocols/v2/registry/service_grpc_pb.d.ts +350 -0
- package/generated/kurrentdb/protocols/v2/registry/service_grpc_pb.js +654 -0
- package/generated/kurrentdb/protocols/v2/registry/service_pb.d.ts +10 -0
- package/generated/kurrentdb/protocols/v2/registry/service_pb.js +29 -0
- package/generated/kurrentdb/protocols/v2/registry/shared_grpc_pb.js +1 -0
- package/generated/kurrentdb/protocols/v2/registry/shared_pb.d.ts +26 -0
- package/generated/kurrentdb/protocols/v2/registry/shared_pb.js +51 -0
- package/generated/kurrentdb/protocols/v2/registry/validation_grpc_pb.js +1 -0
- package/generated/kurrentdb/protocols/v2/registry/validation_pb.d.ts +247 -0
- package/generated/kurrentdb/protocols/v2/registry/validation_pb.js +1789 -0
- package/generated/kurrentdb/protocols/v2/rpc_grpc_pb.js +1 -0
- package/generated/kurrentdb/protocols/v2/rpc_pb.d.ts +34 -0
- package/generated/kurrentdb/protocols/v2/rpc_pb.js +236 -0
- package/generated/kurrentdb/protocols/v2/streams/errors_grpc_pb.js +1 -0
- package/generated/kurrentdb/protocols/v2/streams/errors_pb.d.ts +199 -0
- package/generated/kurrentdb/protocols/v2/streams/errors_pb.js +1439 -0
- package/generated/kurrentdb/protocols/v2/streams/shared_grpc_pb.js +1 -0
- package/generated/kurrentdb/protocols/v2/streams/shared_pb.d.ts +218 -0
- package/generated/kurrentdb/protocols/v2/streams/shared_pb.js +1561 -0
- package/generated/kurrentdb/protocols/v2/streams/streams_grpc_pb.d.ts +44 -0
- package/generated/kurrentdb/protocols/v2/streams/streams_grpc_pb.js +69 -0
- package/generated/kurrentdb/protocols/v2/streams/streams_pb.d.ts +176 -0
- package/generated/kurrentdb/protocols/v2/streams/streams_pb.js +1289 -0
- package/package.json +66 -64
- package/generated/cluster_grpc_pb.d.ts +0 -211
- package/generated/cluster_grpc_pb.js +0 -247
- package/generated/cluster_pb.d.ts +0 -546
- package/generated/cluster_pb.js +0 -4357
- package/generated/gossip_grpc_pb.d.ts +0 -42
- package/generated/monitoring_grpc_pb.d.ts +0 -39
- package/generated/monitoring_grpc_pb.js +0 -44
- package/generated/monitoring_pb.d.ts +0 -52
- package/generated/monitoring_pb.js +0 -361
- package/generated/operations_grpc_pb.d.ts +0 -144
- package/generated/persistent_grpc_pb.d.ts +0 -160
- package/generated/projections_grpc_pb.d.ts +0 -194
- package/generated/serverfeatures_grpc_pb.d.ts +0 -42
- package/generated/streams_grpc_pb.d.ts +0 -113
- package/generated/users_grpc_pb.d.ts +0 -158
- /package/generated/{code_grpc_pb.js → kurrentdb/protocols/v1/code_grpc_pb.js} +0 -0
- /package/generated/{shared_grpc_pb.js → kurrentdb/protocols/v1/shared_grpc_pb.js} +0 -0
- /package/generated/{status_grpc_pb.js → kurrentdb/protocols/v1/status_grpc_pb.js} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
4
|
-
const
|
|
3
|
+
const projectionmanagement_grpc_pb_1 = require("../../generated/kurrentdb/protocols/v1/projectionmanagement_grpc_pb");
|
|
4
|
+
const projectionmanagement_pb_1 = require("../../generated/kurrentdb/protocols/v1/projectionmanagement_pb");
|
|
5
5
|
const Client_1 = require("../Client");
|
|
6
6
|
const utils_1 = require("../utils");
|
|
7
7
|
Client_1.Client.prototype.disableProjection = async function (projectionName, baseOptions = {}) {
|
|
@@ -12,8 +12,8 @@ Client_1.Client.prototype.abortProjection = async function (projectionName, base
|
|
|
12
12
|
};
|
|
13
13
|
function disableProjection(debugName, writeCheckpoint) {
|
|
14
14
|
return async function (projectionName, baseOptions = {}) {
|
|
15
|
-
const req = new
|
|
16
|
-
const options = new
|
|
15
|
+
const req = new projectionmanagement_pb_1.DisableReq();
|
|
16
|
+
const options = new projectionmanagement_pb_1.DisableReq.Options();
|
|
17
17
|
options.setName(projectionName);
|
|
18
18
|
options.setWriteCheckpoint(writeCheckpoint);
|
|
19
19
|
req.setOptions(options);
|
|
@@ -22,7 +22,7 @@ function disableProjection(debugName, writeCheckpoint) {
|
|
|
22
22
|
options: baseOptions,
|
|
23
23
|
});
|
|
24
24
|
utils_1.debug.command_grpc(`${debugName}: %g`, req);
|
|
25
|
-
return this.execute(
|
|
25
|
+
return this.execute(projectionmanagement_grpc_pb_1.ProjectionsClient, debugName, (client) => new Promise((resolve, reject) => {
|
|
26
26
|
client.disable(req, ...this.callArguments(baseOptions), (error) => {
|
|
27
27
|
if (error)
|
|
28
28
|
return reject((0, utils_1.convertToCommandError)(error));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"disableProjection.js","sourceRoot":"","sources":["../../src/projections/disableProjection.ts"],"names":[],"mappings":";;AAAA,
|
|
1
|
+
{"version":3,"file":"disableProjection.js","sourceRoot":"","sources":["../../src/projections/disableProjection.ts"],"names":[],"mappings":";;AAAA,sHAAwG;AACxG,4GAA4F;AAE5F,sCAAmC;AAEnC,oCAAwD;AA4BxD,eAAM,CAAC,SAAS,CAAC,iBAAiB,GAAG,KAAK,WAExC,cAAsB,EACtB,cAAwC,EAAE;IAE1C,OAAO,iBAAiB,CAAC,mBAAmB,EAAE,IAAI,CAAC,CAAC,IAAI,CACtD,IAAI,EACJ,cAAc,EACd,WAAW,CACZ,CAAC;AACJ,CAAC,CAAC;AAEF,eAAM,CAAC,SAAS,CAAC,eAAe,GAAG,KAAK,WAEtC,cAAsB,EACtB,cAAwC,EAAE;IAE1C,OAAO,iBAAiB,CAAC,iBAAiB,EAAE,KAAK,CAAC,CAAC,IAAI,CACrD,IAAI,EACJ,cAAc,EACd,WAAW,CACZ,CAAC;AACJ,CAAC,CAAC;AAEF,SAAS,iBAAiB,CAAC,SAAiB,EAAE,eAAwB;IACpE,OAAO,KAAK,WAEV,cAAsB,EACtB,cAAwC,EAAE;QAE1C,MAAM,GAAG,GAAG,IAAI,oCAAU,EAAE,CAAC;QAC7B,MAAM,OAAO,GAAG,IAAI,oCAAU,CAAC,OAAO,EAAE,CAAC;QAEzC,OAAO,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;QAChC,OAAO,CAAC,kBAAkB,CAAC,eAAe,CAAC,CAAC;QAE5C,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;QAExB,aAAK,CAAC,OAAO,CAAC,GAAG,SAAS,MAAM,EAAE;YAChC,cAAc;YACd,OAAO,EAAE,WAAW;SACrB,CAAC,CAAC;QACH,aAAK,CAAC,YAAY,CAAC,GAAG,SAAS,MAAM,EAAE,GAAG,CAAC,CAAC;QAE5C,OAAO,IAAI,CAAC,OAAO,CACjB,gDAAiB,EACjB,SAAS,EACT,CAAC,MAAM,EAAE,EAAE,CACT,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACpC,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,aAAa,CAAC,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,EAAE;gBAChE,IAAI,KAAK;oBAAE,OAAO,MAAM,CAAC,IAAA,6BAAqB,EAAC,KAAK,CAAC,CAAC,CAAC;gBACvD,OAAO,OAAO,EAAE,CAAC;YACnB,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CACL,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
4
|
-
const
|
|
3
|
+
const projectionmanagement_grpc_pb_1 = require("../../generated/kurrentdb/protocols/v1/projectionmanagement_grpc_pb");
|
|
4
|
+
const projectionmanagement_pb_1 = require("../../generated/kurrentdb/protocols/v1/projectionmanagement_pb");
|
|
5
5
|
const Client_1 = require("../Client");
|
|
6
6
|
const utils_1 = require("../utils");
|
|
7
7
|
Client_1.Client.prototype.enableProjection = async function (projectionName, baseOptions = {}) {
|
|
8
|
-
const req = new
|
|
9
|
-
const options = new
|
|
8
|
+
const req = new projectionmanagement_pb_1.EnableReq();
|
|
9
|
+
const options = new projectionmanagement_pb_1.EnableReq.Options();
|
|
10
10
|
options.setName(projectionName);
|
|
11
11
|
req.setOptions(options);
|
|
12
12
|
utils_1.debug.command("enableProjection: %O", {
|
|
@@ -14,7 +14,7 @@ Client_1.Client.prototype.enableProjection = async function (projectionName, bas
|
|
|
14
14
|
options: baseOptions,
|
|
15
15
|
});
|
|
16
16
|
utils_1.debug.command_grpc("enableProjection: %g", req);
|
|
17
|
-
return this.execute(
|
|
17
|
+
return this.execute(projectionmanagement_grpc_pb_1.ProjectionsClient, "enableProjection", (client) => new Promise((resolve, reject) => {
|
|
18
18
|
client.enable(req, ...this.callArguments(baseOptions), (error) => {
|
|
19
19
|
if (error)
|
|
20
20
|
return reject((0, utils_1.convertToCommandError)(error));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enableProjection.js","sourceRoot":"","sources":["../../src/projections/enableProjection.ts"],"names":[],"mappings":";;AAAA,
|
|
1
|
+
{"version":3,"file":"enableProjection.js","sourceRoot":"","sources":["../../src/projections/enableProjection.ts"],"names":[],"mappings":";;AAAA,sHAAwG;AACxG,4GAA2F;AAE3F,sCAAmC;AAEnC,oCAAwD;AAkBxD,eAAM,CAAC,SAAS,CAAC,gBAAgB,GAAG,KAAK,WAEvC,cAAsB,EACtB,cAAuC,EAAE;IAEzC,MAAM,GAAG,GAAG,IAAI,mCAAS,EAAE,CAAC;IAC5B,MAAM,OAAO,GAAG,IAAI,mCAAS,CAAC,OAAO,EAAE,CAAC;IAExC,OAAO,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;IAEhC,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IAExB,aAAK,CAAC,OAAO,CAAC,sBAAsB,EAAE;QACpC,cAAc;QACd,OAAO,EAAE,WAAW;KACrB,CAAC,CAAC;IACH,aAAK,CAAC,YAAY,CAAC,sBAAsB,EAAE,GAAG,CAAC,CAAC;IAEhD,OAAO,IAAI,CAAC,OAAO,CACjB,gDAAiB,EACjB,kBAAkB,EAClB,CAAC,MAAM,EAAE,EAAE,CACT,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACpC,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,aAAa,CAAC,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,EAAE;YAC/D,IAAI,KAAK;gBAAE,OAAO,MAAM,CAAC,IAAA,6BAAqB,EAAC,KAAK,CAAC,CAAC,CAAC;YACvD,OAAO,OAAO,EAAE,CAAC;QACnB,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CACL,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
4
|
-
const
|
|
3
|
+
const projectionmanagement_grpc_pb_1 = require("../../generated/kurrentdb/protocols/v1/projectionmanagement_grpc_pb");
|
|
4
|
+
const projectionmanagement_pb_1 = require("../../generated/kurrentdb/protocols/v1/projectionmanagement_pb");
|
|
5
5
|
const Client_1 = require("../Client");
|
|
6
6
|
const utils_1 = require("../utils");
|
|
7
7
|
Client_1.Client.prototype.getProjectionResult = async function (projectionName, { partition = "", ...baseOptions } = {}) {
|
|
8
|
-
const req = new
|
|
9
|
-
const options = new
|
|
8
|
+
const req = new projectionmanagement_pb_1.ResultReq();
|
|
9
|
+
const options = new projectionmanagement_pb_1.ResultReq.Options();
|
|
10
10
|
options.setName(projectionName);
|
|
11
11
|
options.setPartition(partition);
|
|
12
12
|
req.setOptions(options);
|
|
@@ -18,7 +18,7 @@ Client_1.Client.prototype.getProjectionResult = async function (projectionName,
|
|
|
18
18
|
},
|
|
19
19
|
});
|
|
20
20
|
utils_1.debug.command_grpc("getProjectionResult: %g", req);
|
|
21
|
-
return this.execute(
|
|
21
|
+
return this.execute(projectionmanagement_grpc_pb_1.ProjectionsClient, "getProjectionResult", (client) => new Promise((resolve, reject) => {
|
|
22
22
|
client.result(req, ...this.callArguments(baseOptions), (error, response) => {
|
|
23
23
|
if (error)
|
|
24
24
|
return reject((0, utils_1.convertToCommandError)(error));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getProjectionResult.js","sourceRoot":"","sources":["../../src/projections/getProjectionResult.ts"],"names":[],"mappings":";;AAAA,
|
|
1
|
+
{"version":3,"file":"getProjectionResult.js","sourceRoot":"","sources":["../../src/projections/getProjectionResult.ts"],"names":[],"mappings":";;AAAA,sHAAwG;AACxG,4GAA2F;AAE3F,sCAAmC;AAEnC,oCAAwD;AAuBxD,eAAM,CAAC,SAAS,CAAC,mBAAmB,GAAG,KAAK,WAE1C,cAAsB,EACtB,EAAE,SAAS,GAAG,EAAE,EAAE,GAAG,WAAW,KAAiC,EAAE;IAEnE,MAAM,GAAG,GAAG,IAAI,mCAAS,EAAE,CAAC;IAC5B,MAAM,OAAO,GAAG,IAAI,mCAAS,CAAC,OAAO,EAAE,CAAC;IACxC,OAAO,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;IAChC,OAAO,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC;IAEhC,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IAExB,aAAK,CAAC,OAAO,CAAC,yBAAyB,EAAE;QACvC,cAAc;QACd,OAAO,EAAE;YACP,SAAS;YACT,GAAG,WAAW;SACf;KACF,CAAC,CAAC;IACH,aAAK,CAAC,YAAY,CAAC,yBAAyB,EAAE,GAAG,CAAC,CAAC;IAEnD,OAAO,IAAI,CAAC,OAAO,CACjB,gDAAiB,EACjB,qBAAqB,EACrB,CAAC,MAAM,EAAE,EAAE,CACT,IAAI,OAAO,CAAI,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACjC,MAAM,CAAC,MAAM,CACX,GAAG,EACH,GAAG,IAAI,CAAC,aAAa,CAAC,WAAW,CAAC,EAClC,CAAC,KAAK,EAAE,QAAQ,EAAE,EAAE;YAClB,IAAI,KAAK;gBAAE,OAAO,MAAM,CAAC,IAAA,6BAAqB,EAAC,KAAK,CAAC,CAAC,CAAC;YACvD,OAAO,OAAO,CAAC,QAAQ,CAAC,SAAS,EAAE,EAAE,YAAY,EAAO,CAAC,CAAC;QAC5D,CAAC,CACF,CAAC;IACJ,CAAC,CAAC,CACL,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
4
|
-
const
|
|
3
|
+
const projectionmanagement_grpc_pb_1 = require("../../generated/kurrentdb/protocols/v1/projectionmanagement_grpc_pb");
|
|
4
|
+
const projectionmanagement_pb_1 = require("../../generated/kurrentdb/protocols/v1/projectionmanagement_pb");
|
|
5
5
|
const Client_1 = require("../Client");
|
|
6
6
|
const utils_1 = require("../utils");
|
|
7
7
|
Client_1.Client.prototype.getProjectionState = async function (projectionName, { partition = "", ...baseOptions } = {}) {
|
|
8
|
-
const req = new
|
|
9
|
-
const options = new
|
|
8
|
+
const req = new projectionmanagement_pb_1.StateReq();
|
|
9
|
+
const options = new projectionmanagement_pb_1.StateReq.Options();
|
|
10
10
|
options.setName(projectionName);
|
|
11
11
|
options.setPartition(partition);
|
|
12
12
|
req.setOptions(options);
|
|
@@ -18,7 +18,7 @@ Client_1.Client.prototype.getProjectionState = async function (projectionName, {
|
|
|
18
18
|
},
|
|
19
19
|
});
|
|
20
20
|
utils_1.debug.command_grpc("getProjectionState: %g", req);
|
|
21
|
-
return this.execute(
|
|
21
|
+
return this.execute(projectionmanagement_grpc_pb_1.ProjectionsClient, "getProjectionState", (client) => new Promise((resolve, reject) => {
|
|
22
22
|
client.state(req, ...this.callArguments(baseOptions), (error, response) => {
|
|
23
23
|
if (error)
|
|
24
24
|
return reject((0, utils_1.convertToCommandError)(error));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getProjectionState.js","sourceRoot":"","sources":["../../src/projections/getProjectionState.ts"],"names":[],"mappings":";;AAAA,
|
|
1
|
+
{"version":3,"file":"getProjectionState.js","sourceRoot":"","sources":["../../src/projections/getProjectionState.ts"],"names":[],"mappings":";;AAAA,sHAAwG;AACxG,4GAA0F;AAE1F,sCAAmC;AAEnC,oCAAwD;AAuBxD,eAAM,CAAC,SAAS,CAAC,kBAAkB,GAAG,KAAK,WAEzC,cAAsB,EACtB,EAAE,SAAS,GAAG,EAAE,EAAE,GAAG,WAAW,KAAgC,EAAE;IAElE,MAAM,GAAG,GAAG,IAAI,kCAAQ,EAAE,CAAC;IAC3B,MAAM,OAAO,GAAG,IAAI,kCAAQ,CAAC,OAAO,EAAE,CAAC;IACvC,OAAO,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;IAChC,OAAO,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC;IAEhC,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IAExB,aAAK,CAAC,OAAO,CAAC,wBAAwB,EAAE;QACtC,cAAc;QACd,OAAO,EAAE;YACP,SAAS;YACT,GAAG,WAAW;SACf;KACF,CAAC,CAAC;IACH,aAAK,CAAC,YAAY,CAAC,wBAAwB,EAAE,GAAG,CAAC,CAAC;IAElD,OAAO,IAAI,CAAC,OAAO,CACjB,gDAAiB,EACjB,oBAAoB,EACpB,CAAC,MAAM,EAAE,EAAE,CACT,IAAI,OAAO,CAAI,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACjC,MAAM,CAAC,KAAK,CACV,GAAG,EACH,GAAG,IAAI,CAAC,aAAa,CAAC,WAAW,CAAC,EAClC,CAAC,KAAK,EAAE,QAAQ,EAAE,EAAE;YAClB,IAAI,KAAK;gBAAE,OAAO,MAAM,CAAC,IAAA,6BAAqB,EAAC,KAAK,CAAC,CAAC,CAAC;YACvD,OAAO,OAAO,CAAC,QAAQ,CAAC,QAAQ,EAAE,EAAE,YAAY,EAAO,CAAC,CAAC;QAC3D,CAAC,CACF,CAAC;IACJ,CAAC,CAAC,CACL,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
4
|
-
const
|
|
3
|
+
const projectionmanagement_grpc_pb_1 = require("../../generated/kurrentdb/protocols/v1/projectionmanagement_grpc_pb");
|
|
4
|
+
const projectionmanagement_pb_1 = require("../../generated/kurrentdb/protocols/v1/projectionmanagement_pb");
|
|
5
5
|
const Client_1 = require("../Client");
|
|
6
6
|
const utils_1 = require("../utils");
|
|
7
7
|
const mapGrpcProjectionDetails_1 = require("./utils/mapGrpcProjectionDetails");
|
|
8
8
|
Client_1.Client.prototype.getProjectionStatus = async function (projectionName, baseOptions = {}) {
|
|
9
|
-
const req = new
|
|
10
|
-
const options = new
|
|
9
|
+
const req = new projectionmanagement_pb_1.StatisticsReq();
|
|
10
|
+
const options = new projectionmanagement_pb_1.StatisticsReq.Options();
|
|
11
11
|
options.setName(projectionName);
|
|
12
12
|
req.setOptions(options);
|
|
13
13
|
utils_1.debug.command("getProjectionStatistics: %O", {
|
|
@@ -15,7 +15,7 @@ Client_1.Client.prototype.getProjectionStatus = async function (projectionName,
|
|
|
15
15
|
options: baseOptions,
|
|
16
16
|
});
|
|
17
17
|
utils_1.debug.command_grpc("getProjectionStatistics: %g", req);
|
|
18
|
-
return this.execute(
|
|
18
|
+
return this.execute(projectionmanagement_grpc_pb_1.ProjectionsClient, "getProjectionStatistics", (client) => {
|
|
19
19
|
const stream = client.statistics(req, ...this.callArguments(baseOptions));
|
|
20
20
|
return new Promise((resolve, reject) => {
|
|
21
21
|
let projectionDetail;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getProjectionStatus.js","sourceRoot":"","sources":["../../src/projections/getProjectionStatus.ts"],"names":[],"mappings":";;AAEA,
|
|
1
|
+
{"version":3,"file":"getProjectionStatus.js","sourceRoot":"","sources":["../../src/projections/getProjectionStatus.ts"],"names":[],"mappings":";;AAEA,sHAAwG;AACxG,4GAGwE;AAExE,sCAAmC;AAEnC,oCAAwD;AACxD,+EAA4E;AAkB5E,eAAM,CAAC,SAAS,CAAC,mBAAmB,GAAG,KAAK,WAE1C,cAAsB,EACtB,cAA0C,EAAE;IAE5C,MAAM,GAAG,GAAG,IAAI,uCAAa,EAAE,CAAC;IAChC,MAAM,OAAO,GAAG,IAAI,uCAAa,CAAC,OAAO,EAAE,CAAC;IAC5C,OAAO,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;IAChC,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IAExB,aAAK,CAAC,OAAO,CAAC,6BAA6B,EAAE;QAC3C,cAAc;QACd,OAAO,EAAE,WAAW;KACrB,CAAC,CAAC;IACH,aAAK,CAAC,YAAY,CAAC,6BAA6B,EAAE,GAAG,CAAC,CAAC;IAEvD,OAAO,IAAI,CAAC,OAAO,CACjB,gDAAiB,EACjB,yBAAyB,EACzB,CAAC,MAAM,EAAE,EAAE;QACT,MAAM,MAAM,GAAG,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,CAAC;QAE1E,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACrC,IAAI,gBAAmC,CAAC;YAExC,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,KAAmB,EAAE,EAAE;gBACzC,MAAM,CAAC,IAAA,6BAAqB,EAAC,KAAK,CAAC,CAAC,CAAC;YACvC,CAAC,CAAC,CAAC;YAEH,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,IAAoB,EAAE,EAAE;gBACzC,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;oBAAE,OAAO;gBAC/B,gBAAgB,GAAG,IAAA,mDAAwB,EAAC,IAAI,CAAC,UAAU,EAAG,CAAC,CAAC;YAClE,CAAC,CAAC,CAAC;YAEH,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE;gBACpB,OAAO,CAAC,gBAAgB,CAAC,CAAC;YAC5B,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CACF,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const shared_pb_1 = require("../../generated/shared_pb");
|
|
4
|
-
const
|
|
5
|
-
const
|
|
3
|
+
const shared_pb_1 = require("../../generated/kurrentdb/protocols/v1/shared_pb");
|
|
4
|
+
const projectionmanagement_grpc_pb_1 = require("../../generated/kurrentdb/protocols/v1/projectionmanagement_grpc_pb");
|
|
5
|
+
const projectionmanagement_pb_1 = require("../../generated/kurrentdb/protocols/v1/projectionmanagement_pb");
|
|
6
6
|
const utils_1 = require("../utils");
|
|
7
7
|
const Client_1 = require("../Client");
|
|
8
8
|
const mapGrpcProjectionDetails_1 = require("./utils/mapGrpcProjectionDetails");
|
|
9
9
|
Client_1.Client.prototype.listProjections = async function (baseOptions = {}) {
|
|
10
|
-
const options = new
|
|
10
|
+
const options = new projectionmanagement_pb_1.StatisticsReq.Options();
|
|
11
11
|
options.setContinuous(new shared_pb_1.Empty());
|
|
12
|
-
const req = new
|
|
12
|
+
const req = new projectionmanagement_pb_1.StatisticsReq();
|
|
13
13
|
req.setOptions(options);
|
|
14
14
|
utils_1.debug.command("%s: %O", "listProjections", {
|
|
15
15
|
options: baseOptions,
|
|
16
16
|
});
|
|
17
17
|
utils_1.debug.command_grpc("%s: %g", "listProjections", req);
|
|
18
|
-
return this.execute(
|
|
18
|
+
return this.execute(projectionmanagement_grpc_pb_1.ProjectionsClient, "listProjections", (client) => {
|
|
19
19
|
const stream = client.statistics(req, ...this.callArguments(baseOptions));
|
|
20
20
|
return new Promise((resolve, reject) => {
|
|
21
21
|
const projectionDetails = [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listProjections.js","sourceRoot":"","sources":["../../src/projections/listProjections.ts"],"names":[],"mappings":";;AAEA,
|
|
1
|
+
{"version":3,"file":"listProjections.js","sourceRoot":"","sources":["../../src/projections/listProjections.ts"],"names":[],"mappings":";;AAEA,gFAAyE;AACzE,sHAAwG;AACxG,4GAGwE;AAGxE,oCAAwD;AACxD,sCAAmC;AAEnC,+EAA4E;AAgB5E,eAAM,CAAC,SAAS,CAAC,eAAe,GAAG,KAAK,WAEtC,cAAsC,EAAE;IAExC,MAAM,OAAO,GAAG,IAAI,uCAAa,CAAC,OAAO,EAAE,CAAC;IAC5C,OAAO,CAAC,aAAa,CAAC,IAAI,iBAAK,EAAE,CAAC,CAAC;IAEnC,MAAM,GAAG,GAAG,IAAI,uCAAa,EAAE,CAAC;IAChC,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IAExB,aAAK,CAAC,OAAO,CAAC,QAAQ,EAAE,iBAAiB,EAAE;QACzC,OAAO,EAAE,WAAW;KACrB,CAAC,CAAC;IACH,aAAK,CAAC,YAAY,CAAC,QAAQ,EAAE,iBAAiB,EAAE,GAAG,CAAC,CAAC;IAErD,OAAO,IAAI,CAAC,OAAO,CAAC,gDAAiB,EAAE,iBAAiB,EAAE,CAAC,MAAM,EAAE,EAAE;QACnE,MAAM,MAAM,GAAG,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,CAAC;QAE1E,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACrC,MAAM,iBAAiB,GAAwB,EAAE,CAAC;YAElD,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,KAAmB,EAAE,EAAE;gBACzC,MAAM,CAAC,IAAA,6BAAqB,EAAC,KAAK,CAAC,CAAC,CAAC;YACvC,CAAC,CAAC,CAAC;YAEH,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,IAAoB,EAAE,EAAE;gBACzC,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;oBAAE,OAAO;gBAC/B,iBAAiB,CAAC,IAAI,CAAC,IAAA,mDAAwB,EAAC,IAAI,CAAC,UAAU,EAAG,CAAC,CAAC,CAAC;YACvE,CAAC,CAAC,CAAC;YAEH,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE;gBACpB,OAAO,CAAC,iBAAiB,CAAC,CAAC;YAC7B,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
4
|
-
const
|
|
3
|
+
const projectionmanagement_grpc_pb_1 = require("../../generated/kurrentdb/protocols/v1/projectionmanagement_grpc_pb");
|
|
4
|
+
const projectionmanagement_pb_1 = require("../../generated/kurrentdb/protocols/v1/projectionmanagement_pb");
|
|
5
5
|
const Client_1 = require("../Client");
|
|
6
6
|
const utils_1 = require("../utils");
|
|
7
7
|
Client_1.Client.prototype.resetProjection = async function (projectionName, baseOptions = {}) {
|
|
8
|
-
const req = new
|
|
9
|
-
const options = new
|
|
8
|
+
const req = new projectionmanagement_pb_1.ResetReq();
|
|
9
|
+
const options = new projectionmanagement_pb_1.ResetReq.Options();
|
|
10
10
|
options.setName(projectionName);
|
|
11
11
|
req.setOptions(options);
|
|
12
12
|
utils_1.debug.command("resetProjection: %O", {
|
|
@@ -14,7 +14,7 @@ Client_1.Client.prototype.resetProjection = async function (projectionName, base
|
|
|
14
14
|
options: baseOptions,
|
|
15
15
|
});
|
|
16
16
|
utils_1.debug.command_grpc("resetProjection: %g", req);
|
|
17
|
-
return this.execute(
|
|
17
|
+
return this.execute(projectionmanagement_grpc_pb_1.ProjectionsClient, "resetProjection", (client) => new Promise((resolve, reject) => {
|
|
18
18
|
client.reset(req, ...this.callArguments(baseOptions), (error) => {
|
|
19
19
|
if (error)
|
|
20
20
|
return reject((0, utils_1.convertToCommandError)(error));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resetProjection.js","sourceRoot":"","sources":["../../src/projections/resetProjection.ts"],"names":[],"mappings":";;AAAA,
|
|
1
|
+
{"version":3,"file":"resetProjection.js","sourceRoot":"","sources":["../../src/projections/resetProjection.ts"],"names":[],"mappings":";;AAAA,sHAAwG;AACxG,4GAA0F;AAE1F,sCAAmC;AAEnC,oCAAwD;AAmBxD,eAAM,CAAC,SAAS,CAAC,eAAe,GAAG,KAAK,WAEtC,cAAsB,EACtB,cAAsC,EAAE;IAExC,MAAM,GAAG,GAAG,IAAI,kCAAQ,EAAE,CAAC;IAC3B,MAAM,OAAO,GAAG,IAAI,kCAAQ,CAAC,OAAO,EAAE,CAAC;IAEvC,OAAO,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;IAEhC,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IAExB,aAAK,CAAC,OAAO,CAAC,qBAAqB,EAAE;QACnC,cAAc;QACd,OAAO,EAAE,WAAW;KACrB,CAAC,CAAC;IACH,aAAK,CAAC,YAAY,CAAC,qBAAqB,EAAE,GAAG,CAAC,CAAC;IAE/C,OAAO,IAAI,CAAC,OAAO,CACjB,gDAAiB,EACjB,iBAAiB,EACjB,CAAC,MAAM,EAAE,EAAE,CACT,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACpC,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,aAAa,CAAC,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,EAAE;YAC9D,IAAI,KAAK;gBAAE,OAAO,MAAM,CAAC,IAAA,6BAAqB,EAAC,KAAK,CAAC,CAAC,CAAC;YACvD,OAAO,OAAO,EAAE,CAAC;QACnB,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CACL,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
4
|
-
const shared_pb_1 = require("../../generated/shared_pb");
|
|
3
|
+
const projectionmanagement_grpc_pb_1 = require("../../generated/kurrentdb/protocols/v1/projectionmanagement_grpc_pb");
|
|
4
|
+
const shared_pb_1 = require("../../generated/kurrentdb/protocols/v1/shared_pb");
|
|
5
5
|
const Client_1 = require("../Client");
|
|
6
6
|
const utils_1 = require("../utils");
|
|
7
7
|
Client_1.Client.prototype.restartSubsystem = async function (baseOptions = {}) {
|
|
@@ -10,7 +10,7 @@ Client_1.Client.prototype.restartSubsystem = async function (baseOptions = {}) {
|
|
|
10
10
|
options: baseOptions,
|
|
11
11
|
});
|
|
12
12
|
utils_1.debug.command_grpc("restartSubsystem: %g", req);
|
|
13
|
-
return this.execute(
|
|
13
|
+
return this.execute(projectionmanagement_grpc_pb_1.ProjectionsClient, "restartSubsystem", (client) => new Promise((resolve, reject) => {
|
|
14
14
|
client.restartSubsystem(req, ...this.callArguments(baseOptions), (error) => {
|
|
15
15
|
if (error)
|
|
16
16
|
return reject((0, utils_1.convertToCommandError)(error));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"restartSubsystem.js","sourceRoot":"","sources":["../../src/projections/restartSubsystem.ts"],"names":[],"mappings":";;AAAA,
|
|
1
|
+
{"version":3,"file":"restartSubsystem.js","sourceRoot":"","sources":["../../src/projections/restartSubsystem.ts"],"names":[],"mappings":";;AAAA,sHAAwG;AACxG,gFAAyE;AAEzE,sCAAmC;AAEnC,oCAAwD;AAcxD,eAAM,CAAC,SAAS,CAAC,gBAAgB,GAAG,KAAK,WAEvC,cAAuC,EAAE;IAEzC,MAAM,GAAG,GAAG,IAAI,iBAAK,EAAE,CAAC;IAExB,aAAK,CAAC,OAAO,CAAC,sBAAsB,EAAE;QACpC,OAAO,EAAE,WAAW;KACrB,CAAC,CAAC;IACH,aAAK,CAAC,YAAY,CAAC,sBAAsB,EAAE,GAAG,CAAC,CAAC;IAEhD,OAAO,IAAI,CAAC,OAAO,CACjB,gDAAiB,EACjB,kBAAkB,EAClB,CAAC,MAAM,EAAE,EAAE,CACT,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACpC,MAAM,CAAC,gBAAgB,CACrB,GAAG,EACH,GAAG,IAAI,CAAC,aAAa,CAAC,WAAW,CAAC,EAClC,CAAC,KAAK,EAAE,EAAE;YACR,IAAI,KAAK;gBAAE,OAAO,MAAM,CAAC,IAAA,6BAAqB,EAAC,KAAK,CAAC,CAAC,CAAC;YACvD,OAAO,OAAO,EAAE,CAAC;QACnB,CAAC,CACF,CAAC;IACJ,CAAC,CAAC,CACL,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
const shared_pb_1 = require("../../generated/shared_pb");
|
|
3
|
+
const projectionmanagement_grpc_pb_1 = require("../../generated/kurrentdb/protocols/v1/projectionmanagement_grpc_pb");
|
|
4
|
+
const projectionmanagement_pb_1 = require("../../generated/kurrentdb/protocols/v1/projectionmanagement_pb");
|
|
5
|
+
const shared_pb_1 = require("../../generated/kurrentdb/protocols/v1/shared_pb");
|
|
6
6
|
const Client_1 = require("../Client");
|
|
7
7
|
const utils_1 = require("../utils");
|
|
8
8
|
Client_1.Client.prototype.updateProjection = async function (projectionName, query, { emitEnabled, ...baseOptions } = {}) {
|
|
9
|
-
const req = new
|
|
10
|
-
const options = new
|
|
9
|
+
const req = new projectionmanagement_pb_1.UpdateReq();
|
|
10
|
+
const options = new projectionmanagement_pb_1.UpdateReq.Options();
|
|
11
11
|
options.setName(projectionName);
|
|
12
12
|
options.setQuery(query);
|
|
13
13
|
if (emitEnabled == null) {
|
|
@@ -23,7 +23,7 @@ Client_1.Client.prototype.updateProjection = async function (projectionName, que
|
|
|
23
23
|
options: { emitEnabled, ...baseOptions },
|
|
24
24
|
});
|
|
25
25
|
utils_1.debug.command_grpc("updateProjection: %g", req);
|
|
26
|
-
return this.execute(
|
|
26
|
+
return this.execute(projectionmanagement_grpc_pb_1.ProjectionsClient, "updateProjection", (client) => new Promise((resolve, reject) => {
|
|
27
27
|
client.update(req, ...this.callArguments(baseOptions), (error) => {
|
|
28
28
|
if (error)
|
|
29
29
|
return reject((0, utils_1.convertToCommandError)(error));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateProjection.js","sourceRoot":"","sources":["../../src/projections/updateProjection.ts"],"names":[],"mappings":";;AAAA,
|
|
1
|
+
{"version":3,"file":"updateProjection.js","sourceRoot":"","sources":["../../src/projections/updateProjection.ts"],"names":[],"mappings":";;AAAA,sHAAwG;AACxG,4GAA2F;AAC3F,gFAAyE;AAEzE,sCAAmC;AAEnC,oCAAwD;AA2BxD,eAAM,CAAC,SAAS,CAAC,gBAAgB,GAAG,KAAK,WAEvC,cAAsB,EACtB,KAAa,EACb,EAAE,WAAW,EAAE,GAAG,WAAW,KAA8B,EAAE;IAE7D,MAAM,GAAG,GAAG,IAAI,mCAAS,EAAE,CAAC;IAC5B,MAAM,OAAO,GAAG,IAAI,mCAAS,CAAC,OAAO,EAAE,CAAC;IAExC,OAAO,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;IAChC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAExB,IAAI,WAAW,IAAI,IAAI,EAAE,CAAC;QACxB,OAAO,CAAC,gBAAgB,CAAC,IAAI,iBAAK,EAAE,CAAC,CAAC;IACxC,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;IACtC,CAAC;IAED,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IAExB,aAAK,CAAC,OAAO,CAAC,sBAAsB,EAAE;QACpC,cAAc;QACd,KAAK;QACL,OAAO,EAAE,EAAE,WAAW,EAAE,GAAG,WAAW,EAAE;KACzC,CAAC,CAAC;IACH,aAAK,CAAC,YAAY,CAAC,sBAAsB,EAAE,GAAG,CAAC,CAAC;IAEhD,OAAO,IAAI,CAAC,OAAO,CACjB,gDAAiB,EACjB,kBAAkB,EAClB,CAAC,MAAM,EAAE,EAAE,CACT,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACpC,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,aAAa,CAAC,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,EAAE;YAC/D,IAAI,KAAK;gBAAE,OAAO,MAAM,CAAC,IAAA,6BAAqB,EAAC,KAAK,CAAC,CAAC,CAAC;YACvD,OAAO,OAAO,EAAE,CAAC;QACnB,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CACL,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { StatisticsResp } from "../../../generated/
|
|
1
|
+
import type { StatisticsResp } from "../../../generated/kurrentdb/protocols/v1/projectionmanagement_pb";
|
|
2
2
|
import type { ProjectionDetails } from "../../types";
|
|
3
3
|
export declare const mapGrpcProjectionDetails: (grpcProjectionDetails: StatisticsResp.Details) => ProjectionDetails;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { CheckSchemaCompatibilityOptions, CheckSchemaCompatibilityResult } from "./types";
|
|
2
|
+
declare module "../Client" {
|
|
3
|
+
interface Client {
|
|
4
|
+
/**
|
|
5
|
+
* Checks if a schema definition is compatible with an existing schema.
|
|
6
|
+
* @param schemaDefinition - The schema definition to check.
|
|
7
|
+
* @param options - Options specifying the schema or version to check against, and the data format.
|
|
8
|
+
* @returns The compatibility result including any errors.
|
|
9
|
+
*/
|
|
10
|
+
checkSchemaCompatibility(schemaDefinition: string | Uint8Array, options: CheckSchemaCompatibilityOptions): Promise<CheckSchemaCompatibilityResult>;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const service_grpc_pb_1 = require("../../generated/kurrentdb/protocols/v2/registry/service_grpc_pb");
|
|
4
|
+
const validation_pb_1 = require("../../generated/kurrentdb/protocols/v2/registry/validation_pb");
|
|
5
|
+
const Client_1 = require("../Client");
|
|
6
|
+
const utils_1 = require("../utils");
|
|
7
|
+
const mappers_1 = require("./utils/mappers");
|
|
8
|
+
Client_1.Client.prototype.checkSchemaCompatibility = async function (schemaDefinition, options) {
|
|
9
|
+
const { schemaName, schemaVersionId, dataFormat, ...baseOptions } = options;
|
|
10
|
+
if (!schemaName && !schemaVersionId) {
|
|
11
|
+
throw new Error("Either schemaName or schemaVersionId must be provided in options");
|
|
12
|
+
}
|
|
13
|
+
const req = new validation_pb_1.CheckSchemaCompatibilityRequest();
|
|
14
|
+
req.setDefinition((0, mappers_1.toSchemaDefinitionBytes)(schemaDefinition));
|
|
15
|
+
req.setDataFormat((0, mappers_1.mapSchemaDataFormatToGrpc)(dataFormat));
|
|
16
|
+
if (schemaName !== undefined) {
|
|
17
|
+
req.setSchemaName(schemaName);
|
|
18
|
+
}
|
|
19
|
+
else if (schemaVersionId !== undefined) {
|
|
20
|
+
req.setSchemaVersionId(schemaVersionId);
|
|
21
|
+
}
|
|
22
|
+
utils_1.debug.command("checkSchemaCompatibility: %O", {
|
|
23
|
+
schemaName,
|
|
24
|
+
schemaVersionId,
|
|
25
|
+
dataFormat,
|
|
26
|
+
definitionLength: typeof schemaDefinition === "string"
|
|
27
|
+
? schemaDefinition.length
|
|
28
|
+
: schemaDefinition.byteLength,
|
|
29
|
+
options: baseOptions,
|
|
30
|
+
});
|
|
31
|
+
utils_1.debug.command_grpc("checkSchemaCompatibility: %g", req);
|
|
32
|
+
return this.execute(service_grpc_pb_1.SchemaRegistryServiceClient, "checkSchemaCompatibility", (client) => new Promise((resolve, reject) => {
|
|
33
|
+
client.checkSchemaCompatibility(req, ...this.callArguments(baseOptions), (error, response) => {
|
|
34
|
+
if (error)
|
|
35
|
+
return reject((0, utils_1.convertToCommandError)(error));
|
|
36
|
+
const success = response?.getSuccess();
|
|
37
|
+
if (success) {
|
|
38
|
+
return resolve({
|
|
39
|
+
isCompatible: true,
|
|
40
|
+
schemaVersionId: success.getSchemaVersionId(),
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
const failure = response?.getFailure();
|
|
44
|
+
if (failure) {
|
|
45
|
+
return resolve({
|
|
46
|
+
isCompatible: false,
|
|
47
|
+
errors: failure
|
|
48
|
+
.getErrorsList()
|
|
49
|
+
.map(mappers_1.mapGrpcSchemaCompatibilityError),
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
// Default to incompatible with no errors if response is empty
|
|
53
|
+
return resolve({
|
|
54
|
+
isCompatible: false,
|
|
55
|
+
errors: [],
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
}));
|
|
59
|
+
};
|
|
60
|
+
//# sourceMappingURL=checkSchemaCompatibility.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkSchemaCompatibility.js","sourceRoot":"","sources":["../../src/schemaRegistry/checkSchemaCompatibility.ts"],"names":[],"mappings":";;AAAA,qGAA8G;AAC9G,iGAAgH;AAEhH,sCAAmC;AACnC,oCAAwD;AAMxD,6CAIyB;AAiBzB,eAAM,CAAC,SAAS,CAAC,wBAAwB,GAAG,KAAK,WAE/C,gBAAqC,EACrC,OAAwC;IAExC,MAAM,EAAE,UAAU,EAAE,eAAe,EAAE,UAAU,EAAE,GAAG,WAAW,EAAE,GAAG,OAAO,CAAC;IAE5E,IAAI,CAAC,UAAU,IAAI,CAAC,eAAe,EAAE,CAAC;QACpC,MAAM,IAAI,KAAK,CACb,kEAAkE,CACnE,CAAC;IACJ,CAAC;IAED,MAAM,GAAG,GAAG,IAAI,+CAA+B,EAAE,CAAC;IAClD,GAAG,CAAC,aAAa,CAAC,IAAA,iCAAuB,EAAC,gBAAgB,CAAC,CAAC,CAAC;IAC7D,GAAG,CAAC,aAAa,CAAC,IAAA,mCAAyB,EAAC,UAAU,CAAC,CAAC,CAAC;IAEzD,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;QAC7B,GAAG,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;IAChC,CAAC;SAAM,IAAI,eAAe,KAAK,SAAS,EAAE,CAAC;QACzC,GAAG,CAAC,kBAAkB,CAAC,eAAe,CAAC,CAAC;IAC1C,CAAC;IAED,aAAK,CAAC,OAAO,CAAC,8BAA8B,EAAE;QAC5C,UAAU;QACV,eAAe;QACf,UAAU;QACV,gBAAgB,EACd,OAAO,gBAAgB,KAAK,QAAQ;YAClC,CAAC,CAAC,gBAAgB,CAAC,MAAM;YACzB,CAAC,CAAC,gBAAgB,CAAC,UAAU;QACjC,OAAO,EAAE,WAAW;KACrB,CAAC,CAAC;IACH,aAAK,CAAC,YAAY,CAAC,8BAA8B,EAAE,GAAG,CAAC,CAAC;IAExD,OAAO,IAAI,CAAC,OAAO,CACjB,6CAA2B,EAC3B,0BAA0B,EAC1B,CAAC,MAAM,EAAE,EAAE,CACT,IAAI,OAAO,CAAiC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QAC9D,MAAM,CAAC,wBAAwB,CAC7B,GAAG,EACH,GAAG,IAAI,CAAC,aAAa,CAAC,WAAW,CAAC,EAClC,CAAC,KAAK,EAAE,QAAQ,EAAE,EAAE;YAClB,IAAI,KAAK;gBAAE,OAAO,MAAM,CAAC,IAAA,6BAAqB,EAAC,KAAK,CAAC,CAAC,CAAC;YAEvD,MAAM,OAAO,GAAG,QAAQ,EAAE,UAAU,EAAE,CAAC;YACvC,IAAI,OAAO,EAAE,CAAC;gBACZ,OAAO,OAAO,CAAC;oBACb,YAAY,EAAE,IAAI;oBAClB,eAAe,EAAE,OAAO,CAAC,kBAAkB,EAAE;iBAC9C,CAAC,CAAC;YACL,CAAC;YAED,MAAM,OAAO,GAAG,QAAQ,EAAE,UAAU,EAAE,CAAC;YACvC,IAAI,OAAO,EAAE,CAAC;gBACZ,OAAO,OAAO,CAAC;oBACb,YAAY,EAAE,KAAK;oBACnB,MAAM,EAAE,OAAO;yBACZ,aAAa,EAAE;yBACf,GAAG,CAAC,yCAA+B,CAAC;iBACxC,CAAC,CAAC;YACL,CAAC;YAED,8DAA8D;YAC9D,OAAO,OAAO,CAAC;gBACb,YAAY,EAAE,KAAK;gBACnB,MAAM,EAAE,EAAE;aACX,CAAC,CAAC;QACL,CAAC,CACF,CAAC;IACJ,CAAC,CAAC,CACL,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { CreateSchemaOptions, CreateSchemaResult, SchemaDetails } from "./types";
|
|
2
|
+
declare module "../Client" {
|
|
3
|
+
interface Client {
|
|
4
|
+
/**
|
|
5
|
+
* Creates a new schema in the schema registry.
|
|
6
|
+
* @param schemaName - The name of the schema to create.
|
|
7
|
+
* @param details - The schema details including data format and compatibility mode.
|
|
8
|
+
* @param options - Optional settings including initial schema definition.
|
|
9
|
+
* @returns The result containing schema version ID and version number if a definition was provided.
|
|
10
|
+
*/
|
|
11
|
+
createSchema(schemaName: string, details: SchemaDetails, options?: CreateSchemaOptions): Promise<CreateSchemaResult>;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const service_grpc_pb_1 = require("../../generated/kurrentdb/protocols/v2/registry/service_grpc_pb");
|
|
4
|
+
const schemas_pb_1 = require("../../generated/kurrentdb/protocols/v2/registry/schemas_pb");
|
|
5
|
+
const Client_1 = require("../Client");
|
|
6
|
+
const utils_1 = require("../utils");
|
|
7
|
+
const mappers_1 = require("./utils/mappers");
|
|
8
|
+
Client_1.Client.prototype.createSchema = async function (schemaName, details, options = {}) {
|
|
9
|
+
const { schemaDefinition, ...baseOptions } = options;
|
|
10
|
+
const req = new schemas_pb_1.CreateSchemaRequest();
|
|
11
|
+
req.setSchemaName(schemaName);
|
|
12
|
+
req.setDetails((0, mappers_1.createGrpcSchemaDetails)(details));
|
|
13
|
+
if (schemaDefinition !== undefined) {
|
|
14
|
+
req.setSchemaDefinition((0, mappers_1.toSchemaDefinitionBytes)(schemaDefinition));
|
|
15
|
+
}
|
|
16
|
+
utils_1.debug.command("createSchema: %O", {
|
|
17
|
+
schemaName,
|
|
18
|
+
details,
|
|
19
|
+
hasDefinition: schemaDefinition !== undefined,
|
|
20
|
+
options: baseOptions,
|
|
21
|
+
});
|
|
22
|
+
utils_1.debug.command_grpc("createSchema: %g", req);
|
|
23
|
+
return this.execute(service_grpc_pb_1.SchemaRegistryServiceClient, "createSchema", (client) => new Promise((resolve, reject) => {
|
|
24
|
+
client.createSchema(req, ...this.callArguments(baseOptions), (error, response) => {
|
|
25
|
+
if (error)
|
|
26
|
+
return reject((0, utils_1.convertToCommandError)(error));
|
|
27
|
+
const result = {};
|
|
28
|
+
if (schemaDefinition !== undefined && response) {
|
|
29
|
+
result.schemaVersionId = response.getSchemaVersionId();
|
|
30
|
+
result.versionNumber = response.getVersionNumber();
|
|
31
|
+
}
|
|
32
|
+
return resolve(result);
|
|
33
|
+
});
|
|
34
|
+
}));
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=createSchema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createSchema.js","sourceRoot":"","sources":["../../src/schemaRegistry/createSchema.ts"],"names":[],"mappings":";;AAAA,qGAA8G;AAC9G,2FAAiG;AAEjG,sCAAmC;AACnC,oCAAwD;AAOxD,6CAGyB;AAmBzB,eAAM,CAAC,SAAS,CAAC,YAAY,GAAG,KAAK,WAEnC,UAAkB,EAClB,OAAsB,EACtB,UAA+B,EAAE;IAEjC,MAAM,EAAE,gBAAgB,EAAE,GAAG,WAAW,EAAE,GAAG,OAAO,CAAC;IAErD,MAAM,GAAG,GAAG,IAAI,gCAAmB,EAAE,CAAC;IACtC,GAAG,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;IAC9B,GAAG,CAAC,UAAU,CAAC,IAAA,iCAAuB,EAAC,OAAO,CAAC,CAAC,CAAC;IAEjD,IAAI,gBAAgB,KAAK,SAAS,EAAE,CAAC;QACnC,GAAG,CAAC,mBAAmB,CAAC,IAAA,iCAAuB,EAAC,gBAAgB,CAAC,CAAC,CAAC;IACrE,CAAC;IAED,aAAK,CAAC,OAAO,CAAC,kBAAkB,EAAE;QAChC,UAAU;QACV,OAAO;QACP,aAAa,EAAE,gBAAgB,KAAK,SAAS;QAC7C,OAAO,EAAE,WAAW;KACrB,CAAC,CAAC;IACH,aAAK,CAAC,YAAY,CAAC,kBAAkB,EAAE,GAAG,CAAC,CAAC;IAE5C,OAAO,IAAI,CAAC,OAAO,CACjB,6CAA2B,EAC3B,cAAc,EACd,CAAC,MAAM,EAAE,EAAE,CACT,IAAI,OAAO,CAAqB,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QAClD,MAAM,CAAC,YAAY,CACjB,GAAG,EACH,GAAG,IAAI,CAAC,aAAa,CAAC,WAAW,CAAC,EAClC,CAAC,KAAK,EAAE,QAAQ,EAAE,EAAE;YAClB,IAAI,KAAK;gBAAE,OAAO,MAAM,CAAC,IAAA,6BAAqB,EAAC,KAAK,CAAC,CAAC,CAAC;YAEvD,MAAM,MAAM,GAAuB,EAAE,CAAC;YACtC,IAAI,gBAAgB,KAAK,SAAS,IAAI,QAAQ,EAAE,CAAC;gBAC/C,MAAM,CAAC,eAAe,GAAG,QAAQ,CAAC,kBAAkB,EAAE,CAAC;gBACvD,MAAM,CAAC,aAAa,GAAG,QAAQ,CAAC,gBAAgB,EAAE,CAAC;YACrD,CAAC;YACD,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC;QACzB,CAAC,CACF,CAAC;IACJ,CAAC,CAAC,CACL,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { DeleteSchemaOptions } from "./types";
|
|
2
|
+
declare module "../Client" {
|
|
3
|
+
interface Client {
|
|
4
|
+
/**
|
|
5
|
+
* Deletes a schema and all its versions from the registry.
|
|
6
|
+
* @param schemaName - The name of the schema to delete.
|
|
7
|
+
* @param options - Command options.
|
|
8
|
+
*/
|
|
9
|
+
deleteSchema(schemaName: string, options?: DeleteSchemaOptions): Promise<void>;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const service_grpc_pb_1 = require("../../generated/kurrentdb/protocols/v2/registry/service_grpc_pb");
|
|
4
|
+
const schemas_pb_1 = require("../../generated/kurrentdb/protocols/v2/registry/schemas_pb");
|
|
5
|
+
const Client_1 = require("../Client");
|
|
6
|
+
const utils_1 = require("../utils");
|
|
7
|
+
Client_1.Client.prototype.deleteSchema = async function (schemaName, options = {}) {
|
|
8
|
+
const req = new schemas_pb_1.DeleteSchemaRequest();
|
|
9
|
+
req.setSchemaName(schemaName);
|
|
10
|
+
utils_1.debug.command("deleteSchema: %O", {
|
|
11
|
+
schemaName,
|
|
12
|
+
options,
|
|
13
|
+
});
|
|
14
|
+
utils_1.debug.command_grpc("deleteSchema: %g", req);
|
|
15
|
+
return this.execute(service_grpc_pb_1.SchemaRegistryServiceClient, "deleteSchema", (client) => new Promise((resolve, reject) => {
|
|
16
|
+
client.deleteSchema(req, ...this.callArguments(options), (error) => {
|
|
17
|
+
if (error)
|
|
18
|
+
return reject((0, utils_1.convertToCommandError)(error));
|
|
19
|
+
return resolve();
|
|
20
|
+
});
|
|
21
|
+
}));
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=deleteSchema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deleteSchema.js","sourceRoot":"","sources":["../../src/schemaRegistry/deleteSchema.ts"],"names":[],"mappings":";;AAAA,qGAA8G;AAC9G,2FAAiG;AAEjG,sCAAmC;AACnC,oCAAwD;AAkBxD,eAAM,CAAC,SAAS,CAAC,YAAY,GAAG,KAAK,WAEnC,UAAkB,EAClB,UAA+B,EAAE;IAEjC,MAAM,GAAG,GAAG,IAAI,gCAAmB,EAAE,CAAC;IACtC,GAAG,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;IAE9B,aAAK,CAAC,OAAO,CAAC,kBAAkB,EAAE;QAChC,UAAU;QACV,OAAO;KACR,CAAC,CAAC;IACH,aAAK,CAAC,YAAY,CAAC,kBAAkB,EAAE,GAAG,CAAC,CAAC;IAE5C,OAAO,IAAI,CAAC,OAAO,CACjB,6CAA2B,EAC3B,cAAc,EACd,CAAC,MAAM,EAAE,EAAE,CACT,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACpC,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,EAAE;YACjE,IAAI,KAAK;gBAAE,OAAO,MAAM,CAAC,IAAA,6BAAqB,EAAC,KAAK,CAAC,CAAC,CAAC;YACvD,OAAO,OAAO,EAAE,CAAC;QACnB,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CACL,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { DeleteSchemaVersionsOptions, DeleteSchemaVersionsResult } from "./types";
|
|
2
|
+
declare module "../Client" {
|
|
3
|
+
interface Client {
|
|
4
|
+
/**
|
|
5
|
+
* Deletes specific versions of a schema.
|
|
6
|
+
* @param schemaName - The name of the schema.
|
|
7
|
+
* @param versions - The version numbers to delete.
|
|
8
|
+
* @param options - Command options.
|
|
9
|
+
* @returns Any errors that occurred during deletion.
|
|
10
|
+
*/
|
|
11
|
+
deleteSchemaVersions(schemaName: string, versions: number[], options?: DeleteSchemaVersionsOptions): Promise<DeleteSchemaVersionsResult>;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const service_grpc_pb_1 = require("../../generated/kurrentdb/protocols/v2/registry/service_grpc_pb");
|
|
4
|
+
const schemas_pb_1 = require("../../generated/kurrentdb/protocols/v2/registry/schemas_pb");
|
|
5
|
+
const Client_1 = require("../Client");
|
|
6
|
+
const utils_1 = require("../utils");
|
|
7
|
+
const mappers_1 = require("./utils/mappers");
|
|
8
|
+
Client_1.Client.prototype.deleteSchemaVersions = async function (schemaName, versions, options = {}) {
|
|
9
|
+
const req = new schemas_pb_1.DeleteSchemaVersionsRequest();
|
|
10
|
+
req.setSchemaName(schemaName);
|
|
11
|
+
req.setVersionsList(versions);
|
|
12
|
+
utils_1.debug.command("deleteSchemaVersions: %O", {
|
|
13
|
+
schemaName,
|
|
14
|
+
versions,
|
|
15
|
+
options,
|
|
16
|
+
});
|
|
17
|
+
utils_1.debug.command_grpc("deleteSchemaVersions: %g", req);
|
|
18
|
+
return this.execute(service_grpc_pb_1.SchemaRegistryServiceClient, "deleteSchemaVersions", (client) => new Promise((resolve, reject) => {
|
|
19
|
+
client.deleteSchemaVersions(req, ...this.callArguments(options), (error, response) => {
|
|
20
|
+
if (error)
|
|
21
|
+
return reject((0, utils_1.convertToCommandError)(error));
|
|
22
|
+
const errors = response?.getErrorsList() ?? [];
|
|
23
|
+
return resolve({
|
|
24
|
+
errors: errors.map(mappers_1.mapGrpcSchemaVersionError),
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
}));
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=deleteSchemaVersions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deleteSchemaVersions.js","sourceRoot":"","sources":["../../src/schemaRegistry/deleteSchemaVersions.ts"],"names":[],"mappings":";;AAAA,qGAA8G;AAC9G,2FAAyG;AAEzG,sCAAmC;AACnC,oCAAwD;AACxD,6CAA4D;AAwB5D,eAAM,CAAC,SAAS,CAAC,oBAAoB,GAAG,KAAK,WAE3C,UAAkB,EAClB,QAAkB,EAClB,UAAuC,EAAE;IAEzC,MAAM,GAAG,GAAG,IAAI,wCAA2B,EAAE,CAAC;IAC9C,GAAG,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;IAC9B,GAAG,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC;IAE9B,aAAK,CAAC,OAAO,CAAC,0BAA0B,EAAE;QACxC,UAAU;QACV,QAAQ;QACR,OAAO;KACR,CAAC,CAAC;IACH,aAAK,CAAC,YAAY,CAAC,0BAA0B,EAAE,GAAG,CAAC,CAAC;IAEpD,OAAO,IAAI,CAAC,OAAO,CACjB,6CAA2B,EAC3B,sBAAsB,EACtB,CAAC,MAAM,EAAE,EAAE,CACT,IAAI,OAAO,CAA6B,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QAC1D,MAAM,CAAC,oBAAoB,CACzB,GAAG,EACH,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,EAC9B,CAAC,KAAK,EAAE,QAAQ,EAAE,EAAE;YAClB,IAAI,KAAK;gBAAE,OAAO,MAAM,CAAC,IAAA,6BAAqB,EAAC,KAAK,CAAC,CAAC,CAAC;YAEvD,MAAM,MAAM,GAAG,QAAQ,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC;YAC/C,OAAO,OAAO,CAAC;gBACb,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,mCAAyB,CAAC;aAC9C,CAAC,CAAC;QACL,CAAC,CACF,CAAC;IACJ,CAAC,CAAC,CACL,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { GetSchemaOptions, Schema } from "./types";
|
|
2
|
+
declare module "../Client" {
|
|
3
|
+
interface Client {
|
|
4
|
+
/**
|
|
5
|
+
* Retrieves schema metadata by name.
|
|
6
|
+
* @param schemaName - The name of the schema to retrieve.
|
|
7
|
+
* @param options - Command options.
|
|
8
|
+
* @returns The schema metadata.
|
|
9
|
+
*/
|
|
10
|
+
getSchema(schemaName: string, options?: GetSchemaOptions): Promise<Schema>;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const service_grpc_pb_1 = require("../../generated/kurrentdb/protocols/v2/registry/service_grpc_pb");
|
|
4
|
+
const schemas_pb_1 = require("../../generated/kurrentdb/protocols/v2/registry/schemas_pb");
|
|
5
|
+
const Client_1 = require("../Client");
|
|
6
|
+
const utils_1 = require("../utils");
|
|
7
|
+
const mappers_1 = require("./utils/mappers");
|
|
8
|
+
Client_1.Client.prototype.getSchema = async function (schemaName, options = {}) {
|
|
9
|
+
const req = new schemas_pb_1.GetSchemaRequest();
|
|
10
|
+
req.setSchemaName(schemaName);
|
|
11
|
+
utils_1.debug.command("getSchema: %O", {
|
|
12
|
+
schemaName,
|
|
13
|
+
options,
|
|
14
|
+
});
|
|
15
|
+
utils_1.debug.command_grpc("getSchema: %g", req);
|
|
16
|
+
return this.execute(service_grpc_pb_1.SchemaRegistryServiceClient, "getSchema", (client) => new Promise((resolve, reject) => {
|
|
17
|
+
client.getSchema(req, ...this.callArguments(options), (error, response) => {
|
|
18
|
+
if (error)
|
|
19
|
+
return reject((0, utils_1.convertToCommandError)(error));
|
|
20
|
+
const grpcSchema = response?.getSchema();
|
|
21
|
+
if (!grpcSchema) {
|
|
22
|
+
return reject(new Error("Schema not found in response"));
|
|
23
|
+
}
|
|
24
|
+
return resolve((0, mappers_1.mapGrpcSchema)(grpcSchema));
|
|
25
|
+
});
|
|
26
|
+
}));
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=getSchema.js.map
|