|
|
@ -26,18 +26,32 @@ defmodule DecentralisedBookIndex.Metadata do
|
|
|
|
:bids,
|
|
|
|
:bids,
|
|
|
|
:author_roles,
|
|
|
|
:author_roles,
|
|
|
|
:publisher_id,
|
|
|
|
:publisher_id,
|
|
|
|
|
|
|
|
{:optional, :cover_image_url},
|
|
|
|
{:optional, :book_editions_registry_id}
|
|
|
|
{:optional, :book_editions_registry_id}
|
|
|
|
]
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
define :add_book_to_related_editions_registry,
|
|
|
|
define :add_book_to_related_editions_registry,
|
|
|
|
action: :add_book_to_related_editions_registry,
|
|
|
|
action: :add_book_to_related_editions_registry,
|
|
|
|
args: [:title, :description, :language, :format, :page_count, :published, :bids, :author_roles, :publisher_id, :related_book_id]
|
|
|
|
args: [
|
|
|
|
|
|
|
|
:title,
|
|
|
|
|
|
|
|
:description,
|
|
|
|
|
|
|
|
:language,
|
|
|
|
|
|
|
|
:format,
|
|
|
|
|
|
|
|
:page_count,
|
|
|
|
|
|
|
|
:published,
|
|
|
|
|
|
|
|
:bids,
|
|
|
|
|
|
|
|
:author_roles,
|
|
|
|
|
|
|
|
:publisher_id,
|
|
|
|
|
|
|
|
:related_book_id,
|
|
|
|
|
|
|
|
{:optional, :cover_image_url}
|
|
|
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
define :list_books, action: :read
|
|
|
|
define :list_books, action: :read
|
|
|
|
define :get_book_by_id, args: [:id], action: :by_id
|
|
|
|
define :get_book_by_id, args: [:id], action: :by_id
|
|
|
|
define :get_book_by_bid, args: [:type, :bid], action: :by_bid
|
|
|
|
define :get_book_by_bid, args: [:type, :bid], action: :by_bid
|
|
|
|
define :get_book_alternative_editions, args: [:book], action: :get_alternative_editions
|
|
|
|
define :get_book_alternative_editions, args: [:book], action: :get_alternative_editions
|
|
|
|
define :get_author_books, args: [:author], action: :get_author_books
|
|
|
|
define :get_author_books, args: [:author], action: :get_author_books
|
|
|
|
|
|
|
|
define :search_book, action: :search, args: [:query]
|
|
|
|
define :update_book, action: :update
|
|
|
|
define :update_book, action: :update
|
|
|
|
define :assign_book_cover_image, args: [:cover_image_url], action: :assign_cover_image
|
|
|
|
define :assign_book_cover_image, args: [:cover_image_url], action: :assign_cover_image
|
|
|
|
define :destroy_book, action: :destroy
|
|
|
|
define :destroy_book, action: :destroy
|
|
|
@ -90,6 +104,7 @@ defmodule DecentralisedBookIndex.Metadata do
|
|
|
|
define :create_author_role, action: :create, args: [:author_id, :order, :role]
|
|
|
|
define :create_author_role, action: :create, args: [:author_id, :order, :role]
|
|
|
|
define :list_author_roles, action: :read
|
|
|
|
define :list_author_roles, action: :read
|
|
|
|
define :get_author_role_by_id, args: [:id], action: :by_id
|
|
|
|
define :get_author_role_by_id, args: [:id], action: :by_id
|
|
|
|
|
|
|
|
define :get_author_roles_by_book_id, args: [:book_id], action: :by_book_id
|
|
|
|
define :update_author_role, action: :update
|
|
|
|
define :update_author_role, action: :update
|
|
|
|
define :destroy_author_role, action: :destroy
|
|
|
|
define :destroy_author_role, action: :destroy
|
|
|
|
end
|
|
|
|
end
|
|
|
|