email-send-event.ts 744 B

123456789101112131415161718192021222324
  1. import { RequestContext, VendureEvent } from '@vendure/core';
  2. import { EmailDetails, EmailMetadata } from './types';
  3. /**
  4. * @description
  5. * This event is fired when an email sending attempt has been made. If the sending was successful,
  6. * the `success` property will be `true`, and if not, the `error` property will contain the error
  7. * which occurred.
  8. *
  9. * @docsCategory core plugins/EmailPlugin
  10. * @since 2.2.0
  11. */
  12. export class EmailSendEvent extends VendureEvent {
  13. constructor(
  14. public readonly ctx: RequestContext,
  15. public readonly details: EmailDetails,
  16. public readonly success: boolean,
  17. public readonly error?: Error,
  18. public readonly metadata?: EmailMetadata,
  19. ) {
  20. super();
  21. }
  22. }