ICommissionModuleService Reference
This section of the documentation provides a reference to the ICommissionModuleService interface’s methods. This is the interface developers use to use the functionalities provided by the Commission Module.
You should only use the methods in this reference when implementing complex customizations. For common cases, check out available workflows instead.
The main service interface for the Commission Module.
Methods
Commission Rule Methods
Commission Rate Methods
Commission Line Methods
Custom Methods
selectCommissionForProductLine
This section provides a reference to the selectCommissionForProductLine method. This belongs to the Commission Module.
This method selects the applicable commission rule for a given product line item based on the commission rule priority system. It searches through rules in priority order and returns the first matching active rule.
Priority Order
seller+product_type (highest priority)
seller+product_category
seller
product_type
product_category
site (lowest priority/default)
Example
const rule = await commissionModuleService . selectCommissionForProductLine ({
seller_id: "sel_123" ,
product_type_id: "ptyp_456" ,
product_category_id: "pcat_789" ,
})
Parameters
ctx
CommissionCalculationContext
required
The calculation context containing product and seller information. The ID of the product type.
The ID of the product category.
Returns
Promise
Promise<CommissionRuleDTO | null>
The first applicable commission rule found, or null if no rule matches. The ID of the commission rule.
The name of the commission rule.
The type of the commission rule reference.
The ID of the referenced entity.
The associated commission rate. The ID of the commission rate.
The type of the commission rate.
The percentage rate for percentage-based commissions.
Whether the commission calculation includes tax.
The ID of the price set used for flat-rate commissions.
The ID of the price set defining the maximum commission amount.
The ID of the price set defining the minimum commission amount.
The created date of the commission rate.
The updated date of the commission rate.
The created date of the commission rule.
The updated date of the commission rule.
createCommissionRules
This section provides a reference to the createCommissionRules method. This belongs to the Commission Module.
createCommissionRules(data, sharedContext?): Promise<CommissionRuleDTO[]>
This method creates commission rules.
Example
const rules = await commissionModuleService . createCommissionRules ([
{
name: "Default Site Commission" ,
reference: "site" ,
reference_id: "" ,
is_active: true ,
rate: {
type: "percentage" ,
percentage_rate: 10 ,
include_tax: false ,
},
},
])
Parameters
data
CreateCommissionRuleDTO[]
required
The commission rules to be created. The name of the commission rule.
The type of the commission rule reference. Can be site, product_type, product_category, seller+product_category, seller+product_type, or seller.
The ID of the referenced entity. Empty string for site reference type.
Whether the commission rule is active.
rate
CreateCommissionRateDTO
required
The commission rate configuration. type
"flat" | "percentage"
required
The type of the commission rate.
The percentage rate for percentage-based commissions.
Whether the commission calculation includes tax.
The price set for flat-rate commissions. The minimum commission amount price set.
The maximum commission amount price set.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
Promise
Promise<CommissionRuleDTO[]>
The created commission rules.
createCommissionRules(data, sharedContext?): Promise<CommissionRuleDTO>
This method creates a commission rule.
Example
const rule = await commissionModuleService . createCommissionRules ({
name: "Electronics Category Commission" ,
reference: "product_category" ,
reference_id: "pcat_electronics" ,
is_active: true ,
rate: {
type: "percentage" ,
percentage_rate: 15 ,
include_tax: false ,
},
})
Parameters
data
CreateCommissionRuleDTO
required
The commission rule to be created. The name of the commission rule.
The type of the commission rule reference. Can be site, product_type, product_category, seller+product_category, seller+product_type, or seller.
The ID of the referenced entity. Empty string for site reference type.
Whether the commission rule is active.
rate
CreateCommissionRateDTO
required
The commission rate configuration. type
"flat" | "percentage"
required
The type of the commission rate.
The percentage rate for percentage-based commissions.
Whether the commission calculation includes tax.
The price set for flat-rate commissions. The minimum commission amount price set.
The maximum commission amount price set.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
Promise
Promise<CommissionRuleDTO>
The created commission rule.
updateCommissionRules
This section provides a reference to the updateCommissionRules method. This belongs to the Commission Module.
updateCommissionRules(id, data, sharedContext?): Promise<CommissionRuleDTO>
This method updates an existing commission rule.
Example
const rule = await commissionModuleService . updateCommissionRules ( "com_rule_123" , {
name: "Updated Commission Rule" ,
is_active: false ,
})
Parameters
The ID of the commission rule.
data
UpdateCommissionRuleDTO
required
The attributes to update in the commission rule. The name of the commission rule.
The type of the commission rule reference.
The ID of the referenced entity.
Whether the commission rule is active.
The commission rate configuration to update. The ID of the commission rate.
The type of the commission rate.
The percentage rate for percentage-based commissions.
Whether the commission calculation includes tax.
The price set for flat-rate commissions.
The minimum commission amount price set.
The maximum commission amount price set.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
Promise
Promise<CommissionRuleDTO>
The updated commission rule. The ID of the commission rule.
The name of the commission rule.
The type of the commission rule reference.
The ID of the referenced entity.
The associated commission rate.
The created date of the commission rule.
The updated date of the commission rule.
deleteCommissionRules
This section provides a reference to the deleteCommissionRules method. This belongs to the Commission Module.
deleteCommissionRules(ids, sharedContext?): Promise<void>
This method deletes commission rules by their IDs.
Example
await commissionModuleService . deleteCommissionRules ([ "com_rule_123" , "com_rule_321" ])
Parameters
The IDs of the commission rules.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
Resolves when the commission rules are deleted successfully.
deleteCommissionRules(id, sharedContext?): Promise<void>
This method deletes a commission rule by its ID.
Example
await commissionModuleService . deleteCommissionRules ( "com_rule_123" )
Parameters
The ID of the commission rule.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
Resolves when the commission rule is deleted successfully.
retrieveCommissionRule
This section provides a reference to the retrieveCommissionRule method. This belongs to the Commission Module.
This method retrieves a commission rule by its ID.
Example
const rule = await commissionModuleService . retrieveCommissionRule ( "com_rule_123" )
To retrieve with the rate:
const rule = await commissionModuleService . retrieveCommissionRule (
"com_rule_123" ,
{
relations: [ "rate" ],
}
)
Parameters
The ID of the commission rule.
config
FindConfig<CommissionRuleDTO>
The configurations determining how the commission rule is retrieved. An array of strings, each being attribute names of the entity to retrieve in the result.
A number indicating the number of records to skip before retrieving the results.
A number indicating the number of records to return in the result.
An array of strings, each being relation names of the entity to retrieve in the result. For example, ["rate"].
order
Record<string, "ASC" | "DESC">
An object used to specify how to sort the returned records.
A boolean indicating whether deleted records should also be retrieved as part of the result.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
Promise
Promise<CommissionRuleDTO>
The retrieved commission rule. The ID of the commission rule.
The name of the commission rule.
The type of the commission rule reference.
The ID of the referenced entity.
The associated commission rate (if included in relations).
The created date of the commission rule.
The updated date of the commission rule.
listCommissionRules
This section provides a reference to the listCommissionRules method. This belongs to the Commission Module.
This method retrieves a paginated list of commission rules based on optional filters and configuration.
Example
To retrieve active commission rules:
const rules = await commissionModuleService . listCommissionRules ({
is_active: true ,
})
To retrieve rules for a specific seller:
const rules = await commissionModuleService . listCommissionRules ({
reference: "seller" ,
reference_id: "sel_123" ,
})
By default, only the first 15 records are retrieved. You can control pagination:
const rules = await commissionModuleService . listCommissionRules (
{
is_active: true ,
},
{
take: 20 ,
skip: 2 ,
relations: [ "rate" ],
}
)
Parameters
filters
FilterableCommissionRuleProps
The filters to apply on the retrieved commission rules. The IDs to filter the commission rules by.
Filter commission rules by their names.
Filter commission rules by their reference types.
Filter commission rules by their reference IDs.
Filter by whether commission rules are active.
config
FindConfig<CommissionRuleDTO>
The configurations determining how the commission rule is retrieved. An array of strings, each being attribute names of the entity to retrieve in the result.
A number indicating the number of records to skip before retrieving the results.
A number indicating the number of records to return in the result.
An array of strings, each being relation names of the entity to retrieve in the result. For example, ["rate"].
order
Record<string, "ASC" | "DESC">
An object used to specify how to sort the returned records.
A boolean indicating whether deleted records should also be retrieved as part of the result.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
Promise
Promise<CommissionRuleDTO[]>
The list of commission rules.
listAndCountCommissionRules
This section provides a reference to the listAndCountCommissionRules method. This belongs to the Commission Module.
This method retrieves a paginated list of commission rules along with the total count of available commission rules satisfying the provided filters.
Example
const [ rules , count ] = await commissionModuleService . listAndCountCommissionRules ({
is_active: true ,
})
Parameters
filters
FilterableCommissionRuleProps
The filters to apply on the retrieved commission rules. The IDs to filter the commission rules by.
Filter commission rules by their names.
Filter commission rules by their reference types.
Filter commission rules by their reference IDs.
Filter by whether commission rules are active.
config
FindConfig<CommissionRuleDTO>
The configurations determining how the commission rule is retrieved. An array of strings, each being attribute names of the entity to retrieve in the result.
A number indicating the number of records to skip before retrieving the results.
A number indicating the number of records to return in the result.
An array of strings, each being relation names of the entity to retrieve in the result.
order
Record<string, "ASC" | "DESC">
An object used to specify how to sort the returned records.
A boolean indicating whether deleted records should also be retrieved as part of the result.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
Promise
Promise<[CommissionRuleDTO[], number]>
The list of commission rules along with their total count.
softDeleteCommissionRules
This section provides a reference to the softDeleteCommissionRules method. This belongs to the Commission Module.
This method soft deletes commission rules by their IDs.
Example
await commissionModuleService . softDeleteCommissionRules ([
"com_rule_123" ,
"com_rule_321" ,
])
Parameters
The IDs of the commission rules.
config
SoftDeleteReturn<TReturnableLinkableKeys>
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
Promise
Promise<void | Record<string, string[]>>
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.
restoreCommissionRules
This section provides a reference to the restoreCommissionRules method. This belongs to the Commission Module.
This method restores soft deleted commission rules by their IDs.
Example
await commissionModuleService . restoreCommissionRules ([ "com_rule_123" , "com_rule_321" ])
Parameters
The IDs of the commission rules.
config
RestoreReturn<TReturnableLinkableKeys>
Configurations determining which relations to restore along with each of the commission rule.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
Promise
Promise<void | Record<string, string[]>>
An object that includes the IDs of related records that were restored. If there are no related records restored, the promise resolves to void.
createCommissionRates
This section provides a reference to the createCommissionRates method. This belongs to the Commission Module.
createCommissionRates(data, sharedContext?): Promise<CommissionRateDTO[]>
This method creates commission rates.
Example
const rates = await commissionModuleService . createCommissionRates ([
{
type: "percentage" ,
percentage_rate: 10 ,
include_tax: false ,
},
])
Parameters
data
CreateCommissionRateDTO[]
required
The commission rates to be created. type
"flat" | "percentage"
required
The type of the commission rate.
The percentage rate for percentage-based commissions.
Whether the commission calculation includes tax.
The price set for flat-rate commissions. The minimum commission amount price set.
The maximum commission amount price set.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
Promise
Promise<CommissionRateDTO[]>
The created commission rates.
updateCommissionRates
This section provides a reference to the updateCommissionRates method. This belongs to the Commission Module.
updateCommissionRates(id, data, sharedContext?): Promise<CommissionRateDTO>
This method updates an existing commission rate.
Example
const rate = await commissionModuleService . updateCommissionRates ( "com_rate_123" , {
percentage_rate: 15 ,
})
Parameters
The ID of the commission rate.
data
UpdateCommissionRateDTO
required
The attributes to update in the commission rate. The type of the commission rate.
The percentage rate for percentage-based commissions.
Whether the commission calculation includes tax.
The price set for flat-rate commissions.
The minimum commission amount price set.
The maximum commission amount price set.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
Promise
Promise<CommissionRateDTO>
The updated commission rate. The ID of the commission rate.
The type of the commission rate.
The percentage rate for percentage-based commissions.
Whether the commission calculation includes tax.
The ID of the price set used for flat-rate commissions.
The ID of the price set defining the maximum commission amount.
The ID of the price set defining the minimum commission amount.
The created date of the commission rate.
The updated date of the commission rate.
deleteCommissionRates
This section provides a reference to the deleteCommissionRates method. This belongs to the Commission Module.
deleteCommissionRates(ids, sharedContext?): Promise<void>
This method deletes commission rates by their IDs.
Example
await commissionModuleService . deleteCommissionRates ([ "com_rate_123" , "com_rate_321" ])
Parameters
The IDs of the commission rates.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
Resolves when the commission rates are deleted successfully.
retrieveCommissionRate
This section provides a reference to the retrieveCommissionRate method. This belongs to the Commission Module.
This method retrieves a commission rate by its ID.
Example
const rate = await commissionModuleService . retrieveCommissionRate ( "com_rate_123" )
Parameters
The ID of the commission rate.
config
FindConfig<CommissionRateDTO>
The configurations determining how the commission rate is retrieved. An array of strings, each being attribute names of the entity to retrieve in the result.
An array of strings, each being relation names of the entity to retrieve in the result.
order
Record<string, "ASC" | "DESC">
An object used to specify how to sort the returned records.
A boolean indicating whether deleted records should also be retrieved as part of the result.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
Promise
Promise<CommissionRateDTO>
The retrieved commission rate. The ID of the commission rate.
The type of the commission rate.
The percentage rate for percentage-based commissions.
Whether the commission calculation includes tax.
The ID of the price set used for flat-rate commissions.
The ID of the price set defining the maximum commission amount.
The ID of the price set defining the minimum commission amount.
The created date of the commission rate.
The updated date of the commission rate.
listCommissionRates
This section provides a reference to the listCommissionRates method. This belongs to the Commission Module.
This method retrieves a paginated list of commission rates based on optional filters and configuration.
Example
const rates = await commissionModuleService . listCommissionRates ({
type: "percentage" ,
})
Parameters
filters
FilterableCommissionRateProps
The filters to apply on the retrieved commission rates. The IDs to filter the commission rates by.
Filter commission rates by their types.
Filter by whether commission rates include tax in calculation.
config
FindConfig<CommissionRateDTO>
The configurations determining how the commission rate is retrieved. An array of strings, each being attribute names of the entity to retrieve in the result.
A number indicating the number of records to skip before retrieving the results.
A number indicating the number of records to return in the result.
An array of strings, each being relation names of the entity to retrieve in the result.
order
Record<string, "ASC" | "DESC">
An object used to specify how to sort the returned records.
A boolean indicating whether deleted records should also be retrieved as part of the result.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
Promise
Promise<CommissionRateDTO[]>
The list of commission rates.
listAndCountCommissionRates
This section provides a reference to the listAndCountCommissionRates method. This belongs to the Commission Module.
This method retrieves a paginated list of commission rates along with the total count of available commission rates satisfying the provided filters.
Example
const [ rates , count ] = await commissionModuleService . listAndCountCommissionRates ({
type: "percentage" ,
})
Parameters
filters
FilterableCommissionRateProps
The filters to apply on the retrieved commission rates. The IDs to filter the commission rates by.
Filter commission rates by their types.
Filter by whether commission rates include tax in calculation.
config
FindConfig<CommissionRateDTO>
The configurations determining how the commission rate is retrieved. An array of strings, each being attribute names of the entity to retrieve in the result.
A number indicating the number of records to skip before retrieving the results.
A number indicating the number of records to return in the result.
An array of strings, each being relation names of the entity to retrieve in the result.
order
Record<string, "ASC" | "DESC">
An object used to specify how to sort the returned records.
A boolean indicating whether deleted records should also be retrieved as part of the result.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
Promise
Promise<[CommissionRateDTO[], number]>
The list of commission rates along with their total count.
softDeleteCommissionRates
This section provides a reference to the softDeleteCommissionRates method. This belongs to the Commission Module.
This method soft deletes commission rates by their IDs.
Example
await commissionModuleService . softDeleteCommissionRates ([
"com_rate_123" ,
"com_rate_321" ,
])
Parameters
The IDs of the commission rates.
config
SoftDeleteReturn<TReturnableLinkableKeys>
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
Promise
Promise<void | Record<string, string[]>>
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.
restoreCommissionRates
This section provides a reference to the restoreCommissionRates method. This belongs to the Commission Module.
This method restores soft deleted commission rates by their IDs.
Example
await commissionModuleService . restoreCommissionRates ([ "com_rate_123" , "com_rate_321" ])
Parameters
The IDs of the commission rates.
config
RestoreReturn<TReturnableLinkableKeys>
Configurations determining which relations to restore along with each of the commission rate.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
Promise
Promise<void | Record<string, string[]>>
An object that includes the IDs of related records that were restored. If there are no related records restored, the promise resolves to void.
createCommissionLines
This section provides a reference to the createCommissionLines method. This belongs to the Commission Module.
createCommissionLines(data, sharedContext?): Promise<CommissionLineDTO[]>
This method creates commission lines.
Example
const lines = await commissionModuleService . createCommissionLines ([
{
item_line_id: "ordli_123" ,
rule_id: "com_rule_123" ,
currency_code: "usd" ,
value: 500 ,
},
])
Parameters
data
CreateCommissionLineDTO[]
required
The commission lines to be created. The ID of the order line item that this commission applies to.
The ID of the commission rule that was applied.
The ISO 3 currency code of the commission.
The calculated commission amount.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
Promise
Promise<CommissionLineDTO[]>
The created commission lines.
updateCommissionLines
This section provides a reference to the updateCommissionLines method. This belongs to the Commission Module.
updateCommissionLines(id, data, sharedContext?): Promise<CommissionLineDTO>
This method updates an existing commission line.
Example
const line = await commissionModuleService . updateCommissionLines ( "com_line_123" , {
value: 600 ,
})
Parameters
The ID of the commission line.
data
UpdateCommissionLineDTO
required
The attributes to update in the commission line. The ID of the order line item that this commission applies to.
The ID of the commission rule that was applied.
The ISO 3 currency code of the commission.
The calculated commission amount.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
Promise
Promise<CommissionLineDTO>
The updated commission line. The ID of the commission line.
The ID of the order line item that this commission applies to.
The ID of the commission rule that was applied.
The ISO 3 currency code of the commission.
The calculated commission amount.
The created date of the commission line.
The updated date of the commission line.
deleteCommissionLines
This section provides a reference to the deleteCommissionLines method. This belongs to the Commission Module.
deleteCommissionLines(ids, sharedContext?): Promise<void>
This method deletes commission lines by their IDs.
Example
await commissionModuleService . deleteCommissionLines ([ "com_line_123" , "com_line_321" ])
Parameters
The IDs of the commission lines.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
Resolves when the commission lines are deleted successfully.
retrieveCommissionLine
This section provides a reference to the retrieveCommissionLine method. This belongs to the Commission Module.
This method retrieves a commission line by its ID.
Example
const line = await commissionModuleService . retrieveCommissionLine ( "com_line_123" )
Parameters
The ID of the commission line.
config
FindConfig<CommissionLineDTO>
The configurations determining how the commission line is retrieved. An array of strings, each being attribute names of the entity to retrieve in the result.
An array of strings, each being relation names of the entity to retrieve in the result.
order
Record<string, "ASC" | "DESC">
An object used to specify how to sort the returned records.
A boolean indicating whether deleted records should also be retrieved as part of the result.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
Promise
Promise<CommissionLineDTO>
The retrieved commission line. The ID of the commission line.
The ID of the order line item that this commission applies to.
The ID of the commission rule that was applied.
The ISO 3 currency code of the commission.
The calculated commission amount.
The created date of the commission line.
The updated date of the commission line.
listCommissionLines
This section provides a reference to the listCommissionLines method. This belongs to the Commission Module.
This method retrieves a paginated list of commission lines based on optional filters and configuration.
Example
To retrieve commission lines for a specific order line item:
const lines = await commissionModuleService . listCommissionLines ({
item_line_id: "ordli_123" ,
})
To retrieve commission lines by rule:
const lines = await commissionModuleService . listCommissionLines ({
rule_id: "com_rule_123" ,
})
Parameters
filters
FilterableCommissionLineProps
The filters to apply on the retrieved commission lines. The IDs to filter the commission lines by.
Filter commission lines by their order line item IDs.
Filter commission lines by their commission rule IDs.
Filter commission lines by their currency codes.
config
FindConfig<CommissionLineDTO>
The configurations determining how the commission line is retrieved. An array of strings, each being attribute names of the entity to retrieve in the result.
A number indicating the number of records to skip before retrieving the results.
A number indicating the number of records to return in the result.
An array of strings, each being relation names of the entity to retrieve in the result.
order
Record<string, "ASC" | "DESC">
An object used to specify how to sort the returned records.
A boolean indicating whether deleted records should also be retrieved as part of the result.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
Promise
Promise<CommissionLineDTO[]>
The list of commission lines.
listAndCountCommissionLines
This section provides a reference to the listAndCountCommissionLines method. This belongs to the Commission Module.
This method retrieves a paginated list of commission lines along with the total count of available commission lines satisfying the provided filters.
Example
const [ lines , count ] = await commissionModuleService . listAndCountCommissionLines ({
item_line_id: "ordli_123" ,
})
Parameters
filters
FilterableCommissionLineProps
The filters to apply on the retrieved commission lines. The IDs to filter the commission lines by.
Filter commission lines by their order line item IDs.
Filter commission lines by their commission rule IDs.
Filter commission lines by their currency codes.
config
FindConfig<CommissionLineDTO>
The configurations determining how the commission line is retrieved. An array of strings, each being attribute names of the entity to retrieve in the result.
A number indicating the number of records to skip before retrieving the results.
A number indicating the number of records to return in the result.
An array of strings, each being relation names of the entity to retrieve in the result.
order
Record<string, "ASC" | "DESC">
An object used to specify how to sort the returned records.
A boolean indicating whether deleted records should also be retrieved as part of the result.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
Promise
Promise<[CommissionLineDTO[], number]>
The list of commission lines along with their total count.
softDeleteCommissionLines
This section provides a reference to the softDeleteCommissionLines method. This belongs to the Commission Module.
This method soft deletes commission lines by their IDs.
Example
await commissionModuleService . softDeleteCommissionLines ([
"com_line_123" ,
"com_line_321" ,
])
Parameters
The IDs of the commission lines.
config
SoftDeleteReturn<TReturnableLinkableKeys>
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
Promise
Promise<void | Record<string, string[]>>
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.
restoreCommissionLines
This section provides a reference to the restoreCommissionLines method. This belongs to the Commission Module.
This method restores soft deleted commission lines by their IDs.
Example
await commissionModuleService . restoreCommissionLines ([ "com_line_123" , "com_line_321" ])
Parameters
The IDs of the commission lines.
config
RestoreReturn<TReturnableLinkableKeys>
Configurations determining which relations to restore along with each of the commission line.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
Promise
Promise<void | Record<string, string[]>>
An object that includes the IDs of related records that were restored. If there are no related records restored, the promise resolves to void.