echofi-client
Version:
A comprehensive TypeScript/JavaScript client library for EchoFi services with automatic gRPC-Web code generation, unified service access, and real-time WebSocket communication.
109 lines • 5.74 kB
JavaScript
"use strict";
/**
* @fileoverview gRPC-Web generated client stub for stats
* @enhanceable
* @public
*/
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.StatsServiceClient = void 0;
// Code generated by protoc-gen-grpc-web. DO NOT EDIT.
// versions:
// protoc-gen-grpc-web v1.5.0
// protoc v3.19.1
// source: stats/service.proto
/* eslint-disable */
// @ts-nocheck
const grpcWeb = __importStar(require("grpc-web"));
const stats_service_pb = __importStar(require("./service_pb")); // proto import: "stats/service.proto"
class StatsServiceClient {
constructor(hostname, credentials, options) {
this.methodDescriptorGetUserStatistics = new grpcWeb.MethodDescriptor('/stats.StatsService/GetUserStatistics', grpcWeb.MethodType.UNARY, stats_service_pb.GetUserStatisticsRequest, stats_service_pb.GetUserStatisticsResponse, (request) => {
return request.serializeBinary();
}, stats_service_pb.GetUserStatisticsResponse.deserializeBinary);
this.methodDescriptorListUserStatistics = new grpcWeb.MethodDescriptor('/stats.StatsService/ListUserStatistics', grpcWeb.MethodType.UNARY, stats_service_pb.ListUserStatisticsRequest, stats_service_pb.ListUserStatisticsResponse, (request) => {
return request.serializeBinary();
}, stats_service_pb.ListUserStatisticsResponse.deserializeBinary);
this.methodDescriptorGetPointBoost = new grpcWeb.MethodDescriptor('/stats.StatsService/GetPointBoost', grpcWeb.MethodType.UNARY, stats_service_pb.GetPointBoostRequest, stats_service_pb.GetPointBoostResponse, (request) => {
return request.serializeBinary();
}, stats_service_pb.GetPointBoostResponse.deserializeBinary);
this.methodDescriptorListPointBoosts = new grpcWeb.MethodDescriptor('/stats.StatsService/ListPointBoosts', grpcWeb.MethodType.UNARY, stats_service_pb.ListPointBoostsRequest, stats_service_pb.ListPointBoostsResponse, (request) => {
return request.serializeBinary();
}, stats_service_pb.ListPointBoostsResponse.deserializeBinary);
if (!options)
options = {};
if (!credentials)
credentials = {};
options['format'] = 'text';
this.client_ = new grpcWeb.GrpcWebClientBase(options);
this.hostname_ = hostname.replace(/\/+$/, '');
this.credentials_ = credentials;
this.options_ = options;
}
getUserStatistics(request, metadata, callback) {
if (callback !== undefined) {
return this.client_.rpcCall(this.hostname_ +
'/stats.StatsService/GetUserStatistics', request, metadata || {}, this.methodDescriptorGetUserStatistics, callback);
}
return this.client_.unaryCall(this.hostname_ +
'/stats.StatsService/GetUserStatistics', request, metadata || {}, this.methodDescriptorGetUserStatistics);
}
listUserStatistics(request, metadata, callback) {
if (callback !== undefined) {
return this.client_.rpcCall(this.hostname_ +
'/stats.StatsService/ListUserStatistics', request, metadata || {}, this.methodDescriptorListUserStatistics, callback);
}
return this.client_.unaryCall(this.hostname_ +
'/stats.StatsService/ListUserStatistics', request, metadata || {}, this.methodDescriptorListUserStatistics);
}
getPointBoost(request, metadata, callback) {
if (callback !== undefined) {
return this.client_.rpcCall(this.hostname_ +
'/stats.StatsService/GetPointBoost', request, metadata || {}, this.methodDescriptorGetPointBoost, callback);
}
return this.client_.unaryCall(this.hostname_ +
'/stats.StatsService/GetPointBoost', request, metadata || {}, this.methodDescriptorGetPointBoost);
}
listPointBoosts(request, metadata, callback) {
if (callback !== undefined) {
return this.client_.rpcCall(this.hostname_ +
'/stats.StatsService/ListPointBoosts', request, metadata || {}, this.methodDescriptorListPointBoosts, callback);
}
return this.client_.unaryCall(this.hostname_ +
'/stats.StatsService/ListPointBoosts', request, metadata || {}, this.methodDescriptorListPointBoosts);
}
}
exports.StatsServiceClient = StatsServiceClient;
//# sourceMappingURL=ServiceServiceClientPb.js.map