1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-15 07:33:04 +01:00
invoiceninja/app/Providers/EventServiceProvider.php

710 lines
26 KiB
PHP
Raw Normal View History

2018-10-04 19:10:43 +02:00
<?php
2019-05-11 05:32:07 +02:00
/**
* Invoice Ninja (https://invoiceninja.com).
2019-05-11 05:32:07 +02:00
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
2024-04-12 06:15:41 +02:00
* @copyright Copyright (c) 2024. Invoice Ninja LLC (https://invoiceninja.com)
2019-05-11 05:32:07 +02:00
*
2021-06-16 08:58:16 +02:00
* @license https://www.elastic.co/licensing/elastic-license
2019-05-11 05:32:07 +02:00
*/
2018-10-04 19:10:43 +02:00
namespace App\Providers;
2024-06-21 11:40:56 +02:00
use App\Models\Task;
use App\Models\User;
use App\Models\Quote;
use App\Models\Client;
use App\Models\Credit;
use App\Models\Vendor;
use App\Models\Account;
use App\Models\Company;
use App\Models\Expense;
use App\Models\Invoice;
use App\Models\Payment;
use App\Models\Product;
use App\Models\Project;
use App\Models\Proposal;
use App\Models\CompanyToken;
use App\Models\Subscription;
use App\Models\ClientContact;
use App\Models\PurchaseOrder;
use App\Models\VendorContact;
use App\Models\CompanyGateway;
use App\Observers\TaskObserver;
use App\Observers\UserObserver;
use App\Observers\QuoteObserver;
use App\Events\User\UserLoggedIn;
use App\Observers\ClientObserver;
use App\Observers\CreditObserver;
use App\Observers\VendorObserver;
use App\Observers\AccountObserver;
use App\Observers\CompanyObserver;
use App\Observers\ExpenseObserver;
use App\Observers\InvoiceObserver;
use App\Observers\PaymentObserver;
use App\Observers\ProductObserver;
use App\Observers\ProjectObserver;
use App\Events\Task\TaskWasCreated;
use App\Events\Task\TaskWasDeleted;
use App\Events\Task\TaskWasUpdated;
use App\Events\User\UserWasCreated;
use App\Events\User\UserWasDeleted;
use App\Events\User\UserWasUpdated;
use App\Observers\ProposalObserver;
use App\Events\Quote\QuoteWasViewed;
use App\Events\Task\TaskWasArchived;
use App\Events\Task\TaskWasRestored;
use App\Events\User\UserWasArchived;
use App\Events\User\UserWasRestored;
use App\Events\Quote\QuoteWasCreated;
use App\Events\Quote\QuoteWasDeleted;
use App\Events\Quote\QuoteWasEmailed;
use App\Events\Quote\QuoteWasUpdated;
2021-04-26 05:01:59 +02:00
use App\Events\Account\AccountCreated;
2024-06-21 11:40:56 +02:00
use App\Events\Credit\CreditWasViewed;
use App\Events\Invoice\InvoiceWasPaid;
use App\Events\Quote\QuoteWasApproved;
use App\Events\Quote\QuoteWasArchived;
use App\Events\Quote\QuoteWasRestored;
2019-04-20 03:19:43 +02:00
use App\Events\Client\ClientWasCreated;
2020-06-22 00:34:02 +02:00
use App\Events\Client\ClientWasDeleted;
use App\Events\Client\ClientWasUpdated;
2019-07-10 03:50:49 +02:00
use App\Events\Contact\ContactLoggedIn;
2020-07-17 06:44:34 +02:00
use App\Events\Credit\CreditWasCreated;
2020-07-20 01:02:31 +02:00
use App\Events\Credit\CreditWasDeleted;
use App\Events\Credit\CreditWasEmailed;
2023-10-26 04:57:44 +02:00
use App\Events\Credit\CreditWasUpdated;
use App\Events\Design\DesignWasDeleted;
use App\Events\Design\DesignWasUpdated;
2024-06-21 11:40:56 +02:00
use App\Events\Vendor\VendorWasCreated;
use App\Events\Vendor\VendorWasDeleted;
use App\Events\Vendor\VendorWasUpdated;
use App\Observers\CompanyTokenObserver;
use App\Observers\SubscriptionObserver;
use Illuminate\Mail\Events\MessageSent;
use App\Events\Client\ClientWasArchived;
use App\Events\Client\ClientWasRestored;
use App\Events\Credit\CreditWasArchived;
use App\Events\Credit\CreditWasRestored;
use App\Events\Design\DesignWasArchived;
use App\Events\Design\DesignWasRestored;
use App\Events\Invoice\InvoiceWasViewed;
use App\Events\Misc\InvitationWasViewed;
use App\Events\Payment\PaymentWasVoided;
use App\Events\Vendor\VendorWasArchived;
use App\Events\Vendor\VendorWasRestored;
use App\Listeners\Mail\MailSentListener;
use App\Observers\ClientContactObserver;
use App\Observers\PurchaseOrderObserver;
use App\Observers\VendorContactObserver;
2020-11-03 11:04:15 +01:00
use App\Events\Expense\ExpenseWasCreated;
use App\Events\Expense\ExpenseWasDeleted;
use App\Events\Expense\ExpenseWasUpdated;
2019-05-15 07:03:18 +02:00
use App\Events\Invoice\InvoiceWasCreated;
use App\Events\Invoice\InvoiceWasDeleted;
use App\Events\Invoice\InvoiceWasEmailed;
2019-05-15 07:03:18 +02:00
use App\Events\Invoice\InvoiceWasUpdated;
2019-05-13 08:18:46 +02:00
use App\Events\Payment\PaymentWasCreated;
use App\Events\Payment\PaymentWasDeleted;
2020-11-12 04:04:27 +01:00
use App\Events\Payment\PaymentWasEmailed;
2024-06-21 11:40:56 +02:00
use App\Events\Payment\PaymentWasUpdated;
use App\Observers\CompanyGatewayObserver;
use App\Events\Credit\CreditWasMarkedSent;
use App\Events\Expense\ExpenseWasArchived;
use App\Events\Expense\ExpenseWasRestored;
use App\Events\Invoice\InvoiceWasArchived;
use App\Events\Invoice\InvoiceWasRestored;
use App\Events\Invoice\InvoiceWasReversed;
use App\Events\Payment\PaymentWasArchived;
use App\Events\Payment\PaymentWasRefunded;
2020-07-22 09:53:14 +02:00
use App\Events\Payment\PaymentWasRestored;
2024-06-21 11:40:56 +02:00
use Illuminate\Mail\Events\MessageSending;
use App\Events\Document\DocumentWasCreated;
use App\Events\Document\DocumentWasDeleted;
use App\Events\Document\DocumentWasUpdated;
use App\Events\Invoice\InvoiceWasCancelled;
use App\Listeners\Quote\QuoteEmailActivity;
use App\Listeners\User\CreatedUserActivity;
use App\Listeners\User\DeletedUserActivity;
use App\Listeners\User\UpdatedUserActivity;
use App\Listeners\User\UpdateUserLastLogin;
use App\Events\Account\StripeConnectFailure;
use App\Events\Document\DocumentWasArchived;
use App\Events\Document\DocumentWasRestored;
use App\Events\Invoice\InvoiceWasMarkedSent;
use App\Events\Vendor\VendorContactLoggedIn;
2024-06-21 11:40:56 +02:00
use App\Listeners\Quote\QuoteViewedActivity;
use App\Listeners\User\ArchivedUserActivity;
use App\Listeners\User\RestoredUserActivity;
use App\Events\Quote\QuoteReminderWasEmailed;
use App\Events\Statement\StatementWasEmailed;
use App\Listeners\Quote\QuoteApprovedWebhook;
use App\Listeners\Quote\QuoteDeletedActivity;
use App\Listeners\Credit\CreditViewedActivity;
use App\Listeners\Invoice\InvoicePaidActivity;
use App\Listeners\Payment\PaymentNotification;
use App\Listeners\Quote\QuoteApprovedActivity;
use App\Listeners\Quote\QuoteArchivedActivity;
use App\Listeners\Quote\QuoteRestoredActivity;
use App\Listeners\Quote\ReachWorkflowSettings;
use App\Events\Company\CompanyDocumentsDeleted;
use App\Listeners\Activity\CreatedTaskActivity;
use App\Listeners\Activity\TaskDeletedActivity;
use App\Listeners\Activity\TaskUpdatedActivity;
use App\Listeners\Invoice\InvoiceEmailActivity;
use App\Listeners\SendVerificationNotification;
use App\Events\Credit\CreditWasEmailedAndFailed;
2024-08-29 06:36:38 +02:00
use App\Events\Invoice\InvoiceAutoBillFailed;
use App\Events\Invoice\InvoiceAutoBillSuccess;
2024-06-21 11:40:56 +02:00
use App\Listeners\Activity\CreatedQuoteActivity;
use App\Listeners\Activity\DeleteClientActivity;
use App\Listeners\Activity\DeleteCreditActivity;
use App\Listeners\Activity\QuoteUpdatedActivity;
use App\Listeners\Activity\TaskArchivedActivity;
use App\Listeners\Activity\TaskRestoredActivity;
use App\Listeners\Credit\CreditRestoredActivity;
use App\Listeners\Invoice\CreateInvoiceActivity;
use App\Listeners\Invoice\InvoiceViewedActivity;
use App\Listeners\Invoice\UpdateInvoiceActivity;
use App\Listeners\Misc\InvitationViewedListener;
use App\Events\Invoice\InvoiceReminderWasEmailed;
2020-11-03 11:04:15 +01:00
use App\Listeners\Activity\ClientUpdatedActivity;
2019-05-13 08:18:46 +02:00
use App\Listeners\Activity\CreatedClientActivity;
2020-07-17 06:44:34 +02:00
use App\Listeners\Activity\CreatedCreditActivity;
2023-10-26 04:57:44 +02:00
use App\Listeners\Activity\CreatedVendorActivity;
2024-06-21 11:40:56 +02:00
use App\Listeners\Activity\PaymentVoidedActivity;
use App\Listeners\Activity\RestoreClientActivity;
use App\Listeners\Activity\UpdatedCreditActivity;
use App\Listeners\Activity\VendorDeletedActivity;
use App\Listeners\Activity\VendorUpdatedActivity;
use App\Listeners\Contact\UpdateContactLastLogin;
use App\Listeners\Invoice\InvoiceDeletedActivity;
use App\Listeners\Payment\PaymentBalanceActivity;
use App\Listeners\Payment\PaymentEmailedActivity;
use App\Listeners\Quote\QuoteCreatedNotification;
use App\Listeners\Quote\QuoteEmailedNotification;
use App\Events\Invoice\InvoiceWasEmailedAndFailed;
use App\Events\Payment\PaymentWasEmailedAndFailed;
use App\Listeners\Activity\ArchivedClientActivity;
use App\Listeners\Activity\CreatedExpenseActivity;
2020-07-17 06:44:34 +02:00
use App\Listeners\Activity\CreditArchivedActivity;
2020-11-03 11:04:15 +01:00
use App\Listeners\Activity\ExpenseDeletedActivity;
use App\Listeners\Activity\ExpenseUpdatedActivity;
2019-05-15 07:03:18 +02:00
use App\Listeners\Activity\PaymentCreatedActivity;
use App\Listeners\Activity\PaymentDeletedActivity;
2020-07-17 03:28:54 +02:00
use App\Listeners\Activity\PaymentUpdatedActivity;
2020-11-03 11:04:15 +01:00
use App\Listeners\Activity\VendorArchivedActivity;
use App\Listeners\Activity\VendorRestoredActivity;
2023-10-26 04:57:44 +02:00
use App\Listeners\Document\DeleteCompanyDocuments;
use App\Listeners\Invoice\InvoiceArchivedActivity;
2024-06-21 11:40:56 +02:00
use App\Listeners\Invoice\InvoiceRestoredActivity;
use App\Listeners\Invoice\InvoiceReversedActivity;
use App\Listeners\Payment\PaymentRestoredActivity;
use App\Listeners\Quote\QuoteApprovedNotification;
use App\Events\Subscription\SubscriptionWasCreated;
use App\Events\Subscription\SubscriptionWasDeleted;
use App\Events\Subscription\SubscriptionWasUpdated;
use App\Listeners\Activity\ExpenseArchivedActivity;
use App\Listeners\Activity\ExpenseRestoredActivity;
use App\Listeners\Activity\PaymentArchivedActivity;
use App\Listeners\Activity\PaymentRefundedActivity;
use App\Listeners\Credit\CreditCreatedNotification;
use App\Listeners\Credit\CreditEmailedNotification;
2020-08-12 04:02:21 +02:00
use App\Listeners\Invoice\InvoiceCancelledActivity;
2024-06-21 11:40:56 +02:00
use App\Listeners\Quote\QuoteReminderEmailActivity;
use App\Events\PurchaseOrder\PurchaseOrderWasViewed;
use App\Events\Subscription\SubscriptionWasArchived;
use App\Events\Subscription\SubscriptionWasRestored;
use App\Events\PurchaseOrder\PurchaseOrderWasCreated;
use App\Events\PurchaseOrder\PurchaseOrderWasDeleted;
use App\Events\PurchaseOrder\PurchaseOrderWasEmailed;
use App\Events\PurchaseOrder\PurchaseOrderWasUpdated;
use App\Listeners\Invoice\InvoiceCreatedNotification;
2022-12-19 13:25:48 +01:00
use App\Listeners\Invoice\InvoiceEmailedNotification;
2023-02-16 02:36:09 +01:00
use App\Listeners\Invoice\InvoiceEmailFailedActivity;
2024-06-21 11:40:56 +02:00
use App\Listeners\Statement\StatementEmailedActivity;
use App\Events\PurchaseOrder\PurchaseOrderWasAccepted;
use App\Events\PurchaseOrder\PurchaseOrderWasArchived;
use App\Events\PurchaseOrder\PurchaseOrderWasRestored;
use App\Listeners\Vendor\UpdateVendorContactLastLogin;
use App\Events\RecurringQuote\RecurringQuoteWasCreated;
use App\Events\RecurringQuote\RecurringQuoteWasDeleted;
use App\Events\RecurringQuote\RecurringQuoteWasUpdated;
use App\Listeners\Account\StripeConnectFailureListener;
use App\Listeners\Activity\CreatedSubscriptionActivity;
use App\Listeners\Activity\SubscriptionDeletedActivity;
use App\Listeners\Activity\SubscriptionUpdatedActivity;
2023-10-26 04:57:44 +02:00
use App\Listeners\Invoice\InvoiceReminderEmailActivity;
2024-06-21 11:40:56 +02:00
use App\Events\RecurringQuote\RecurringQuoteWasArchived;
use App\Events\RecurringQuote\RecurringQuoteWasRestored;
use App\Listeners\Activity\SubscriptionArchivedActivity;
use App\Listeners\Activity\SubscriptionRestoredActivity;
use App\Listeners\Invoice\InvoiceFailedEmailNotification;
use App\Events\RecurringExpense\RecurringExpenseWasCreated;
use App\Events\RecurringExpense\RecurringExpenseWasDeleted;
use App\Events\RecurringExpense\RecurringExpenseWasUpdated;
use App\Events\RecurringInvoice\RecurringInvoiceWasCreated;
use App\Events\RecurringInvoice\RecurringInvoiceWasDeleted;
use App\Events\RecurringInvoice\RecurringInvoiceWasUpdated;
use App\Listeners\PurchaseOrder\PurchaseOrderEmailActivity;
use App\Events\RecurringExpense\RecurringExpenseWasArchived;
use App\Events\RecurringExpense\RecurringExpenseWasRestored;
use App\Events\RecurringInvoice\RecurringInvoiceWasArchived;
use App\Events\RecurringInvoice\RecurringInvoiceWasRestored;
2024-08-29 06:36:38 +02:00
use App\Listeners\Invoice\InvoiceAutoBillFailedActivity;
use App\Listeners\Invoice\InvoiceAutoBillSuccessActivity;
2022-06-09 05:33:13 +02:00
use App\Listeners\PurchaseOrder\CreatePurchaseOrderActivity;
2024-06-21 11:40:56 +02:00
use App\Listeners\PurchaseOrder\PurchaseOrderViewedActivity;
use App\Listeners\PurchaseOrder\UpdatePurchaseOrderActivity;
use App\Listeners\PurchaseOrder\PurchaseOrderCreatedListener;
use App\Listeners\PurchaseOrder\PurchaseOrderDeletedActivity;
2022-06-15 08:27:21 +02:00
use App\Listeners\PurchaseOrder\PurchaseOrderAcceptedActivity;
2022-12-19 13:25:48 +01:00
use App\Listeners\PurchaseOrder\PurchaseOrderAcceptedListener;
2022-06-09 05:33:13 +02:00
use App\Listeners\PurchaseOrder\PurchaseOrderArchivedActivity;
2023-10-26 04:57:44 +02:00
use App\Listeners\PurchaseOrder\PurchaseOrderRestoredActivity;
2024-06-21 11:40:56 +02:00
use App\Listeners\RecurringQuote\CreateRecurringQuoteActivity;
use App\Listeners\RecurringQuote\UpdateRecurringQuoteActivity;
use App\Listeners\RecurringQuote\RecurringQuoteDeletedActivity;
use App\Listeners\RecurringQuote\RecurringQuoteArchivedActivity;
use App\Listeners\RecurringQuote\RecurringQuoteRestoredActivity;
use App\Listeners\PurchaseOrder\PurchaseOrderEmailedNotification;
use App\Listeners\RecurringInvoice\CreateRecurringInvoiceActivity;
use App\Listeners\RecurringInvoice\UpdateRecurringInvoiceActivity;
use App\Listeners\RecurringExpense\CreatedRecurringExpenseActivity;
2023-10-26 04:57:44 +02:00
use App\Listeners\RecurringExpense\RecurringExpenseDeletedActivity;
use App\Listeners\RecurringExpense\RecurringExpenseUpdatedActivity;
use App\Listeners\RecurringInvoice\RecurringInvoiceDeletedActivity;
2024-06-21 11:40:56 +02:00
use App\Listeners\RecurringExpense\RecurringExpenseArchivedActivity;
use App\Listeners\RecurringExpense\RecurringExpenseRestoredActivity;
use App\Listeners\RecurringInvoice\RecurringInvoiceArchivedActivity;
use App\Listeners\RecurringInvoice\RecurringInvoiceRestoredActivity;
2018-10-04 19:10:43 +02:00
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
class EventServiceProvider extends ServiceProvider
{
/**
* The event listener mappings for the application.
*
*/
protected $listen = [
2024-01-14 05:05:00 +01:00
2023-11-25 12:58:27 +01:00
// RequestSending::class => [
// LogRequestSending::class,
// ],
// ResponseReceived::class => [
// LogResponseReceived::class,
// ],
AccountCreated::class => [
2021-04-26 05:01:59 +02:00
],
MessageSending::class => [
2021-02-22 01:18:52 +01:00
],
2022-08-17 09:18:30 +02:00
MessageSent::class => [
MailSentListener::class,
],
2019-06-12 06:22:05 +02:00
UserWasCreated::class => [
2021-01-14 04:44:52 +01:00
CreatedUserActivity::class,
2018-10-24 05:50:15 +02:00
SendVerificationNotification::class,
2019-04-20 03:19:43 +02:00
],
UserWasDeleted::class => [
DeletedUserActivity::class,
],
2021-01-14 04:44:52 +01:00
UserWasArchived::class => [
ArchivedUserActivity::class,
],
2019-06-03 23:46:46 +02:00
UserLoggedIn::class => [
UpdateUserLastLogin::class,
],
2021-01-14 04:44:52 +01:00
UserWasUpdated::class => [
UpdatedUserActivity::class,
],
UserWasRestored::class => [
RestoredUserActivity::class,
],
2019-07-10 03:50:49 +02:00
ContactLoggedIn::class => [
UpdateContactLastLogin::class,
],
2019-05-13 08:18:46 +02:00
PaymentWasCreated::class => [
PaymentCreatedActivity::class,
PaymentNotification::class,
PaymentBalanceActivity::class,
2019-05-13 08:18:46 +02:00
],
PaymentWasDeleted::class => [
PaymentDeletedActivity::class,
PaymentBalanceActivity::class,
],
2020-07-17 03:28:54 +02:00
PaymentWasArchived::class => [
PaymentArchivedActivity::class,
],
PaymentWasUpdated::class => [
PaymentUpdatedActivity::class,
PaymentBalanceActivity::class,
2020-07-17 03:28:54 +02:00
],
PaymentWasRefunded::class => [
PaymentRefundedActivity::class,
PaymentBalanceActivity::class,
],
PaymentWasVoided::class => [
PaymentVoidedActivity::class,
PaymentBalanceActivity::class,
],
PaymentWasRestored::class => [
2020-07-22 09:53:14 +02:00
PaymentRestoredActivity::class,
PaymentBalanceActivity::class,
2020-07-22 09:53:14 +02:00
],
2020-06-22 00:34:02 +02:00
// Clients
ClientWasCreated::class => [
2020-06-22 00:34:02 +02:00
CreatedClientActivity::class,
2019-04-20 03:19:43 +02:00
],
ClientWasArchived::class => [
2020-07-17 02:31:19 +02:00
ArchivedClientActivity::class,
2019-04-20 03:19:43 +02:00
],
ClientWasUpdated::class => [
2020-11-03 11:04:15 +01:00
ClientUpdatedActivity::class,
2019-04-20 03:19:43 +02:00
],
ClientWasDeleted::class => [
2020-07-17 02:31:19 +02:00
DeleteClientActivity::class,
2020-06-22 00:34:02 +02:00
],
ClientWasRestored::class => [
2020-07-17 02:31:19 +02:00
RestoreClientActivity::class,
2019-04-20 03:19:43 +02:00
],
2020-06-24 13:49:06 +02:00
// Documents
DocumentWasCreated::class => [
2020-06-24 13:49:06 +02:00
],
DocumentWasArchived::class => [
2020-06-24 13:49:06 +02:00
],
DocumentWasUpdated::class => [
2020-06-24 13:49:06 +02:00
],
DocumentWasDeleted::class => [
2020-06-24 13:49:06 +02:00
],
DocumentWasRestored::class => [
2020-06-24 13:49:06 +02:00
],
2020-07-17 06:44:34 +02:00
CreditWasCreated::class => [
CreatedCreditActivity::class,
CreditCreatedNotification::class,
2020-07-17 06:44:34 +02:00
],
2020-07-20 01:02:31 +02:00
CreditWasDeleted::class => [
DeleteCreditActivity::class,
],
2020-07-17 06:44:34 +02:00
CreditWasUpdated::class => [
UpdatedCreditActivity::class,
],
2020-06-30 01:35:17 +02:00
CreditWasEmailedAndFailed::class => [
],
CreditWasEmailed::class => [
CreditEmailedNotification::class,
2020-06-30 01:35:17 +02:00
],
CreditWasMarkedSent::class => [
],
2020-07-17 06:44:34 +02:00
CreditWasArchived::class => [
CreditArchivedActivity::class,
],
2020-07-22 09:53:14 +02:00
CreditWasRestored::class => [
CreditRestoredActivity::class,
],
2020-08-12 04:02:21 +02:00
CreditWasViewed::class => [
CreditViewedActivity::class,
2020-08-12 04:02:21 +02:00
],
2020-06-22 00:34:02 +02:00
//Designs
DesignWasUpdated::class => [
],
2020-11-03 11:04:15 +01:00
DesignWasArchived::class => [
],
2020-06-22 00:34:02 +02:00
DesignWasDeleted::class => [
],
DesignWasRestored::class => [
],
2020-11-03 11:04:15 +01:00
ExpenseWasCreated::class => [
CreatedExpenseActivity::class,
],
ExpenseWasUpdated::class => [
ExpenseUpdatedActivity::class,
],
ExpenseWasArchived::class => [
ExpenseArchivedActivity::class,
],
ExpenseWasDeleted::class => [
ExpenseDeletedActivity::class,
],
ExpenseWasRestored::class => [
ExpenseRestoredActivity::class,
2020-11-03 11:04:15 +01:00
],
//Invoices
2024-08-29 06:36:38 +02:00
InvoiceAutoBillSuccess::class => [
InvoiceAutoBillSuccessActivity::class,
],
InvoiceAutoBillFailed::class => [
InvoiceAutoBillFailedActivity::class,
],
InvoiceWasMarkedSent::class => [
2019-05-15 07:03:18 +02:00
],
InvoiceWasUpdated::class => [
UpdateInvoiceActivity::class,
2019-05-15 07:03:18 +02:00
],
InvoiceWasCreated::class => [
CreateInvoiceActivity::class,
InvoiceCreatedNotification::class,
],
InvoiceWasPaid::class => [
InvoicePaidActivity::class,
],
2020-07-17 03:47:37 +02:00
InvoiceWasViewed::class => [
2020-07-17 03:18:40 +02:00
InvoiceViewedActivity::class,
],
InvoiceWasEmailed::class => [
InvoiceEmailActivity::class,
InvoiceEmailedNotification::class,
],
InvoiceWasEmailedAndFailed::class => [
InvoiceEmailFailedActivity::class,
2021-01-20 02:59:39 +01:00
InvoiceFailedEmailNotification::class,
],
2020-11-09 11:17:20 +01:00
InvoiceReminderWasEmailed::class => [
InvoiceReminderEmailActivity::class,
2023-04-27 00:48:45 +02:00
InvoiceEmailedNotification::class,
2020-11-09 11:17:20 +01:00
],
InvoiceWasDeleted::class => [
InvoiceDeletedActivity::class,
],
2020-07-17 03:28:54 +02:00
InvoiceWasArchived::class => [
InvoiceArchivedActivity::class,
],
2020-07-22 09:53:14 +02:00
InvoiceWasRestored::class => [
InvoiceRestoredActivity::class,
],
InvoiceWasReversed::class => [
2020-08-12 04:02:21 +02:00
InvoiceReversedActivity::class,
],
InvoiceWasCancelled::class => [
2020-08-12 04:02:21 +02:00
InvoiceCancelledActivity::class,
],
InvitationWasViewed::class => [
InvitationViewedListener::class,
],
2020-11-12 04:04:27 +01:00
PaymentWasEmailed::class => [
2023-03-17 07:36:49 +01:00
PaymentEmailedActivity::class,
2020-11-12 04:04:27 +01:00
],
PaymentWasEmailedAndFailed::class => [
// PaymentEmailFailureActivity::class,
2020-11-12 04:04:27 +01:00
],
2022-06-09 04:24:42 +02:00
PurchaseOrderWasArchived::class => [
2022-06-09 05:33:13 +02:00
PurchaseOrderArchivedActivity::class,
2022-06-09 04:24:42 +02:00
],
PurchaseOrderWasCreated::class => [
2022-06-09 05:33:13 +02:00
CreatePurchaseOrderActivity::class,
2022-12-19 13:25:48 +01:00
PurchaseOrderCreatedListener::class,
2022-06-09 04:24:42 +02:00
],
PurchaseOrderWasDeleted::class => [
2022-06-09 05:33:13 +02:00
PurchaseOrderDeletedActivity::class,
2022-06-09 04:24:42 +02:00
],
PurchaseOrderWasEmailed::class => [
2022-06-09 05:33:13 +02:00
PurchaseOrderEmailActivity::class,
2022-12-19 13:25:48 +01:00
PurchaseOrderEmailedNotification::class,
2022-06-09 04:24:42 +02:00
],
PurchaseOrderWasRestored::class => [
2022-06-09 05:33:13 +02:00
PurchaseOrderRestoredActivity::class,
2022-06-09 04:24:42 +02:00
],
PurchaseOrderWasUpdated::class => [
2022-06-09 05:33:13 +02:00
UpdatePurchaseOrderActivity::class,
2022-06-09 04:24:42 +02:00
],
PurchaseOrderWasViewed::class => [
2022-06-09 05:33:13 +02:00
PurchaseOrderViewedActivity::class,
2022-06-09 04:24:42 +02:00
],
2022-06-15 08:27:21 +02:00
PurchaseOrderWasAccepted::class => [
2022-12-19 13:25:48 +01:00
PurchaseOrderAcceptedListener::class,
2022-06-15 08:27:21 +02:00
PurchaseOrderAcceptedActivity::class,
],
2020-07-08 14:02:16 +02:00
CompanyDocumentsDeleted::class => [
DeleteCompanyDocuments::class,
],
QuoteWasApproved::class => [
ReachWorkflowSettings::class,
2020-10-29 22:43:23 +01:00
QuoteApprovedActivity::class,
2021-09-11 04:51:34 +02:00
QuoteApprovedWebhook::class,
2021-11-16 04:14:15 +01:00
QuoteApprovedNotification::class,
],
2020-07-20 01:02:31 +02:00
QuoteWasCreated::class => [
CreatedQuoteActivity::class,
QuoteCreatedNotification::class,
2020-07-20 01:02:31 +02:00
],
QuoteWasUpdated::class => [
QuoteUpdatedActivity::class,
],
QuoteWasEmailed::class => [
QuoteEmailActivity::class,
QuoteEmailedNotification::class,
2020-07-20 01:02:31 +02:00
],
QuoteWasViewed::class => [
QuoteViewedActivity::class,
],
2020-07-22 09:53:14 +02:00
QuoteWasArchived::class => [
QuoteArchivedActivity::class,
],
QuoteWasDeleted::class => [
QuoteDeletedActivity::class,
],
QuoteWasRestored::class => [
QuoteRestoredActivity::class,
],
2024-08-22 08:45:06 +02:00
QuoteReminderWasEmailed::class => [
2024-06-21 11:40:56 +02:00
QuoteReminderEmailActivity::class,
// QuoteEmailedNotification::class,
],
2021-08-24 07:55:14 +02:00
RecurringExpenseWasCreated::class => [
CreatedRecurringExpenseActivity::class,
],
RecurringExpenseWasUpdated::class => [
RecurringExpenseUpdatedActivity::class,
],
RecurringExpenseWasArchived::class => [
RecurringExpenseArchivedActivity::class,
],
RecurringExpenseWasDeleted::class => [
RecurringExpenseDeletedActivity::class,
],
RecurringExpenseWasRestored::class => [
RecurringExpenseRestoredActivity::class,
2021-08-24 07:55:14 +02:00
],
RecurringQuoteWasUpdated::class => [
UpdateRecurringQuoteActivity::class,
],
RecurringQuoteWasCreated::class => [
CreateRecurringQuoteActivity::class,
],
RecurringQuoteWasDeleted::class => [
RecurringQuoteDeletedActivity::class,
],
RecurringQuoteWasArchived::class => [
RecurringQuoteArchivedActivity::class,
],
RecurringQuoteWasRestored::class => [
RecurringQuoteRestoredActivity::class,
],
RecurringInvoiceWasUpdated::class => [
UpdateRecurringInvoiceActivity::class,
],
RecurringInvoiceWasCreated::class => [
CreateRecurringInvoiceActivity::class,
],
RecurringInvoiceWasDeleted::class => [
RecurringInvoiceDeletedActivity::class,
],
RecurringInvoiceWasArchived::class => [
RecurringInvoiceArchivedActivity::class,
],
RecurringInvoiceWasRestored::class => [
RecurringInvoiceRestoredActivity::class,
],
StatementWasEmailed::class => [
StatementEmailedActivity::class,
],
2020-11-03 11:04:15 +01:00
TaskWasCreated::class => [
CreatedTaskActivity::class,
],
TaskWasUpdated::class => [
TaskUpdatedActivity::class,
],
TaskWasArchived::class => [
TaskArchivedActivity::class,
],
TaskWasDeleted::class => [
TaskDeletedActivity::class,
],
TaskWasRestored::class => [
TaskRestoredActivity::class,
],
StripeConnectFailure::class => [
StripeConnectFailureListener::class,
],
SubscriptionWasCreated::class => [
CreatedSubscriptionActivity::class,
],
SubscriptionWasUpdated::class => [
SubscriptionUpdatedActivity::class,
],
SubscriptionWasArchived::class => [
SubscriptionArchivedActivity::class,
],
SubscriptionWasDeleted::class => [
SubscriptionDeletedActivity::class,
],
SubscriptionWasRestored::class => [
SubscriptionRestoredActivity::class,
],
2020-11-03 06:44:50 +01:00
VendorWasCreated::class => [
CreatedVendorActivity::class,
2020-11-03 11:04:15 +01:00
],
VendorWasArchived::class => [
VendorArchivedActivity::class,
],
VendorWasDeleted::class => [
VendorDeletedActivity::class,
],
VendorWasRestored::class => [
VendorRestoredActivity::class,
],
VendorWasUpdated::class => [
VendorUpdatedActivity::class,
],
VendorContactLoggedIn::class => [
UpdateVendorContactLastLogin::class,
],
\SocialiteProviders\Manager\SocialiteWasCalled::class => [
// ... Manager won't register drivers that are not added to this listener.
\SocialiteProviders\Apple\AppleExtendSocialite::class.'@handle',
\SocialiteProviders\Microsoft\MicrosoftExtendSocialite::class.'@handle',
],
2020-11-03 06:44:50 +01:00
];
/**
* The subscriber classes to register.
*
* @var array
*/
protected $subscribe = [
2018-10-04 19:10:43 +02:00
];
/**
* Register any events for your application.
*
* @return void
*/
2019-06-05 02:43:23 +02:00
public function boot()
{
parent::boot();
2021-10-14 08:54:38 +02:00
Account::observe(AccountObserver::class);
Subscription::observe(SubscriptionObserver::class);
Client::observe(ClientObserver::class);
ClientContact::observe(ClientContactObserver::class);
2021-10-14 08:54:38 +02:00
Company::observe(CompanyObserver::class);
CompanyGateway::observe(CompanyGatewayObserver::class);
CompanyToken::observe(CompanyTokenObserver::class);
Credit::observe(CreditObserver::class);
Expense::observe(ExpenseObserver::class);
Invoice::observe(InvoiceObserver::class);
Payment::observe(PaymentObserver::class);
Product::observe(ProductObserver::class);
2022-04-14 13:38:29 +02:00
Project::observe(ProjectObserver::class);
2021-10-14 08:54:38 +02:00
Proposal::observe(ProposalObserver::class);
Quote::observe(QuoteObserver::class);
Task::observe(TaskObserver::class);
User::observe(UserObserver::class);
2023-01-31 11:05:01 +01:00
Vendor::observe(VendorObserver::class);
VendorContact::observe(VendorContactObserver::class);
2022-05-29 05:59:44 +02:00
PurchaseOrder::observe(PurchaseOrderObserver::class);
}
2022-06-21 11:59:19 +02:00
/**
* Determine if events and listeners should be automatically discovered.
*
* @return bool
*/
public function shouldDiscoverEvents()
{
return false;
}
2018-10-04 19:10:43 +02:00
}