UNPKG

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.

153 lines 8.78 kB
"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.methodDescriptorUpdateUser = new grpcWeb.MethodDescriptor('/user.UserService/UpdateUser', grpcWeb.MethodType.UNARY, user_service_pb.UpdateUserRequest, user_service_pb.UpdateUserResponse, (request) => { return request.serializeBinary(); }, user_service_pb.UpdateUserResponse.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); this.methodDescriptorCheckWalletLinking = new grpcWeb.MethodDescriptor('/user.UserService/CheckWalletLinking', grpcWeb.MethodType.UNARY, user_service_pb.CheckWalletLinkingRequest, user_service_pb.CheckWalletLinkingResponse, (request) => { return request.serializeBinary(); }, user_service_pb.CheckWalletLinkingResponse.deserializeBinary); this.methodDescriptorLinkWalletToUser = new grpcWeb.MethodDescriptor('/user.UserService/LinkWalletToUser', grpcWeb.MethodType.UNARY, user_service_pb.LinkWalletToUserRequest, user_service_pb.LinkWalletToUserResponse, (request) => { return request.serializeBinary(); }, user_service_pb.LinkWalletToUserResponse.deserializeBinary); this.methodDescriptorCheckEmailLinking = new grpcWeb.MethodDescriptor('/user.UserService/CheckEmailLinking', grpcWeb.MethodType.UNARY, user_service_pb.CheckEmailLinkingRequest, user_service_pb.CheckEmailLinkingResponse, (request) => { return request.serializeBinary(); }, user_service_pb.CheckEmailLinkingResponse.deserializeBinary); this.methodDescriptorLinkEmailToUser = new grpcWeb.MethodDescriptor('/user.UserService/LinkEmailToUser', grpcWeb.MethodType.UNARY, user_service_pb.LinkEmailToUserRequest, user_service_pb.LinkEmailToUserResponse, (request) => { return request.serializeBinary(); }, user_service_pb.LinkEmailToUserResponse.deserializeBinary); this.methodDescriptorGetUserAuthState = new grpcWeb.MethodDescriptor('/user.UserService/GetUserAuthState', grpcWeb.MethodType.UNARY, user_service_pb.GetUserAuthStateRequest, user_service_pb.GetUserAuthStateResponse, (request) => { return request.serializeBinary(); }, user_service_pb.GetUserAuthStateResponse.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); } updateUser(request, metadata, callback) { if (callback !== undefined) { return this.client_.rpcCall(this.hostname_ + '/user.UserService/UpdateUser', request, metadata || {}, this.methodDescriptorUpdateUser, callback); } return this.client_.unaryCall(this.hostname_ + '/user.UserService/UpdateUser', request, metadata || {}, this.methodDescriptorUpdateUser); } 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); } checkWalletLinking(request, metadata, callback) { if (callback !== undefined) { return this.client_.rpcCall(this.hostname_ + '/user.UserService/CheckWalletLinking', request, metadata || {}, this.methodDescriptorCheckWalletLinking, callback); } return this.client_.unaryCall(this.hostname_ + '/user.UserService/CheckWalletLinking', request, metadata || {}, this.methodDescriptorCheckWalletLinking); } linkWalletToUser(request, metadata, callback) { if (callback !== undefined) { return this.client_.rpcCall(this.hostname_ + '/user.UserService/LinkWalletToUser', request, metadata || {}, this.methodDescriptorLinkWalletToUser, callback); } return this.client_.unaryCall(this.hostname_ + '/user.UserService/LinkWalletToUser', request, metadata || {}, this.methodDescriptorLinkWalletToUser); } checkEmailLinking(request, metadata, callback) { if (callback !== undefined) { return this.client_.rpcCall(this.hostname_ + '/user.UserService/CheckEmailLinking', request, metadata || {}, this.methodDescriptorCheckEmailLinking, callback); } return this.client_.unaryCall(this.hostname_ + '/user.UserService/CheckEmailLinking', request, metadata || {}, this.methodDescriptorCheckEmailLinking); } linkEmailToUser(request, metadata, callback) { if (callback !== undefined) { return this.client_.rpcCall(this.hostname_ + '/user.UserService/LinkEmailToUser', request, metadata || {}, this.methodDescriptorLinkEmailToUser, callback); } return this.client_.unaryCall(this.hostname_ + '/user.UserService/LinkEmailToUser', request, metadata || {}, this.methodDescriptorLinkEmailToUser); } getUserAuthState(request, metadata, callback) { if (callback !== undefined) { return this.client_.rpcCall(this.hostname_ + '/user.UserService/GetUserAuthState', request, metadata || {}, this.methodDescriptorGetUserAuthState, callback); } return this.client_.unaryCall(this.hostname_ + '/user.UserService/GetUserAuthState', request, metadata || {}, this.methodDescriptorGetUserAuthState); } } exports.UserServiceClient = UserServiceClient; //# sourceMappingURL=ServiceServiceClientPb.js.map