import * as grpcWeb from 'grpc-web';

import * as google_protobuf_empty_pb from 'google-protobuf/google/protobuf/empty_pb'; // proto import: "google/protobuf/empty.proto"
import * as admin_pb from './admin_pb'; // proto import: "admin.proto"
import * as api_pb from './api_pb'; // proto import: "api.proto"


export class AdminClient {
  constructor (hostname: string,
               credentials?: null | { [index: string]: string; },
               options?: null | { [index: string]: any; });

  getUserDetails(
    request: admin_pb.GetUserDetailsReq,
    metadata: grpcWeb.Metadata | undefined,
    callback: (err: grpcWeb.RpcError,
               response: admin_pb.UserDetails) => void
  ): grpcWeb.ClientReadableStream<admin_pb.UserDetails>;

  getUser(
    request: admin_pb.GetUserReq,
    metadata: grpcWeb.Metadata | undefined,
    callback: (err: grpcWeb.RpcError,
               response: api_pb.User) => void
  ): grpcWeb.ClientReadableStream<api_pb.User>;

  searchUsers(
    request: admin_pb.SearchUsersReq,
    metadata: grpcWeb.Metadata | undefined,
    callback: (err: grpcWeb.RpcError,
               response: admin_pb.SearchUsersRes) => void
  ): grpcWeb.ClientReadableStream<admin_pb.SearchUsersRes>;

  changeUserGender(
    request: admin_pb.ChangeUserGenderReq,
    metadata: grpcWeb.Metadata | undefined,
    callback: (err: grpcWeb.RpcError,
               response: admin_pb.UserDetails) => void
  ): grpcWeb.ClientReadableStream<admin_pb.UserDetails>;

  changeUserBirthdate(
    request: admin_pb.ChangeUserBirthdateReq,
    metadata: grpcWeb.Metadata | undefined,
    callback: (err: grpcWeb.RpcError,
               response: admin_pb.UserDetails) => void
  ): grpcWeb.ClientReadableStream<admin_pb.UserDetails>;

  addBadge(
    request: admin_pb.AddBadgeReq,
    metadata: grpcWeb.Metadata | undefined,
    callback: (err: grpcWeb.RpcError,
               response: admin_pb.UserDetails) => void
  ): grpcWeb.ClientReadableStream<admin_pb.UserDetails>;

  removeBadge(
    request: admin_pb.RemoveBadgeReq,
    metadata: grpcWeb.Metadata | undefined,
    callback: (err: grpcWeb.RpcError,
               response: admin_pb.UserDetails) => void
  ): grpcWeb.ClientReadableStream<admin_pb.UserDetails>;

  setPassportSexGenderException(
    request: admin_pb.SetPassportSexGenderExceptionReq,
    metadata: grpcWeb.Metadata | undefined,
    callback: (err: grpcWeb.RpcError,
               response: admin_pb.UserDetails) => void
  ): grpcWeb.ClientReadableStream<admin_pb.UserDetails>;

  banUser(
    request: admin_pb.BanUserReq,
    metadata: grpcWeb.Metadata | undefined,
    callback: (err: grpcWeb.RpcError,
               response: admin_pb.UserDetails) => void
  ): grpcWeb.ClientReadableStream<admin_pb.UserDetails>;

  unbanUser(
    request: admin_pb.UnbanUserReq,
    metadata: grpcWeb.Metadata | undefined,
    callback: (err: grpcWeb.RpcError,
               response: admin_pb.UserDetails) => void
  ): grpcWeb.ClientReadableStream<admin_pb.UserDetails>;

  shadowUser(
    request: admin_pb.ShadowUserReq,
    metadata: grpcWeb.Metadata | undefined,
    callback: (err: grpcWeb.RpcError,
               response: admin_pb.UserDetails) => void
  ): grpcWeb.ClientReadableStream<admin_pb.UserDetails>;

  unshadowUser(
    request: admin_pb.UnshadowUserReq,
    metadata: grpcWeb.Metadata | undefined,
    callback: (err: grpcWeb.RpcError,
               response: admin_pb.UserDetails) => void
  ): grpcWeb.ClientReadableStream<admin_pb.UserDetails>;

  addAdminNote(
    request: admin_pb.AddAdminNoteReq,
    metadata: grpcWeb.Metadata | undefined,
    callback: (err: grpcWeb.RpcError,
               response: admin_pb.UserDetails) => void
  ): grpcWeb.ClientReadableStream<admin_pb.UserDetails>;

  getContentReport(
    request: admin_pb.GetContentReportReq,
    metadata: grpcWeb.Metadata | undefined,
    callback: (err: grpcWeb.RpcError,
               response: admin_pb.GetContentReportRes) => void
  ): grpcWeb.ClientReadableStream<admin_pb.GetContentReportRes>;

  getContentReportsForAuthor(
    request: admin_pb.GetContentReportsForAuthorReq,
    metadata: grpcWeb.Metadata | undefined,
    callback: (err: grpcWeb.RpcError,
               response: admin_pb.GetContentReportsForAuthorRes) => void
  ): grpcWeb.ClientReadableStream<admin_pb.GetContentReportsForAuthorRes>;

  sendModNote(
    request: admin_pb.SendModNoteReq,
    metadata: grpcWeb.Metadata | undefined,
    callback: (err: grpcWeb.RpcError,
               response: admin_pb.UserDetails) => void
  ): grpcWeb.ClientReadableStream<admin_pb.UserDetails>;

  markUserNeedsLocationUpdate(
    request: admin_pb.MarkUserNeedsLocationUpdateReq,
    metadata: grpcWeb.Metadata | undefined,
    callback: (err: grpcWeb.RpcError,
               response: admin_pb.UserDetails) => void
  ): grpcWeb.ClientReadableStream<admin_pb.UserDetails>;

  deleteUser(
    request: admin_pb.DeleteUserReq,
    metadata: grpcWeb.Metadata | undefined,
    callback: (err: grpcWeb.RpcError,
               response: admin_pb.UserDetails) => void
  ): grpcWeb.ClientReadableStream<admin_pb.UserDetails>;

  recoverDeletedUser(
    request: admin_pb.RecoverDeletedUserReq,
    metadata: grpcWeb.Metadata | undefined,
    callback: (err: grpcWeb.RpcError,
               response: admin_pb.UserDetails) => void
  ): grpcWeb.ClientReadableStream<admin_pb.UserDetails>;

  createApiKey(
    request: admin_pb.CreateApiKeyReq,
    metadata: grpcWeb.Metadata | undefined,
    callback: (err: grpcWeb.RpcError,
               response: admin_pb.CreateApiKeyRes) => void
  ): grpcWeb.ClientReadableStream<admin_pb.CreateApiKeyRes>;

  getChats(
    request: admin_pb.GetChatsReq,
    metadata: grpcWeb.Metadata | undefined,
    callback: (err: grpcWeb.RpcError,
               response: admin_pb.GetChatsRes) => void
  ): grpcWeb.ClientReadableStream<admin_pb.GetChatsRes>;

  deleteEvent(
    request: admin_pb.DeleteEventReq,
    metadata: grpcWeb.Metadata | undefined,
    callback: (err: grpcWeb.RpcError,
               response: google_protobuf_empty_pb.Empty) => void
  ): grpcWeb.ClientReadableStream<google_protobuf_empty_pb.Empty>;

  listUserIds(
    request: admin_pb.ListUserIdsReq,
    metadata: grpcWeb.Metadata | undefined,
    callback: (err: grpcWeb.RpcError,
               response: admin_pb.ListUserIdsRes) => void
  ): grpcWeb.ClientReadableStream<admin_pb.ListUserIdsRes>;

  editReferenceText(
    request: admin_pb.EditReferenceTextReq,
    metadata: grpcWeb.Metadata | undefined,
    callback: (err: grpcWeb.RpcError,
               response: google_protobuf_empty_pb.Empty) => void
  ): grpcWeb.ClientReadableStream<google_protobuf_empty_pb.Empty>;

  deleteReference(
    request: admin_pb.DeleteReferenceReq,
    metadata: grpcWeb.Metadata | undefined,
    callback: (err: grpcWeb.RpcError,
               response: google_protobuf_empty_pb.Empty) => void
  ): grpcWeb.ClientReadableStream<google_protobuf_empty_pb.Empty>;

  getUserReferences(
    request: admin_pb.GetUserReferencesReq,
    metadata: grpcWeb.Metadata | undefined,
    callback: (err: grpcWeb.RpcError,
               response: admin_pb.GetUserReferencesRes) => void
  ): grpcWeb.ClientReadableStream<admin_pb.GetUserReferencesRes>;

  getFriendRequests(
    request: admin_pb.GetFriendRequestsReq,
    metadata: grpcWeb.Metadata | undefined,
    callback: (err: grpcWeb.RpcError,
               response: admin_pb.GetFriendRequestsRes) => void
  ): grpcWeb.ClientReadableStream<admin_pb.GetFriendRequestsRes>;

  getNonvisibleUserAccessLog(
    request: admin_pb.GetNonvisibleUserAccessLogReq,
    metadata: grpcWeb.Metadata | undefined,
    callback: (err: grpcWeb.RpcError,
               response: admin_pb.GetNonvisibleUserAccessLogRes) => void
  ): grpcWeb.ClientReadableStream<admin_pb.GetNonvisibleUserAccessLogRes>;

  editDiscussion(
    request: admin_pb.EditDiscussionReq,
    metadata: grpcWeb.Metadata | undefined,
    callback: (err: grpcWeb.RpcError,
               response: google_protobuf_empty_pb.Empty) => void
  ): grpcWeb.ClientReadableStream<google_protobuf_empty_pb.Empty>;

  deleteDiscussion(
    request: admin_pb.AdminDeleteDiscussionReq,
    metadata: grpcWeb.Metadata | undefined,
    callback: (err: grpcWeb.RpcError,
               response: google_protobuf_empty_pb.Empty) => void
  ): grpcWeb.ClientReadableStream<google_protobuf_empty_pb.Empty>;

  editReply(
    request: admin_pb.EditReplyReq,
    metadata: grpcWeb.Metadata | undefined,
    callback: (err: grpcWeb.RpcError,
               response: google_protobuf_empty_pb.Empty) => void
  ): grpcWeb.ClientReadableStream<google_protobuf_empty_pb.Empty>;

  addUsersToModerationUserList(
    request: admin_pb.AddUsersToModerationUserListReq,
    metadata: grpcWeb.Metadata | undefined,
    callback: (err: grpcWeb.RpcError,
               response: admin_pb.AddUsersToModerationUserListRes) => void
  ): grpcWeb.ClientReadableStream<admin_pb.AddUsersToModerationUserListRes>;

  removeUserFromModerationUserList(
    request: admin_pb.RemoveUserFromModerationUserListReq,
    metadata: grpcWeb.Metadata | undefined,
    callback: (err: grpcWeb.RpcError,
               response: google_protobuf_empty_pb.Empty) => void
  ): grpcWeb.ClientReadableStream<google_protobuf_empty_pb.Empty>;

  listModerationUserLists(
    request: admin_pb.ListModerationUserListsReq,
    metadata: grpcWeb.Metadata | undefined,
    callback: (err: grpcWeb.RpcError,
               response: admin_pb.ListModerationUserListsRes) => void
  ): grpcWeb.ClientReadableStream<admin_pb.ListModerationUserListsRes>;

  createAccountDeletionLink(
    request: admin_pb.CreateAccountDeletionLinkReq,
    metadata: grpcWeb.Metadata | undefined,
    callback: (err: grpcWeb.RpcError,
               response: admin_pb.CreateAccountDeletionLinkRes) => void
  ): grpcWeb.ClientReadableStream<admin_pb.CreateAccountDeletionLinkRes>;

  accessStats(
    request: admin_pb.AccessStatsReq,
    metadata: grpcWeb.Metadata | undefined,
    callback: (err: grpcWeb.RpcError,
               response: admin_pb.AccessStatsRes) => void
  ): grpcWeb.ClientReadableStream<admin_pb.AccessStatsRes>;

  setLastDonated(
    request: admin_pb.SetLastDonatedReq,
    metadata: grpcWeb.Metadata | undefined,
    callback: (err: grpcWeb.RpcError,
               response: admin_pb.UserDetails) => void
  ): grpcWeb.ClientReadableStream<admin_pb.UserDetails>;

  createAdminTag(
    request: admin_pb.CreateAdminTagReq,
    metadata: grpcWeb.Metadata | undefined,
    callback: (err: grpcWeb.RpcError,
               response: admin_pb.AdminTagInfo) => void
  ): grpcWeb.ClientReadableStream<admin_pb.AdminTagInfo>;

  listAdminTags(
    request: admin_pb.ListAdminTagsReq,
    metadata: grpcWeb.Metadata | undefined,
    callback: (err: grpcWeb.RpcError,
               response: admin_pb.ListAdminTagsRes) => void
  ): grpcWeb.ClientReadableStream<admin_pb.ListAdminTagsRes>;

  addAdminTagToUser(
    request: admin_pb.AddAdminTagToUserReq,
    metadata: grpcWeb.Metadata | undefined,
    callback: (err: grpcWeb.RpcError,
               response: admin_pb.UserDetails) => void
  ): grpcWeb.ClientReadableStream<admin_pb.UserDetails>;

  removeAdminTagFromUser(
    request: admin_pb.RemoveAdminTagFromUserReq,
    metadata: grpcWeb.Metadata | undefined,
    callback: (err: grpcWeb.RpcError,
               response: admin_pb.UserDetails) => void
  ): grpcWeb.ClientReadableStream<admin_pb.UserDetails>;

  setModScore(
    request: admin_pb.SetModScoreReq,
    metadata: grpcWeb.Metadata | undefined,
    callback: (err: grpcWeb.RpcError,
               response: admin_pb.UserDetails) => void
  ): grpcWeb.ClientReadableStream<admin_pb.UserDetails>;

  listAdminActions(
    request: admin_pb.ListAdminActionsReq,
    metadata: grpcWeb.Metadata | undefined,
    callback: (err: grpcWeb.RpcError,
               response: admin_pb.ListAdminActionsRes) => void
  ): grpcWeb.ClientReadableStream<admin_pb.ListAdminActionsRes>;

  listUserUploads(
    request: admin_pb.ListUserUploadsReq,
    metadata: grpcWeb.Metadata | undefined,
    callback: (err: grpcWeb.RpcError,
               response: admin_pb.ListUserUploadsRes) => void
  ): grpcWeb.ClientReadableStream<admin_pb.ListUserUploadsRes>;

  createOTAPackage(
    request: admin_pb.CreateOTAPackageReq,
    metadata: grpcWeb.Metadata | undefined,
    callback: (err: grpcWeb.RpcError,
               response: admin_pb.OTAPackage) => void
  ): grpcWeb.ClientReadableStream<admin_pb.OTAPackage>;

  listOTAPackages(
    request: admin_pb.ListOTAPackagesReq,
    metadata: grpcWeb.Metadata | undefined,
    callback: (err: grpcWeb.RpcError,
               response: admin_pb.ListOTAPackagesRes) => void
  ): grpcWeb.ClientReadableStream<admin_pb.ListOTAPackagesRes>;

  banOTAPackage(
    request: admin_pb.BanOTAPackageReq,
    metadata: grpcWeb.Metadata | undefined,
    callback: (err: grpcWeb.RpcError,
               response: admin_pb.OTAPackage) => void
  ): grpcWeb.ClientReadableStream<admin_pb.OTAPackage>;

}

export class AdminPromiseClient {
  constructor (hostname: string,
               credentials?: null | { [index: string]: string; },
               options?: null | { [index: string]: any; });

  getUserDetails(
    request: admin_pb.GetUserDetailsReq,
    metadata?: grpcWeb.Metadata
  ): Promise<admin_pb.UserDetails>;

  getUser(
    request: admin_pb.GetUserReq,
    metadata?: grpcWeb.Metadata
  ): Promise<api_pb.User>;

  searchUsers(
    request: admin_pb.SearchUsersReq,
    metadata?: grpcWeb.Metadata
  ): Promise<admin_pb.SearchUsersRes>;

  changeUserGender(
    request: admin_pb.ChangeUserGenderReq,
    metadata?: grpcWeb.Metadata
  ): Promise<admin_pb.UserDetails>;

  changeUserBirthdate(
    request: admin_pb.ChangeUserBirthdateReq,
    metadata?: grpcWeb.Metadata
  ): Promise<admin_pb.UserDetails>;

  addBadge(
    request: admin_pb.AddBadgeReq,
    metadata?: grpcWeb.Metadata
  ): Promise<admin_pb.UserDetails>;

  removeBadge(
    request: admin_pb.RemoveBadgeReq,
    metadata?: grpcWeb.Metadata
  ): Promise<admin_pb.UserDetails>;

  setPassportSexGenderException(
    request: admin_pb.SetPassportSexGenderExceptionReq,
    metadata?: grpcWeb.Metadata
  ): Promise<admin_pb.UserDetails>;

  banUser(
    request: admin_pb.BanUserReq,
    metadata?: grpcWeb.Metadata
  ): Promise<admin_pb.UserDetails>;

  unbanUser(
    request: admin_pb.UnbanUserReq,
    metadata?: grpcWeb.Metadata
  ): Promise<admin_pb.UserDetails>;

  shadowUser(
    request: admin_pb.ShadowUserReq,
    metadata?: grpcWeb.Metadata
  ): Promise<admin_pb.UserDetails>;

  unshadowUser(
    request: admin_pb.UnshadowUserReq,
    metadata?: grpcWeb.Metadata
  ): Promise<admin_pb.UserDetails>;

  addAdminNote(
    request: admin_pb.AddAdminNoteReq,
    metadata?: grpcWeb.Metadata
  ): Promise<admin_pb.UserDetails>;

  getContentReport(
    request: admin_pb.GetContentReportReq,
    metadata?: grpcWeb.Metadata
  ): Promise<admin_pb.GetContentReportRes>;

  getContentReportsForAuthor(
    request: admin_pb.GetContentReportsForAuthorReq,
    metadata?: grpcWeb.Metadata
  ): Promise<admin_pb.GetContentReportsForAuthorRes>;

  sendModNote(
    request: admin_pb.SendModNoteReq,
    metadata?: grpcWeb.Metadata
  ): Promise<admin_pb.UserDetails>;

  markUserNeedsLocationUpdate(
    request: admin_pb.MarkUserNeedsLocationUpdateReq,
    metadata?: grpcWeb.Metadata
  ): Promise<admin_pb.UserDetails>;

  deleteUser(
    request: admin_pb.DeleteUserReq,
    metadata?: grpcWeb.Metadata
  ): Promise<admin_pb.UserDetails>;

  recoverDeletedUser(
    request: admin_pb.RecoverDeletedUserReq,
    metadata?: grpcWeb.Metadata
  ): Promise<admin_pb.UserDetails>;

  createApiKey(
    request: admin_pb.CreateApiKeyReq,
    metadata?: grpcWeb.Metadata
  ): Promise<admin_pb.CreateApiKeyRes>;

  getChats(
    request: admin_pb.GetChatsReq,
    metadata?: grpcWeb.Metadata
  ): Promise<admin_pb.GetChatsRes>;

  deleteEvent(
    request: admin_pb.DeleteEventReq,
    metadata?: grpcWeb.Metadata
  ): Promise<google_protobuf_empty_pb.Empty>;

  listUserIds(
    request: admin_pb.ListUserIdsReq,
    metadata?: grpcWeb.Metadata
  ): Promise<admin_pb.ListUserIdsRes>;

  editReferenceText(
    request: admin_pb.EditReferenceTextReq,
    metadata?: grpcWeb.Metadata
  ): Promise<google_protobuf_empty_pb.Empty>;

  deleteReference(
    request: admin_pb.DeleteReferenceReq,
    metadata?: grpcWeb.Metadata
  ): Promise<google_protobuf_empty_pb.Empty>;

  getUserReferences(
    request: admin_pb.GetUserReferencesReq,
    metadata?: grpcWeb.Metadata
  ): Promise<admin_pb.GetUserReferencesRes>;

  getFriendRequests(
    request: admin_pb.GetFriendRequestsReq,
    metadata?: grpcWeb.Metadata
  ): Promise<admin_pb.GetFriendRequestsRes>;

  getNonvisibleUserAccessLog(
    request: admin_pb.GetNonvisibleUserAccessLogReq,
    metadata?: grpcWeb.Metadata
  ): Promise<admin_pb.GetNonvisibleUserAccessLogRes>;

  editDiscussion(
    request: admin_pb.EditDiscussionReq,
    metadata?: grpcWeb.Metadata
  ): Promise<google_protobuf_empty_pb.Empty>;

  deleteDiscussion(
    request: admin_pb.AdminDeleteDiscussionReq,
    metadata?: grpcWeb.Metadata
  ): Promise<google_protobuf_empty_pb.Empty>;

  editReply(
    request: admin_pb.EditReplyReq,
    metadata?: grpcWeb.Metadata
  ): Promise<google_protobuf_empty_pb.Empty>;

  addUsersToModerationUserList(
    request: admin_pb.AddUsersToModerationUserListReq,
    metadata?: grpcWeb.Metadata
  ): Promise<admin_pb.AddUsersToModerationUserListRes>;

  removeUserFromModerationUserList(
    request: admin_pb.RemoveUserFromModerationUserListReq,
    metadata?: grpcWeb.Metadata
  ): Promise<google_protobuf_empty_pb.Empty>;

  listModerationUserLists(
    request: admin_pb.ListModerationUserListsReq,
    metadata?: grpcWeb.Metadata
  ): Promise<admin_pb.ListModerationUserListsRes>;

  createAccountDeletionLink(
    request: admin_pb.CreateAccountDeletionLinkReq,
    metadata?: grpcWeb.Metadata
  ): Promise<admin_pb.CreateAccountDeletionLinkRes>;

  accessStats(
    request: admin_pb.AccessStatsReq,
    metadata?: grpcWeb.Metadata
  ): Promise<admin_pb.AccessStatsRes>;

  setLastDonated(
    request: admin_pb.SetLastDonatedReq,
    metadata?: grpcWeb.Metadata
  ): Promise<admin_pb.UserDetails>;

  createAdminTag(
    request: admin_pb.CreateAdminTagReq,
    metadata?: grpcWeb.Metadata
  ): Promise<admin_pb.AdminTagInfo>;

  listAdminTags(
    request: admin_pb.ListAdminTagsReq,
    metadata?: grpcWeb.Metadata
  ): Promise<admin_pb.ListAdminTagsRes>;

  addAdminTagToUser(
    request: admin_pb.AddAdminTagToUserReq,
    metadata?: grpcWeb.Metadata
  ): Promise<admin_pb.UserDetails>;

  removeAdminTagFromUser(
    request: admin_pb.RemoveAdminTagFromUserReq,
    metadata?: grpcWeb.Metadata
  ): Promise<admin_pb.UserDetails>;

  setModScore(
    request: admin_pb.SetModScoreReq,
    metadata?: grpcWeb.Metadata
  ): Promise<admin_pb.UserDetails>;

  listAdminActions(
    request: admin_pb.ListAdminActionsReq,
    metadata?: grpcWeb.Metadata
  ): Promise<admin_pb.ListAdminActionsRes>;

  listUserUploads(
    request: admin_pb.ListUserUploadsReq,
    metadata?: grpcWeb.Metadata
  ): Promise<admin_pb.ListUserUploadsRes>;

  createOTAPackage(
    request: admin_pb.CreateOTAPackageReq,
    metadata?: grpcWeb.Metadata
  ): Promise<admin_pb.OTAPackage>;

  listOTAPackages(
    request: admin_pb.ListOTAPackagesReq,
    metadata?: grpcWeb.Metadata
  ): Promise<admin_pb.ListOTAPackagesRes>;

  banOTAPackage(
    request: admin_pb.BanOTAPackageReq,
    metadata?: grpcWeb.Metadata
  ): Promise<admin_pb.OTAPackage>;

}

