432 lines
13 KiB
JavaScript
432 lines
13 KiB
JavaScript
|
/**
|
||
|
* @fileoverview gRPC-Web generated client stub for loafle.cms.proto.user
|
||
|
* @enhanceable
|
||
|
* @public
|
||
|
*/
|
||
|
|
||
|
// GENERATED CODE -- DO NOT EDIT!
|
||
|
|
||
|
|
||
|
|
||
|
const grpc = {};
|
||
|
grpc.web = require('grpc-web');
|
||
|
|
||
|
|
||
|
var common_search$criteria_pb = require('../common/search-criteria_pb.js')
|
||
|
|
||
|
var common_search$pagination_pb = require('../common/search-pagination_pb.js')
|
||
|
|
||
|
var common_search$sort_pb = require('../common/search-sort_pb.js')
|
||
|
|
||
|
var user_user_pb = require('../user/user_pb.js')
|
||
|
const proto = {};
|
||
|
proto.loafle = {};
|
||
|
proto.loafle.cms = {};
|
||
|
proto.loafle.cms.proto = {};
|
||
|
proto.loafle.cms.proto.user = require('./user-service_pb.js');
|
||
|
|
||
|
/**
|
||
|
* @param {string} hostname
|
||
|
* @param {?Object} credentials
|
||
|
* @param {?Object} options
|
||
|
* @constructor
|
||
|
* @struct
|
||
|
* @final
|
||
|
*/
|
||
|
proto.loafle.cms.proto.user.UserServiceClient =
|
||
|
function(hostname, credentials, options) {
|
||
|
if (!options) options = {};
|
||
|
options['format'] = 'binary';
|
||
|
|
||
|
/**
|
||
|
* @private @const {!grpc.web.GrpcWebClientBase} The client
|
||
|
*/
|
||
|
this.client_ = new grpc.web.GrpcWebClientBase(options);
|
||
|
|
||
|
/**
|
||
|
* @private @const {string} The hostname
|
||
|
*/
|
||
|
this.hostname_ = hostname;
|
||
|
|
||
|
/**
|
||
|
* @private @const {?Object} The credentials to be used to connect
|
||
|
* to the server
|
||
|
*/
|
||
|
this.credentials_ = credentials;
|
||
|
|
||
|
/**
|
||
|
* @private @const {?Object} Options for the client
|
||
|
*/
|
||
|
this.options_ = options;
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* @param {string} hostname
|
||
|
* @param {?Object} credentials
|
||
|
* @param {?Object} options
|
||
|
* @constructor
|
||
|
* @struct
|
||
|
* @final
|
||
|
*/
|
||
|
proto.loafle.cms.proto.user.UserServicePromiseClient =
|
||
|
function(hostname, credentials, options) {
|
||
|
if (!options) options = {};
|
||
|
options['format'] = 'binary';
|
||
|
|
||
|
/**
|
||
|
* @private @const {!grpc.web.GrpcWebClientBase} The client
|
||
|
*/
|
||
|
this.client_ = new grpc.web.GrpcWebClientBase(options);
|
||
|
|
||
|
/**
|
||
|
* @private @const {string} The hostname
|
||
|
*/
|
||
|
this.hostname_ = hostname;
|
||
|
|
||
|
/**
|
||
|
* @private @const {?Object} The credentials to be used to connect
|
||
|
* to the server
|
||
|
*/
|
||
|
this.credentials_ = credentials;
|
||
|
|
||
|
/**
|
||
|
* @private @const {?Object} Options for the client
|
||
|
*/
|
||
|
this.options_ = options;
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* @const
|
||
|
* @type {!grpc.web.AbstractClientBase.MethodInfo<
|
||
|
* !proto.loafle.cms.proto.user.CreateUserRequest,
|
||
|
* !proto.loafle.cms.proto.user.CreateUserResponse>}
|
||
|
*/
|
||
|
const methodInfo_UserService_CreateUser = new grpc.web.AbstractClientBase.MethodInfo(
|
||
|
proto.loafle.cms.proto.user.CreateUserResponse,
|
||
|
/** @param {!proto.loafle.cms.proto.user.CreateUserRequest} request */
|
||
|
function(request) {
|
||
|
return request.serializeBinary();
|
||
|
},
|
||
|
proto.loafle.cms.proto.user.CreateUserResponse.deserializeBinary
|
||
|
);
|
||
|
|
||
|
|
||
|
/**
|
||
|
* @param {!proto.loafle.cms.proto.user.CreateUserRequest} request The
|
||
|
* request proto
|
||
|
* @param {?Object<string, string>} metadata User defined
|
||
|
* call metadata
|
||
|
* @param {function(?grpc.web.Error, ?proto.loafle.cms.proto.user.CreateUserResponse)}
|
||
|
* callback The callback function(error, response)
|
||
|
* @return {!grpc.web.ClientReadableStream<!proto.loafle.cms.proto.user.CreateUserResponse>|undefined}
|
||
|
* The XHR Node Readable Stream
|
||
|
*/
|
||
|
proto.loafle.cms.proto.user.UserServiceClient.prototype.createUser =
|
||
|
function(request, metadata, callback) {
|
||
|
return this.client_.rpcCall(this.hostname_ +
|
||
|
'/loafle.cms.proto.user.UserService/CreateUser',
|
||
|
request,
|
||
|
metadata || {},
|
||
|
methodInfo_UserService_CreateUser,
|
||
|
callback);
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* @param {!proto.loafle.cms.proto.user.CreateUserRequest} request The
|
||
|
* request proto
|
||
|
* @param {?Object<string, string>} metadata User defined
|
||
|
* call metadata
|
||
|
* @return {!Promise<!proto.loafle.cms.proto.user.CreateUserResponse>}
|
||
|
* A native promise that resolves to the response
|
||
|
*/
|
||
|
proto.loafle.cms.proto.user.UserServicePromiseClient.prototype.createUser =
|
||
|
function(request, metadata) {
|
||
|
return this.client_.unaryCall(this.hostname_ +
|
||
|
'/loafle.cms.proto.user.UserService/CreateUser',
|
||
|
request,
|
||
|
metadata || {},
|
||
|
methodInfo_UserService_CreateUser);
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* @const
|
||
|
* @type {!grpc.web.AbstractClientBase.MethodInfo<
|
||
|
* !proto.loafle.cms.proto.user.ReadUserByIdRequest,
|
||
|
* !proto.loafle.cms.proto.user.ReadUserResponse>}
|
||
|
*/
|
||
|
const methodInfo_UserService_ReadUserById = new grpc.web.AbstractClientBase.MethodInfo(
|
||
|
proto.loafle.cms.proto.user.ReadUserResponse,
|
||
|
/** @param {!proto.loafle.cms.proto.user.ReadUserByIdRequest} request */
|
||
|
function(request) {
|
||
|
return request.serializeBinary();
|
||
|
},
|
||
|
proto.loafle.cms.proto.user.ReadUserResponse.deserializeBinary
|
||
|
);
|
||
|
|
||
|
|
||
|
/**
|
||
|
* @param {!proto.loafle.cms.proto.user.ReadUserByIdRequest} request The
|
||
|
* request proto
|
||
|
* @param {?Object<string, string>} metadata User defined
|
||
|
* call metadata
|
||
|
* @param {function(?grpc.web.Error, ?proto.loafle.cms.proto.user.ReadUserResponse)}
|
||
|
* callback The callback function(error, response)
|
||
|
* @return {!grpc.web.ClientReadableStream<!proto.loafle.cms.proto.user.ReadUserResponse>|undefined}
|
||
|
* The XHR Node Readable Stream
|
||
|
*/
|
||
|
proto.loafle.cms.proto.user.UserServiceClient.prototype.readUserById =
|
||
|
function(request, metadata, callback) {
|
||
|
return this.client_.rpcCall(this.hostname_ +
|
||
|
'/loafle.cms.proto.user.UserService/ReadUserById',
|
||
|
request,
|
||
|
metadata || {},
|
||
|
methodInfo_UserService_ReadUserById,
|
||
|
callback);
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* @param {!proto.loafle.cms.proto.user.ReadUserByIdRequest} request The
|
||
|
* request proto
|
||
|
* @param {?Object<string, string>} metadata User defined
|
||
|
* call metadata
|
||
|
* @return {!Promise<!proto.loafle.cms.proto.user.ReadUserResponse>}
|
||
|
* A native promise that resolves to the response
|
||
|
*/
|
||
|
proto.loafle.cms.proto.user.UserServicePromiseClient.prototype.readUserById =
|
||
|
function(request, metadata) {
|
||
|
return this.client_.unaryCall(this.hostname_ +
|
||
|
'/loafle.cms.proto.user.UserService/ReadUserById',
|
||
|
request,
|
||
|
metadata || {},
|
||
|
methodInfo_UserService_ReadUserById);
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* @const
|
||
|
* @type {!grpc.web.AbstractClientBase.MethodInfo<
|
||
|
* !proto.loafle.cms.proto.user.ReadUserByUsernameRequest,
|
||
|
* !proto.loafle.cms.proto.user.ReadUserResponse>}
|
||
|
*/
|
||
|
const methodInfo_UserService_ReadUserByUsername = new grpc.web.AbstractClientBase.MethodInfo(
|
||
|
proto.loafle.cms.proto.user.ReadUserResponse,
|
||
|
/** @param {!proto.loafle.cms.proto.user.ReadUserByUsernameRequest} request */
|
||
|
function(request) {
|
||
|
return request.serializeBinary();
|
||
|
},
|
||
|
proto.loafle.cms.proto.user.ReadUserResponse.deserializeBinary
|
||
|
);
|
||
|
|
||
|
|
||
|
/**
|
||
|
* @param {!proto.loafle.cms.proto.user.ReadUserByUsernameRequest} request The
|
||
|
* request proto
|
||
|
* @param {?Object<string, string>} metadata User defined
|
||
|
* call metadata
|
||
|
* @param {function(?grpc.web.Error, ?proto.loafle.cms.proto.user.ReadUserResponse)}
|
||
|
* callback The callback function(error, response)
|
||
|
* @return {!grpc.web.ClientReadableStream<!proto.loafle.cms.proto.user.ReadUserResponse>|undefined}
|
||
|
* The XHR Node Readable Stream
|
||
|
*/
|
||
|
proto.loafle.cms.proto.user.UserServiceClient.prototype.readUserByUsername =
|
||
|
function(request, metadata, callback) {
|
||
|
return this.client_.rpcCall(this.hostname_ +
|
||
|
'/loafle.cms.proto.user.UserService/ReadUserByUsername',
|
||
|
request,
|
||
|
metadata || {},
|
||
|
methodInfo_UserService_ReadUserByUsername,
|
||
|
callback);
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* @param {!proto.loafle.cms.proto.user.ReadUserByUsernameRequest} request The
|
||
|
* request proto
|
||
|
* @param {?Object<string, string>} metadata User defined
|
||
|
* call metadata
|
||
|
* @return {!Promise<!proto.loafle.cms.proto.user.ReadUserResponse>}
|
||
|
* A native promise that resolves to the response
|
||
|
*/
|
||
|
proto.loafle.cms.proto.user.UserServicePromiseClient.prototype.readUserByUsername =
|
||
|
function(request, metadata) {
|
||
|
return this.client_.unaryCall(this.hostname_ +
|
||
|
'/loafle.cms.proto.user.UserService/ReadUserByUsername',
|
||
|
request,
|
||
|
metadata || {},
|
||
|
methodInfo_UserService_ReadUserByUsername);
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* @const
|
||
|
* @type {!grpc.web.AbstractClientBase.MethodInfo<
|
||
|
* !proto.loafle.cms.proto.user.UpdateUserRequest,
|
||
|
* !proto.loafle.cms.proto.user.UpdateUserResponse>}
|
||
|
*/
|
||
|
const methodInfo_UserService_UpdateUser = new grpc.web.AbstractClientBase.MethodInfo(
|
||
|
proto.loafle.cms.proto.user.UpdateUserResponse,
|
||
|
/** @param {!proto.loafle.cms.proto.user.UpdateUserRequest} request */
|
||
|
function(request) {
|
||
|
return request.serializeBinary();
|
||
|
},
|
||
|
proto.loafle.cms.proto.user.UpdateUserResponse.deserializeBinary
|
||
|
);
|
||
|
|
||
|
|
||
|
/**
|
||
|
* @param {!proto.loafle.cms.proto.user.UpdateUserRequest} request The
|
||
|
* request proto
|
||
|
* @param {?Object<string, string>} metadata User defined
|
||
|
* call metadata
|
||
|
* @param {function(?grpc.web.Error, ?proto.loafle.cms.proto.user.UpdateUserResponse)}
|
||
|
* callback The callback function(error, response)
|
||
|
* @return {!grpc.web.ClientReadableStream<!proto.loafle.cms.proto.user.UpdateUserResponse>|undefined}
|
||
|
* The XHR Node Readable Stream
|
||
|
*/
|
||
|
proto.loafle.cms.proto.user.UserServiceClient.prototype.updateUser =
|
||
|
function(request, metadata, callback) {
|
||
|
return this.client_.rpcCall(this.hostname_ +
|
||
|
'/loafle.cms.proto.user.UserService/UpdateUser',
|
||
|
request,
|
||
|
metadata || {},
|
||
|
methodInfo_UserService_UpdateUser,
|
||
|
callback);
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* @param {!proto.loafle.cms.proto.user.UpdateUserRequest} request The
|
||
|
* request proto
|
||
|
* @param {?Object<string, string>} metadata User defined
|
||
|
* call metadata
|
||
|
* @return {!Promise<!proto.loafle.cms.proto.user.UpdateUserResponse>}
|
||
|
* A native promise that resolves to the response
|
||
|
*/
|
||
|
proto.loafle.cms.proto.user.UserServicePromiseClient.prototype.updateUser =
|
||
|
function(request, metadata) {
|
||
|
return this.client_.unaryCall(this.hostname_ +
|
||
|
'/loafle.cms.proto.user.UserService/UpdateUser',
|
||
|
request,
|
||
|
metadata || {},
|
||
|
methodInfo_UserService_UpdateUser);
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* @const
|
||
|
* @type {!grpc.web.AbstractClientBase.MethodInfo<
|
||
|
* !proto.loafle.cms.proto.user.DeleteUserRequest,
|
||
|
* !proto.loafle.cms.proto.user.DeleteUserResponse>}
|
||
|
*/
|
||
|
const methodInfo_UserService_DeleteUser = new grpc.web.AbstractClientBase.MethodInfo(
|
||
|
proto.loafle.cms.proto.user.DeleteUserResponse,
|
||
|
/** @param {!proto.loafle.cms.proto.user.DeleteUserRequest} request */
|
||
|
function(request) {
|
||
|
return request.serializeBinary();
|
||
|
},
|
||
|
proto.loafle.cms.proto.user.DeleteUserResponse.deserializeBinary
|
||
|
);
|
||
|
|
||
|
|
||
|
/**
|
||
|
* @param {!proto.loafle.cms.proto.user.DeleteUserRequest} request The
|
||
|
* request proto
|
||
|
* @param {?Object<string, string>} metadata User defined
|
||
|
* call metadata
|
||
|
* @param {function(?grpc.web.Error, ?proto.loafle.cms.proto.user.DeleteUserResponse)}
|
||
|
* callback The callback function(error, response)
|
||
|
* @return {!grpc.web.ClientReadableStream<!proto.loafle.cms.proto.user.DeleteUserResponse>|undefined}
|
||
|
* The XHR Node Readable Stream
|
||
|
*/
|
||
|
proto.loafle.cms.proto.user.UserServiceClient.prototype.deleteUser =
|
||
|
function(request, metadata, callback) {
|
||
|
return this.client_.rpcCall(this.hostname_ +
|
||
|
'/loafle.cms.proto.user.UserService/DeleteUser',
|
||
|
request,
|
||
|
metadata || {},
|
||
|
methodInfo_UserService_DeleteUser,
|
||
|
callback);
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* @param {!proto.loafle.cms.proto.user.DeleteUserRequest} request The
|
||
|
* request proto
|
||
|
* @param {?Object<string, string>} metadata User defined
|
||
|
* call metadata
|
||
|
* @return {!Promise<!proto.loafle.cms.proto.user.DeleteUserResponse>}
|
||
|
* A native promise that resolves to the response
|
||
|
*/
|
||
|
proto.loafle.cms.proto.user.UserServicePromiseClient.prototype.deleteUser =
|
||
|
function(request, metadata) {
|
||
|
return this.client_.unaryCall(this.hostname_ +
|
||
|
'/loafle.cms.proto.user.UserService/DeleteUser',
|
||
|
request,
|
||
|
metadata || {},
|
||
|
methodInfo_UserService_DeleteUser);
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* @const
|
||
|
* @type {!grpc.web.AbstractClientBase.MethodInfo<
|
||
|
* !proto.loafle.cms.proto.user.ReadAllUsersRequest,
|
||
|
* !proto.loafle.cms.proto.user.ReadAllUsersResponse>}
|
||
|
*/
|
||
|
const methodInfo_UserService_ReadAllUsers = new grpc.web.AbstractClientBase.MethodInfo(
|
||
|
proto.loafle.cms.proto.user.ReadAllUsersResponse,
|
||
|
/** @param {!proto.loafle.cms.proto.user.ReadAllUsersRequest} request */
|
||
|
function(request) {
|
||
|
return request.serializeBinary();
|
||
|
},
|
||
|
proto.loafle.cms.proto.user.ReadAllUsersResponse.deserializeBinary
|
||
|
);
|
||
|
|
||
|
|
||
|
/**
|
||
|
* @param {!proto.loafle.cms.proto.user.ReadAllUsersRequest} request The
|
||
|
* request proto
|
||
|
* @param {?Object<string, string>} metadata User defined
|
||
|
* call metadata
|
||
|
* @param {function(?grpc.web.Error, ?proto.loafle.cms.proto.user.ReadAllUsersResponse)}
|
||
|
* callback The callback function(error, response)
|
||
|
* @return {!grpc.web.ClientReadableStream<!proto.loafle.cms.proto.user.ReadAllUsersResponse>|undefined}
|
||
|
* The XHR Node Readable Stream
|
||
|
*/
|
||
|
proto.loafle.cms.proto.user.UserServiceClient.prototype.readAllUsers =
|
||
|
function(request, metadata, callback) {
|
||
|
return this.client_.rpcCall(this.hostname_ +
|
||
|
'/loafle.cms.proto.user.UserService/ReadAllUsers',
|
||
|
request,
|
||
|
metadata || {},
|
||
|
methodInfo_UserService_ReadAllUsers,
|
||
|
callback);
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* @param {!proto.loafle.cms.proto.user.ReadAllUsersRequest} request The
|
||
|
* request proto
|
||
|
* @param {?Object<string, string>} metadata User defined
|
||
|
* call metadata
|
||
|
* @return {!Promise<!proto.loafle.cms.proto.user.ReadAllUsersResponse>}
|
||
|
* A native promise that resolves to the response
|
||
|
*/
|
||
|
proto.loafle.cms.proto.user.UserServicePromiseClient.prototype.readAllUsers =
|
||
|
function(request, metadata) {
|
||
|
return this.client_.unaryCall(this.hostname_ +
|
||
|
'/loafle.cms.proto.user.UserService/ReadAllUsers',
|
||
|
request,
|
||
|
metadata || {},
|
||
|
methodInfo_UserService_ReadAllUsers);
|
||
|
};
|
||
|
|
||
|
|
||
|
module.exports = proto.loafle.cms.proto.user;
|
||
|
|