ISellerModuleService Reference
This section of the documentation provides a reference to theISellerModuleService interface’s methods. This is the interface developers use to use the functionalities provided by the Seller Module.
The main service interface for the Seller Module.
Methods
Seller Methods
- createSellers
- updateSellers
- deleteSellers
- retrieveSeller
- listSellers
- listAndCountSellers
- softDeleteSellers
- restoreSellers
Member Methods
- createMembers
- updateMembers
- deleteMembers
- retrieveMember
- listMembers
- listAndCountMembers
- softDeleteMembers
- restoreMembers
Member Invite Methods
- createMemberInvites
- updateMemberInvites
- deleteMemberInvites
- retrieveMemberInvite
- listMemberInvites
- listAndCountMemberInvites
- softDeleteMemberInvites
- restoreMemberInvites
- validateInviteToken
Seller Onboarding Methods
- createSellerOnboardings
- updateSellerOnboardings
- deleteSellerOnboardings
- retrieveSellerOnboarding
- listSellerOnboardings
- listAndCountSellerOnboardings
- softDeleteSellerOnboardings
- restoreSellerOnboardings
- isOnboardingCompleted
createSellers
This section provides a reference to thecreateSellers method. This belongs to the Seller Module.
createSellers(data, sharedContext?): Promise<SellerDTO[]>
This method creates sellers.Example
Parameters
The sellers to be created.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
The created sellers.
createSellers(data, sharedContext?): Promise<SellerDTO>
This method creates a seller.Example
Parameters
The seller to be created.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
The created seller.
updateSellers
This section provides a reference to theupdateSellers method. This belongs to the Seller Module.
updateSellers(id, data, sharedContext?): Promise<SellerDTO>
This method updates an existing seller.Example
Parameters
The ID of the seller.
The attributes to update in the seller.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
The updated seller.
deleteSellers
This section provides a reference to thedeleteSellers method. This belongs to the Seller Module.
deleteSellers(ids, sharedContext?): Promise<void>
This method deletes sellers by their IDs.Example
Parameters
The IDs of the sellers.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
Resolves when the sellers are deleted successfully.
deleteSellers(id, sharedContext?): Promise<void>
This method deletes a seller by its ID.Example
Parameters
The ID of the seller.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
Resolves when the seller is deleted successfully.
retrieveSeller
This section provides a reference to theretrieveSeller method. This belongs to the Seller Module.
This method retrieves a seller by its ID.
Example
Parameters
The ID of the seller.
The configurations determining how the seller is retrieved. Its properties, such as
select or relations, accept the attributes or relations associated with a seller.A context used to share resources, such as transaction manager, between the application and the module.
Returns
The retrieved seller.
listSellers
This section provides a reference to thelistSellers method. This belongs to the Seller Module.
This method retrieves a paginated list of sellers based on optional filters and configuration.
Example
To retrieve a list of sellers using their IDs:15 records are retrieved. You can control pagination:
Parameters
The filters to apply on the retrieved sellers.
The configurations determining how the seller is retrieved.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
The list of sellers.
listAndCountSellers
This section provides a reference to thelistAndCountSellers method. This belongs to the Seller Module.
This method retrieves a paginated list of sellers along with the total count of available sellers satisfying the provided filters.
Example
Parameters
The filters to apply on the retrieved sellers.
The configurations determining how the seller is retrieved.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
The list of sellers along with their total count.
softDeleteSellers
This section provides a reference to thesoftDeleteSellers method. This belongs to the Seller Module.
This method soft deletes sellers by their IDs.
Example
Parameters
The IDs of the sellers.
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.restoreSellers
This section provides a reference to therestoreSellers method. This belongs to the Seller Module.
This method restores soft deleted sellers by their IDs.
Example
Parameters
The IDs of the sellers.
Configurations determining which relations to restore along with each of the seller.
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.createMembers
This section provides a reference to thecreateMembers method. This belongs to the Seller Module.
createMembers(data, sharedContext?): Promise<MemberDTO[]>
This method creates members.Example
Parameters
The members to be created.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
The created members.
createMembers(data, sharedContext?): Promise<MemberDTO>
This method creates a member.Example
Parameters
The member to be created.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
The created member.
updateMembers
This section provides a reference to theupdateMembers method. This belongs to the Seller Module.
updateMembers(id, data, sharedContext?): Promise<MemberDTO>
This method updates an existing member.Example
Parameters
The ID of the member.
The attributes to update in the member.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
The updated member.
deleteMembers
This section provides a reference to thedeleteMembers method. This belongs to the Seller Module.
deleteMembers(ids, sharedContext?): Promise<void>
This method deletes members by their IDs.Example
Parameters
The IDs of the members.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
Resolves when the members are deleted successfully.
deleteMembers(id, sharedContext?): Promise<void>
This method deletes a member by its ID.Example
Parameters
The ID of the member.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
Resolves when the member is deleted successfully.
retrieveMember
This section provides a reference to theretrieveMember method. This belongs to the Seller Module.
This method retrieves a member by its ID.
Example
Parameters
The ID of the member.
The configurations determining how the member is retrieved.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
The retrieved member.
listMembers
This section provides a reference to thelistMembers method. This belongs to the Seller Module.
This method retrieves a paginated list of members based on optional filters and configuration.
Example
Parameters
The filters to apply on the retrieved members.
The configurations determining how the member is retrieved.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
The list of members.
listAndCountMembers
This section provides a reference to thelistAndCountMembers method. This belongs to the Seller Module.
This method retrieves a paginated list of members along with the total count of available members satisfying the provided filters.
Example
Parameters
The filters to apply on the retrieved members.
The configurations determining how the member is retrieved.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
The list of members along with their total count.
softDeleteMembers
This section provides a reference to thesoftDeleteMembers method. This belongs to the Seller Module.
This method soft deletes members by their IDs.
Example
Parameters
The IDs of the members.
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.restoreMembers
This section provides a reference to therestoreMembers method. This belongs to the Seller Module.
This method restores soft deleted members by their IDs.
Example
Parameters
The IDs of the members.
Configurations determining which relations to restore along with each of the member.
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.createMemberInvites
This section provides a reference to thecreateMemberInvites method. This belongs to the Seller Module.
This method creates member invites with automatically generated JWT tokens.
createMemberInvites(data, sharedContext?): Promise<MemberInviteDTO[]>
Example
Parameters
The member invites to be created.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
The created member invites with generated tokens.
validateInviteToken
This section provides a reference to thevalidateInviteToken method. This belongs to the Seller Module.
This method validates a member invitation JWT token and returns the associated invite if valid.
Example
Parameters
The JWT invitation token to validate.
Returns
The validated member invite.
This method throws an error if the invite has already been accepted or has expired.
updateMemberInvites
This section provides a reference to theupdateMemberInvites method. This belongs to the Seller Module.
updateMemberInvites(id, data, sharedContext?): Promise<MemberInviteDTO>
This method updates an existing member invite.Example
Parameters
The ID of the member invite.
The attributes to update in the member invite.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
The updated member invite.
deleteMemberInvites
This section provides a reference to thedeleteMemberInvites method. This belongs to the Seller Module.
deleteMemberInvites(ids, sharedContext?): Promise<void>
This method deletes member invites by their IDs.Example
Parameters
The IDs of the member invites.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
Resolves when the member invites are deleted successfully.
deleteMemberInvites(id, sharedContext?): Promise<void>
This method deletes a member invite by its ID.Example
Parameters
The ID of the member invite.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
Resolves when the member invite is deleted successfully.
retrieveMemberInvite
This section provides a reference to theretrieveMemberInvite method. This belongs to the Seller Module.
This method retrieves a member invite by its ID.
Example
Parameters
The ID of the member invite.
The configurations determining how the member invite is retrieved.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
The retrieved member invite.
listMemberInvites
This section provides a reference to thelistMemberInvites method. This belongs to the Seller Module.
This method retrieves a paginated list of member invites based on optional filters and configuration.
Example
Parameters
The filters to apply on the retrieved member invites.
The configurations determining how the member invite is retrieved.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
The list of member invites.
listAndCountMemberInvites
This section provides a reference to thelistAndCountMemberInvites method. This belongs to the Seller Module.
This method retrieves a paginated list of member invites along with the total count of available member invites satisfying the provided filters.
Example
Parameters
The filters to apply on the retrieved member invites.
The configurations determining how the member invite is retrieved.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
The list of member invites along with their total count.
softDeleteMemberInvites
This section provides a reference to thesoftDeleteMemberInvites method. This belongs to the Seller Module.
This method soft deletes member invites by their IDs.
Example
Parameters
The IDs of the member invites.
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.restoreMemberInvites
This section provides a reference to therestoreMemberInvites method. This belongs to the Seller Module.
This method restores soft deleted member invites by their IDs.
Example
Parameters
The IDs of the member invites.
Configurations determining which relations to restore along with each of the member invite.
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.createSellerOnboardings
This section provides a reference to thecreateSellerOnboardings method. This belongs to the Seller Module.
createSellerOnboardings(data, sharedContext?): Promise<SellerOnboardingDTO[]>
This method creates seller onboarding records.Example
Parameters
The seller onboardings to be created.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
The created seller onboardings.
updateSellerOnboardings
This section provides a reference to theupdateSellerOnboardings method. This belongs to the Seller Module.
updateSellerOnboardings(id, data, sharedContext?): Promise<SellerOnboardingDTO>
This method updates an existing seller onboarding record.Example
Parameters
The ID of the seller onboarding.
The attributes to update in the seller onboarding.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
The updated seller onboarding.
isOnboardingCompleted
This section provides a reference to theisOnboardingCompleted method. This belongs to the Seller Module.
This method checks whether a seller has completed all onboarding steps.
Example
Parameters
The ID of the seller to check.
Returns
A boolean indicating whether all onboarding steps are completed. Returns
true if all four steps (store_information, stripe_connection, locations_shipping, products) are completed, otherwise false.deleteSellerOnboardings
This section provides a reference to thedeleteSellerOnboardings method. This belongs to the Seller Module.
deleteSellerOnboardings(ids, sharedContext?): Promise<void>
This method deletes seller onboardings by their IDs.Example
Parameters
The IDs of the seller onboardings.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
Resolves when the seller onboardings are deleted successfully.
deleteSellerOnboardings(id, sharedContext?): Promise<void>
This method deletes a seller onboarding by its ID.Example
Parameters
The ID of the seller onboarding.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
Resolves when the seller onboarding is deleted successfully.
retrieveSellerOnboarding
This section provides a reference to theretrieveSellerOnboarding method. This belongs to the Seller Module.
This method retrieves a seller onboarding by its ID.
Example
Parameters
The ID of the seller onboarding.
The configurations determining how the seller onboarding is retrieved.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
The retrieved seller onboarding.
listSellerOnboardings
This section provides a reference to thelistSellerOnboardings method. This belongs to the Seller Module.
This method retrieves a paginated list of seller onboardings based on optional filters and configuration.
Example
Parameters
The filters to apply on the retrieved seller onboardings.
The configurations determining how the seller onboarding is retrieved.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
The list of seller onboardings.
listAndCountSellerOnboardings
This section provides a reference to thelistAndCountSellerOnboardings method. This belongs to the Seller Module.
This method retrieves a paginated list of seller onboardings along with the total count of available seller onboardings satisfying the provided filters.
Example
Parameters
The filters to apply on the retrieved seller onboardings.
The configurations determining how the seller onboarding is retrieved.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
The list of seller onboardings along with their total count.
softDeleteSellerOnboardings
This section provides a reference to thesoftDeleteSellerOnboardings method. This belongs to the Seller Module.
This method soft deletes seller onboardings by their IDs.
Example
Parameters
The IDs of the seller onboardings.
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.restoreSellerOnboardings
This section provides a reference to therestoreSellerOnboardings method. This belongs to the Seller Module.
This method restores soft deleted seller onboardings by their IDs.
Example
Parameters
The IDs of the seller onboardings.
Configurations determining which relations to restore along with each of the seller onboarding.
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.