UNPKG

@authzed/authzed-js-node

Version:
26 lines 1.35 kB
// @generated by protobuf-ts 2.9.1 with parameter generate_dependencies,long_type_string,client_grpc1 // @generated from protobuf file "authzed/api/v1/watch_service.proto" (package "authzed.api.v1", syntax proto3) // tslint:disable import { WatchService } from "./watch_service.js"; import * as grpc from "@grpc/grpc-js"; /** * @generated from protobuf service authzed.api.v1.WatchService */ export class WatchServiceClient extends grpc.Client { _binaryOptions; constructor(address, credentials, options = {}, binaryOptions = {}) { super(address, credentials, options); this._binaryOptions = binaryOptions; } /** * Watch returns a stream of events that occurred in the datastore in ascending timestamp order. * The events can be relationship updates, schema updates, or checkpoints. * * @generated from protobuf rpc: Watch(authzed.api.v1.WatchRequest) returns (stream authzed.api.v1.WatchResponse); */ watch(input, metadata, options) { const method = WatchService.methods[0]; return this.makeServerStreamRequest(`/${WatchService.typeName}/${method.name}`, (value) => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value) => method.O.fromBinary(value, this._binaryOptions), input, metadata, options); } } //# sourceMappingURL=watch_service.grpc-client.js.map