IPromotionModuleService
Methods
registerUsage
Parameters
Returns
Promise
Promise<void>RequiredcomputeActions
Parameters
promotionCodesToApply
string[]Requiredoptions
Record<string, any>Returns
create
**create**(data, sharedContext?): Promise<[PromotionDTO](/references/types/PromotionTypes/interfaces/types.PromotionTypes.PromotionDTO)[]>
Parameters
Returns
**create**(data, sharedContext?): Promise<[PromotionDTO](/references/types/PromotionTypes/interfaces/types.PromotionTypes.PromotionDTO)>
Parameters
Returns
update
**update**(data, sharedContext?): Promise<[PromotionDTO](/references/types/PromotionTypes/interfaces/types.PromotionTypes.PromotionDTO)[]>
Parameters
Returns
**update**(data, sharedContext?): Promise<[PromotionDTO](/references/types/PromotionTypes/interfaces/types.PromotionTypes.PromotionDTO)>
Parameters
Returns
list
Parameters
filters
FilterablePromotionProps
filters
FilterablePromotionPropsconfig
FindConfig<PromotionDTO>
config
FindConfig<PromotionDTO>Returns
listAndCount
Parameters
filters
FilterablePromotionProps
filters
FilterablePromotionPropsconfig
FindConfig<PromotionDTO>
config
FindConfig<PromotionDTO>Returns
retrieve
Parameters
id
stringRequiredconfig
FindConfig<PromotionDTO>
config
FindConfig<PromotionDTO>Returns
delete
**delete**(ids, sharedContext?): Promise<void>
Parameters
ids
string[]RequiredReturns
Promise
Promise<void>Required**delete**(ids, sharedContext?): Promise<void>
Parameters
ids
stringRequiredReturns
Promise
Promise<void>RequiredsoftDelete
Type Parameters
TReturnableLinkableKeys
stringRequiredParameters
promotionIds
string | string[]Requiredconfig
SoftDeleteReturn<TReturnableLinkableKeys>
config
SoftDeleteReturn<TReturnableLinkableKeys>Returns
Promise
Promise<void | Record<string, string[]>>Required
Promise
Promise<void | Record<string, string[]>>Requiredrestore
Type Parameters
TReturnableLinkableKeys
stringRequiredParameters
promotionIds
string | string[]Requiredconfig
RestoreReturn<TReturnableLinkableKeys>
config
RestoreReturn<TReturnableLinkableKeys>Returns
Promise
Promise<void | Record<string, string[]>>Required
Promise
Promise<void | Record<string, string[]>>RequiredaddPromotionRules
Parameters
promotionId
stringRequiredReturns
addPromotionTargetRules
Parameters
promotionId
stringRequiredReturns
addPromotionBuyRules
Parameters
promotionId
stringRequiredReturns
removePromotionRules
Parameters
promotionId
stringRequiredReturns
removePromotionTargetRules
Parameters
promotionId
stringRequiredReturns
removePromotionBuyRules
Parameters
promotionId
stringRequiredReturns
createCampaigns
**createCampaigns**(data, sharedContext?): Promise<[CampaignDTO](/references/types/PromotionTypes/interfaces/types.PromotionTypes.CampaignDTO)>
Parameters
Returns
**createCampaigns**(data, sharedContext?): Promise<[CampaignDTO](/references/types/PromotionTypes/interfaces/types.PromotionTypes.CampaignDTO)[]>
Parameters
Returns
updateCampaigns
**updateCampaigns**(data, sharedContext?): Promise<[CampaignDTO](/references/types/PromotionTypes/interfaces/types.PromotionTypes.CampaignDTO)[]>
Parameters
Returns
**updateCampaigns**(data, sharedContext?): Promise<[CampaignDTO](/references/types/PromotionTypes/interfaces/types.PromotionTypes.CampaignDTO)>
Parameters
Returns
listCampaigns
Parameters
filters
FilterableCampaignProps
filters
FilterableCampaignPropsconfig
FindConfig<CampaignDTO>
config
FindConfig<CampaignDTO>Returns
listAndCountCampaigns
Parameters
filters
FilterableCampaignProps
filters
FilterableCampaignPropsconfig
FindConfig<CampaignDTO>
config
FindConfig<CampaignDTO>Returns
retrieveCampaign
Parameters
id
stringRequiredconfig
FindConfig<CampaignDTO>
config
FindConfig<CampaignDTO>Returns
deleteCampaigns
**deleteCampaigns**(ids, sharedContext?): Promise<void>
Parameters
ids
string[]RequiredReturns
Promise
Promise<void>Required**deleteCampaigns**(ids, sharedContext?): Promise<void>
Parameters
ids
stringRequiredReturns
Promise
Promise<void>RequiredsoftDeleteCampaigns
Type Parameters
TReturnableLinkableKeys
stringRequiredParameters
campaignIds
string | string[]Requiredconfig
SoftDeleteReturn<TReturnableLinkableKeys>
config
SoftDeleteReturn<TReturnableLinkableKeys>Returns
Promise
Promise<void | Record<string, string[]>>Required
Promise
Promise<void | Record<string, string[]>>RequiredrestoreCampaigns
Type Parameters
TReturnableLinkableKeys
stringRequiredParameters
campaignIds
string | string[]Requiredconfig
RestoreReturn<TReturnableLinkableKeys>
config
RestoreReturn<TReturnableLinkableKeys>Returns
Promise
Promise<void | Record<string, string[]>>Required
Promise
Promise<void | Record<string, string[]>>Required