IWishlistModuleService Reference
This section of the documentation provides a reference to theIWishlistModuleService interface’s methods. This is the interface developers use to use the functionalities provided by the Wishlist Module.
The main service interface for the Wishlist Module.
Methods
- createWishlists
- updateWishlists
- deleteWishlists
- retrieveWishlist
- listWishlists
- listAndCountWishlists
- softDeleteWishlists
- restoreWishlists
createWishlists
This section provides a reference to thecreateWishlists method. This belongs to the Wishlist Module.
createWishlists(data, sharedContext?): Promise<WishlistDTO[]>
This method creates wishlist items.Example
Parameters
The wishlist items to be created.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
The created wishlist items.
createWishlists(data, sharedContext?): Promise<WishlistDTO>
This method creates a wishlist item.Example
Parameters
The wishlist item to be created.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
The created wishlist item.
updateWishlists
This section provides a reference to theupdateWishlists method. This belongs to the Wishlist Module.
updateWishlists(id, data, sharedContext?): Promise<WishlistDTO>
This method updates an existing wishlist item.Example
Parameters
The ID of the wishlist item.
The attributes to update in the wishlist item.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
The updated wishlist item.
deleteWishlists
This section provides a reference to thedeleteWishlists method. This belongs to the Wishlist Module.
deleteWishlists(ids, sharedContext?): Promise<void>
This method deletes wishlist items by their IDs.Example
Parameters
The IDs of the wishlist items.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
Resolves when the wishlist items are deleted successfully.
deleteWishlists(id, sharedContext?): Promise<void>
This method deletes a wishlist item by its ID.Example
Parameters
The ID of the wishlist item.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
Resolves when the wishlist item is deleted successfully.
retrieveWishlist
This section provides a reference to theretrieveWishlist method. This belongs to the Wishlist Module.
This method retrieves a wishlist item by its ID.
Example
Parameters
The ID of the wishlist item.
The configurations determining how the wishlist item is retrieved.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
The retrieved wishlist item.
listWishlists
This section provides a reference to thelistWishlists method. This belongs to the Wishlist Module.
This method retrieves a paginated list of wishlist items based on optional filters and configuration.
Example
To retrieve a customer’s wishlist:15 records are retrieved. You can control pagination by specifying the skip and take properties of the config parameter:
Parameters
The filters to apply on the retrieved wishlist items.
The configurations determining how the wishlist item is retrieved.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
The list of wishlist items.
listAndCountWishlists
This section provides a reference to thelistAndCountWishlists method. This belongs to the Wishlist Module.
This method retrieves a paginated list of wishlist items along with the total count of available wishlist items satisfying the provided filters.
Example
To retrieve a customer’s wishlist with count:15 records are retrieved. You can control pagination by specifying the skip and take properties of the config parameter:
Parameters
The filters to apply on the retrieved wishlist items.
The configurations determining how the wishlist item is retrieved.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
The list of wishlist items along with their total count.
softDeleteWishlists
This section provides a reference to thesoftDeleteWishlists method. This belongs to the Wishlist Module.
This method soft deletes wishlist items by their IDs.
Example
Parameters
The IDs of the wishlist items.
An object that is used to specify an entity’s related entities that should be soft-deleted when the main entity is soft-deleted.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
An object that includes the IDs of related records that were also soft deleted. If there are no related records, the promise resolves to
void.restoreWishlists
This section provides a reference to therestoreWishlists method. This belongs to the Wishlist Module.
This method restores soft deleted wishlist items by their IDs.
Example
Parameters
The IDs of the wishlist items.
Configurations determining which relations to restore along with each of the wishlist item.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
An object that includes the IDs of related records that were restored. If there are no related records restored, the promise resolves to
void.