@headspace/protos-events 0.0.1-y.2 → 0.0.1
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/lib/index.d.ts +45 -0
- package/lib/index.js +68 -0
- package/package.json +1 -1
- package/pingpong.proto +4 -0
package/lib/index.d.ts
CHANGED
|
@@ -395,6 +395,51 @@ export class Pong implements IPong {
|
|
|
395
395
|
public toJSON(): { [k: string]: any };
|
|
396
396
|
}
|
|
397
397
|
|
|
398
|
+
/** Represents a PingPongService */
|
|
399
|
+
export class PingPongService extends $protobuf.rpc.Service {
|
|
400
|
+
|
|
401
|
+
/**
|
|
402
|
+
* Constructs a new PingPongService service.
|
|
403
|
+
* @param rpcImpl RPC implementation
|
|
404
|
+
* @param [requestDelimited=false] Whether requests are length-delimited
|
|
405
|
+
* @param [responseDelimited=false] Whether responses are length-delimited
|
|
406
|
+
*/
|
|
407
|
+
constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean);
|
|
408
|
+
|
|
409
|
+
/**
|
|
410
|
+
* Creates new PingPongService service using the specified rpc implementation.
|
|
411
|
+
* @param rpcImpl RPC implementation
|
|
412
|
+
* @param [requestDelimited=false] Whether requests are length-delimited
|
|
413
|
+
* @param [responseDelimited=false] Whether responses are length-delimited
|
|
414
|
+
* @returns RPC service. Useful where requests and/or responses are streamed.
|
|
415
|
+
*/
|
|
416
|
+
public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): PingPongService;
|
|
417
|
+
|
|
418
|
+
/**
|
|
419
|
+
* Calls ping.
|
|
420
|
+
* @param request Ping message or plain object
|
|
421
|
+
* @param callback Node-style callback called with the error, if any, and Pong
|
|
422
|
+
*/
|
|
423
|
+
public ping(request: IPing, callback: PingPongService.pingCallback): void;
|
|
424
|
+
|
|
425
|
+
/**
|
|
426
|
+
* Calls ping.
|
|
427
|
+
* @param request Ping message or plain object
|
|
428
|
+
* @returns Promise
|
|
429
|
+
*/
|
|
430
|
+
public ping(request: IPing): Promise<Pong>;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
export namespace PingPongService {
|
|
434
|
+
|
|
435
|
+
/**
|
|
436
|
+
* Callback as used by {@link PingPongService#ping}.
|
|
437
|
+
* @param error Error, if any
|
|
438
|
+
* @param [response] Pong
|
|
439
|
+
*/
|
|
440
|
+
type pingCallback = (error: (Error|null), response?: Pong) => void;
|
|
441
|
+
}
|
|
442
|
+
|
|
398
443
|
/** Properties of a SubscriptionCreated. */
|
|
399
444
|
export interface ISubscriptionCreated {
|
|
400
445
|
|
package/lib/index.js
CHANGED
|
@@ -949,6 +949,74 @@ $root.Pong = (function() {
|
|
|
949
949
|
return Pong;
|
|
950
950
|
})();
|
|
951
951
|
|
|
952
|
+
$root.PingPongService = (function() {
|
|
953
|
+
|
|
954
|
+
/**
|
|
955
|
+
* Constructs a new PingPongService service.
|
|
956
|
+
* @exports PingPongService
|
|
957
|
+
* @classdesc Represents a PingPongService
|
|
958
|
+
* @extends $protobuf.rpc.Service
|
|
959
|
+
* @constructor
|
|
960
|
+
* @param {$protobuf.RPCImpl} rpcImpl RPC implementation
|
|
961
|
+
* @param {boolean} [requestDelimited=false] Whether requests are length-delimited
|
|
962
|
+
* @param {boolean} [responseDelimited=false] Whether responses are length-delimited
|
|
963
|
+
*/
|
|
964
|
+
function PingPongService(rpcImpl, requestDelimited, responseDelimited) {
|
|
965
|
+
$protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited);
|
|
966
|
+
}
|
|
967
|
+
|
|
968
|
+
(PingPongService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = PingPongService;
|
|
969
|
+
|
|
970
|
+
/**
|
|
971
|
+
* Creates new PingPongService service using the specified rpc implementation.
|
|
972
|
+
* @function create
|
|
973
|
+
* @memberof PingPongService
|
|
974
|
+
* @static
|
|
975
|
+
* @param {$protobuf.RPCImpl} rpcImpl RPC implementation
|
|
976
|
+
* @param {boolean} [requestDelimited=false] Whether requests are length-delimited
|
|
977
|
+
* @param {boolean} [responseDelimited=false] Whether responses are length-delimited
|
|
978
|
+
* @returns {PingPongService} RPC service. Useful where requests and/or responses are streamed.
|
|
979
|
+
*/
|
|
980
|
+
PingPongService.create = function create(rpcImpl, requestDelimited, responseDelimited) {
|
|
981
|
+
return new this(rpcImpl, requestDelimited, responseDelimited);
|
|
982
|
+
};
|
|
983
|
+
|
|
984
|
+
/**
|
|
985
|
+
* Callback as used by {@link PingPongService#ping}.
|
|
986
|
+
* @memberof PingPongService
|
|
987
|
+
* @typedef pingCallback
|
|
988
|
+
* @type {function}
|
|
989
|
+
* @param {Error|null} error Error, if any
|
|
990
|
+
* @param {Pong} [response] Pong
|
|
991
|
+
*/
|
|
992
|
+
|
|
993
|
+
/**
|
|
994
|
+
* Calls ping.
|
|
995
|
+
* @function ping
|
|
996
|
+
* @memberof PingPongService
|
|
997
|
+
* @instance
|
|
998
|
+
* @param {IPing} request Ping message or plain object
|
|
999
|
+
* @param {PingPongService.pingCallback} callback Node-style callback called with the error, if any, and Pong
|
|
1000
|
+
* @returns {undefined}
|
|
1001
|
+
* @variation 1
|
|
1002
|
+
*/
|
|
1003
|
+
Object.defineProperty(PingPongService.prototype.ping = function ping(request, callback) {
|
|
1004
|
+
return this.rpcCall(ping, $root.Ping, $root.Pong, request, callback);
|
|
1005
|
+
}, "name", { value: "ping" });
|
|
1006
|
+
|
|
1007
|
+
/**
|
|
1008
|
+
* Calls ping.
|
|
1009
|
+
* @function ping
|
|
1010
|
+
* @memberof PingPongService
|
|
1011
|
+
* @instance
|
|
1012
|
+
* @param {IPing} request Ping message or plain object
|
|
1013
|
+
* @returns {Promise<Pong>} Promise
|
|
1014
|
+
* @variation 2
|
|
1015
|
+
*/
|
|
1016
|
+
|
|
1017
|
+
return PingPongService;
|
|
1018
|
+
})();
|
|
1019
|
+
|
|
952
1020
|
$root.SubscriptionCreated = (function() {
|
|
953
1021
|
|
|
954
1022
|
/**
|
package/package.json
CHANGED