-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(core): Introduce new
ProductVariantPriceEvent
- Loading branch information
1 parent
5ad41bf
commit aa4eeb8
Showing
2 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
packages/core/src/event-bus/events/product-variant-price-event.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { CreateProductVariantInput, UpdateProductVariantInput } from '@vendure/common/lib/generated-types'; | ||
|
||
import { RequestContext } from '../../api/common/request-context'; | ||
import { ProductVariantPrice } from '../../entity'; | ||
import { VendureEntityEvent } from '../vendure-entity-event'; | ||
|
||
type ProductVariantInputTypes = undefined; | ||
|
||
/** | ||
* @description | ||
* This event is fired whenever a {@link ProductVariantPrice} is added, updated or deleted. | ||
* | ||
* @docsCategory events | ||
* @docsPage Event Types | ||
* @since 2.2.0 | ||
*/ | ||
export class ProductVariantPriceEvent extends VendureEntityEvent< | ||
ProductVariantPrice[], | ||
ProductVariantInputTypes | ||
> { | ||
constructor( | ||
ctx: RequestContext, | ||
entity: ProductVariantPrice[], | ||
type: 'created' | 'updated' | 'deleted', | ||
input?: ProductVariantInputTypes, | ||
) { | ||
super(entity, type, ctx, input); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters