Skip to main content

Event Types

AccountRegistrationEvent

This event is fired when a new user registers an account, either as a stand-alone signup or after placing an order.

Signature
class AccountRegistrationEvent extends VendureEvent {
constructor(ctx: RequestContext, user: User)
}

constructor

method
(ctx: RequestContext, user: User) => AccountRegistrationEvent

AccountVerifiedEvent

This event is fired when a users email address successfully gets verified after the verifyCustomerAccount mutation was executed.

Signature
class AccountVerifiedEvent extends VendureEvent {
constructor(ctx: RequestContext, customer: Customer)
}

constructor

method
(ctx: RequestContext, customer: Customer) => AccountVerifiedEvent

AdministratorEvent

This event is fired whenever a Administrator is added, updated or deleted.

Signature
class AdministratorEvent extends VendureEntityEvent<Administrator, AdministratorInputTypes> {
constructor(ctx: RequestContext, entity: Administrator, type: 'created' | 'updated' | 'deleted', input?: AdministratorInputTypes)
}

constructor

method
(ctx: RequestContext, entity: Administrator, type: 'created' | 'updated' | 'deleted', input?: AdministratorInputTypes) => AdministratorEvent

AssetChannelEvent

This event is fired whenever an Asset is assigned or removed From a channel.

Signature
class AssetChannelEvent extends VendureEvent {
constructor(ctx: RequestContext, asset: Asset, channelId: ID, type: 'assigned' | 'removed')
}

constructor

method
(ctx: RequestContext, asset: Asset, channelId: ID, type: 'assigned' | 'removed') => AssetChannelEvent

AssetEvent

This event is fired whenever a Asset is added, updated or deleted.

Signature
class AssetEvent extends VendureEntityEvent<Asset, AssetInputTypes> {
constructor(ctx: RequestContext, entity: Asset, type: 'created' | 'updated' | 'deleted', input?: AssetInputTypes)
asset: Asset
}

constructor

method
(ctx: RequestContext, entity: Asset, type: 'created' | 'updated' | 'deleted', input?: AssetInputTypes) => AssetEvent

asset

property
v1.4

AttemptedLoginEvent

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.

Signature
class AttemptedLoginEvent extends VendureEvent {
constructor(ctx: RequestContext, strategy: string, identifier?: string)
}

constructor

method
(ctx: RequestContext, strategy: string, identifier?: string) => AttemptedLoginEvent

ChangeChannelEvent

This event is fired whenever an ChannelAware entity is assigned or removed from a channel. The entity property contains the value before updating the channels.

Signature
class ChangeChannelEvent<T extends ChannelAware & VendureEntity> extends VendureEvent {
constructor(ctx: RequestContext, entity: T, channelIds: ID[], type: 'assigned' | 'removed', entityType?: Type<T>)
}

constructor

method
(ctx: RequestContext, entity: T, channelIds: ID[], type: 'assigned' | 'removed', entityType?: Type<T>) => ChangeChannelEvent

ChannelEvent

This event is fired whenever a Channel is added, updated or deleted.

Signature
class ChannelEvent extends VendureEntityEvent<Channel, ChannelInputTypes> {
constructor(ctx: RequestContext, entity: Channel, type: 'created' | 'updated' | 'deleted', input?: ChannelInputTypes)
}

constructor

method
(ctx: RequestContext, entity: Channel, type: 'created' | 'updated' | 'deleted', input?: ChannelInputTypes) => ChannelEvent

CollectionEvent

This event is fired whenever a Collection is added, updated or deleted.

Signature
class CollectionEvent extends VendureEntityEvent<Collection, CollectionInputTypes> {
constructor(ctx: RequestContext, entity: Collection, type: 'created' | 'updated' | 'deleted', input?: CollectionInputTypes)
}

constructor

method
(ctx: RequestContext, entity: Collection, type: 'created' | 'updated' | 'deleted', input?: CollectionInputTypes) => CollectionEvent

CollectionModificationEvent

This event is fired whenever a Collection is modified in some way. The productVariantIds argument is an array of ids of all ProductVariants which:

  1. were part of this collection prior to modification and are no longer
  2. are now part of this collection after modification but were not before
Signature
class CollectionModificationEvent extends VendureEvent {
constructor(ctx: RequestContext, collection: Collection, productVariantIds: ID[])
}

constructor

method
(ctx: RequestContext, collection: Collection, productVariantIds: ID[]) => CollectionModificationEvent

CountryEvent

This event is fired whenever a Country is added, updated or deleted.

Signature
class CountryEvent extends VendureEntityEvent<Country, CountryInputTypes> {
constructor(ctx: RequestContext, entity: Country, type: 'created' | 'updated' | 'deleted', input?: CountryInputTypes)
}

constructor

method
(ctx: RequestContext, entity: Country, type: 'created' | 'updated' | 'deleted', input?: CountryInputTypes) => CountryEvent

CouponCodeEvent

This event is fired whenever an coupon code of an active Promotion is assigned or removed to an Order.

Signature
class CouponCodeEvent extends VendureEvent {
constructor(ctx: RequestContext, couponCode: string, orderId: ID, type: 'assigned' | 'removed')
}

constructor

method
(ctx: RequestContext, couponCode: string, orderId: ID, type: 'assigned' | 'removed') => CouponCodeEvent

CustomerAddressEvent

This event is fired whenever a Address is added, updated or deleted.

Signature
class CustomerAddressEvent extends VendureEntityEvent<Address, CustomerAddressInputTypes> {
constructor(ctx: RequestContext, entity: Address, type: 'created' | 'updated' | 'deleted', input?: CustomerAddressInputTypes)
address: Address
}

constructor

method
(ctx: RequestContext, entity: Address, type: 'created' | 'updated' | 'deleted', input?: CustomerAddressInputTypes) => CustomerAddressEvent

address

property

CustomerEvent

This event is fired whenever a Customer is added, updated or deleted.

Signature
class CustomerEvent extends VendureEntityEvent<Customer, CustomerInputTypes> {
constructor(ctx: RequestContext, entity: Customer, type: 'created' | 'updated' | 'deleted', input?: CustomerInputTypes)
customer: Customer
}

constructor

method
(ctx: RequestContext, entity: Customer, type: 'created' | 'updated' | 'deleted', input?: CustomerInputTypes) => CustomerEvent

customer

property
v1.4

CustomerGroupChangeEvent

This event is fired whenever one or more Customer is assigned to or removed from a CustomerGroup.

Signature
class CustomerGroupChangeEvent extends VendureEvent {
constructor(ctx: RequestContext, customers: Customer[], customGroup: CustomerGroup, type: 'assigned' | 'removed')
}

constructor

method
(ctx: RequestContext, customers: Customer[], customGroup: CustomerGroup, type: 'assigned' | 'removed') => CustomerGroupChangeEvent

CustomerGroupEvent

This event is fired whenever a CustomerGroup is added, updated or deleted.

Signature
class CustomerGroupEvent extends VendureEntityEvent<CustomerGroup, CustomerGroupInputTypes> {
constructor(ctx: RequestContext, entity: CustomerGroup, type: 'created' | 'updated' | 'deleted', input?: CustomerGroupInputTypes)
}

constructor

method
(ctx: RequestContext, entity: CustomerGroup, type: 'created' | 'updated' | 'deleted', input?: CustomerGroupInputTypes) => CustomerGroupEvent

FacetEvent

This event is fired whenever a Facet is added, updated or deleted.

Signature
class FacetEvent extends VendureEntityEvent<Facet, FacetInputTypes> {
constructor(ctx: RequestContext, entity: Facet, type: 'created' | 'updated' | 'deleted', input?: FacetInputTypes)
}

constructor

method
(ctx: RequestContext, entity: Facet, type: 'created' | 'updated' | 'deleted', input?: FacetInputTypes) => FacetEvent

FacetValueEvent

This event is fired whenever a FacetValue is added, updated or deleted.

Signature
class FacetValueEvent extends VendureEntityEvent<FacetValue, FacetValueInputTypes> {
constructor(ctx: RequestContext, entity: FacetValue, type: 'created' | 'updated' | 'deleted', input?: FacetValueInputTypes)
}

constructor

method
(ctx: RequestContext, entity: FacetValue, type: 'created' | 'updated' | 'deleted', input?: FacetValueInputTypes) => FacetValueEvent

FulfillmentEvent

This event is fired whenever a Fulfillment is added. The type is always created.

Signature
class FulfillmentEvent extends VendureEntityEvent<Fulfillment, CreateFulfillmentInput> {
constructor(ctx: RequestContext, entity: Fulfillment, input?: CreateFulfillmentInput)
}

constructor

method
(ctx: RequestContext, entity: Fulfillment, input?: CreateFulfillmentInput) => FulfillmentEvent

FulfillmentStateTransitionEvent

This event is fired whenever an Fulfillment transitions from one FulfillmentState to another.

Signature
class FulfillmentStateTransitionEvent extends VendureEvent {
constructor(fromState: FulfillmentState, toState: FulfillmentState, ctx: RequestContext, fulfillment: Fulfillment)
}

constructor

method
(fromState: FulfillmentState, toState: FulfillmentState, ctx: RequestContext, fulfillment: Fulfillment) => FulfillmentStateTransitionEvent

GlobalSettingsEvent

This event is fired whenever a GlobalSettings is added. The type is always updated, because it's only created once and never deleted.

Signature
class GlobalSettingsEvent extends VendureEntityEvent<GlobalSettings, UpdateGlobalSettingsInput> {
constructor(ctx: RequestContext, entity: GlobalSettings, input?: UpdateGlobalSettingsInput)
}

constructor

method
(ctx: RequestContext, entity: GlobalSettings, input?: UpdateGlobalSettingsInput) => GlobalSettingsEvent

HistoryEntryEvent

This event is fired whenever one HistoryEntry is added, updated or deleted.

Signature
class HistoryEntryEvent extends VendureEntityEvent<HistoryEntry, HistoryInput> {
public readonly historyType: 'order' | 'customer' | string;
constructor(ctx: RequestContext, entity: HistoryEntry, type: 'created' | 'updated' | 'deleted', historyType: 'order' | 'customer' | string, input?: HistoryInput)
}

historyType

property
'order' | 'customer' | string

constructor

method
(ctx: RequestContext, entity: HistoryEntry, type: 'created' | 'updated' | 'deleted', historyType: 'order' | 'customer' | string, input?: HistoryInput) => HistoryEntryEvent

IdentifierChangeEvent

This event is fired when a registered user successfully changes the identifier (ie email address) associated with their account.

Signature
class IdentifierChangeEvent extends VendureEvent {
constructor(ctx: RequestContext, user: User, oldIdentifier: string)
}

constructor

method
(ctx: RequestContext, user: User, oldIdentifier: string) => IdentifierChangeEvent

IdentifierChangeRequestEvent

This event is fired when a registered user requests to update the identifier (ie email address) associated with the account.

Signature
class IdentifierChangeRequestEvent extends VendureEvent {
constructor(ctx: RequestContext, user: User)
}

constructor

method
(ctx: RequestContext, user: User) => IdentifierChangeRequestEvent

InitializerEvent

This event is fired when vendure finished initializing its services inside the InitializerService

Signature
class InitializerEvent extends VendureEvent {
constructor()
}

constructor

method
() => InitializerEvent

LoginEvent

This event is fired when a user successfully logs in via the shop or admin API login mutation.

Signature
class LoginEvent extends VendureEvent {
constructor(ctx: RequestContext, user: User)
}

constructor

method
(ctx: RequestContext, user: User) => LoginEvent

LogoutEvent

This event is fired when a user logs out via the shop or admin API logout mutation.

Signature
class LogoutEvent extends VendureEvent {
constructor(ctx: RequestContext)
}

constructor

method
(ctx: RequestContext) => LogoutEvent

OrderEvent

This event is fired whenever an Order is added, updated or deleted.

Signature
class OrderEvent extends VendureEvent {
constructor(ctx: RequestContext, order: Order, type: 'created' | 'updated' | 'deleted')
}

constructor

method
(ctx: RequestContext, order: Order, type: 'created' | 'updated' | 'deleted') => OrderEvent

OrderLineEvent

This event is fired whenever an OrderLine is added, updated or deleted.

Signature
class OrderLineEvent extends VendureEvent {
constructor(ctx: RequestContext, order: Order, orderLine: OrderLine, type: 'created' | 'updated' | 'deleted')
}

constructor

method
(ctx: RequestContext, order: Order, orderLine: OrderLine, type: 'created' | 'updated' | 'deleted') => OrderLineEvent

OrderPlacedEvent

This 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.

Signature
class OrderPlacedEvent extends VendureEvent {
constructor(fromState: OrderState, toState: OrderState, ctx: RequestContext, order: Order)
}

constructor

method
(fromState: OrderState, toState: OrderState, ctx: RequestContext, order: Order) => OrderPlacedEvent

OrderStateTransitionEvent

This event is fired whenever an Order transitions from one OrderState to another.

Signature
class OrderStateTransitionEvent extends VendureEvent {
constructor(fromState: OrderState, toState: OrderState, ctx: RequestContext, order: Order)
}

constructor

method
(fromState: OrderState, toState: OrderState, ctx: RequestContext, order: Order) => OrderStateTransitionEvent

PasswordResetEvent

This event is fired when a Customer requests a password reset email.

Signature
class PasswordResetEvent extends VendureEvent {
constructor(ctx: RequestContext, user: User)
}

constructor

method
(ctx: RequestContext, user: User) => PasswordResetEvent

PasswordResetVerifiedEvent

This event is fired when a password reset is executed with a verified token.

Signature
class PasswordResetVerifiedEvent extends VendureEvent {
constructor(ctx: RequestContext, user: User)
}

constructor

method
(ctx: RequestContext, user: User) => PasswordResetVerifiedEvent

PaymentMethodEvent

This event is fired whenever a PaymentMethod is added, updated or deleted.

Signature
class PaymentMethodEvent extends VendureEntityEvent<PaymentMethod, PaymentMethodInputTypes> {
constructor(ctx: RequestContext, entity: PaymentMethod, type: 'created' | 'updated' | 'deleted', input?: PaymentMethodInputTypes)
}

constructor

method
(ctx: RequestContext, entity: PaymentMethod, type: 'created' | 'updated' | 'deleted', input?: PaymentMethodInputTypes) => PaymentMethodEvent

PaymentStateTransitionEvent

This event is fired whenever a Payment transitions from one PaymentState to another, e.g. a Payment is authorized by the payment provider.

Signature
class PaymentStateTransitionEvent extends VendureEvent {
constructor(fromState: PaymentState, toState: PaymentState, ctx: RequestContext, payment: Payment, order: Order)
}

constructor

method
(fromState: PaymentState, toState: PaymentState, ctx: RequestContext, payment: Payment, order: Order) => PaymentStateTransitionEvent

ProductChannelEvent

This event is fired whenever a Product is added, updated or deleted.

Signature
class ProductChannelEvent extends VendureEvent {
constructor(ctx: RequestContext, product: Product, channelId: ID, type: 'assigned' | 'removed')
}

constructor

method
(ctx: RequestContext, product: Product, channelId: ID, type: 'assigned' | 'removed') => ProductChannelEvent

ProductEvent

This event is fired whenever a Product is added, updated or deleted.

Signature
class ProductEvent extends VendureEntityEvent<Product, ProductInputTypes> {
constructor(ctx: RequestContext, entity: Product, type: 'created' | 'updated' | 'deleted', input?: ProductInputTypes)
product: Product
}

constructor

method
(ctx: RequestContext, entity: Product, type: 'created' | 'updated' | 'deleted', input?: ProductInputTypes) => ProductEvent

product

property
v1.4

ProductOptionEvent

This event is fired whenever a ProductOption is added or updated.

Signature
class ProductOptionEvent extends VendureEntityEvent<ProductOption, ProductOptionInputTypes> {
constructor(ctx: RequestContext, entity: ProductOption, type: 'created' | 'updated' | 'deleted', input?: ProductOptionInputTypes)
}

constructor

method
(ctx: RequestContext, entity: ProductOption, type: 'created' | 'updated' | 'deleted', input?: ProductOptionInputTypes) => ProductOptionEvent

ProductOptionGroupChangeEvent

This event is fired whenever a ProductOptionGroup is assigned or removed from a Product.

Signature
class ProductOptionGroupChangeEvent extends VendureEvent {
constructor(ctx: RequestContext, product: Product, optionGroupId: ID, type: 'assigned' | 'removed')
}

constructor

method
(ctx: RequestContext, product: Product, optionGroupId: ID, type: 'assigned' | 'removed') => ProductOptionGroupChangeEvent

ProductOptionGroupEvent

This event is fired whenever a ProductOptionGroup is added or updated.

Signature
class ProductOptionGroupEvent extends VendureEntityEvent<
ProductOptionGroup,
ProductOptionGroupInputTypes
> {
constructor(ctx: RequestContext, entity: ProductOptionGroup, type: 'created' | 'updated' | 'deleted', input?: ProductOptionGroupInputTypes)
}

constructor

method
(ctx: RequestContext, entity: ProductOptionGroup, type: 'created' | 'updated' | 'deleted', input?: ProductOptionGroupInputTypes) => ProductOptionGroupEvent

ProductVariantChannelEvent

This event is fired whenever a ProductVariant is assigned or removed from a Channel.

Signature
class ProductVariantChannelEvent extends VendureEvent {
constructor(ctx: RequestContext, productVariant: ProductVariant, channelId: ID, type: 'assigned' | 'removed')
}

constructor

method
(ctx: RequestContext, productVariant: ProductVariant, channelId: ID, type: 'assigned' | 'removed') => ProductVariantChannelEvent

ProductVariantEvent

This event is fired whenever a ProductVariant is added, updated or deleted.

Signature
class ProductVariantEvent extends VendureEntityEvent<ProductVariant[], ProductVariantInputTypes> {
constructor(ctx: RequestContext, entity: ProductVariant[], type: 'created' | 'updated' | 'deleted', input?: ProductVariantInputTypes)
variants: ProductVariant[]
}

constructor

method
(ctx: RequestContext, entity: ProductVariant[], type: 'created' | 'updated' | 'deleted', input?: ProductVariantInputTypes) => ProductVariantEvent

variants

property
v1.4

ProductVariantPriceEvent

This event is fired whenever a ProductVariantPrice is added, updated or deleted.

Signature
class ProductVariantPriceEvent extends VendureEntityEvent<
ProductVariantPrice[],
ProductVariantInputTypes
> {
constructor(ctx: RequestContext, entity: ProductVariantPrice[], type: 'created' | 'updated' | 'deleted', input?: ProductVariantInputTypes)
}

constructor

method
(ctx: RequestContext, entity: ProductVariantPrice[], type: 'created' | 'updated' | 'deleted', input?: ProductVariantInputTypes) => ProductVariantPriceEvent

PromotionEvent

This event is fired whenever a Promotion is added, updated or deleted.

Signature
class PromotionEvent extends VendureEntityEvent<Promotion, PromotionInputTypes> {
constructor(ctx: RequestContext, entity: Promotion, type: 'created' | 'updated' | 'deleted', input?: PromotionInputTypes)
}

constructor

method
(ctx: RequestContext, entity: Promotion, type: 'created' | 'updated' | 'deleted', input?: PromotionInputTypes) => PromotionEvent

ProvinceEvent

This event is fired whenever a Province is added, updated or deleted.

Signature
class ProvinceEvent extends VendureEntityEvent<Province, ProvinceInputTypes> {
constructor(ctx: RequestContext, entity: Province, type: 'created' | 'updated' | 'deleted', input?: ProvinceInputTypes)
}

constructor

method
(ctx: RequestContext, entity: Province, type: 'created' | 'updated' | 'deleted', input?: ProvinceInputTypes) => ProvinceEvent

RefundStateTransitionEvent

This event is fired whenever a Refund transitions from one RefundState to another.

Signature
class RefundStateTransitionEvent extends VendureEvent {
constructor(fromState: RefundState, toState: RefundState, ctx: RequestContext, refund: Refund, order: Order)
}

constructor

method
(fromState: RefundState, toState: RefundState, ctx: RequestContext, refund: Refund, order: Order) => RefundStateTransitionEvent

RoleChangeEvent

This event is fired whenever one Role is assigned or removed from a user. The property roleIds only contains the removed or assigned role ids.

Signature
class RoleChangeEvent extends VendureEvent {
constructor(ctx: RequestContext, admin: Administrator, roleIds: ID[], type: 'assigned' | 'removed')
}

constructor

method
(ctx: RequestContext, admin: Administrator, roleIds: ID[], type: 'assigned' | 'removed') => RoleChangeEvent

RoleEvent

This event is fired whenever one Role is added, updated or deleted.

Signature
class RoleEvent extends VendureEntityEvent<Role, RoleInputTypes> {
constructor(ctx: RequestContext, entity: Role, type: 'created' | 'updated' | 'deleted', input?: RoleInputTypes)
}

constructor

method
(ctx: RequestContext, entity: Role, type: 'created' | 'updated' | 'deleted', input?: RoleInputTypes) => RoleEvent

SearchEvent

This event is fired whenever a search query is executed.

Signature
class SearchEvent extends VendureEvent {
constructor(ctx: RequestContext, input: ExtendedSearchInput)
}

constructor

method
(ctx: RequestContext, input: ExtendedSearchInput) => SearchEvent

SellerEvent

This event is fired whenever one Seller is added, updated or deleted.

Signature
class SellerEvent extends VendureEntityEvent<Seller, SellerInputTypes> {
constructor(ctx: RequestContext, entity: Seller, type: 'created' | 'updated' | 'deleted', input?: SellerInputTypes)
}

constructor

method
(ctx: RequestContext, entity: Seller, type: 'created' | 'updated' | 'deleted', input?: SellerInputTypes) => SellerEvent

ShippingMethodEvent

This event is fired whenever a ShippingMethod is added, updated or deleted.

Signature
class ShippingMethodEvent extends VendureEntityEvent<ShippingMethod, ShippingMethodInputTypes> {
constructor(ctx: RequestContext, entity: ShippingMethod, type: 'created' | 'updated' | 'deleted', input?: ShippingMethodInputTypes)
}

constructor

method
(ctx: RequestContext, entity: ShippingMethod, type: 'created' | 'updated' | 'deleted', input?: ShippingMethodInputTypes) => ShippingMethodEvent

StockMovementEvent

This 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.

Signature
class StockMovementEvent extends VendureEvent {
public readonly type: StockMovementType;
constructor(ctx: RequestContext, stockMovements: StockMovement[])
}

type

property
StockMovementType

constructor

method
(ctx: RequestContext, stockMovements: StockMovement[]) => StockMovementEvent

TaxCategoryEvent

This event is fired whenever a TaxCategory is added, updated or deleted.

Signature
class TaxCategoryEvent extends VendureEntityEvent<TaxCategory, TaxCategoryInputTypes> {
constructor(ctx: RequestContext, entity: TaxCategory, type: 'created' | 'updated' | 'deleted', input?: TaxCategoryInputTypes)
}

constructor

method
(ctx: RequestContext, entity: TaxCategory, type: 'created' | 'updated' | 'deleted', input?: TaxCategoryInputTypes) => TaxCategoryEvent

TaxRateEvent

This event is fired whenever a TaxRate is added, updated or deleted.

Signature
class TaxRateEvent extends VendureEntityEvent<TaxRate, TaxRateInputTypes> {
constructor(ctx: RequestContext, entity: TaxRate, type: 'created' | 'updated' | 'deleted', input?: TaxRateInputTypes)
}

constructor

method
(ctx: RequestContext, entity: TaxRate, type: 'created' | 'updated' | 'deleted', input?: TaxRateInputTypes) => TaxRateEvent

TaxRateModificationEvent

This event is fired whenever a TaxRate is changed

Signature
class TaxRateModificationEvent extends VendureEvent {
constructor(ctx: RequestContext, taxRate: TaxRate)
}

constructor

method
(ctx: RequestContext, taxRate: TaxRate) => TaxRateModificationEvent

ZoneEvent

This event is fired whenever a Zone is added, updated or deleted.

Signature
class ZoneEvent extends VendureEntityEvent<Zone, ZoneInputTypes> {
constructor(ctx: RequestContext, entity: Zone, type: 'created' | 'updated' | 'deleted', input?: ZoneInputTypes)
}

constructor

method
(ctx: RequestContext, entity: Zone, type: 'created' | 'updated' | 'deleted', input?: ZoneInputTypes) => ZoneEvent

ZoneMembersEvent

This event is fired whenever a Zone gets Country members assigned or removed The entity property contains the zone with the already updated member field.

Signature
class ZoneMembersEvent extends VendureEvent {
constructor(ctx: RequestContext, entity: Zone, type: 'assigned' | 'removed', memberIds: ID[])
}

constructor

method
(ctx: RequestContext, entity: Zone, type: 'assigned' | 'removed', memberIds: ID[]) => ZoneMembersEvent