backend
    Preparing search index...
    Index

    Constructors

    Methods

    • Parameters

      • id: string

      Returns Promise<
          {
              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;
          },
      >

    • Parameters

      Returns Promise<
          {
              author: | {
                  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;
              }
              | null;
              genres: (
                  { genre: { id: string; name: string } } & {
                      bookId: string;
                      genreId: string;
                  }
              )[];
              isbns: { bookId: string; id: string; isbnNumber: 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;
          },
      >

    • Parameters

      • id: string

      Returns Promise<
          {
              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;
          },
      >

    • Parameters

      Returns Promise<
          | {
              book?: undefined;
              existingBooksFromAuthor?: undefined;
              externalBook?: undefined;
              status: string;
          }
          | {
              book: | {
                  author: | {
                      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;
                  }
                  | null;
                  genres: (
                      { genre: { id: string; name: string } } & {
                          bookId: string;
                          genreId: string;
                      }
                  )[];
                  isbns: { bookId: string; id: string; isbnNumber: string }[];
              } & {
                  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;
              }
              | null;
              existingBooksFromAuthor?: undefined;
              externalBook?: undefined;
              status: string;
          }
          | {
              book?: undefined;
              existingBooksFromAuthor: (
                  { isbns: { bookId: string; id: string; isbnNumber: string }[] } & {
                      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;
                  }
              )[];
              externalBook: ExternalBookResponse;
              status: string;
          }
          | {
              book: ExternalBookResponse;
              existingBooksFromAuthor?: undefined;
              externalBook?: undefined;
              status: string;
          },
      >

    • Parameters

      Returns Promise<
          {
              data: {
                  approveStatus: boolean;
                  author: { id: string; name: string }
                  | null;
                  authorId: string | null;
                  biggerCoverPic: string;
                  biggerCoverPicKey: string | null;
                  commentCount: number;
                  createdAt: Date;
                  description: string;
                  favoriteCount: number;
                  genres: { genre: { name: string } }[];
                  googleBookId: string | null;
                  id: string;
                  isFavorited: boolean;
                  latestPublicationYear: number | null;
                  openLibraryId: string | null;
                  originalPublicationYear: number | null;
                  originalPublisher: string | null;
                  pageNumber: number | null;
                  smallerCoverPic: string;
                  smallerCoverPicKey: string | null;
                  statistics: { averageRating: number; ratingCount: number } | null;
                  title: string;
                  updatedAt: Date;
              }[];
              meta: {
                  hasNextPage: boolean;
                  hasPreviousPage: boolean;
                  lastPage: number;
                  page: number;
                  total: number;
              };
          },
      >

    • Parameters

      • id: string
      • session: any

      Returns Promise<
          {
              foundBook: {
                  _count: { favoritedBy: number };
                  approveStatus: boolean;
                  author:
                      | {
                          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;
                      }
                      | null;
                  authorId: string
                  | null;
                  biggerCoverPic: string;
                  biggerCoverPicKey: string | null;
                  comments: {
                      _count: { votes: number };
                      bookId: string;
                      createdAt: Date;
                      id: string;
                      isLikedByMe: boolean;
                      likeCount: number;
                      text: string;
                      user: {
                          biggerProfilePic: string | null;
                          biggerProfilePicKey: string | null;
                          createdAt: Date;
                          email: string;
                          id: string;
                          nickname: string | null;
                          smallerProfilePic: string | null;
                          smallerProfilePicKey: string | null;
                          updatedAt: Date;
                          username: string;
                      };
                      userId: string;
                      votes: { commentId: string; userId: string }[];
                  }[];
                  createdAt: Date;
                  description: string;
                  favoritedBy: { bookId: string; userId: string }[];
                  genres: (
                      { genre: { id: string; name: string } } & {
                          bookId: string;
                          genreId: string;
                      }
                  )[];
                  googleBookId: string
                  | null;
                  id: string;
                  isbns: { bookId: string; id: string; isbnNumber: string }[];
                  isLikedByMe: boolean;
                  latestPublicationYear: number | null;
                  openLibraryId: string | null;
                  originalPublicationYear: number | null;
                  originalPublisher: string | null;
                  pageNumber: number | null;
                  ratings: {
                      bookId: string;
                      createdAt: Date;
                      score: number;
                      userId: string;
                  }[];
                  smallerCoverPic: string;
                  smallerCoverPicKey: string
                  | null;
                  statistics:
                      | {
                          averageRating: number;
                          bookId: string;
                          id: string;
                          ratingCount: number;
                          readersCount: number;
                          reviewCount: number;
                          wantToReadCount: number;
                      }
                      | null;
                  title: string;
                  updatedAt: Date;
              };
              similarBooks: (
                  {
                      author: | {
                          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;
                      }
                      | null;
                      genres: (
                          { genre: { id: string; name: string } } & {
                              bookId: string;
                              genreId: string;
                          }
                      )[];
                      isbns: { bookId: string; id: string; isbnNumber: 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;
                  }
              )[];
          },
      >

    • Parameters

      • isbn: string

      Returns Promise<
          {
              book: {
                  author: { name: string }
                  | null;
                  genres: (
                      { genre: { id: string; name: string } } & {
                          bookId: string;
                          genreId: string;
                      }
                  )[];
                  isbns: { bookId: string; id: string; isbnNumber: 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;
              };
          } & { bookId: string; id: string; isbnNumber: string },
      >

    • Returns Promise<
          | {
              author: | {
                  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;
              }
              | null;
              genres: (
                  { genre: { id: string; name: string } } & {
                      bookId: string;
                      genreId: string;
                  }
              )[];
              isbns: { bookId: string; id: string; isbnNumber: 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;
          }
          | null,
      >

    • Parameters

      Returns Promise<
          (
              {
                  author: { name: string }
                  | null;
                  comments: {
                      bookId: string;
                      createdAt: Date;
                      id: string;
                      text: string;
                      userId: string;
                  }[];
                  genres: (
                      { genre: { name: string } } & { bookId: string; genreId: string }
                  )[];
                  isbns: { bookId: string; id: string; isbnNumber: 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;
              }
          )[],
      >

    • Parameters

      Returns Promise<
          {
              data: | (
                  {
                      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;
                  }
              )[]
              | undefined;
              subtitle: string;
              title: string;
          }[],
      >

    • Parameters

      • session: any

      Returns Promise<
          {
              authors: (
                  | {
                      data: {
                          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;
                      }[];
                      profilePic?: undefined;
                      subtitle: string;
                      title: string;
                  }
                  | {
                      data: | never[]
                      | {
                          biggerProfilePic: string
                          | null;
                          id: string;
                          name: string;
                          nationality: string | null;
                          smallerProfilePic: string | null;
                          topWorks: string | null;
                      }[];
                      profilePic: string
                      | null
                      | undefined;
                      subtitle: string;
                      title: string;
                  }
              )[];
              books: (
                  | {
                      data: (
                          {
                              comments: {
                                  bookId: string;
                                  createdAt: Date;
                                  id: string;
                                  text: string;
                                  userId: string;
                              }[];
                              genres: ({ genre: ... } & { bookId: ...; genreId: ... })[];
                              isbns: { bookId: string; id: string; isbnNumber: 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;
                          }
                      )[];
                      image?: undefined;
                      profilePic: string
                      | null;
                      subtitle: string;
                      title: string;
                  }
                  | {
                      data: (
                          {
                              author: { name: string }
                              | null;
                              genres: ({ genre: ... } & { bookId: ...; genreId: ... })[];
                              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;
                          }
                      )[];
                      image: null;
                      profilePic?: undefined;
                      subtitle: string;
                      title: string;
                  }
                  | {
                      data: (
                          {
                              author: { name: string }
                              | null;
                              comments: {
                                  bookId: string;
                                  createdAt: Date;
                                  id: string;
                                  text: string;
                                  userId: string;
                              }[];
                              genres: ({ genre: ... } & { bookId: ...; genreId: ... })[];
                              isbns: { bookId: string; id: string; isbnNumber: 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;
                          }
                      )[];
                      image: null;
                      profilePic?: undefined;
                      subtitle: string;
                      title: string;
                  }
                  | {
                      data: (
                          {
                              author: { name: string }
                              | null;
                              genres: ({ genre: ... } & { bookId: ...; genreId: ... })[];
                              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;
                          }
                      )[];
                      image: string
                      | undefined;
                      profilePic?: undefined;
                      subtitle: string | undefined;
                      title: string;
                  }
              )[];
          },
      >

    • Parameters

      • session: any

      Returns Promise<
          {
              authors: {
                  data: {
                      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;
                  }[];
                  subtitle: string;
                  title: string;
              };
              books: {
                  data: (
                      {
                          genres: (
                              { genre: { id: string; name: string } } & {
                                  bookId: string;
                                  genreId: 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;
                      }
                  )[];
                  subtitle: string;
                  title: string;
              };
          },
      >

    • Returns Promise<
          {
              authors: {
                  data: {
                      approveStatus: boolean;
                      biggerProfilePic: string
                      | null;
                      bio: string | null;
                      birthDate: Date | null;
                      createdAt: Date;
                      id: string;
                      name: string;
                      nationality: string | null;
                      openLibraryId: string | null;
                      smallerProfilePic: string | null;
                      subjects: string | null;
                      topWorks: string | null;
                      updatedAt: Date;
                  }[];
                  subtitle: string;
                  title: string;
              }[];
              books: {
                  data: (
                      {
                          author: | {
                              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;
                          }
                          | null;
                          genres: (
                              { genre: { id: ...; name: ... } } & {
                                  bookId: string;
                                  genreId: string;
                              }
                          )[];
                          isbns: { bookId: string; id: string; isbnNumber: 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;
                      }
                  )[];
                  subtitle: string;
                  title: string;
              }[];
          },
      >

    • Returns Promise<
          {
              authors: {
                  data: {
                      approveStatus: boolean;
                      biggerProfilePic: string
                      | null;
                      bio: string | null;
                      birthDate: Date | null;
                      createdAt: Date;
                      id: string;
                      name: string;
                      nationality: string | null;
                      openLibraryId: string | null;
                      smallerProfilePic: string | null;
                      subjects: string | null;
                      topWorks: string | null;
                      updatedAt: Date;
                  }[];
                  subtitle: string;
                  title: string;
              }[];
              books: {
                  data: (
                      {
                          author: { name: string }
                          | null;
                          comments: {
                              bookId: string;
                              createdAt: Date;
                              id: string;
                              text: string;
                              userId: string;
                          }[];
                          genres: (
                              { genre: { name: ... } } & { bookId: string; genreId: string }
                          )[];
                          isbns: { bookId: string; id: string; isbnNumber: string }[];
                          statistics:
                              | {
                                  averageRating: number;
                                  bookId: string;
                                  id: string;
                                  ratingCount: number;
                                  readersCount: number;
                                  reviewCount: number;
                                  wantToReadCount: number;
                              }
                              | null;
                      } & {
                          approveStatus: boolean;
                          authorId: string
                          | null;
                          biggerCoverPic: string;
                          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;
                          title: string;
                          updatedAt: Date;
                      }
                  )[];
                  subtitle: string;
                  title: string;
              }[];
          },
      >

    • Parameters

      • id: string

      Returns Promise<
          {
              deletedBook: {
                  biggerCoverPicKey: string
                  | null;
                  smallerCoverPicKey: string | null;
              };
              message: string;
          },
      >

    • Parameters

      • query: string
      • take: number = 10
      • session: any

      Returns Promise<
          {
              authors: (
                  { favoritedBy: { authorId: string; userId: string }[] } & {
                      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;
                  }
              )[];
              books: (
                  {
                      author: { name: string }
                      | null;
                      favoritedBy: { bookId: string; userId: string }[];
                  } & {
                      approveStatus: boolean;
                      authorId: string
                      | null;
                      biggerCoverPic: string;
                      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;
                      title: string;
                      updatedAt: Date;
                  }
              )[];
              genres: { id: string; name: string }[];
          },
      >

    • Parameters

      Returns Promise<
          {
              author: | {
                  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;
              }
              | null;
              genres: (
                  { genre: { id: string; name: string } } & {
                      bookId: string;
                      genreId: string;
                  }
              )[];
              isbns: { bookId: string; id: string; isbnNumber: string }[];
          } & {
              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;
          },
      >