-
-
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.
- Loading branch information
1 parent
e362475
commit 5cff832
Showing
3 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
packages/core/src/event-bus/events/stock-location-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,27 @@ | ||
import { CreateStockLocationInput, UpdateStockLocationInput } from '@vendure/common/lib/generated-types'; | ||
import { ID } from '@vendure/common/lib/shared-types'; | ||
|
||
import { RequestContext } from '../../api/common/request-context'; | ||
import { StockLocation } from '../../entity'; | ||
import { VendureEntityEvent } from '../vendure-entity-event'; | ||
|
||
type StockLocationInputTypes = CreateStockLocationInput | UpdateStockLocationInput | ID; | ||
|
||
/** | ||
* @description | ||
* This event is fired whenever a {@link StockLocation} is added, updated | ||
* or deleted. | ||
* | ||
* @docsCategory events | ||
* @docsPage Event Types | ||
*/ | ||
export class StockLocationEvent extends VendureEntityEvent<StockLocation, StockLocationInputTypes> { | ||
constructor( | ||
ctx: RequestContext, | ||
entity: StockLocation, | ||
type: 'created' | 'updated' | 'deleted', | ||
input?: StockLocationInputTypes, | ||
) { | ||
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
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