using System.Collections.Immutable;
using Common.Documents;
using Connected.Annotations;
using Connected.ServiceModel;
namespace Logistics.Documents.Receive;
///
/// Represents service for the document.
///
[Service]
[ServiceUrl(DocumentUrls.Receives)]
public interface IReceiveDocumentService : IDocumentService
{
///
/// Inserts a new .
///
/// The arguments containing the properties of the new document.
/// The id of the newly inserted document.
Task Insert(InsertReceiveDocumentArgs args);
///
/// Updates document.
///
/// The arguments containing changed properties of the document.
Task Update(UpdateReceiveDocumentArgs args);
///
/// Performs partial update on the for the properties specified
/// in arguments.
///
/// The arguments containing properties that need to be updated.
Task Patch(PatchArgs args);
///
/// Deletes from the storage.
///
/// The arguments containing the id of the document that is about to be deleted.
Task Delete(PrimaryKeyArgs args);
///
/// Selects for the specified id.
///
/// The arguments containing the id.
/// if found, null otherwise.
Task Select(PrimaryKeyArgs args);
///
/// Searches documents for the specified criteria.
///
/// The arguments containing the query criteria.
/// The list of documents that matches the search criteria.
Task> Query(QueryArgs? args);
///
/// Inserts a new into the document.
///
/// The arguments containing the properties of the new item.
/// The id of the newly inserted item.
Task InsertItem(InsertReceiveItemArgs args);
///
/// Updates .
///
/// The arguments containing the properties to be updated.
Task UpdateItem(UpdateReceiveItemArgs args);
///
/// Permanently deleted the .
///
/// The arguments containing the id of the item to be deleted.
Task DeleteItem(PrimaryKeyArgs args);
///
/// Queries the items for the specified .
///
/// The arguments containing the id of the document for which the items to be
/// queried.
/// The list of items that belong to the specified document.
Task> QueryItems(PrimaryKeyArgs args);
///
/// Selects the item for the specified id.
///
/// The arguments containing the id of the item.
/// The if found, null otherwise.
Task SelectItem(PrimaryKeyArgs args);
///
/// Select the for the specified entity and entity id from the
/// specified document.
///
/// The arguments containing criteria values.
/// A first that matches the criteria, null otherwise.
Task SelectItem(SelectReceiveItemArgs args);
}