echofi-client
Version:
A TypeScript/Node.js client library for EchoFi services with Level 3 Ultimate API and gRPC-Web clients for music streaming, user management, activity tracking, and authentication.
87 lines • 3.9 kB
JavaScript
"use strict";
/**
* @fileoverview gRPC-Web generated client stub for user
* @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.UserServiceClient = 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: user/service.proto
/* eslint-disable */
// @ts-nocheck
const grpcWeb = __importStar(require("grpc-web"));
const user_service_pb = __importStar(require("./service_pb")); // proto import: "user/service.proto"
class UserServiceClient {
constructor(hostname, credentials, options) {
this.methodDescriptorGetUser = new grpcWeb.MethodDescriptor('/user.UserService/GetUser', grpcWeb.MethodType.UNARY, user_service_pb.GetUserRequest, user_service_pb.GetUserResponse, (request) => {
return request.serializeBinary();
}, user_service_pb.GetUserResponse.deserializeBinary);
this.methodDescriptorListUsers = new grpcWeb.MethodDescriptor('/user.UserService/ListUsers', grpcWeb.MethodType.UNARY, user_service_pb.ListUsersRequest, user_service_pb.ListUsersResponse, (request) => {
return request.serializeBinary();
}, user_service_pb.ListUsersResponse.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;
}
getUser(request, metadata, callback) {
if (callback !== undefined) {
return this.client_.rpcCall(this.hostname_ +
'/user.UserService/GetUser', request, metadata || {}, this.methodDescriptorGetUser, callback);
}
return this.client_.unaryCall(this.hostname_ +
'/user.UserService/GetUser', request, metadata || {}, this.methodDescriptorGetUser);
}
listUsers(request, metadata, callback) {
if (callback !== undefined) {
return this.client_.rpcCall(this.hostname_ +
'/user.UserService/ListUsers', request, metadata || {}, this.methodDescriptorListUsers, callback);
}
return this.client_.unaryCall(this.hostname_ +
'/user.UserService/ListUsers', request, metadata || {}, this.methodDescriptorListUsers);
}
}
exports.UserServiceClient = UserServiceClient;
//# sourceMappingURL=ServiceServiceClientPb.js.map