Skip to main content
Skip to main content

IPromotionModuleService

Methods

registerUsage

Parameters

computedActionsComputeActions[]Required

Returns

PromisePromise<void>Required

computeActions

Parameters

promotionCodesToApplystring[]Required
applicationContextComputeActionContextRequired
optionsRecord<string, any>

Returns

PromisePromise<ComputeActions[]>Required

create

**create**(data, sharedContext?): Promise&#60;[PromotionDTO](/references/types/PromotionTypes/interfaces/types.PromotionTypes.PromotionDTO)[]&#62;

Parameters

dataCreatePromotionDTO[]Required
sharedContextContext

Returns

PromisePromise<PromotionDTO[]>Required

**create**(data, sharedContext?): Promise&#60;[PromotionDTO](/references/types/PromotionTypes/interfaces/types.PromotionTypes.PromotionDTO)&#62;

Parameters

dataCreatePromotionDTORequired
sharedContextContext

Returns

PromisePromise<PromotionDTO>Required

update

**update**(data, sharedContext?): Promise&#60;[PromotionDTO](/references/types/PromotionTypes/interfaces/types.PromotionTypes.PromotionDTO)[]&#62;

Parameters

dataUpdatePromotionDTO[]Required
sharedContextContext

Returns

PromisePromise<PromotionDTO[]>Required

**update**(data, sharedContext?): Promise&#60;[PromotionDTO](/references/types/PromotionTypes/interfaces/types.PromotionTypes.PromotionDTO)&#62;

Parameters

dataUpdatePromotionDTORequired
sharedContextContext

Returns

PromisePromise<PromotionDTO>Required

list

Parameters

Returns

PromisePromise<PromotionDTO[]>Required

listAndCount

Parameters

Returns

PromisePromise<[PromotionDTO[], number]>Required

retrieve

Parameters

idstringRequired
sharedContextContext

Returns

PromisePromise<PromotionDTO>Required

delete

**delete**(ids, sharedContext?): Promise&#60;void&#62;

Parameters

idsstring[]Required
sharedContextContext

Returns

PromisePromise<void>Required

**delete**(ids, sharedContext?): Promise&#60;void&#62;

Parameters

idsstringRequired
sharedContextContext

Returns

PromisePromise<void>Required

softDelete

Type Parameters

TReturnableLinkableKeysstringRequired

Parameters

promotionIdsstring | string[]Required
configSoftDeleteReturn<TReturnableLinkableKeys>
sharedContextContext

Returns

PromisePromise<void | Record<string, string[]>>Required

restore

Type Parameters

TReturnableLinkableKeysstringRequired

Parameters

promotionIdsstring | string[]Required
configRestoreReturn<TReturnableLinkableKeys>
sharedContextContext

Returns

PromisePromise<void | Record<string, string[]>>Required

addPromotionRules

Parameters

promotionIdstringRequired
rulesDataCreatePromotionRuleDTO[]Required
sharedContextContext

Returns

PromisePromise<PromotionDTO>Required

addPromotionTargetRules

Parameters

promotionIdstringRequired
rulesDataCreatePromotionRuleDTO[]Required
sharedContextContext

Returns

PromisePromise<PromotionDTO>Required

addPromotionBuyRules

Parameters

promotionIdstringRequired
rulesDataCreatePromotionRuleDTO[]Required
sharedContextContext

Returns

PromisePromise<PromotionDTO>Required

removePromotionRules

Parameters

promotionIdstringRequired
rulesDataRemovePromotionRuleDTO[]Required
sharedContextContext

Returns

PromisePromise<PromotionDTO>Required

removePromotionTargetRules

Parameters

promotionIdstringRequired
rulesDataRemovePromotionRuleDTO[]Required
sharedContextContext

Returns

PromisePromise<PromotionDTO>Required

removePromotionBuyRules

Parameters

promotionIdstringRequired
rulesDataRemovePromotionRuleDTO[]Required
sharedContextContext

Returns

PromisePromise<PromotionDTO>Required

createCampaigns

**createCampaigns**(data, sharedContext?): Promise&#60;[CampaignDTO](/references/types/PromotionTypes/interfaces/types.PromotionTypes.CampaignDTO)&#62;

Parameters

dataCreateCampaignDTORequired
sharedContextContext

Returns

PromisePromise<CampaignDTO>Required

**createCampaigns**(data, sharedContext?): Promise&#60;[CampaignDTO](/references/types/PromotionTypes/interfaces/types.PromotionTypes.CampaignDTO)[]&#62;

Parameters

dataCreateCampaignDTO[]Required
sharedContextContext

Returns

PromisePromise<CampaignDTO[]>Required

updateCampaigns

**updateCampaigns**(data, sharedContext?): Promise&#60;[CampaignDTO](/references/types/PromotionTypes/interfaces/types.PromotionTypes.CampaignDTO)[]&#62;

Parameters

dataUpdateCampaignDTO[]Required
sharedContextContext

Returns

PromisePromise<CampaignDTO[]>Required

**updateCampaigns**(data, sharedContext?): Promise&#60;[CampaignDTO](/references/types/PromotionTypes/interfaces/types.PromotionTypes.CampaignDTO)&#62;

Parameters

dataUpdateCampaignDTORequired
sharedContextContext

Returns

PromisePromise<CampaignDTO>Required

listCampaigns

Parameters

Returns

PromisePromise<CampaignDTO[]>Required

listAndCountCampaigns

Parameters

Returns

PromisePromise<[CampaignDTO[], number]>Required

retrieveCampaign

Parameters

idstringRequired
sharedContextContext

Returns

PromisePromise<CampaignDTO>Required

deleteCampaigns

**deleteCampaigns**(ids, sharedContext?): Promise&#60;void&#62;

Parameters

idsstring[]Required
sharedContextContext

Returns

PromisePromise<void>Required

**deleteCampaigns**(ids, sharedContext?): Promise&#60;void&#62;

Parameters

idsstringRequired
sharedContextContext

Returns

PromisePromise<void>Required

softDeleteCampaigns

Type Parameters

TReturnableLinkableKeysstringRequired

Parameters

campaignIdsstring | string[]Required
configSoftDeleteReturn<TReturnableLinkableKeys>
sharedContextContext

Returns

PromisePromise<void | Record<string, string[]>>Required

restoreCampaigns

Type Parameters

TReturnableLinkableKeysstringRequired

Parameters

campaignIdsstring | string[]Required
configRestoreReturn<TReturnableLinkableKeys>
sharedContextContext

Returns

PromisePromise<void | Record<string, string[]>>Required
Was this section helpful?