Contains methods relating to Promotion entities.
PromotionCondition[]PromotionAction[](ctx: RequestContext, options?: ListQueryOptions<Promotion>, relations: RelationPaths<Promotion> = []) => Promise<PaginatedList<Promotion>>(ctx: RequestContext, adjustmentSourceId: ID, relations: RelationPaths<Promotion> = []) => Promise<Promotion | undefined>(ctx: RequestContext) => ConfigurableOperationDefinition[](ctx: RequestContext) => ConfigurableOperationDefinition[](ctx: RequestContext, input: CreatePromotionInput) => Promise<ErrorResultUnion<CreatePromotionResult, Promotion>>(ctx: RequestContext, input: UpdatePromotionInput) => Promise<ErrorResultUnion<UpdatePromotionResult, Promotion>>(ctx: RequestContext, promotionId: ID) => Promise<DeletionResponse>(ctx: RequestContext, input: AssignPromotionsToChannelInput) => Promise<Promotion[]>(ctx: RequestContext, input: RemovePromotionsFromChannelInput) => (ctx: RequestContext, couponCode: string, customerId?: ID, excludeOrderId?: ID) => Promise<JustErrorResults<ApplyCouponCodeResult> | Promotion>Checks the validity of a coupon code, by checking that it is associated with an existing, enabled and non-expired Promotion. The comparison is case-insensitive, so e.g. "SUMMER20" and "summer20" are treated as the same code. Additionally, if there is a usage limit on the coupon code, this method will enforce that limit against the specified Customer.
(ctx: RequestContext) => (ctx: RequestContext, orderId: ID) => Promise<Promotion[]>(ctx: RequestContext, order: Order, promotionsPre: Promotion[]) => (ctx: RequestContext, order: Order) => Promise<Order>Used internally to associate a Promotion with an Order, once an Order has been placed.
(ctx: RequestContext, promotions: Promotion[], customerId?: ID) => Promise<Set<string>>Returns a Set of Promotion IDs (as strings) that have exceeded their usageLimit or
perCustomerUsageLimit. Only checks promotions without a coupon code
(coupon-based promotions are validated separately in validateCouponCode()).