Event Types
This event is fired when a new user registers an account, either as a stand-alone signup or after placing an order.
- Extends:
VendureEvent
constructor
(ctx: RequestContext, user: User) => AccountRegistrationEventThis event is fired when a users email address successfully gets verified after
the verifyCustomerAccount mutation was executed.
- Extends:
VendureEvent
constructor
(ctx: RequestContext, customer: Customer) => AccountVerifiedEventThis event is fired whenever a Administrator is added, updated or deleted.
- Extends:
VendureEntityEvent<Administrator, AdministratorInputTypes>
constructor
(ctx: RequestContext, entity: Administrator, type: 'created' | 'updated' | 'deleted', input?: AdministratorInputTypes) => AdministratorEventThis event is fired whenever an Asset is assigned or removed From a channel.
- Extends:
VendureEvent
constructor
(ctx: RequestContext, asset: Asset, channelId: ID, type: 'assigned' | 'removed') => AssetChannelEventThis event is fired whenever a Asset is added, updated or deleted.
- Extends:
VendureEntityEvent<Asset, AssetInputTypes>
constructor
(ctx: RequestContext, entity: Asset, type: 'created' | 'updated' | 'deleted', input?: AssetInputTypes) => AssetEventasset
This event is fired when an attempt is made to log in via the shop or admin API login mutation.
The strategy represents the name of the AuthenticationStrategy used in the login attempt.
If the "native" strategy is used, the additional identifier property will be available.
- Extends:
VendureEvent
constructor
(ctx: RequestContext, strategy: string, identifier?: string) => AttemptedLoginEventThis event is fired whenever an ChannelAware entity is assigned or removed from a channel. The entity property contains the value before updating the channels.
- Extends:
VendureEvent
constructor
(ctx: RequestContext, entity: T, channelIds: ID[], type: 'assigned' | 'removed', entityType?: Type<T>) => ChangeChannelEventThis event is fired whenever a Channel is added, updated or deleted.
- Extends:
VendureEntityEvent<Channel, ChannelInputTypes>
constructor
(ctx: RequestContext, entity: Channel, type: 'created' | 'updated' | 'deleted', input?: ChannelInputTypes) => ChannelEventThis event is fired whenever a Collection is added, updated or deleted.
- Extends:
VendureEntityEvent<Collection, CollectionInputTypes>
constructor
(ctx: RequestContext, entity: Collection, type: 'created' | 'updated' | 'deleted', input?: CollectionInputTypes) => CollectionEventThis event is fired whenever a Collection is modified in some way. The productVariantIds
argument is an array of ids of all ProductVariants which:
- were part of this collection prior to modification and are no longer
- are now part of this collection after modification but were not before
- Extends:
VendureEvent
constructor
(ctx: RequestContext, collection: Collection, productVariantIds: ID[]) => CollectionModificationEventThis event is fired whenever a Country is added, updated or deleted.
- Extends:
VendureEntityEvent<Country, CountryInputTypes>
constructor
(ctx: RequestContext, entity: Country, type: 'created' | 'updated' | 'deleted', input?: CountryInputTypes) => CountryEventThis event is fired whenever an coupon code of an active Promotion is assigned or removed to an Order.
- Extends:
VendureEvent
constructor
(ctx: RequestContext, couponCode: string, orderId: ID, type: 'assigned' | 'removed') => CouponCodeEventThis event is fired whenever a Address is added, updated or deleted.
- Extends:
VendureEntityEvent<Address, CustomerAddressInputTypes>
constructor
(ctx: RequestContext, entity: Address, type: 'created' | 'updated' | 'deleted', input?: CustomerAddressInputTypes) => CustomerAddressEventaddress
AddressThis event is fired whenever a Customer is added, updated or deleted.
- Extends:
VendureEntityEvent<Customer, CustomerInputTypes>
constructor
(ctx: RequestContext, entity: Customer, type: 'created' | 'updated' | 'deleted', input?: CustomerInputTypes) => CustomerEventcustomer
This event is fired whenever one or more Customer is assigned to or removed from a CustomerGroup.
- Extends:
VendureEvent
constructor
(ctx: RequestContext, customers: Customer[], customGroup: CustomerGroup, type: 'assigned' | 'removed') => CustomerGroupChangeEventThis event is fired whenever a CustomerGroup is added, updated or deleted.
- Extends:
VendureEntityEvent<CustomerGroup, CustomerGroupInputTypes>
constructor
(ctx: RequestContext, entity: CustomerGroup, type: 'created' | 'updated' | 'deleted', input?: CustomerGroupInputTypes) => CustomerGroupEventThis event is fired whenever a Facet is added, updated or deleted.
- Extends:
VendureEntityEvent<Facet, FacetInputTypes>
constructor
(ctx: RequestContext, entity: Facet, type: 'created' | 'updated' | 'deleted', input?: FacetInputTypes) => FacetEventThis event is fired whenever a FacetValue is added, updated or deleted.
- Extends:
VendureEntityEvent<FacetValue, FacetValueInputTypes>
constructor
(ctx: RequestContext, entity: FacetValue, type: 'created' | 'updated' | 'deleted', input?: FacetValueInputTypes) => FacetValueEventThis event is fired whenever a Fulfillment is added. The type is always created.
- Extends:
VendureEntityEvent<Fulfillment, CreateFulfillmentInput>
constructor
(ctx: RequestContext, entity: Fulfillment, input?: CreateFulfillmentInput) => FulfillmentEventThis event is fired whenever an Fulfillment transitions from one FulfillmentState to another.
- Extends:
VendureEvent
constructor
(fromState: FulfillmentState, toState: FulfillmentState, ctx: RequestContext, fulfillment: Fulfillment) => FulfillmentStateTransitionEventThis event is fired whenever a GlobalSettings is added. The type is always updated, because it's
only created once and never deleted.
- Extends:
VendureEntityEvent<GlobalSettings, UpdateGlobalSettingsInput>
constructor
(ctx: RequestContext, entity: GlobalSettings, input?: UpdateGlobalSettingsInput) => GlobalSettingsEventThis event is fired whenever one HistoryEntry is added, updated or deleted.
- Extends:
VendureEntityEvent<HistoryEntry, HistoryInput>
historyType
'order' | 'customer' | stringconstructor
(ctx: RequestContext, entity: HistoryEntry, type: 'created' | 'updated' | 'deleted', historyType: 'order' | 'customer' | string, input?: HistoryInput) => HistoryEntryEventThis event is fired when a registered user successfully changes the identifier (ie email address) associated with their account.
- Extends:
VendureEvent
constructor
(ctx: RequestContext, user: User, oldIdentifier: string) => IdentifierChangeEventThis event is fired when a registered user requests to update the identifier (ie email address) associated with the account.
- Extends:
VendureEvent
constructor
(ctx: RequestContext, user: User) => IdentifierChangeRequestEventThis event is fired when vendure finished initializing its services inside the InitializerService
- Extends:
VendureEvent
This event is fired when a user successfully logs in via the shop or admin API login mutation.
- Extends:
VendureEvent
constructor
(ctx: RequestContext, user: User) => LoginEventThis event is fired when a user logs out via the shop or admin API logout mutation.
- Extends:
VendureEvent
constructor
(ctx: RequestContext) => LogoutEventThis event is fired whenever an Order is added, updated or deleted.
- Extends:
VendureEntityEvent<Order, OrderInputTypes>
constructor
(ctx: RequestContext, order: Order, type: 'created' | 'updated' | 'deleted', input?: OrderInputTypes) => OrderEventorder
This event is fired whenever an OrderLine is added, updated or deleted.
- Extends:
VendureEvent
constructor
(ctx: RequestContext, order: Order, orderLine: OrderLine, type: 'created' | 'updated' | 'deleted' | 'cancelled') => OrderLineEventThis event is fired whenever an Order is set as "placed", which by default is when it transitions from 'ArrangingPayment' to either 'PaymentAuthorized' or 'PaymentSettled'.
Note that the exact point that it is set as "placed" can be configured according to the OrderPlacedStrategy.
- Extends:
VendureEvent
constructor
(fromState: OrderState, toState: OrderState, ctx: RequestContext, order: Order) => OrderPlacedEventThis event is fired whenever an Order transitions from one OrderState to another.
- Extends:
VendureEvent
constructor
(fromState: OrderState, toState: OrderState, ctx: RequestContext, order: Order) => OrderStateTransitionEventThis event is fired when a Customer requests a password reset email.
- Extends:
VendureEvent
constructor
(ctx: RequestContext, user: User) => PasswordResetEventThis event is fired when a password reset is executed with a verified token.
- Extends:
VendureEvent
constructor
(ctx: RequestContext, user: User) => PasswordResetVerifiedEventThis event is fired whenever a PaymentMethod is added, updated or deleted.
- Extends:
VendureEntityEvent<PaymentMethod, PaymentMethodInputTypes>
constructor
(ctx: RequestContext, entity: PaymentMethod, type: 'created' | 'updated' | 'deleted', input?: PaymentMethodInputTypes) => PaymentMethodEventThis event is fired whenever a Payment transitions from one PaymentState to another, e.g. a Payment is authorized by the payment provider.
- Extends:
VendureEvent
constructor
(fromState: PaymentState, toState: PaymentState, ctx: RequestContext, payment: Payment, order: Order) => PaymentStateTransitionEventThis event is fired whenever a Product is added, updated or deleted.
- Extends:
VendureEvent
constructor
(ctx: RequestContext, product: Product, channelId: ID, type: 'assigned' | 'removed') => ProductChannelEventThis event is fired whenever a Product is added, updated or deleted.
- Extends:
VendureEntityEvent<Product, ProductInputTypes>
constructor
(ctx: RequestContext, entity: Product, type: 'created' | 'updated' | 'deleted', input?: ProductInputTypes) => ProductEventproduct
This event is fired whenever a ProductOption is added or updated.
- Extends:
VendureEntityEvent<ProductOption, ProductOptionInputTypes>
constructor
(ctx: RequestContext, entity: ProductOption, type: 'created' | 'updated' | 'deleted', input?: ProductOptionInputTypes) => ProductOptionEventThis event is fired whenever a ProductOptionGroup is assigned or removed from a Product.
- Extends:
VendureEvent
constructor
(ctx: RequestContext, product: Product, optionGroupId: ID, type: 'assigned' | 'removed') => ProductOptionGroupChangeEventThis event is fired whenever a ProductOptionGroup is added or updated.
- Extends:
VendureEntityEvent<ProductOptionGroup, ProductOptionGroupInputTypes >
constructor
(ctx: RequestContext, entity: ProductOptionGroup, type: 'created' | 'updated' | 'deleted', input?: ProductOptionGroupInputTypes) => ProductOptionGroupEventThis event is fired whenever a ProductVariant is assigned or removed from a Channel.
- Extends:
VendureEvent
constructor
(ctx: RequestContext, productVariant: ProductVariant, channelId: ID, type: 'assigned' | 'removed') => ProductVariantChannelEventThis event is fired whenever a ProductVariant is added, updated or deleted.
- Extends:
VendureEntityEvent<ProductVariant[], ProductVariantInputTypes>
constructor
(ctx: RequestContext, entity: ProductVariant[], type: 'created' | 'updated' | 'deleted', input?: ProductVariantInputTypes) => ProductVariantEventvariants
This event is fired whenever a ProductVariantPrice is added, updated or deleted.
- Extends:
VendureEntityEvent<ProductVariantPrice[], ProductVariantInputTypes >
constructor
(ctx: RequestContext, entity: ProductVariantPrice[], type: 'created' | 'updated' | 'deleted', input?: ProductVariantInputTypes) => ProductVariantPriceEventThis event is fired whenever a Promotion is added, updated or deleted.
- Extends:
VendureEntityEvent<Promotion, PromotionInputTypes>
constructor
(ctx: RequestContext, entity: Promotion, type: 'created' | 'updated' | 'deleted', input?: PromotionInputTypes) => PromotionEventThis event is fired whenever a Province is added, updated or deleted.
- Extends:
VendureEntityEvent<Province, ProvinceInputTypes>
constructor
(ctx: RequestContext, entity: Province, type: 'created' | 'updated' | 'deleted', input?: ProvinceInputTypes) => ProvinceEventThis event is fired whenever a Refund is created
- Extends:
VendureEvent
constructor
(ctx: RequestContext, order: Order, refund: Refund, type: 'created') => RefundEventThis event is fired whenever a Refund transitions from one RefundState to another.
- Extends:
VendureEvent
constructor
(fromState: RefundState, toState: RefundState, ctx: RequestContext, refund: Refund, order: Order) => RefundStateTransitionEventThis event is fired whenever one Role is assigned or removed from a user.
The property roleIds only contains the removed or assigned role ids.
- Extends:
VendureEvent
constructor
(ctx: RequestContext, admin: Administrator, roleIds: ID[], type: 'assigned' | 'removed') => RoleChangeEventThis event is fired whenever one Role is added, updated or deleted.
- Extends:
VendureEntityEvent<Role, RoleInputTypes>
constructor
(ctx: RequestContext, entity: Role, type: 'created' | 'updated' | 'deleted', input?: RoleInputTypes) => RoleEventThis event is fired whenever a search query is executed.
- Extends:
VendureEvent
constructor
(ctx: RequestContext, input: ExtendedSearchInput) => SearchEventThis event is fired whenever one Seller is added, updated or deleted.
- Extends:
VendureEntityEvent<Seller, SellerInputTypes>
constructor
(ctx: RequestContext, entity: Seller, type: 'created' | 'updated' | 'deleted', input?: SellerInputTypes) => SellerEventThis event is fired whenever a ShippingMethod is added, updated or deleted.
- Extends:
VendureEntityEvent<ShippingMethod, ShippingMethodInputTypes>
constructor
(ctx: RequestContext, entity: ShippingMethod, type: 'created' | 'updated' | 'deleted', input?: ShippingMethodInputTypes) => ShippingMethodEventThis event is fired whenever a StockLocation is added, updated or deleted.
- Extends:
VendureEntityEvent<StockLocation, StockLocationInputTypes>
constructor
(ctx: RequestContext, entity: StockLocation, type: 'created' | 'updated' | 'deleted', input?: StockLocationInputTypes) => StockLocationEventThis event is fired whenever a StockMovement entity is created, which occurs when the saleable stock level of a ProductVariant is altered due to things like sales, manual adjustments, and cancellations.
- Extends:
VendureEvent
type
StockMovementTypeconstructor
(ctx: RequestContext, stockMovements: StockMovement[]) => StockMovementEventThis event is fired whenever a TaxCategory is added, updated or deleted.
- Extends:
VendureEntityEvent<TaxCategory, TaxCategoryInputTypes>
constructor
(ctx: RequestContext, entity: TaxCategory, type: 'created' | 'updated' | 'deleted', input?: TaxCategoryInputTypes) => TaxCategoryEventThis event is fired whenever a TaxRate is added, updated or deleted.
- Extends:
VendureEntityEvent<TaxRate, TaxRateInputTypes>
constructor
(ctx: RequestContext, entity: TaxRate, type: 'created' | 'updated' | 'deleted', input?: TaxRateInputTypes) => TaxRateEventThis event is fired whenever a TaxRate is changed
- Extends:
VendureEvent
constructor
(ctx: RequestContext, taxRate: TaxRate) => TaxRateModificationEventThis event is fired whenever a Zone is added, updated or deleted.
- Extends:
VendureEntityEvent<Zone, ZoneInputTypes>
constructor
(ctx: RequestContext, entity: Zone, type: 'created' | 'updated' | 'deleted', input?: ZoneInputTypes) => ZoneEventThis event is fired whenever a Zone gets Country members assigned or removed
The entity property contains the zone with the already updated member field.
- Extends:
VendureEvent
constructor
(ctx: RequestContext, entity: Zone, type: 'assigned' | 'removed', memberIds: ID[]) => ZoneMembersEvent