backend
Preparing search index...
authors/authors.controller
AuthorsController
Class AuthorsController
Index
Constructors
constructor
Methods
approve
create
disapprove
find
All
find
One
find
Pending
Approvals
get
Related
get
Related
By
Genres
get
Stats
remove
Flexible
search
External
update
Constructors
constructor
new
AuthorsController
(
authorsService
:
AuthorsService
)
:
AuthorsController
Parameters
authorsService
:
AuthorsService
Returns
AuthorsController
Methods
approve
approve
(
id
:
string
,
)
:
Promise
<
{
approveStatus
:
boolean
;
biggerProfilePic
:
string
|
null
;
biggerProfilePicKey
:
string
|
null
;
bio
:
string
|
null
;
birthDate
:
Date
|
null
;
createdAt
:
Date
;
id
:
string
;
name
:
string
;
nationality
:
string
|
null
;
openLibraryId
:
string
|
null
;
smallerProfilePic
:
string
|
null
;
smallerProfilePicKey
:
string
|
null
;
subjects
:
string
|
null
;
topWorks
:
string
|
null
;
updatedAt
:
Date
;
}
,
>
Parameters
id
:
string
Returns
Promise
<
{
approveStatus
:
boolean
;
biggerProfilePic
:
string
|
null
;
biggerProfilePicKey
:
string
|
null
;
bio
:
string
|
null
;
birthDate
:
Date
|
null
;
createdAt
:
Date
;
id
:
string
;
name
:
string
;
nationality
:
string
|
null
;
openLibraryId
:
string
|
null
;
smallerProfilePic
:
string
|
null
;
smallerProfilePicKey
:
string
|
null
;
subjects
:
string
|
null
;
topWorks
:
string
|
null
;
updatedAt
:
Date
;
}
,
>
create
create
(
file
:
UploadedFile
|
null
,
createAuthorDto
:
CreateAuthorDto
,
)
:
Promise
<
{
approveStatus
:
boolean
;
biggerProfilePic
:
string
|
null
;
biggerProfilePicKey
:
string
|
null
;
bio
:
string
|
null
;
birthDate
:
Date
|
null
;
createdAt
:
Date
;
id
:
string
;
name
:
string
;
nationality
:
string
|
null
;
openLibraryId
:
string
|
null
;
smallerProfilePic
:
string
|
null
;
smallerProfilePicKey
:
string
|
null
;
subjects
:
string
|
null
;
topWorks
:
string
|
null
;
updatedAt
:
Date
;
}
,
>
Parameters
file
:
UploadedFile
|
null
createAuthorDto
:
CreateAuthorDto
Returns
Promise
<
{
approveStatus
:
boolean
;
biggerProfilePic
:
string
|
null
;
biggerProfilePicKey
:
string
|
null
;
bio
:
string
|
null
;
birthDate
:
Date
|
null
;
createdAt
:
Date
;
id
:
string
;
name
:
string
;
nationality
:
string
|
null
;
openLibraryId
:
string
|
null
;
smallerProfilePic
:
string
|
null
;
smallerProfilePicKey
:
string
|
null
;
subjects
:
string
|
null
;
topWorks
:
string
|
null
;
updatedAt
:
Date
;
}
,
>
disapprove
disapprove
(
id
:
string
,
)
:
Promise
<
{
approveStatus
:
boolean
;
biggerProfilePic
:
string
|
null
;
biggerProfilePicKey
:
string
|
null
;
bio
:
string
|
null
;
birthDate
:
Date
|
null
;
createdAt
:
Date
;
id
:
string
;
name
:
string
;
nationality
:
string
|
null
;
openLibraryId
:
string
|
null
;
smallerProfilePic
:
string
|
null
;
smallerProfilePicKey
:
string
|
null
;
subjects
:
string
|
null
;
topWorks
:
string
|
null
;
updatedAt
:
Date
;
}
,
>
Parameters
id
:
string
Returns
Promise
<
{
approveStatus
:
boolean
;
biggerProfilePic
:
string
|
null
;
biggerProfilePicKey
:
string
|
null
;
bio
:
string
|
null
;
birthDate
:
Date
|
null
;
createdAt
:
Date
;
id
:
string
;
name
:
string
;
nationality
:
string
|
null
;
openLibraryId
:
string
|
null
;
smallerProfilePic
:
string
|
null
;
smallerProfilePicKey
:
string
|
null
;
subjects
:
string
|
null
;
topWorks
:
string
|
null
;
updatedAt
:
Date
;
}
,
>
find
All
findAll
(
query
:
PaginationDto
,
session
:
any
,
)
:
Promise
<
{
data
:
any
;
meta
:
{
lastPage
:
number
;
page
:
number
;
total
:
number
}
}
,
>
Parameters
query
:
PaginationDto
session
:
any
Returns
Promise
<
{
data
:
any
;
meta
:
{
lastPage
:
number
;
page
:
number
;
total
:
number
}
}
>
find
One
findOne
(
id
:
string
,
session
:
any
,
)
:
Promise
<
{
_count
:
{
favoritedBy
:
number
}
;
approveStatus
:
boolean
;
biggerProfilePic
:
string
|
null
;
biggerProfilePicKey
:
string
|
null
;
bio
:
string
|
null
;
birthDate
:
Date
|
null
;
books
:
(
{
genres
:
{
genre
:
{
name
:
string
}
}
[]
;
statistics
:
|
{
averageRating
:
number
;
bookId
:
string
;
id
:
string
;
ratingCount
:
number
;
readersCount
:
number
;
reviewCount
:
number
;
wantToReadCount
:
number
;
}
|
null
;
}
&
{
approveStatus
:
boolean
;
authorId
:
string
|
null
;
biggerCoverPic
:
string
;
biggerCoverPicKey
:
string
|
null
;
createdAt
:
Date
;
description
:
string
;
googleBookId
:
string
|
null
;
id
:
string
;
latestPublicationYear
:
number
|
null
;
openLibraryId
:
string
|
null
;
originalPublicationYear
:
number
|
null
;
originalPublisher
:
string
|
null
;
pageNumber
:
number
|
null
;
smallerCoverPic
:
string
;
smallerCoverPicKey
:
string
|
null
;
title
:
string
;
updatedAt
:
Date
;
}
)
[]
;
createdAt
:
Date
;
id
:
string
;
isFavoritedbyCurrentUser
:
boolean
;
name
:
string
;
nationality
:
string
|
null
;
openLibraryId
:
string
|
null
;
smallerProfilePic
:
string
|
null
;
smallerProfilePicKey
:
string
|
null
;
subjects
:
string
|
null
;
topWorks
:
string
|
null
;
updatedAt
:
Date
;
}
,
>
Parameters
id
:
string
session
:
any
Returns
Promise
<
{
_count
:
{
favoritedBy
:
number
}
;
approveStatus
:
boolean
;
biggerProfilePic
:
string
|
null
;
biggerProfilePicKey
:
string
|
null
;
bio
:
string
|
null
;
birthDate
:
Date
|
null
;
books
:
(
{
genres
:
{
genre
:
{
name
:
string
}
}
[]
;
statistics
:
|
{
averageRating
:
number
;
bookId
:
string
;
id
:
string
;
ratingCount
:
number
;
readersCount
:
number
;
reviewCount
:
number
;
wantToReadCount
:
number
;
}
|
null
;
}
&
{
approveStatus
:
boolean
;
authorId
:
string
|
null
;
biggerCoverPic
:
string
;
biggerCoverPicKey
:
string
|
null
;
createdAt
:
Date
;
description
:
string
;
googleBookId
:
string
|
null
;
id
:
string
;
latestPublicationYear
:
number
|
null
;
openLibraryId
:
string
|
null
;
originalPublicationYear
:
number
|
null
;
originalPublisher
:
string
|
null
;
pageNumber
:
number
|
null
;
smallerCoverPic
:
string
;
smallerCoverPicKey
:
string
|
null
;
title
:
string
;
updatedAt
:
Date
;
}
)
[]
;
createdAt
:
Date
;
id
:
string
;
isFavoritedbyCurrentUser
:
boolean
;
name
:
string
;
nationality
:
string
|
null
;
openLibraryId
:
string
|
null
;
smallerProfilePic
:
string
|
null
;
smallerProfilePicKey
:
string
|
null
;
subjects
:
string
|
null
;
topWorks
:
string
|
null
;
updatedAt
:
Date
;
}
,
>
find
Pending
Approvals
findPendingApprovals
(
query
:
PaginationDto
,
session
:
any
,
)
:
Promise
<
{
data
:
any
;
meta
:
{
lastPage
:
number
;
page
:
number
;
total
:
number
}
}
,
>
Parameters
query
:
PaginationDto
session
:
any
Returns
Promise
<
{
data
:
any
;
meta
:
{
lastPage
:
number
;
page
:
number
;
total
:
number
}
}
>
get
Related
getRelated
(
id
:
string
,
)
:
Promise
<
{
approveStatus
:
boolean
;
biggerProfilePic
:
string
|
null
;
biggerProfilePicKey
:
string
|
null
;
bio
:
string
|
null
;
birthDate
:
Date
|
null
;
commonCount
:
number
;
createdAt
:
Date
;
id
:
string
;
name
:
string
;
nationality
:
string
|
null
;
openLibraryId
:
string
|
null
;
smallerProfilePic
:
string
|
null
;
smallerProfilePicKey
:
string
|
null
;
subjects
:
string
|
null
;
topWorks
:
string
|
null
;
updatedAt
:
Date
;
}
[]
,
>
Parameters
id
:
string
Returns
Promise
<
{
approveStatus
:
boolean
;
biggerProfilePic
:
string
|
null
;
biggerProfilePicKey
:
string
|
null
;
bio
:
string
|
null
;
birthDate
:
Date
|
null
;
commonCount
:
number
;
createdAt
:
Date
;
id
:
string
;
name
:
string
;
nationality
:
string
|
null
;
openLibraryId
:
string
|
null
;
smallerProfilePic
:
string
|
null
;
smallerProfilePicKey
:
string
|
null
;
subjects
:
string
|
null
;
topWorks
:
string
|
null
;
updatedAt
:
Date
;
}
[]
,
>
get
Related
By
Genres
getRelatedByGenres
(
id
:
string
,
)
:
Promise
<
{
_count
:
{
books
:
number
}
;
approveStatus
:
boolean
;
biggerProfilePic
:
string
|
null
;
biggerProfilePicKey
:
string
|
null
;
bio
:
string
|
null
;
birthDate
:
Date
|
null
;
commonCount
:
number
;
createdAt
:
Date
;
id
:
string
;
name
:
string
;
nationality
:
string
|
null
;
openLibraryId
:
string
|
null
;
smallerProfilePic
:
string
|
null
;
smallerProfilePicKey
:
string
|
null
;
subjects
:
string
|
null
;
topWorks
:
string
|
null
;
updatedAt
:
Date
;
}
[]
,
>
Parameters
id
:
string
Returns
Promise
<
{
_count
:
{
books
:
number
}
;
approveStatus
:
boolean
;
biggerProfilePic
:
string
|
null
;
biggerProfilePicKey
:
string
|
null
;
bio
:
string
|
null
;
birthDate
:
Date
|
null
;
commonCount
:
number
;
createdAt
:
Date
;
id
:
string
;
name
:
string
;
nationality
:
string
|
null
;
openLibraryId
:
string
|
null
;
smallerProfilePic
:
string
|
null
;
smallerProfilePicKey
:
string
|
null
;
subjects
:
string
|
null
;
topWorks
:
string
|
null
;
updatedAt
:
Date
;
}
[]
,
>
get
Stats
getStats
()
:
Promise
<
{
dataQuality
:
{
totalWithBio
:
number
;
totalWithPic
:
number
}
;
moderation
:
{
approved
:
number
;
pending
:
number
}
;
topAuthors
:
{
_count
:
{
favoritedBy
:
number
}
;
name
:
string
}
[]
;
}
,
>
Returns
Promise
<
{
dataQuality
:
{
totalWithBio
:
number
;
totalWithPic
:
number
}
;
moderation
:
{
approved
:
number
;
pending
:
number
}
;
topAuthors
:
{
_count
:
{
favoritedBy
:
number
}
;
name
:
string
}
[]
;
}
,
>
remove
Flexible
removeFlexible
(
olId
?:
string
,
id
?:
string
,
)
:
Promise
<
{
approveStatus
:
boolean
;
biggerProfilePic
:
string
|
null
;
biggerProfilePicKey
:
string
|
null
;
bio
:
string
|
null
;
birthDate
:
Date
|
null
;
createdAt
:
Date
;
id
:
string
;
name
:
string
;
nationality
:
string
|
null
;
openLibraryId
:
string
|
null
;
smallerProfilePic
:
string
|
null
;
smallerProfilePicKey
:
string
|
null
;
subjects
:
string
|
null
;
topWorks
:
string
|
null
;
updatedAt
:
Date
;
}
,
>
Parameters
Optional
olId
:
string
Optional
id
:
string
Returns
Promise
<
{
approveStatus
:
boolean
;
biggerProfilePic
:
string
|
null
;
biggerProfilePicKey
:
string
|
null
;
bio
:
string
|
null
;
birthDate
:
Date
|
null
;
createdAt
:
Date
;
id
:
string
;
name
:
string
;
nationality
:
string
|
null
;
openLibraryId
:
string
|
null
;
smallerProfilePic
:
string
|
null
;
smallerProfilePicKey
:
string
|
null
;
subjects
:
string
|
null
;
topWorks
:
string
|
null
;
updatedAt
:
Date
;
}
,
>
search
External
searchExternal
(
name
:
string
)
:
Promise
<
any
[]
>
Parameters
name
:
string
Returns
Promise
<
any
[]
>
update
update
(
id
:
string
,
file
:
UploadedFile
|
null
,
updateAuthorDto
:
UpdateAuthorDto
,
)
:
Promise
<
{
approveStatus
:
boolean
;
biggerProfilePic
:
string
|
null
;
biggerProfilePicKey
:
string
|
null
;
bio
:
string
|
null
;
birthDate
:
Date
|
null
;
createdAt
:
Date
;
id
:
string
;
name
:
string
;
nationality
:
string
|
null
;
openLibraryId
:
string
|
null
;
smallerProfilePic
:
string
|
null
;
smallerProfilePicKey
:
string
|
null
;
subjects
:
string
|
null
;
topWorks
:
string
|
null
;
updatedAt
:
Date
;
}
,
>
Parameters
id
:
string
file
:
UploadedFile
|
null
updateAuthorDto
:
UpdateAuthorDto
Returns
Promise
<
{
approveStatus
:
boolean
;
biggerProfilePic
:
string
|
null
;
biggerProfilePicKey
:
string
|
null
;
bio
:
string
|
null
;
birthDate
:
Date
|
null
;
createdAt
:
Date
;
id
:
string
;
name
:
string
;
nationality
:
string
|
null
;
openLibraryId
:
string
|
null
;
smallerProfilePic
:
string
|
null
;
smallerProfilePicKey
:
string
|
null
;
subjects
:
string
|
null
;
topWorks
:
string
|
null
;
updatedAt
:
Date
;
}
,
>
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
On This Page
Constructors
constructor
Methods
approve
create
disapprove
find
All
find
One
find
Pending
Approvals
get
Related
get
Related
By
Genres
get
Stats
remove
Flexible
search
External
update
backend
Loading...