From 81a7ba0acc46edd1d8872527b62e85953f79d9c4 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sat, 21 Jan 2023 19:32:58 +1100 Subject: [PATCH 01/17] Append entity name to the start of documents --- app/Models/BaseModel.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Models/BaseModel.php b/app/Models/BaseModel.php index 11b8becb2b..d9f8d345d2 100644 --- a/app/Models/BaseModel.php +++ b/app/Models/BaseModel.php @@ -188,7 +188,7 @@ class BaseModel extends Model public function numberFormatter() { - $number = strlen($this->number) >= 1 ? $this->number : class_basename($this) . "_" . Str::random(5); + $number = strlen($this->number) >= 1 ? class_basename($this) . "_" . $this->number : class_basename($this) . "_" . Str::random(5); $formatted_number = mb_ereg_replace("([^\w\s\d\-_~,;\[\]\(\).])", '', $number); From f6549f43ade42ddc4a559b7a4181549131b23123 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sun, 22 Jan 2023 09:28:50 +1100 Subject: [PATCH 02/17] Updates for API Docs --- app/Http/Controllers/AccountController.php | 1 - app/Http/Controllers/ActivityController.php | 2 - app/Http/Controllers/Auth/LoginController.php | 1 - .../Controllers/Bank/YodleeController.php | 1 - .../Controllers/BankIntegrationController.php | 11 - .../Controllers/BankTransactionController.php | 9 - .../BankTransactionRuleController.php | 8 - app/Http/Controllers/ChartController.php | 1 - app/Http/Controllers/ClientController.php | 11 - .../ClientGatewayTokenController.php | 7 - .../Controllers/ClientStatementController.php | 1 - app/Http/Controllers/CompanyController.php | 9 - .../Controllers/CompanyGatewayController.php | 8 - .../Controllers/CompanyLedgerController.php | 1 - .../Controllers/CompanyUserController.php | 1 - .../ConnectedAccountController.php | 1 - app/Http/Controllers/CreditController.php | 9 - app/Http/Controllers/DesignController.php | 8 - app/Http/Controllers/DocumentController.php | 1 - app/Http/Controllers/EmailController.php | 1 - .../Controllers/ExpenseCategoryController.php | 7 - app/Http/Controllers/ExpenseController.php | 9 - app/Http/Controllers/ExportController.php | 1 - .../Controllers/GroupSettingController.php | 9 - app/Http/Controllers/ImportController.php | 1 - app/Http/Controllers/ImportJsonController.php | 1 - .../InAppPurchase/AppleController.php | 2 - app/Http/Controllers/InvoiceController.php | 12 - app/Http/Controllers/LicenseController.php | 1 - app/Http/Controllers/LogoutController.php | 1 - app/Http/Controllers/MigrationController.php | 3 - .../Controllers/OneTimeTokenController.php | 1 - app/Http/Controllers/PaymentController.php | 11 - .../Controllers/PaymentTermController.php | 8 - app/Http/Controllers/PingController.php | 2 - app/Http/Controllers/PostMarkController.php | 1 - app/Http/Controllers/PreviewController.php | 1 - .../PreviewPurchaseOrderController.php | 1 - app/Http/Controllers/ProductController.php | 9 - app/Http/Controllers/ProjectController.php | 9 - .../Controllers/PurchaseOrderController.php | 10 - app/Http/Controllers/QuoteController.php | 10 - .../RecurringExpenseController.php | 9 - .../RecurringInvoiceController.php | 11 - .../Controllers/RecurringQuoteController.php | 9 - .../Reports/ClientContactReportController.php | 1 - .../Reports/ClientReportController.php | 1 - .../Reports/CreditReportController.php | 1 - .../Reports/DocumentReportController.php | 1 - .../Reports/ExpenseReportController.php | 1 - .../Reports/InvoiceItemReportController.php | 1 - .../Reports/InvoiceReportController.php | 1 - .../Reports/PaymentReportController.php | 1 - .../Reports/ProductReportController.php | 1 - .../Reports/ProductSalesReportController.php | 1 - .../Reports/ProfitAndLossController.php | 1 - .../Reports/QuoteItemReportController.php | 1 - .../Reports/QuoteReportController.php | 1 - .../RecurringInvoiceReportController.php | 1 - .../Reports/TaskReportController.php | 1 - app/Http/Controllers/SelfUpdateController.php | 1 - app/Http/Controllers/StaticController.php | 1 - .../Controllers/SubscriptionController.php | 8 - .../Support/Messages/SendingController.php | 1 - app/Http/Controllers/SystemLogController.php | 2 - app/Http/Controllers/TaskController.php | 10 - .../Controllers/TaskSchedulerController.php | 5 - app/Http/Controllers/TaskStatusController.php | 8 - app/Http/Controllers/TaxRateController.php | 6 - app/Http/Controllers/TemplateController.php | 1 - app/Http/Controllers/TokenController.php | 8 - app/Http/Controllers/UserController.php | 11 - app/Http/Controllers/VendorController.php | 9 - app/Http/Controllers/WebCronController.php | 1 - app/Http/Controllers/WebhookController.php | 8 - app/Models/Account.php | 3 +- app/Models/Invoice.php | 2 - ...dd_google_refresh_token_to_users_table.php | 3 +- database/schema/mysql-schema.dump | 250 +++++++++--------- 79 files changed, 128 insertions(+), 456 deletions(-) diff --git a/app/Http/Controllers/AccountController.php b/app/Http/Controllers/AccountController.php index 48dddbb644..516e0c29c0 100644 --- a/app/Http/Controllers/AccountController.php +++ b/app/Http/Controllers/AccountController.php @@ -67,7 +67,6 @@ class AccountController extends BaseController * tags={"signup"}, * summary="Attempts a new account signup", * description="Attempts a new account signup and returns a CompanyUser object on success", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter( * name="token_name", diff --git a/app/Http/Controllers/ActivityController.php b/app/Http/Controllers/ActivityController.php index f35b2cb4fe..f222177b8d 100644 --- a/app/Http/Controllers/ActivityController.php +++ b/app/Http/Controllers/ActivityController.php @@ -46,7 +46,6 @@ class ActivityController extends BaseController * tags={"actvities"}, * summary="Gets a list of actvities", * description="Lists all activities", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -131,7 +130,6 @@ class ActivityController extends BaseController * tags={"actvities"}, * summary="Gets a PDF for the given activity", * description="Gets a PDF for the given activity", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter( diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php index 362198218d..c10110537f 100644 --- a/app/Http/Controllers/Auth/LoginController.php +++ b/app/Http/Controllers/Auth/LoginController.php @@ -249,7 +249,6 @@ class LoginController extends BaseController * tags={"refresh"}, * summary="Refreshes the dataset", * description="Refreshes the dataset", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), diff --git a/app/Http/Controllers/Bank/YodleeController.php b/app/Http/Controllers/Bank/YodleeController.php index af7269e3ad..6e32bff4c4 100644 --- a/app/Http/Controllers/Bank/YodleeController.php +++ b/app/Http/Controllers/Bank/YodleeController.php @@ -127,7 +127,6 @@ class YodleeController extends BaseController * tags={"yodlee"}, * summary="Processing webhooks from Yodlee", * description="Notifies the system when a data point can be refreshed", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), diff --git a/app/Http/Controllers/BankIntegrationController.php b/app/Http/Controllers/BankIntegrationController.php index aaa2ed88b5..3ec83fb919 100644 --- a/app/Http/Controllers/BankIntegrationController.php +++ b/app/Http/Controllers/BankIntegrationController.php @@ -54,7 +54,6 @@ class BankIntegrationController extends BaseController * tags={"bank_integrations"}, * summary="Gets a list of bank_integrations", * description="Lists all bank integrations", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -115,7 +114,6 @@ class BankIntegrationController extends BaseController * tags={"bank_integrations"}, * summary="Shows a bank_integration", * description="Displays a bank_integration by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -171,7 +169,6 @@ class BankIntegrationController extends BaseController * tags={"bank_integrations"}, * summary="Shows a bank_integration for editing", * description="Displays a bank_integration by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -227,7 +224,6 @@ class BankIntegrationController extends BaseController * tags={"bank_integrations"}, * summary="Updates a bank_integration", * description="Handles the updating of a bank_integration by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -286,7 +282,6 @@ class BankIntegrationController extends BaseController * tags={"bank_integrations"}, * summary="Gets a new blank bank_integration object", * description="Returns a blank object with default values", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -332,7 +327,6 @@ class BankIntegrationController extends BaseController * tags={"bank_integrations"}, * summary="Adds a bank_integration", * description="Adds an bank_integration to a company", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -380,7 +374,6 @@ class BankIntegrationController extends BaseController * tags={"bank_integrations"}, * summary="Deletes a bank_integration", * description="Handles the deletion of a bank_integration by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -434,7 +427,6 @@ class BankIntegrationController extends BaseController * tags={"bank_integrations"}, * summary="Performs bulk actions on an array of bank_integrations", * description="", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/index"), @@ -507,7 +499,6 @@ class BankIntegrationController extends BaseController * tags={"bank_integrations"}, * summary="Gets the list of accounts from the remote server", * description="Adds an bank_integration to a company", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -599,7 +590,6 @@ class BankIntegrationController extends BaseController * tags={"bank_integrations"}, * summary="Removes an account from the integration", * description="Removes an account from the integration", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -657,7 +647,6 @@ class BankIntegrationController extends BaseController * tags={"bank_integrations"}, * summary="Retrieve transactions for a account", * description="Retrieve transactions for a account", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), diff --git a/app/Http/Controllers/BankTransactionController.php b/app/Http/Controllers/BankTransactionController.php index ef0354d1ea..31a8dd333d 100644 --- a/app/Http/Controllers/BankTransactionController.php +++ b/app/Http/Controllers/BankTransactionController.php @@ -58,7 +58,6 @@ class BankTransactionController extends BaseController * tags={"bank_transactions"}, * summary="Gets a list of bank_transactions", * description="Lists all bank integrations", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -119,7 +118,6 @@ class BankTransactionController extends BaseController * tags={"bank_transactions"}, * summary="Shows a bank_transaction", * description="Displays a bank_transaction by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -175,7 +173,6 @@ class BankTransactionController extends BaseController * tags={"bank_transactions"}, * summary="Shows a bank_transaction for editing", * description="Displays a bank_transaction by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -231,7 +228,6 @@ class BankTransactionController extends BaseController * tags={"bank_transactions"}, * summary="Updates a bank_transaction", * description="Handles the updating of a bank_transaction by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -290,7 +286,6 @@ class BankTransactionController extends BaseController * tags={"bank_transactions"}, * summary="Gets a new blank bank_transaction object", * description="Returns a blank object with default values", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -336,7 +331,6 @@ class BankTransactionController extends BaseController * tags={"bank_transactions"}, * summary="Adds a bank_transaction", * description="Adds an bank_transaction to a company", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -384,7 +378,6 @@ class BankTransactionController extends BaseController * tags={"bank_transactions"}, * summary="Deletes a bank_transaction", * description="Handles the deletion of a bank_transaction by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -438,7 +431,6 @@ class BankTransactionController extends BaseController * tags={"bank_transactions"}, * summary="Performs bulk actions on an array of bank_transations", * description="", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/index"), @@ -523,7 +515,6 @@ class BankTransactionController extends BaseController * tags={"bank_transactions"}, * summary="Performs match actions on an array of bank_transactions", * description="", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/index"), diff --git a/app/Http/Controllers/BankTransactionRuleController.php b/app/Http/Controllers/BankTransactionRuleController.php index 3386f95558..ba9dab0a90 100644 --- a/app/Http/Controllers/BankTransactionRuleController.php +++ b/app/Http/Controllers/BankTransactionRuleController.php @@ -61,7 +61,6 @@ class BankTransactionRuleController extends BaseController * tags={"bank_transaction_rules"}, * summary="Gets a list of bank_transaction_rules", * description="Lists all bank transaction rules", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -122,7 +121,6 @@ class BankTransactionRuleController extends BaseController * tags={"bank_transaction_rules"}, * summary="Shows a bank_transaction", * description="Displays a bank_transaction by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -178,7 +176,6 @@ class BankTransactionRuleController extends BaseController * tags={"bank_transaction_rules"}, * summary="Shows a bank_transaction for editing", * description="Displays a bank_transaction by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -234,7 +231,6 @@ class BankTransactionRuleController extends BaseController * tags={"bank_transaction_rules"}, * summary="Updates a bank_transaction Rule", * description="Handles the updating of a bank_transaction rule by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -293,7 +289,6 @@ class BankTransactionRuleController extends BaseController * tags={"bank_transaction_rules"}, * summary="Gets a new blank bank_transaction rule object", * description="Returns a blank object with default values", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -339,7 +334,6 @@ class BankTransactionRuleController extends BaseController * tags={"bank_transaction_rules"}, * summary="Adds a bank_transaction rule", * description="Adds an bank_transaction to a company", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -387,7 +381,6 @@ class BankTransactionRuleController extends BaseController * tags={"bank_transaction_rules"}, * summary="Deletes a bank_transaction rule", * description="Handles the deletion of a bank_transaction rule by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -441,7 +434,6 @@ class BankTransactionRuleController extends BaseController * tags={"bank_transaction_rules"}, * summary="Performs bulk actions on an array of bank_transation rules", * description="", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/index"), diff --git a/app/Http/Controllers/ChartController.php b/app/Http/Controllers/ChartController.php index 8dac67dafd..3857da86f1 100644 --- a/app/Http/Controllers/ChartController.php +++ b/app/Http/Controllers/ChartController.php @@ -30,7 +30,6 @@ class ChartController extends BaseController * tags={"charts"}, * summary="Get chart data", * description="Get chart data", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), diff --git a/app/Http/Controllers/ClientController.php b/app/Http/Controllers/ClientController.php index 60a16d2242..64fc4da9cb 100644 --- a/app/Http/Controllers/ClientController.php +++ b/app/Http/Controllers/ClientController.php @@ -79,7 +79,6 @@ class ClientController extends BaseController * description="Lists clients, search and filters allow fine grained lists to be generated. Query parameters can be added to performed more fine grained filtering of the clients, these are handled by the ClientFilters class which defines the methods available", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -129,7 +128,6 @@ class ClientController extends BaseController * tags={"clients"}, * summary="Shows a client", * description="Displays a client by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -184,7 +182,6 @@ class ClientController extends BaseController * tags={"clients"}, * summary="Shows a client for editting", * description="Displays a client by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -240,7 +237,6 @@ class ClientController extends BaseController * tags={"clients"}, * summary="Updates a client", * description="Handles the updating of a client by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -305,7 +301,6 @@ class ClientController extends BaseController * tags={"clients"}, * summary="Gets a new blank client object", * description="Returns a blank object with default values", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -351,7 +346,6 @@ class ClientController extends BaseController * tags={"clients"}, * summary="Adds a client", * description="Adds an client to a company", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -409,7 +403,6 @@ class ClientController extends BaseController * tags={"clients"}, * summary="Deletes a client", * description="Handles the deletion of a client by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -463,7 +456,6 @@ class ClientController extends BaseController * tags={"clients"}, * summary="Performs bulk actions on an array of clients", * description="", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/index"), @@ -537,7 +529,6 @@ class ClientController extends BaseController * tags={"clients"}, * summary="Uploads a document to a client", * description="Handles the uploading of a document to a client", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -601,7 +592,6 @@ class ClientController extends BaseController * tags={"clients"}, * summary="Purges a client from the system", * description="Handles purging a client", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -674,7 +664,6 @@ class ClientController extends BaseController * tags={"clients"}, * summary="Merges two clients", * description="Handles merging 2 clients", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), diff --git a/app/Http/Controllers/ClientGatewayTokenController.php b/app/Http/Controllers/ClientGatewayTokenController.php index 84b918c09a..72f8be1cc7 100644 --- a/app/Http/Controllers/ClientGatewayTokenController.php +++ b/app/Http/Controllers/ClientGatewayTokenController.php @@ -77,7 +77,6 @@ class ClientGatewayTokenController extends BaseController * description="Lists client_gateway_tokens, search and filters allow fine grained lists to be generated. Query parameters can be added to performed more fine grained filtering of the client_gateway_tokens, these are handled by the ClientGatewayTokenFilters class which defines the methods available", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -125,7 +124,6 @@ class ClientGatewayTokenController extends BaseController * tags={"client_gateway_tokens"}, * summary="Shows a client", * description="Displays a client by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -180,7 +178,6 @@ class ClientGatewayTokenController extends BaseController * tags={"client_gateway_tokens"}, * summary="Shows a client for editting", * description="Displays a client by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -236,7 +233,6 @@ class ClientGatewayTokenController extends BaseController * tags={"client_gateway_tokens"}, * summary="Updates a client", * description="Handles the updating of a client by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -293,7 +289,6 @@ class ClientGatewayTokenController extends BaseController * tags={"client_gateway_tokens"}, * summary="Gets a new blank client object", * description="Returns a blank object with default values", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -341,7 +336,6 @@ class ClientGatewayTokenController extends BaseController * tags={"client_gateway_tokens"}, * summary="Adds a client", * description="Adds an client to a company", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -390,7 +384,6 @@ class ClientGatewayTokenController extends BaseController * tags={"client_gateway_tokens"}, * summary="Deletes a client", * description="Handles the deletion of a client by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), diff --git a/app/Http/Controllers/ClientStatementController.php b/app/Http/Controllers/ClientStatementController.php index 1e4db875f9..ce671bbcac 100644 --- a/app/Http/Controllers/ClientStatementController.php +++ b/app/Http/Controllers/ClientStatementController.php @@ -47,7 +47,6 @@ class ClientStatementController extends BaseController * tags={"clients"}, * summary="Return a PDF of the client statement", * description="Return a PDF of the client statement", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), diff --git a/app/Http/Controllers/CompanyController.php b/app/Http/Controllers/CompanyController.php index 23e5208ee0..0db8e9c817 100644 --- a/app/Http/Controllers/CompanyController.php +++ b/app/Http/Controllers/CompanyController.php @@ -91,7 +91,6 @@ class CompanyController extends BaseController * description="Lists companies, search and filters allow fine grained lists to be generated. Query parameters can be added to performed more fine grained filtering of the companies, these are handled by the CompanyFilters class which defines the methods available", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -137,7 +136,6 @@ class CompanyController extends BaseController * tags={"companies"}, * summary="Gets a new blank company object", * description="Returns a blank object with default values", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -183,7 +181,6 @@ class CompanyController extends BaseController * tags={"companies"}, * summary="Adds a company", * description="Adds an company to the system", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -267,7 +264,6 @@ class CompanyController extends BaseController * tags={"companies"}, * summary="Shows an company", * description="Displays an company by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -322,7 +318,6 @@ class CompanyController extends BaseController * tags={"companies"}, * summary="Shows an company for editting", * description="Displays an company by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -377,7 +372,6 @@ class CompanyController extends BaseController * tags={"companies"}, * summary="Updates an company", * description="Handles the updating of an company by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -447,7 +441,6 @@ class CompanyController extends BaseController * tags={"companies"}, * summary="Deletes a company", * description="Handles the deletion of an company by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -551,7 +544,6 @@ class CompanyController extends BaseController * tags={"companies"}, * summary="Uploads a document to a company", * description="Handles the uploading of a document to a company", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -615,7 +607,6 @@ class CompanyController extends BaseController * tags={"companies"}, * summary="Sets the company as the default company.", * description="Sets the company as the default company.", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), diff --git a/app/Http/Controllers/CompanyGatewayController.php b/app/Http/Controllers/CompanyGatewayController.php index d957238d41..016884938f 100644 --- a/app/Http/Controllers/CompanyGatewayController.php +++ b/app/Http/Controllers/CompanyGatewayController.php @@ -75,7 +75,6 @@ class CompanyGatewayController extends BaseController * description="Lists company_gateways, search and filters allow fine grained lists to be generated. Query parameters can be added to performed more fine grained filtering of the company_gateways, these are handled by the CompanyGatewayFilters class which defines the methods available", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -121,7 +120,6 @@ class CompanyGatewayController extends BaseController * tags={"company_gateways"}, * summary="Gets a new blank CompanyGateway object", * description="Returns a blank object with default values", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -167,7 +165,6 @@ class CompanyGatewayController extends BaseController * tags={"company_gateways"}, * summary="Adds a CompanyGateway", * description="Adds an CompanyGateway to the system", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -232,7 +229,6 @@ class CompanyGatewayController extends BaseController * tags={"company_gateways"}, * summary="Shows an CompanyGateway", * description="Displays an CompanyGateway by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -287,7 +283,6 @@ class CompanyGatewayController extends BaseController * tags={"company_gateways"}, * summary="Shows an CompanyGateway for editting", * description="Displays an CompanyGateway by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -342,7 +337,6 @@ class CompanyGatewayController extends BaseController * tags={"company_gateways"}, * summary="Updates an CompanyGateway", * description="Handles the updating of an CompanyGateway by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -408,7 +402,6 @@ class CompanyGatewayController extends BaseController * tags={"company_gateways"}, * summary="Deletes a CompanyGateway", * description="Handles the deletion of an CompanyGateway by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -465,7 +458,6 @@ class CompanyGatewayController extends BaseController * tags={"company_gateways"}, * summary="Performs bulk actions on an array of company_gateways", * description="", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/index"), diff --git a/app/Http/Controllers/CompanyLedgerController.php b/app/Http/Controllers/CompanyLedgerController.php index 1b71fa0b63..37bda0a5f2 100644 --- a/app/Http/Controllers/CompanyLedgerController.php +++ b/app/Http/Controllers/CompanyLedgerController.php @@ -39,7 +39,6 @@ class CompanyLedgerController extends BaseController * tags={"company_ledger"}, * summary="Gets a list of company_ledger", * description="Lists the company_ledger.", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), diff --git a/app/Http/Controllers/CompanyUserController.php b/app/Http/Controllers/CompanyUserController.php index 181686c70d..957eba898f 100644 --- a/app/Http/Controllers/CompanyUserController.php +++ b/app/Http/Controllers/CompanyUserController.php @@ -83,7 +83,6 @@ class CompanyUserController extends BaseController * tags={"company_user"}, * summary="Update a company user record", * description="Attempts to update a company user record. A company user can modify only their settings fields. Full access for Admin users", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Response( * response=200, diff --git a/app/Http/Controllers/ConnectedAccountController.php b/app/Http/Controllers/ConnectedAccountController.php index 32783c55d7..bd05f3f883 100644 --- a/app/Http/Controllers/ConnectedAccountController.php +++ b/app/Http/Controllers/ConnectedAccountController.php @@ -50,7 +50,6 @@ class ConnectedAccountController extends BaseController * tags={"connected_account"}, * summary="Connect an oauth user to an existing user", * description="Refreshes the dataset", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), diff --git a/app/Http/Controllers/CreditController.php b/app/Http/Controllers/CreditController.php index 4db5c835a8..5bf8fbc873 100644 --- a/app/Http/Controllers/CreditController.php +++ b/app/Http/Controllers/CreditController.php @@ -78,7 +78,6 @@ class CreditController extends BaseController * description="Lists credits, search and filters allow fine grained lists to be generated. * * Query parameters can be added to performed more fine grained filtering of the credits, these are handled by the CreditFilters class which defines the methods available", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -124,7 +123,6 @@ class CreditController extends BaseController * tags={"credits"}, * summary="Gets a new blank credit object", * description="Returns a blank object with default values", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -170,7 +168,6 @@ class CreditController extends BaseController * tags={"credits"}, * summary="Adds a credit", * description="Adds an credit to the system", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -231,7 +228,6 @@ class CreditController extends BaseController * tags={"credits"}, * summary="Shows an credit", * description="Displays an credit by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -286,7 +282,6 @@ class CreditController extends BaseController * tags={"credits"}, * summary="Shows an credit for editting", * description="Displays an credit by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -342,7 +337,6 @@ class CreditController extends BaseController * tags={"Credits"}, * summary="Updates an Credit", * description="Handles the updating of an Credit by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -410,7 +404,6 @@ class CreditController extends BaseController * tags={"credits"}, * summary="Deletes a credit", * description="Handles the deletion of an credit by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -463,7 +456,6 @@ class CreditController extends BaseController * tags={"credits"}, * summary="Performs bulk actions on an array of credits", * description="", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/index"), @@ -682,7 +674,6 @@ class CreditController extends BaseController * tags={"credits"}, * summary="Uploads a document to a credit", * description="Handles the uploading of a document to a credit", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), diff --git a/app/Http/Controllers/DesignController.php b/app/Http/Controllers/DesignController.php index 56544e276c..112a646b2b 100644 --- a/app/Http/Controllers/DesignController.php +++ b/app/Http/Controllers/DesignController.php @@ -59,7 +59,6 @@ class DesignController extends BaseController * tags={"designs"}, * summary="Gets a list of designs", * description="Lists designs", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -107,7 +106,6 @@ class DesignController extends BaseController * tags={"designs"}, * summary="Shows a design", * description="Displays a design by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -162,7 +160,6 @@ class DesignController extends BaseController * tags={"designs"}, * summary="Shows a design for editting", * description="Displays a design by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -218,7 +215,6 @@ class DesignController extends BaseController * tags={"designs"}, * summary="Updates a design", * description="Handles the updating of a design by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -280,7 +276,6 @@ class DesignController extends BaseController * tags={"designs"}, * summary="Gets a new blank design object", * description="Returns a blank object with default values", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -326,7 +321,6 @@ class DesignController extends BaseController * tags={"designs"}, * summary="Adds a design", * description="Adds an design to a company", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -425,7 +419,6 @@ class DesignController extends BaseController * tags={"designs"}, * summary="Deletes a design", * description="Handles the deletion of a design by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -483,7 +476,6 @@ class DesignController extends BaseController * tags={"designs"}, * summary="Performs bulk actions on an array of designs", * description="", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/index"), diff --git a/app/Http/Controllers/DocumentController.php b/app/Http/Controllers/DocumentController.php index 21a2dfe0b7..94f4dca634 100644 --- a/app/Http/Controllers/DocumentController.php +++ b/app/Http/Controllers/DocumentController.php @@ -47,7 +47,6 @@ class DocumentController extends BaseController * description="Lists documents, search and filters allow fine grained lists to be generated. Query parameters can be added to performed more fine grained filtering of the documents, these are handled by the DocumentsFilters class which defines the methods available", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), diff --git a/app/Http/Controllers/EmailController.php b/app/Http/Controllers/EmailController.php index a96946ca68..16eb6a8efe 100644 --- a/app/Http/Controllers/EmailController.php +++ b/app/Http/Controllers/EmailController.php @@ -57,7 +57,6 @@ class EmailController extends BaseController * tags={"emails"}, * summary="Sends an email for an entity", * description="Sends an email for an entity", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\RequestBody( * description="The template subject and body", diff --git a/app/Http/Controllers/ExpenseCategoryController.php b/app/Http/Controllers/ExpenseCategoryController.php index f8780baa27..c7dd7178e3 100644 --- a/app/Http/Controllers/ExpenseCategoryController.php +++ b/app/Http/Controllers/ExpenseCategoryController.php @@ -104,7 +104,6 @@ class ExpenseCategoryController extends BaseController * tags={"expense_categories"}, * summary="Gets a new blank Expens Category object", * description="Returns a blank object with default values", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Response( @@ -150,7 +149,6 @@ class ExpenseCategoryController extends BaseController * tags={"expense_categories"}, * summary="Adds a expense category", * description="Adds an expense category to the system", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -198,7 +196,6 @@ class ExpenseCategoryController extends BaseController * tags={"expense_categories"}, * summary="Shows a Expens Category", * description="Displays an ExpenseCategory by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter( @@ -252,7 +249,6 @@ class ExpenseCategoryController extends BaseController * tags={"expense_categories"}, * summary="Shows a Expens Category for editting", * description="Displays a Expens Category by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter( @@ -307,7 +303,6 @@ class ExpenseCategoryController extends BaseController * tags={"expense_categories"}, * summary="Updates a tax rate", * description="Handles the updating of a tax rate by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter( @@ -365,7 +360,6 @@ class ExpenseCategoryController extends BaseController * tags={"expense_categories"}, * summary="Deletes a ExpenseCategory", * description="Handles the deletion of an ExpenseCategory by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter( @@ -420,7 +414,6 @@ class ExpenseCategoryController extends BaseController * tags={"expense_categories"}, * summary="Performs bulk actions on an array of ExpenseCategorys", * description="", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/index"), diff --git a/app/Http/Controllers/ExpenseController.php b/app/Http/Controllers/ExpenseController.php index 076e8702cc..f16bbcbe54 100644 --- a/app/Http/Controllers/ExpenseController.php +++ b/app/Http/Controllers/ExpenseController.php @@ -74,7 +74,6 @@ class ExpenseController extends BaseController * description="Lists expenses, search and filters allow fine grained lists to be generated. Query parameters can be added to performed more fine grained filtering of the expenses, these are handled by the ExpenseFilters class which defines the methods available", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -122,7 +121,6 @@ class ExpenseController extends BaseController * tags={"expenses"}, * summary="Shows a client", * description="Displays a client by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -177,7 +175,6 @@ class ExpenseController extends BaseController * tags={"expenses"}, * summary="Shows a client for editting", * description="Displays a client by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -233,7 +230,6 @@ class ExpenseController extends BaseController * tags={"expenses"}, * summary="Updates a client", * description="Handles the updating of a client by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -298,7 +294,6 @@ class ExpenseController extends BaseController * tags={"expenses"}, * summary="Gets a new blank client object", * description="Returns a blank object with default values", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -344,7 +339,6 @@ class ExpenseController extends BaseController * tags={"expenses"}, * summary="Adds a client", * description="Adds an client to a company", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -393,7 +387,6 @@ class ExpenseController extends BaseController * tags={"expenses"}, * summary="Deletes a client", * description="Handles the deletion of a client by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -447,7 +440,6 @@ class ExpenseController extends BaseController * tags={"expenses"}, * summary="Performs bulk actions on an array of expenses", * description="", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/index"), @@ -527,7 +519,6 @@ class ExpenseController extends BaseController * tags={"expense"}, * summary="Uploads a document to a expense", * description="Handles the uploading of a document to a expense", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), diff --git a/app/Http/Controllers/ExportController.php b/app/Http/Controllers/ExportController.php index 1e6d57df67..70e24a1559 100644 --- a/app/Http/Controllers/ExportController.php +++ b/app/Http/Controllers/ExportController.php @@ -32,7 +32,6 @@ class ExportController extends BaseController * tags={"export"}, * summary="Export data from the system", * description="Export data from the system", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Response( * response=200, diff --git a/app/Http/Controllers/GroupSettingController.php b/app/Http/Controllers/GroupSettingController.php index 2f66bd2c81..9358d72fd1 100644 --- a/app/Http/Controllers/GroupSettingController.php +++ b/app/Http/Controllers/GroupSettingController.php @@ -64,7 +64,6 @@ class GroupSettingController extends BaseController * description="Lists group_settings, search and filters allow fine grained lists to be generated. Query parameters can be added to performed more fine grained filtering of the group_settings, these are handled by the GroupSettingFilters class which defines the methods available", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -110,7 +109,6 @@ class GroupSettingController extends BaseController * tags={"group_settings"}, * summary="Gets a new blank GroupSetting object", * description="Returns a blank object with default values", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -156,7 +154,6 @@ class GroupSettingController extends BaseController * tags={"group_settings"}, * summary="Adds a GroupSetting", * description="Adds an GroupSetting to the system", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -209,7 +206,6 @@ class GroupSettingController extends BaseController * tags={"group_settings"}, * summary="Shows an GroupSetting", * description="Displays an GroupSetting by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -264,7 +260,6 @@ class GroupSettingController extends BaseController * tags={"group_settings"}, * summary="Shows an GroupSetting for editting", * description="Displays an GroupSetting by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -319,7 +314,6 @@ class GroupSettingController extends BaseController * tags={"group_settings"}, * summary="Updates an GroupSetting", * description="Handles the updating of an GroupSetting by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -383,7 +377,6 @@ class GroupSettingController extends BaseController * tags={"group_settings"}, * summary="Deletes a GroupSetting", * description="Handles the deletion of an GroupSetting by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -436,7 +429,6 @@ class GroupSettingController extends BaseController * tags={"group_settings"}, * summary="Performs bulk actions on an array of group_settings", * description="", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/index"), @@ -516,7 +508,6 @@ class GroupSettingController extends BaseController * tags={"group_settings"}, * summary="Uploads a document to a group setting", * description="Handles the uploading of a document to a group setting", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), diff --git a/app/Http/Controllers/ImportController.php b/app/Http/Controllers/ImportController.php index c4d64fc9e7..770944a86a 100644 --- a/app/Http/Controllers/ImportController.php +++ b/app/Http/Controllers/ImportController.php @@ -35,7 +35,6 @@ class ImportController extends Controller * tags={"imports"}, * summary="Pre Import checks - returns a reference to the job and the headers of the CSV", * description="Pre Import checks - returns a reference to the job and the headers of the CSV", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), diff --git a/app/Http/Controllers/ImportJsonController.php b/app/Http/Controllers/ImportJsonController.php index 786da6dedf..8f8eac46be 100644 --- a/app/Http/Controllers/ImportJsonController.php +++ b/app/Http/Controllers/ImportJsonController.php @@ -39,7 +39,6 @@ class ImportJsonController extends BaseController * tags={"import"}, * summary="Import data from the system", * description="Import data from the system", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Response( * response=200, diff --git a/app/Http/Controllers/InAppPurchase/AppleController.php b/app/Http/Controllers/InAppPurchase/AppleController.php index 80105d7c6b..ee513b14d4 100644 --- a/app/Http/Controllers/InAppPurchase/AppleController.php +++ b/app/Http/Controllers/InAppPurchase/AppleController.php @@ -33,7 +33,6 @@ class AppleController extends BaseController * tags={"postmark"}, * summary="Processing webhooks from Apple for in app purchases", * description="Adds an credit to the system", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -73,7 +72,6 @@ class AppleController extends BaseController * tags={"postmark"}, * summary="Processing event webhooks from Apple for in purchase / subscription status update", * description="Adds an credit to the system", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), diff --git a/app/Http/Controllers/InvoiceController.php b/app/Http/Controllers/InvoiceController.php index 88b6bb04cd..b75c0c83d6 100644 --- a/app/Http/Controllers/InvoiceController.php +++ b/app/Http/Controllers/InvoiceController.php @@ -98,7 +98,6 @@ class InvoiceController extends BaseController * description="Lists invoices, search and filters allow fine grained lists to be generated. * * Query parameters can be added to performed more fine grained filtering of the invoices, these are handled by the InvoiceFilters class which defines the methods available", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -145,7 +144,6 @@ class InvoiceController extends BaseController * tags={"invoices"}, * summary="Gets a new blank invoice object", * description="Returns a blank object with default values", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -191,7 +189,6 @@ class InvoiceController extends BaseController * tags={"invoices"}, * summary="Adds a invoice", * description="Adds an invoice to the system", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -260,7 +257,6 @@ class InvoiceController extends BaseController * tags={"invoices"}, * summary="Shows an invoice", * description="Displays an invoice by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -315,7 +311,6 @@ class InvoiceController extends BaseController * tags={"invoices"}, * summary="Shows an invoice for editting", * description="Displays an invoice by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -371,7 +366,6 @@ class InvoiceController extends BaseController * tags={"invoices"}, * summary="Updates an invoice", * description="Handles the updating of an invoice by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -456,7 +450,6 @@ class InvoiceController extends BaseController * tags={"invoices"}, * summary="Deletes a invoice", * description="Handles the deletion of an invoice by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -509,7 +502,6 @@ class InvoiceController extends BaseController * tags={"invoices"}, * summary="Performs bulk actions on an array of invoices", * description="", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/index"), @@ -637,7 +629,6 @@ class InvoiceController extends BaseController * - archive * - delete * - email", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -826,7 +817,6 @@ class InvoiceController extends BaseController * tags={"invoices"}, * summary="Download a specific invoice by invitation key", * description="Downloads a specific invoice", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -894,7 +884,6 @@ class InvoiceController extends BaseController * tags={"invoices"}, * summary="Download a specific invoice delivery notes", * description="Downloads a specific invoice delivery notes", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -955,7 +944,6 @@ class InvoiceController extends BaseController * tags={"invoices"}, * summary="Uploads a document to a invoice", * description="Handles the uploading of a document to a invoice", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), diff --git a/app/Http/Controllers/LicenseController.php b/app/Http/Controllers/LicenseController.php index a603beb26e..c4bbc56e8f 100644 --- a/app/Http/Controllers/LicenseController.php +++ b/app/Http/Controllers/LicenseController.php @@ -36,7 +36,6 @@ class LicenseController extends BaseController * tags={"claim_license"}, * summary="Attempts to claim a white label license", * description="Attempts to claim a white label license", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter( * name="license_key", diff --git a/app/Http/Controllers/LogoutController.php b/app/Http/Controllers/LogoutController.php index c04c3f4f04..4526135c92 100644 --- a/app/Http/Controllers/LogoutController.php +++ b/app/Http/Controllers/LogoutController.php @@ -31,7 +31,6 @@ class LogoutController extends BaseController * tags={"logout"}, * summary="Gets a list of logout", * description="Lists all logout", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), diff --git a/app/Http/Controllers/MigrationController.php b/app/Http/Controllers/MigrationController.php index 7a70ab910d..53adcfa938 100644 --- a/app/Http/Controllers/MigrationController.php +++ b/app/Http/Controllers/MigrationController.php @@ -46,7 +46,6 @@ class MigrationController extends BaseController * tags={"migration"}, * summary="Attempts to purge a company record and all its child records", * description="Attempts to purge a company record and all its child records", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter( @@ -137,7 +136,6 @@ class MigrationController extends BaseController * tags={"migration"}, * summary="Attempts to purge a companies child records but save the company record and its settings", * description="Attempts to purge a companies child records but save the company record and its settings", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter( @@ -221,7 +219,6 @@ class MigrationController extends BaseController * tags={"migration"}, * summary="Starts the migration from previous version of Invoice Ninja", * description="Starts the migration from previous version of Invoice Ninja", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/X-Api-Password"), diff --git a/app/Http/Controllers/OneTimeTokenController.php b/app/Http/Controllers/OneTimeTokenController.php index c4544d9397..6b5745bb3c 100644 --- a/app/Http/Controllers/OneTimeTokenController.php +++ b/app/Http/Controllers/OneTimeTokenController.php @@ -43,7 +43,6 @@ class OneTimeTokenController extends BaseController * tags={"one_time_token"}, * summary="Attempts to create a one time token", * description="Attempts to create a one time token", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Response( * response=200, diff --git a/app/Http/Controllers/PaymentController.php b/app/Http/Controllers/PaymentController.php index 01f5354817..78233b5ea2 100644 --- a/app/Http/Controllers/PaymentController.php +++ b/app/Http/Controllers/PaymentController.php @@ -80,7 +80,6 @@ class PaymentController extends BaseController * description="Lists payments, search and filters allow fine grained lists to be generated. Query parameters can be added to performed more fine grained filtering of the payments, these are handled by the PaymentFilters class which defines the methods available", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -127,7 +126,6 @@ class PaymentController extends BaseController * tags={"payments"}, * summary="Gets a new blank Payment object", * description="Returns a blank object with default values", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -174,7 +172,6 @@ class PaymentController extends BaseController * tags={"payments"}, * summary="Adds a Payment", * description="Adds an Payment to the system", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -226,7 +223,6 @@ class PaymentController extends BaseController * tags={"payments"}, * summary="Shows an Payment", * description="Displays an Payment by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -282,7 +278,6 @@ class PaymentController extends BaseController * tags={"payments"}, * summary="Shows an Payment for editting", * description="Displays an Payment by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -338,7 +333,6 @@ class PaymentController extends BaseController * tags={"payments"}, * summary="Updates an Payment", * description="Handles the updating of an Payment by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -403,7 +397,6 @@ class PaymentController extends BaseController * tags={"payments"}, * summary="Deletes a Payment", * description="Handles the deletion of an Payment by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -457,7 +450,6 @@ class PaymentController extends BaseController * tags={"payments"}, * summary="Performs bulk actions on an array of payments", * description="", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/index"), @@ -535,7 +527,6 @@ class PaymentController extends BaseController - archive - delete - email", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -648,7 +639,6 @@ class PaymentController extends BaseController * tags={"payments"}, * summary="Adds a Refund", * description="Adds an Refund to the system", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -702,7 +692,6 @@ class PaymentController extends BaseController * tags={"payments"}, * summary="Uploads a document to a payment", * description="Handles the uploading of a document to a payment", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), diff --git a/app/Http/Controllers/PaymentTermController.php b/app/Http/Controllers/PaymentTermController.php index a9d658e66b..7aa23ffb0f 100644 --- a/app/Http/Controllers/PaymentTermController.php +++ b/app/Http/Controllers/PaymentTermController.php @@ -48,7 +48,6 @@ class PaymentTermController extends BaseController * tags={"payment_terms"}, * summary="Gets a list of payment terms", * description="Lists payment terms", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -96,7 +95,6 @@ class PaymentTermController extends BaseController * tags={"payment_terms"}, * summary="Gets a new blank PaymentTerm object", * description="Returns a blank object with default values", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -143,7 +141,6 @@ class PaymentTermController extends BaseController * tags={"payment_terms"}, * summary="Adds a Payment", * description="Adds a Payment Term to the system", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -189,7 +186,6 @@ class PaymentTermController extends BaseController * tags={"payment_terms"}, * summary="Shows a Payment Term", * description="Displays an Payment Term by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -240,7 +236,6 @@ class PaymentTermController extends BaseController * tags={"payment_terms"}, * summary="Shows an Payment Term for editting", * description="Displays an Payment Term by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -299,7 +294,6 @@ class PaymentTermController extends BaseController * tags={"payment_terms"}, * summary="Updates a Payment Term", * description="Handles the updating of an Payment Termby id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -359,7 +353,6 @@ class PaymentTermController extends BaseController * tags={"payment_termss"}, * summary="Deletes a Payment Term", * description="Handles the deletion of an PaymentTerm by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -413,7 +406,6 @@ class PaymentTermController extends BaseController * tags={"payment_terms"}, * summary="Performs bulk actions on an array of payment terms", * description="", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/index"), diff --git a/app/Http/Controllers/PingController.php b/app/Http/Controllers/PingController.php index ff325c31ed..79a9334924 100644 --- a/app/Http/Controllers/PingController.php +++ b/app/Http/Controllers/PingController.php @@ -28,7 +28,6 @@ class PingController extends BaseController * tags={"ping"}, * summary="Attempts to ping the API", * description="Attempts to ping the API", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Response( * response=200, @@ -60,7 +59,6 @@ class PingController extends BaseController * tags={"health_check"}, * summary="Attempts to get a health check from the API", * description="Attempts to get a health check from the API", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Response( * response=200, diff --git a/app/Http/Controllers/PostMarkController.php b/app/Http/Controllers/PostMarkController.php index 05d571c917..8e1e6c3882 100644 --- a/app/Http/Controllers/PostMarkController.php +++ b/app/Http/Controllers/PostMarkController.php @@ -47,7 +47,6 @@ class PostMarkController extends BaseController * tags={"postmark"}, * summary="Processing webhooks from PostMark", * description="Adds an credit to the system", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), diff --git a/app/Http/Controllers/PreviewController.php b/app/Http/Controllers/PreviewController.php index 46c25b79f7..6b6468945c 100644 --- a/app/Http/Controllers/PreviewController.php +++ b/app/Http/Controllers/PreviewController.php @@ -68,7 +68,6 @@ class PreviewController extends BaseController * tags={"preview"}, * summary="Returns a pdf preview", * description="Returns a pdf preview.", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Response( * response=200, diff --git a/app/Http/Controllers/PreviewPurchaseOrderController.php b/app/Http/Controllers/PreviewPurchaseOrderController.php index aeabf41ea5..60752d4a90 100644 --- a/app/Http/Controllers/PreviewPurchaseOrderController.php +++ b/app/Http/Controllers/PreviewPurchaseOrderController.php @@ -79,7 +79,6 @@ class PreviewPurchaseOrderController extends BaseController * tags={"preview"}, * summary="Returns a pdf preview for purchase order", * description="Returns a pdf preview for purchase order.", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Response( * response=200, diff --git a/app/Http/Controllers/ProductController.php b/app/Http/Controllers/ProductController.php index 4d6fcbe33a..b74075f5be 100644 --- a/app/Http/Controllers/ProductController.php +++ b/app/Http/Controllers/ProductController.php @@ -60,7 +60,6 @@ class ProductController extends BaseController * description="Lists products, search and filters allow fine grained lists to be generated. Query parameters can be added to performed more fine grained filtering of the products, these are handled by the ProductFilters class which defines the methods available", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -107,7 +106,6 @@ class ProductController extends BaseController * tags={"products"}, * summary="Gets a new blank Product object", * description="Returns a blank object with default values", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -153,7 +151,6 @@ class ProductController extends BaseController * tags={"products"}, * summary="Adds a Product", * description="Adds an Product to the system", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -199,7 +196,6 @@ class ProductController extends BaseController * tags={"products"}, * summary="Shows an Product", * description="Displays an Product by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -253,7 +249,6 @@ class ProductController extends BaseController * tags={"products"}, * summary="Shows an Product for editting", * description="Displays an Product by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -308,7 +303,6 @@ class ProductController extends BaseController * tags={"products"}, * summary="Updates an Product", * description="Handles the updating of an Product by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -370,7 +364,6 @@ class ProductController extends BaseController * tags={"products"}, * summary="Deletes a Product", * description="Handles the deletion of an Product by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -424,7 +417,6 @@ class ProductController extends BaseController * tags={"products"}, * summary="Performs bulk actions on an array of products", * description="", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/index"), @@ -496,7 +488,6 @@ class ProductController extends BaseController * tags={"products"}, * summary="Uploads a document to a product", * description="Handles the uploading of a document to a product", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), diff --git a/app/Http/Controllers/ProjectController.php b/app/Http/Controllers/ProjectController.php index 0aaf58673e..49d7a4743e 100644 --- a/app/Http/Controllers/ProjectController.php +++ b/app/Http/Controllers/ProjectController.php @@ -63,7 +63,6 @@ class ProjectController extends BaseController * tags={"projects"}, * summary="Gets a list of projects", * description="Lists projects", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -111,7 +110,6 @@ class ProjectController extends BaseController * tags={"projects"}, * summary="Shows a project", * description="Displays a project by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -166,7 +164,6 @@ class ProjectController extends BaseController * tags={"projects"}, * summary="Shows a project for editting", * description="Displays a project by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -222,7 +219,6 @@ class ProjectController extends BaseController * tags={"projects"}, * summary="Updates a project", * description="Handles the updating of a project by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -289,7 +285,6 @@ class ProjectController extends BaseController * tags={"projects"}, * summary="Gets a new blank project object", * description="Returns a blank object with default values", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -335,7 +330,6 @@ class ProjectController extends BaseController * tags={"projects"}, * summary="Adds a project", * description="Adds an project to a company", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -393,7 +387,6 @@ class ProjectController extends BaseController * tags={"projects"}, * summary="Deletes a project", * description="Handles the deletion of a project by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -450,7 +443,6 @@ class ProjectController extends BaseController * tags={"projects"}, * summary="Performs bulk actions on an array of projects", * description="", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/index"), @@ -521,7 +513,6 @@ class ProjectController extends BaseController * tags={"projects"}, * summary="Uploads a document to a project", * description="Handles the uploading of a document to a project", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), diff --git a/app/Http/Controllers/PurchaseOrderController.php b/app/Http/Controllers/PurchaseOrderController.php index 821f0c8884..87be658c5f 100644 --- a/app/Http/Controllers/PurchaseOrderController.php +++ b/app/Http/Controllers/PurchaseOrderController.php @@ -71,7 +71,6 @@ class PurchaseOrderController extends BaseController * description="Lists purchase orders, search and filters allow fine grained lists to be generated. * * Query parameters can be added to performed more fine grained filtering of the purchase orders, these are handled by the PurchaseOrderFilters class which defines the methods available", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -116,7 +115,6 @@ class PurchaseOrderController extends BaseController * tags={"purchase_orders"}, * summary="Gets a new blank purchase order object", * description="Returns a blank object with default values", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -161,7 +159,6 @@ class PurchaseOrderController extends BaseController * tags={"purhcase_orders"}, * summary="Adds a purchase order", * description="Adds an purchase order to the system", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -215,7 +212,6 @@ class PurchaseOrderController extends BaseController * tags={"purchase_orders"}, * summary="Shows an purcase orders", * description="Displays an purchase order by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -269,7 +265,6 @@ class PurchaseOrderController extends BaseController * tags={"purchase_orders"}, * summary="Shows an purchase order for editting", * description="Displays an purchase order by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -324,7 +319,6 @@ class PurchaseOrderController extends BaseController * tags={"purchase_orders"}, * summary="Updates an purchase order", * description="Handles the updating of an purchase order by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -391,7 +385,6 @@ class PurchaseOrderController extends BaseController * tags={"purchase_orders"}, * summary="Deletes a purchase order", * description="Handles the deletion of an purchase orders by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -444,7 +437,6 @@ class PurchaseOrderController extends BaseController * tags={"purchase_orders"}, * summary="Performs bulk actions on an array of purchase_orders", * description="", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/index"), @@ -557,7 +549,6 @@ class PurchaseOrderController extends BaseController * - archive * - delete * - email", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -723,7 +714,6 @@ class PurchaseOrderController extends BaseController * tags={"purchase_orders"}, * summary="Uploads a document to a purchase_orders", * description="Handles the uploading of a document to a purchase_order", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), diff --git a/app/Http/Controllers/QuoteController.php b/app/Http/Controllers/QuoteController.php index 72de83134a..18d7692c79 100644 --- a/app/Http/Controllers/QuoteController.php +++ b/app/Http/Controllers/QuoteController.php @@ -95,7 +95,6 @@ class QuoteController extends BaseController * description="Lists quotes, search and filters allow fine grained lists to be generated. * * Query parameters can be added to performed more fine grained filtering of the quotes, these are handled by the QuoteFilters class which defines the methods available", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -140,7 +139,6 @@ class QuoteController extends BaseController * tags={"quotes"}, * summary="Gets a new blank Quote object", * description="Returns a blank object with default values", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -187,7 +185,6 @@ class QuoteController extends BaseController * tags={"quotes"}, * summary="Adds a Quote", * description="Adds an Quote to the system", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -243,7 +240,6 @@ class QuoteController extends BaseController * tags={"quotes"}, * summary="Shows an Quote", * description="Displays an Quote by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -299,7 +295,6 @@ class QuoteController extends BaseController * tags={"quotes"}, * summary="Shows an Quote for editting", * description="Displays an Quote by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -355,7 +350,6 @@ class QuoteController extends BaseController * tags={"quotes"}, * summary="Updates an Quote", * description="Handles the updating of an Quote by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -424,7 +418,6 @@ class QuoteController extends BaseController * tags={"quotes"}, * summary="Deletes a Quote", * description="Handles the deletion of an Quote by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -478,7 +471,6 @@ class QuoteController extends BaseController * tags={"quotes"}, * summary="Performs bulk actions on an array of quotes", * description="", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/index"), @@ -635,7 +627,6 @@ class QuoteController extends BaseController - convert - convert_to_invoice - email", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -822,7 +813,6 @@ class QuoteController extends BaseController * tags={"quotes"}, * summary="Uploads a document to a quote", * description="Handles the uploading of a document to a quote", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), diff --git a/app/Http/Controllers/RecurringExpenseController.php b/app/Http/Controllers/RecurringExpenseController.php index 98524be5ff..7734349ccc 100644 --- a/app/Http/Controllers/RecurringExpenseController.php +++ b/app/Http/Controllers/RecurringExpenseController.php @@ -74,7 +74,6 @@ class RecurringExpenseController extends BaseController * description="Lists recurring_expenses, search and filters allow fine grained lists to be generated. Query parameters can be added to performed more fine grained filtering of the recurring_expenses, these are handled by the RecurringExpenseFilters class which defines the methods available", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -122,7 +121,6 @@ class RecurringExpenseController extends BaseController * tags={"recurring_expenses"}, * summary="Shows a client", * description="Displays a client by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -177,7 +175,6 @@ class RecurringExpenseController extends BaseController * tags={"recurring_expenses"}, * summary="Shows a client for editting", * description="Displays a client by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -233,7 +230,6 @@ class RecurringExpenseController extends BaseController * tags={"recurring_expenses"}, * summary="Updates a client", * description="Handles the updating of a client by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -299,7 +295,6 @@ class RecurringExpenseController extends BaseController * tags={"recurring_expenses"}, * summary="Gets a new blank client object", * description="Returns a blank object with default values", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -345,7 +340,6 @@ class RecurringExpenseController extends BaseController * tags={"recurring_expenses"}, * summary="Adds a client", * description="Adds an client to a company", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -395,7 +389,6 @@ class RecurringExpenseController extends BaseController * tags={"recurring_expenses"}, * summary="Deletes a client", * description="Handles the deletion of a client by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -449,7 +442,6 @@ class RecurringExpenseController extends BaseController * tags={"recurring_expenses"}, * summary="Performs bulk actions on an array of recurring_expenses", * description="", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/index"), @@ -567,7 +559,6 @@ class RecurringExpenseController extends BaseController * tags={"recurring_expense"}, * summary="Uploads a document to a recurring_expense", * description="Handles the uploading of a document to a recurring_expense", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), diff --git a/app/Http/Controllers/RecurringInvoiceController.php b/app/Http/Controllers/RecurringInvoiceController.php index 00b56e3859..58f091d472 100644 --- a/app/Http/Controllers/RecurringInvoiceController.php +++ b/app/Http/Controllers/RecurringInvoiceController.php @@ -81,7 +81,6 @@ class RecurringInvoiceController extends BaseController * description="Lists recurring_invoices, search and filters allow fine grained lists to be generated. Query parameters can be added to performed more fine grained filtering of the recurring_invoices, these are handled by the RecurringInvoiceFilters class which defines the methods available", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -128,7 +127,6 @@ class RecurringInvoiceController extends BaseController * tags={"recurring_invoices"}, * summary="Gets a new blank RecurringInvoice object", * description="Returns a blank object with default values", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -175,7 +173,6 @@ class RecurringInvoiceController extends BaseController * tags={"recurring_invoices"}, * summary="Adds a RecurringInvoice", * description="Adds an RecurringInvoice to the system", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -228,7 +225,6 @@ class RecurringInvoiceController extends BaseController * tags={"recurring_invoices"}, * summary="Shows an RecurringInvoice", * description="Displays an RecurringInvoice by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -284,7 +280,6 @@ class RecurringInvoiceController extends BaseController * tags={"recurring_invoices"}, * summary="Shows an RecurringInvoice for editting", * description="Displays an RecurringInvoice by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -340,7 +335,6 @@ class RecurringInvoiceController extends BaseController * tags={"recurring_invoices"}, * summary="Updates an RecurringInvoice", * description="Handles the updating of an RecurringInvoice by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -410,7 +404,6 @@ class RecurringInvoiceController extends BaseController * tags={"recurring_invoices"}, * summary="Deletes a RecurringInvoice", * description="Handles the deletion of an RecurringInvoice by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -459,7 +452,6 @@ class RecurringInvoiceController extends BaseController * tags={"invoices"}, * summary="Download a specific invoice by invitation key", * description="Downloads a specific invoice", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -521,7 +513,6 @@ class RecurringInvoiceController extends BaseController * tags={"recurring_invoices"}, * summary="Performs bulk actions on an array of recurring_invoices", * description="", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/index"), @@ -599,7 +590,6 @@ class RecurringInvoiceController extends BaseController - archive - delete - email", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -727,7 +717,6 @@ class RecurringInvoiceController extends BaseController * tags={"recurring_invoices"}, * summary="Uploads a document to a recurring_invoice", * description="Handles the uploading of a document to a recurring_invoice", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), diff --git a/app/Http/Controllers/RecurringQuoteController.php b/app/Http/Controllers/RecurringQuoteController.php index 4851b0f369..70a1d54cbd 100644 --- a/app/Http/Controllers/RecurringQuoteController.php +++ b/app/Http/Controllers/RecurringQuoteController.php @@ -77,7 +77,6 @@ class RecurringQuoteController extends BaseController * description="Lists recurring_quotes, search and filters allow fine grained lists to be generated. Query parameters can be added to performed more fine grained filtering of the recurring_quotes, these are handled by the RecurringQuoteFilters class which defines the methods available", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -123,7 +122,6 @@ class RecurringQuoteController extends BaseController * tags={"recurring_quotes"}, * summary="Gets a new blank RecurringQuote object", * description="Returns a blank object with default values", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -169,7 +167,6 @@ class RecurringQuoteController extends BaseController * tags={"recurring_quotes"}, * summary="Adds a RecurringQuote", * description="Adds an RecurringQuote to the system", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -216,7 +213,6 @@ class RecurringQuoteController extends BaseController * tags={"recurring_quotes"}, * summary="Shows an RecurringQuote", * description="Displays an RecurringQuote by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -272,7 +268,6 @@ class RecurringQuoteController extends BaseController * tags={"recurring_quotes"}, * summary="Shows an RecurringQuote for editting", * description="Displays an RecurringQuote by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -328,7 +323,6 @@ class RecurringQuoteController extends BaseController * tags={"recurring_quotes"}, * summary="Updates an RecurringQuote", * description="Handles the updating of an RecurringQuote by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -391,7 +385,6 @@ class RecurringQuoteController extends BaseController * tags={"recurring_quotes"}, * summary="Deletes a RecurringQuote", * description="Handles the deletion of an RecurringQuote by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -445,7 +438,6 @@ class RecurringQuoteController extends BaseController * tags={"recurring_quotes"}, * summary="Performs bulk actions on an array of recurring_quotes", * description="", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/index"), @@ -524,7 +516,6 @@ class RecurringQuoteController extends BaseController - archive - delete - email", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), diff --git a/app/Http/Controllers/Reports/ClientContactReportController.php b/app/Http/Controllers/Reports/ClientContactReportController.php index c86a657f49..e4023b7d1e 100644 --- a/app/Http/Controllers/Reports/ClientContactReportController.php +++ b/app/Http/Controllers/Reports/ClientContactReportController.php @@ -36,7 +36,6 @@ class ClientContactReportController extends BaseController * tags={"reports"}, * summary="Contact reports", * description="Export contact reports", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\RequestBody( * required=true, diff --git a/app/Http/Controllers/Reports/ClientReportController.php b/app/Http/Controllers/Reports/ClientReportController.php index 6ecfcb0506..f121a0e225 100644 --- a/app/Http/Controllers/Reports/ClientReportController.php +++ b/app/Http/Controllers/Reports/ClientReportController.php @@ -37,7 +37,6 @@ class ClientReportController extends BaseController * tags={"reports"}, * summary="Client reports", * description="Export client reports", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\RequestBody( * required=true, diff --git a/app/Http/Controllers/Reports/CreditReportController.php b/app/Http/Controllers/Reports/CreditReportController.php index 85407b7eef..f4cdf2c65a 100644 --- a/app/Http/Controllers/Reports/CreditReportController.php +++ b/app/Http/Controllers/Reports/CreditReportController.php @@ -36,7 +36,6 @@ class CreditReportController extends BaseController * tags={"reports"}, * summary="Credit reports", * description="Export credit reports", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\RequestBody( * required=true, diff --git a/app/Http/Controllers/Reports/DocumentReportController.php b/app/Http/Controllers/Reports/DocumentReportController.php index 18ea598e4b..122081cd6d 100644 --- a/app/Http/Controllers/Reports/DocumentReportController.php +++ b/app/Http/Controllers/Reports/DocumentReportController.php @@ -36,7 +36,6 @@ class DocumentReportController extends BaseController * tags={"reports"}, * summary="Document reports", * description="Export document reports", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\RequestBody( * required=true, diff --git a/app/Http/Controllers/Reports/ExpenseReportController.php b/app/Http/Controllers/Reports/ExpenseReportController.php index 92ebb7c5ed..30098d4be9 100644 --- a/app/Http/Controllers/Reports/ExpenseReportController.php +++ b/app/Http/Controllers/Reports/ExpenseReportController.php @@ -37,7 +37,6 @@ class ExpenseReportController extends BaseController * tags={"reports"}, * summary="Expense reports", * description="Export expense reports", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\RequestBody( * required=true, diff --git a/app/Http/Controllers/Reports/InvoiceItemReportController.php b/app/Http/Controllers/Reports/InvoiceItemReportController.php index 23117545ad..3ec536aaa7 100644 --- a/app/Http/Controllers/Reports/InvoiceItemReportController.php +++ b/app/Http/Controllers/Reports/InvoiceItemReportController.php @@ -36,7 +36,6 @@ class InvoiceItemReportController extends BaseController * tags={"reports"}, * summary="Invoice item reports", * description="Export invoice item reports", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\RequestBody( * required=true, diff --git a/app/Http/Controllers/Reports/InvoiceReportController.php b/app/Http/Controllers/Reports/InvoiceReportController.php index 91871c37b0..0e8f21ea80 100644 --- a/app/Http/Controllers/Reports/InvoiceReportController.php +++ b/app/Http/Controllers/Reports/InvoiceReportController.php @@ -36,7 +36,6 @@ class InvoiceReportController extends BaseController * tags={"reports"}, * summary="Invoice reports", * description="Export invoice reports", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\RequestBody( * required=true, diff --git a/app/Http/Controllers/Reports/PaymentReportController.php b/app/Http/Controllers/Reports/PaymentReportController.php index 7891fea104..0f14028c28 100644 --- a/app/Http/Controllers/Reports/PaymentReportController.php +++ b/app/Http/Controllers/Reports/PaymentReportController.php @@ -37,7 +37,6 @@ class PaymentReportController extends BaseController * tags={"reports"}, * summary="Payment reports", * description="Export payment reports", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\RequestBody( * required=true, diff --git a/app/Http/Controllers/Reports/ProductReportController.php b/app/Http/Controllers/Reports/ProductReportController.php index e9d35a0ec2..cc07e9b973 100644 --- a/app/Http/Controllers/Reports/ProductReportController.php +++ b/app/Http/Controllers/Reports/ProductReportController.php @@ -37,7 +37,6 @@ class ProductReportController extends BaseController * tags={"reports"}, * summary="Product reports", * description="Export product reports", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\RequestBody( * required=true, diff --git a/app/Http/Controllers/Reports/ProductSalesReportController.php b/app/Http/Controllers/Reports/ProductSalesReportController.php index 1f0bf4a9aa..4f6c63b0eb 100644 --- a/app/Http/Controllers/Reports/ProductSalesReportController.php +++ b/app/Http/Controllers/Reports/ProductSalesReportController.php @@ -39,7 +39,6 @@ class ProductSalesReportController extends BaseController * tags={"reports"}, * summary="Product Salesreports", * description="Export product sales reports", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\RequestBody( * required=true, diff --git a/app/Http/Controllers/Reports/ProfitAndLossController.php b/app/Http/Controllers/Reports/ProfitAndLossController.php index df8e3359e9..327fdfff66 100644 --- a/app/Http/Controllers/Reports/ProfitAndLossController.php +++ b/app/Http/Controllers/Reports/ProfitAndLossController.php @@ -38,7 +38,6 @@ class ProfitAndLossController extends BaseController * tags={"reports"}, * summary="Profit loss reports", * description="Profit loss report", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\RequestBody( * required=true, diff --git a/app/Http/Controllers/Reports/QuoteItemReportController.php b/app/Http/Controllers/Reports/QuoteItemReportController.php index ba11073559..fab94da853 100644 --- a/app/Http/Controllers/Reports/QuoteItemReportController.php +++ b/app/Http/Controllers/Reports/QuoteItemReportController.php @@ -36,7 +36,6 @@ class QuoteItemReportController extends BaseController * tags={"reports"}, * summary="Quote item reports", * description="Export Quote item reports", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\RequestBody( * required=true, diff --git a/app/Http/Controllers/Reports/QuoteReportController.php b/app/Http/Controllers/Reports/QuoteReportController.php index af0c83e1c6..d125c5a13b 100644 --- a/app/Http/Controllers/Reports/QuoteReportController.php +++ b/app/Http/Controllers/Reports/QuoteReportController.php @@ -36,7 +36,6 @@ class QuoteReportController extends BaseController * tags={"reports"}, * summary="Quote reports", * description="Export quote reports", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\RequestBody( * required=true, diff --git a/app/Http/Controllers/Reports/RecurringInvoiceReportController.php b/app/Http/Controllers/Reports/RecurringInvoiceReportController.php index cfc1b976e5..3c22e03917 100644 --- a/app/Http/Controllers/Reports/RecurringInvoiceReportController.php +++ b/app/Http/Controllers/Reports/RecurringInvoiceReportController.php @@ -36,7 +36,6 @@ class RecurringInvoiceReportController extends BaseController * tags={"reports"}, * summary="Recurring Invoice reports", * description="Export recurring invoice reports", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\RequestBody( * required=true, diff --git a/app/Http/Controllers/Reports/TaskReportController.php b/app/Http/Controllers/Reports/TaskReportController.php index ab8944f3b3..0b68426a9d 100644 --- a/app/Http/Controllers/Reports/TaskReportController.php +++ b/app/Http/Controllers/Reports/TaskReportController.php @@ -36,7 +36,6 @@ class TaskReportController extends BaseController * tags={"reports"}, * summary="Task reports", * description="Export task reports", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\RequestBody( * required=true, diff --git a/app/Http/Controllers/SelfUpdateController.php b/app/Http/Controllers/SelfUpdateController.php index f1af705342..66eec5c588 100644 --- a/app/Http/Controllers/SelfUpdateController.php +++ b/app/Http/Controllers/SelfUpdateController.php @@ -46,7 +46,6 @@ class SelfUpdateController extends BaseController * tags={"update"}, * summary="Performs a system update", * description="Performs a system update", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Api-Password"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), diff --git a/app/Http/Controllers/StaticController.php b/app/Http/Controllers/StaticController.php index d78d7bf80c..325971e143 100644 --- a/app/Http/Controllers/StaticController.php +++ b/app/Http/Controllers/StaticController.php @@ -36,7 +36,6 @@ class StaticController extends BaseController * summary="Gets a list of statics", * description="Lists all statics", * - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), diff --git a/app/Http/Controllers/SubscriptionController.php b/app/Http/Controllers/SubscriptionController.php index 6880f4573a..5b5f611a8e 100644 --- a/app/Http/Controllers/SubscriptionController.php +++ b/app/Http/Controllers/SubscriptionController.php @@ -57,7 +57,6 @@ class SubscriptionController extends BaseController * summary="Gets a list of subscriptions", * description="Lists subscriptions.", * - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -102,7 +101,6 @@ class SubscriptionController extends BaseController * tags={"subscriptions"}, * summary="Gets a new blank subscriptions object", * description="Returns a blank object with default values", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -148,7 +146,6 @@ class SubscriptionController extends BaseController * tags={"subscriptions"}, * summary="Adds a subscriptions", * description="Adds an subscriptions to the system", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -197,7 +194,6 @@ class SubscriptionController extends BaseController * tags={"subscriptions"}, * summary="Shows an subscriptions", * description="Displays an subscriptions by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -252,7 +248,6 @@ class SubscriptionController extends BaseController * tags={"subscriptions"}, * summary="Shows an subscriptions for editting", * description="Displays an subscriptions by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -308,7 +303,6 @@ class SubscriptionController extends BaseController * tags={"subscriptions"}, * summary="Updates an subscriptions", * description="Handles the updating of an subscriptions by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -372,7 +366,6 @@ class SubscriptionController extends BaseController * tags={"subscriptions"}, * summary="Deletes a subscriptions", * description="Handles the deletion of an subscriptions by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -426,7 +419,6 @@ class SubscriptionController extends BaseController * tags={"subscriptions"}, * summary="Performs bulk actions on an array of subscriptions", * description="", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/index"), diff --git a/app/Http/Controllers/Support/Messages/SendingController.php b/app/Http/Controllers/Support/Messages/SendingController.php index 38082d581e..a022e8fabb 100644 --- a/app/Http/Controllers/Support/Messages/SendingController.php +++ b/app/Http/Controllers/Support/Messages/SendingController.php @@ -18,7 +18,6 @@ class SendingController extends Controller * tags={"support"}, * summary="Sends a support message to Invoice Ninja team", * description="Allows a user to send a support message to the Invoice Ninja Team", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\RequestBody( diff --git a/app/Http/Controllers/SystemLogController.php b/app/Http/Controllers/SystemLogController.php index 55bae6d50c..a191062c65 100644 --- a/app/Http/Controllers/SystemLogController.php +++ b/app/Http/Controllers/SystemLogController.php @@ -33,7 +33,6 @@ class SystemLogController extends BaseController * description="Lists system logs, search and filters allow fine grained lists to be generated. * * Query parameters can be added to performed more fine grained filtering of the system logs, these are handled by the SystemLogFilters class which defines the methods available", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -113,7 +112,6 @@ class SystemLogController extends BaseController * tags={"system_logs"}, * summary="Shows a system_logs", * description="Displays a system_logs by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), diff --git a/app/Http/Controllers/TaskController.php b/app/Http/Controllers/TaskController.php index 383e338ae2..808e357e3f 100644 --- a/app/Http/Controllers/TaskController.php +++ b/app/Http/Controllers/TaskController.php @@ -75,7 +75,6 @@ class TaskController extends BaseController * description="Lists tasks, search and filters allow fine grained lists to be generated. * * Query parameters can be added to performed more fine grained filtering of the tasks, these are handled by the TaskFilters class which defines the methods available", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -123,7 +122,6 @@ class TaskController extends BaseController * tags={"tasks"}, * summary="Shows a client", * description="Displays a client by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -178,7 +176,6 @@ class TaskController extends BaseController * tags={"tasks"}, * summary="Shows a client for editting", * description="Displays a client by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -234,7 +231,6 @@ class TaskController extends BaseController * tags={"tasks"}, * summary="Updates a client", * description="Handles the updating of a client by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -304,7 +300,6 @@ class TaskController extends BaseController * tags={"tasks"}, * summary="Gets a new blank client object", * description="Returns a blank object with default values", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -350,7 +345,6 @@ class TaskController extends BaseController * tags={"tasks"}, * summary="Adds a client", * description="Adds an client to a company", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -400,7 +394,6 @@ class TaskController extends BaseController * tags={"tasks"}, * summary="Deletes a client", * description="Handles the deletion of a client by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -455,7 +448,6 @@ class TaskController extends BaseController * tags={"tasks"}, * summary="Performs bulk actions on an array of tasks", * description="", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/index"), @@ -535,7 +527,6 @@ class TaskController extends BaseController * tags={"tasks"}, * summary="Uploads a document to a task", * description="Handles the uploading of a document to a task", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -598,7 +589,6 @@ class TaskController extends BaseController * tags={"tasks"}, * summary="Sort tasks on KanBan", * description="Sorts tasks after drag and drop on the KanBan.", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), diff --git a/app/Http/Controllers/TaskSchedulerController.php b/app/Http/Controllers/TaskSchedulerController.php index c3f771a463..90e1f53fbd 100644 --- a/app/Http/Controllers/TaskSchedulerController.php +++ b/app/Http/Controllers/TaskSchedulerController.php @@ -47,7 +47,6 @@ class TaskSchedulerController extends BaseController * tags={"task_schedulers"}, * summary="Task Scheduler Index", * description="Get all schedulers with associated jobs", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Response( * response=200, @@ -84,7 +83,6 @@ class TaskSchedulerController extends BaseController * tags={"task_schedulers"}, * summary="Gets a new blank scheduler object", * description="Returns a blank object with default values", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -163,7 +161,6 @@ class TaskSchedulerController extends BaseController * tags={"task_schedulers"}, * summary="Show given scheduler", * description="Get scheduler with associated job", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter( * name="id", @@ -251,7 +248,6 @@ class TaskSchedulerController extends BaseController * tags={"task_schedulers"}, * summary="Destroy Task Scheduler", * description="Destroy task scheduler and its associated job", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter( * name="id", @@ -298,7 +294,6 @@ class TaskSchedulerController extends BaseController * tags={"task_schedulers"}, * summary="Performs bulk actions on an array of task_schedulers", * description="", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/index"), diff --git a/app/Http/Controllers/TaskStatusController.php b/app/Http/Controllers/TaskStatusController.php index 94f1bdb624..c037cfb059 100644 --- a/app/Http/Controllers/TaskStatusController.php +++ b/app/Http/Controllers/TaskStatusController.php @@ -49,7 +49,6 @@ class TaskStatusController extends BaseController * tags={"task_status"}, * summary="Gets a list of task statuses", * description="Lists task statuses", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -97,7 +96,6 @@ class TaskStatusController extends BaseController * tags={"task_status"}, * summary="Gets a new blank TaskStatus object", * description="Returns a blank object with default values", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -144,7 +142,6 @@ class TaskStatusController extends BaseController * tags={"task_status"}, * summary="Adds a TaskStatus", * description="Adds a TaskStatusto the system", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -193,7 +190,6 @@ class TaskStatusController extends BaseController * tags={"task_status"}, * summary="Shows a TaskStatus Term", * description="Displays an TaskStatusby id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -244,7 +240,6 @@ class TaskStatusController extends BaseController * tags={"task_status"}, * summary="Shows an TaskStatusfor editting", * description="Displays an TaskStatusby id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -303,7 +298,6 @@ class TaskStatusController extends BaseController * tags={"task_status"}, * summary="Updates a TaskStatus Term", * description="Handles the updating of an TaskStatus Termby id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -363,7 +357,6 @@ class TaskStatusController extends BaseController * tags={"task_statuss"}, * summary="Deletes a TaskStatus Term", * description="Handles the deletion of an TaskStatus by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -417,7 +410,6 @@ class TaskStatusController extends BaseController * tags={"task_status"}, * summary="Performs bulk actions on an array of task statuses", * description="", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/index"), diff --git a/app/Http/Controllers/TaxRateController.php b/app/Http/Controllers/TaxRateController.php index c467f05678..b740dc496f 100644 --- a/app/Http/Controllers/TaxRateController.php +++ b/app/Http/Controllers/TaxRateController.php @@ -101,7 +101,6 @@ class TaxRateController extends BaseController * tags={"tax_rates"}, * summary="Gets a new blank Tax Rate object", * description="Returns a blank object with default values", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Response( @@ -161,7 +160,6 @@ class TaxRateController extends BaseController * tags={"tax_rates"}, * summary="Shows a Tax Rate", * description="Displays an TaxRate by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter( @@ -215,7 +213,6 @@ class TaxRateController extends BaseController * tags={"tax_rates"}, * summary="Shows a Tax Rate for editting", * description="Displays a Tax Rate by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter( @@ -270,7 +267,6 @@ class TaxRateController extends BaseController * tags={"tax_rates"}, * summary="Updates a tax rate", * description="Handles the updating of a tax rate by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter( @@ -328,7 +324,6 @@ class TaxRateController extends BaseController * tags={"tax_rates"}, * summary="Deletes a TaxRate", * description="Handles the deletion of an TaxRate by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter( @@ -383,7 +378,6 @@ class TaxRateController extends BaseController * tags={"tax_rates"}, * summary="Performs bulk actions on an array of TaxRates", * description="", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/index"), diff --git a/app/Http/Controllers/TemplateController.php b/app/Http/Controllers/TemplateController.php index 3f02a6412a..87f1e4df44 100644 --- a/app/Http/Controllers/TemplateController.php +++ b/app/Http/Controllers/TemplateController.php @@ -42,7 +42,6 @@ class TemplateController extends BaseController * tags={"templates"}, * summary="Returns a entity template with the template variables replaced with the Entities", * description="Returns a entity template with the template variables replaced with the Entities", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\RequestBody( * description="The template subject and body", diff --git a/app/Http/Controllers/TokenController.php b/app/Http/Controllers/TokenController.php index cb13b50ca7..08212c9e8b 100644 --- a/app/Http/Controllers/TokenController.php +++ b/app/Http/Controllers/TokenController.php @@ -64,7 +64,6 @@ class TokenController extends BaseController * description="Lists company tokens. * * Query parameters can be added to performed more fine grained filtering of the tokens, these are handled by the TokenFilters class which defines the methods available", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -114,7 +113,6 @@ class TokenController extends BaseController * tags={"tokens"}, * summary="Shows a token", * description="Displays a token by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -169,7 +167,6 @@ class TokenController extends BaseController * tags={"tokens"}, * summary="Shows a token for editting", * description="Displays a token by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -227,7 +224,6 @@ class TokenController extends BaseController * tags={"tokens"}, * summary="Updates a token", * description="Handles the updating of a token by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -290,7 +286,6 @@ class TokenController extends BaseController * tags={"tokens"}, * summary="Gets a new blank token object", * description="Returns a blank object with default values", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -336,7 +331,6 @@ class TokenController extends BaseController * tags={"tokens"}, * summary="Adds a token", * description="Adds an token to a company", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -385,7 +379,6 @@ class TokenController extends BaseController * tags={"tokens"}, * summary="Deletes a token", * description="Handles the deletion of a token by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -442,7 +435,6 @@ class TokenController extends BaseController * tags={"tokens"}, * summary="Performs bulk actions on an array of tokens", * description="", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/index"), diff --git a/app/Http/Controllers/UserController.php b/app/Http/Controllers/UserController.php index ef34f029e0..113397d4e2 100644 --- a/app/Http/Controllers/UserController.php +++ b/app/Http/Controllers/UserController.php @@ -86,7 +86,6 @@ class UserController extends BaseController * description="Lists users, search and filters allow fine grained lists to be generated. Query parameters can be added to performed more fine grained filtering of the users, these are handled by the UserFilters class which defines the methods available", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -131,7 +130,6 @@ class UserController extends BaseController * tags={"users"}, * summary="Gets a new blank User object", * description="Returns a blank object with default values", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -177,7 +175,6 @@ class UserController extends BaseController * tags={"users"}, * summary="Adds a User", * description="Adds an User to the system", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -234,7 +231,6 @@ class UserController extends BaseController * tags={"users"}, * summary="Shows an User", * description="Displays an User by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -289,7 +285,6 @@ class UserController extends BaseController * tags={"users"}, * summary="Shows an User for editting", * description="Displays an User by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -339,7 +334,6 @@ class UserController extends BaseController * tags={"users"}, * summary="Updates an User", * description="Handles the updating of an User by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -420,7 +414,6 @@ class UserController extends BaseController * tags={"users"}, * summary="Deletes a User", * description="Handles the deletion of an User by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -492,7 +485,6 @@ class UserController extends BaseController * tags={"users"}, * summary="Performs bulk actions on an array of users", * description="", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/index"), @@ -569,7 +561,6 @@ class UserController extends BaseController * tags={"users"}, * summary="Detach an existing user to a company", * description="Detach an existing user from a company", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -644,7 +635,6 @@ class UserController extends BaseController * tags={"users"}, * summary="Reconfirm an existing user to a company", * description="Reconfirm an existing user from a company", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -701,7 +691,6 @@ class UserController extends BaseController * tags={"users"}, * summary="Reconfirm an existing user to a company", * description="Reconfirm an existing user from a company", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), diff --git a/app/Http/Controllers/VendorController.php b/app/Http/Controllers/VendorController.php index 51098fda18..6773dead8d 100644 --- a/app/Http/Controllers/VendorController.php +++ b/app/Http/Controllers/VendorController.php @@ -73,7 +73,6 @@ class VendorController extends BaseController * description="Lists vendors, search and filters allow fine grained lists to be generated. Query parameters can be added to performed more fine grained filtering of the vendors, these are handled by the VendorFilters class which defines the methods available", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -121,7 +120,6 @@ class VendorController extends BaseController * tags={"vendors"}, * summary="Shows a client", * description="Displays a client by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -176,7 +174,6 @@ class VendorController extends BaseController * tags={"vendors"}, * summary="Shows a client for editting", * description="Displays a client by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -232,7 +229,6 @@ class VendorController extends BaseController * tags={"vendors"}, * summary="Updates a client", * description="Handles the updating of a client by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -297,7 +293,6 @@ class VendorController extends BaseController * tags={"vendors"}, * summary="Gets a new blank client object", * description="Returns a blank object with default values", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -343,7 +338,6 @@ class VendorController extends BaseController * tags={"vendors"}, * summary="Adds a client", * description="Adds an client to a company", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -396,7 +390,6 @@ class VendorController extends BaseController * tags={"vendors"}, * summary="Deletes a client", * description="Handles the deletion of a client by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -451,7 +444,6 @@ class VendorController extends BaseController * tags={"vendors"}, * summary="Performs bulk actions on an array of vendors", * description="", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/index"), @@ -531,7 +523,6 @@ class VendorController extends BaseController * tags={"vendors"}, * summary="Uploads a document to a vendor", * description="Handles the uploading of a document to a vendor", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), diff --git a/app/Http/Controllers/WebCronController.php b/app/Http/Controllers/WebCronController.php index 6111a606d0..9d5b804745 100644 --- a/app/Http/Controllers/WebCronController.php +++ b/app/Http/Controllers/WebCronController.php @@ -31,7 +31,6 @@ class WebCronController extends Controller * tags={"webcron"}, * summary="Executes the task scheduler via a webcron service", * description="Executes the task scheduler via a webcron service", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Response( * response=200, diff --git a/app/Http/Controllers/WebhookController.php b/app/Http/Controllers/WebhookController.php index 519e368460..26ae49446c 100644 --- a/app/Http/Controllers/WebhookController.php +++ b/app/Http/Controllers/WebhookController.php @@ -53,7 +53,6 @@ class WebhookController extends BaseController * description="Lists Webhooks, search and filters allow fine grained lists to be generated. * * Query parameters can be added to performed more fine grained filtering of the Webhooks, these are handled by the WebhookFilters class which defines the methods available", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -101,7 +100,6 @@ class WebhookController extends BaseController * tags={"webhooks"}, * summary="Shows a Webhook", * description="Displays a Webhook by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -156,7 +154,6 @@ class WebhookController extends BaseController * tags={"webhooks"}, * summary="Shows a Webhook for editting", * description="Displays a Webhook by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -212,7 +209,6 @@ class WebhookController extends BaseController * tags={"webhooks"}, * summary="Updates a Webhook", * description="Handles the updating of a Webhook by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -274,7 +270,6 @@ class WebhookController extends BaseController * tags={"webhooks"}, * summary="Gets a new blank Webhook object", * description="Returns a blank object with default values", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -322,7 +317,6 @@ class WebhookController extends BaseController * tags={"webhooks"}, * summary="Adds a Webhook", * description="Adds an Webhook to a company", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -386,7 +380,6 @@ class WebhookController extends BaseController * tags={"Webhooks"}, * summary="Deletes a Webhook", * description="Handles the deletion of a Webhook by id", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/include"), @@ -441,7 +434,6 @@ class WebhookController extends BaseController * tags={"webhooks"}, * summary="Performs bulk actions on an array of Webhooks", * description="", - * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), * @OA\Parameter(ref="#/components/parameters/index"), diff --git a/app/Models/Account.php b/app/Models/Account.php index afe8406121..8aa870a9c3 100644 --- a/app/Models/Account.php +++ b/app/Models/Account.php @@ -11,7 +11,6 @@ namespace App\Models; -use App\Exceptions\ModelNotFoundException; use App\Jobs\Mail\NinjaMailerJob; use App\Jobs\Mail\NinjaMailerObject; use App\Mail\Ninja\EmailQuotaExceeded; @@ -23,7 +22,7 @@ use App\Utils\Ninja; use App\Utils\Traits\MakesHash; use Carbon\Carbon; use DateTime; -use Illuminate\Database\Eloquent\Relations\BelongsTo; +use Illuminate\Database\Eloquent\ModelNotFoundException; use Illuminate\Support\Facades\App; use Illuminate\Support\Facades\Cache; use Laracasts\Presenter\PresentableTrait; diff --git a/app/Models/Invoice.php b/app/Models/Invoice.php index 2a5cf63a06..6f6d20d074 100644 --- a/app/Models/Invoice.php +++ b/app/Models/Invoice.php @@ -13,7 +13,6 @@ namespace App\Models; use App\Events\Invoice\InvoiceReminderWasEmailed; use App\Events\Invoice\InvoiceWasEmailed; -use App\Events\Invoice\InvoiceWasUpdated; use App\Helpers\Invoice\InvoiceSum; use App\Helpers\Invoice\InvoiceSumInclusive; use App\Jobs\Entity\CreateEntityPdf; @@ -25,7 +24,6 @@ use App\Services\Ledger\LedgerService; use App\Utils\Ninja; use App\Utils\Traits\Invoice\ActionsInvoice; use App\Utils\Traits\MakesDates; -use App\Utils\Traits\MakesHash; use App\Utils\Traits\MakesInvoiceValues; use App\Utils\Traits\MakesReminders; use App\Utils\Traits\NumberFormatter; diff --git a/database/migrations/2020_05_13_035355_add_google_refresh_token_to_users_table.php b/database/migrations/2020_05_13_035355_add_google_refresh_token_to_users_table.php index 8baafed8e7..db007bb547 100644 --- a/database/migrations/2020_05_13_035355_add_google_refresh_token_to_users_table.php +++ b/database/migrations/2020_05_13_035355_add_google_refresh_token_to_users_table.php @@ -24,9 +24,10 @@ return new class extends Migration { { Schema::table('users', function (Blueprint $table) { $table->string('oauth_user_refresh_token')->nullable(); + $table->string('oauth_user_token')->nullable()->change(); }); - DB::statement('alter table users modify column oauth_user_token text'); + // DB::statement('alter table users modify column oauth_user_token text'); Schema::table('companies', function (Blueprint $table) { $table->integer('enabled_item_tax_rates')->default(0); diff --git a/database/schema/mysql-schema.dump b/database/schema/mysql-schema.dump index bdf30e6abb..31efb3175e 100644 --- a/database/schema/mysql-schema.dump +++ b/database/schema/mysql-schema.dump @@ -52,7 +52,7 @@ CREATE TABLE `accounts` ( PRIMARY KEY (`id`), KEY `accounts_payment_id_index` (`payment_id`), KEY `accounts_key_index` (`key`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `activities`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -104,7 +104,7 @@ CREATE TABLE `activities` ( KEY `activities_purchase_order_id_company_id_index` (`purchase_order_id`,`company_id`), KEY `activities_vendor_contact_id_company_id_index` (`vendor_contact_id`,`company_id`), CONSTRAINT `activities_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `backups`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -121,7 +121,7 @@ CREATE TABLE `backups` ( PRIMARY KEY (`id`), KEY `backups_activity_id_foreign` (`activity_id`), CONSTRAINT `backups_activity_id_foreign` FOREIGN KEY (`activity_id`) REFERENCES `activities` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `bank_companies`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -142,7 +142,7 @@ CREATE TABLE `bank_companies` ( CONSTRAINT `bank_companies_bank_id_foreign` FOREIGN KEY (`bank_id`) REFERENCES `banks` (`id`), CONSTRAINT `bank_companies_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `bank_companies_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `bank_integrations`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -176,7 +176,7 @@ CREATE TABLE `bank_integrations` ( CONSTRAINT `bank_integrations_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `accounts` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `bank_integrations_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `bank_integrations_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `bank_subcompanies`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -199,7 +199,7 @@ CREATE TABLE `bank_subcompanies` ( CONSTRAINT `bank_subcompanies_bank_company_id_foreign` FOREIGN KEY (`bank_company_id`) REFERENCES `bank_companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `bank_subcompanies_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `bank_subcompanies_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `bank_transaction_rules`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -225,7 +225,7 @@ CREATE TABLE `bank_transaction_rules` ( KEY `bank_transaction_rules_company_id_foreign` (`company_id`), CONSTRAINT `bank_transaction_rules_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `bank_transaction_rules_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `bank_transactions`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -267,7 +267,7 @@ CREATE TABLE `bank_transactions` ( CONSTRAINT `bank_transactions_bank_integration_id_foreign` FOREIGN KEY (`bank_integration_id`) REFERENCES `bank_integrations` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `bank_transactions_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `bank_transactions_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `banks`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -279,7 +279,7 @@ CREATE TABLE `banks` ( `bank_library_id` int(11) NOT NULL DEFAULT 1, `config` text DEFAULT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `client_contacts`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -330,7 +330,7 @@ CREATE TABLE `client_contacts` ( KEY `client_contacts_contact_key(20)_index` (`contact_key`(20)), KEY `client_contacts_email_index` (`email`), CONSTRAINT `client_contacts_client_id_foreign` FOREIGN KEY (`client_id`) REFERENCES `clients` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `client_gateway_tokens`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -355,7 +355,7 @@ CREATE TABLE `client_gateway_tokens` ( KEY `client_gateway_tokens_client_id_foreign` (`client_id`), CONSTRAINT `client_gateway_tokens_client_id_foreign` FOREIGN KEY (`client_id`) REFERENCES `clients` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `client_gateway_tokens_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `client_subscriptions`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -385,7 +385,7 @@ CREATE TABLE `client_subscriptions` ( CONSTRAINT `client_subscriptions_invoice_id_foreign` FOREIGN KEY (`invoice_id`) REFERENCES `invoices` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `client_subscriptions_recurring_invoice_id_foreign` FOREIGN KEY (`recurring_invoice_id`) REFERENCES `recurring_invoices` (`id`), CONSTRAINT `client_subscriptions_subscription_id_foreign` FOREIGN KEY (`subscription_id`) REFERENCES `subscriptions` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `clients`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -444,7 +444,7 @@ CREATE TABLE `clients` ( CONSTRAINT `clients_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `clients_industry_id_foreign` FOREIGN KEY (`industry_id`) REFERENCES `industries` (`id`), CONSTRAINT `clients_size_id_foreign` FOREIGN KEY (`size_id`) REFERENCES `sizes` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `companies`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -517,12 +517,12 @@ CREATE TABLE `companies` ( `track_inventory` tinyint(1) NOT NULL DEFAULT 0, `inventory_notification_threshold` int(11) NOT NULL DEFAULT 0, `stock_notification` tinyint(1) NOT NULL DEFAULT 1, + `matomo_url` varchar(191) DEFAULT NULL, + `matomo_id` bigint(20) DEFAULT NULL, `enabled_expense_tax_rates` int(10) unsigned NOT NULL DEFAULT 0, `invoice_task_project` tinyint(1) NOT NULL DEFAULT 0, `report_include_deleted` tinyint(1) NOT NULL DEFAULT 0, `invoice_task_lock` tinyint(1) NOT NULL DEFAULT 0, - `matomo_url` varchar(191) DEFAULT NULL, - `matomo_id` bigint(20) DEFAULT NULL, `convert_payment_currency` tinyint(1) NOT NULL DEFAULT 0, `convert_expense_currency` tinyint(1) NOT NULL DEFAULT 0, `notify_vendor_when_paid` tinyint(1) NOT NULL DEFAULT 0, @@ -538,7 +538,7 @@ CREATE TABLE `companies` ( CONSTRAINT `companies_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `accounts` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `companies_industry_id_foreign` FOREIGN KEY (`industry_id`) REFERENCES `industries` (`id`), CONSTRAINT `companies_size_id_foreign` FOREIGN KEY (`size_id`) REFERENCES `sizes` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `company_gateways`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -577,7 +577,7 @@ CREATE TABLE `company_gateways` ( CONSTRAINT `company_gateways_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `company_gateways_gateway_key_foreign` FOREIGN KEY (`gateway_key`) REFERENCES `gateways` (`key`), CONSTRAINT `company_gateways_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `company_ledgers`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -601,7 +601,7 @@ CREATE TABLE `company_ledgers` ( KEY `company_ledgers_client_id_foreign` (`client_id`), CONSTRAINT `company_ledgers_client_id_foreign` FOREIGN KEY (`client_id`) REFERENCES `clients` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `company_ledgers_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `company_tokens`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -627,7 +627,7 @@ CREATE TABLE `company_tokens` ( CONSTRAINT `company_tokens_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `accounts` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `company_tokens_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `company_tokens_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `company_user`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -655,7 +655,7 @@ CREATE TABLE `company_user` ( KEY `company_user_user_id_index` (`user_id`), CONSTRAINT `company_user_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `accounts` (`id`) ON DELETE CASCADE, CONSTRAINT `company_user_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `countries`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -680,7 +680,7 @@ CREATE TABLE `countries` ( `thousand_separator` varchar(191) DEFAULT '', `decimal_separator` varchar(191) DEFAULT '', PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `credit_invitations`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -717,7 +717,7 @@ CREATE TABLE `credit_invitations` ( CONSTRAINT `credit_invitations_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `credit_invitations_credit_id_foreign` FOREIGN KEY (`credit_id`) REFERENCES `credits` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `credit_invitations_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `credits`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -793,7 +793,7 @@ CREATE TABLE `credits` ( CONSTRAINT `credits_client_id_foreign` FOREIGN KEY (`client_id`) REFERENCES `clients` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `credits_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `credits_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `currencies`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -809,7 +809,7 @@ CREATE TABLE `currencies` ( `swap_currency_symbol` tinyint(1) NOT NULL DEFAULT 0, `exchange_rate` decimal(13,6) NOT NULL DEFAULT 1.000000, PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `date_formats`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -820,7 +820,7 @@ CREATE TABLE `date_formats` ( `format_moment` varchar(191) NOT NULL, `format_dart` varchar(191) NOT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `datetime_formats`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -831,7 +831,7 @@ CREATE TABLE `datetime_formats` ( `format_moment` varchar(191) NOT NULL, `format_dart` varchar(191) NOT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `designs`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -852,7 +852,7 @@ CREATE TABLE `designs` ( KEY `designs_company_id_deleted_at_index` (`company_id`,`deleted_at`), KEY `designs_company_id_index` (`company_id`), CONSTRAINT `designs_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `documents`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -888,7 +888,7 @@ CREATE TABLE `documents` ( KEY `documents_company_id_index` (`company_id`), KEY `documents_documentable_id_documentable_type_deleted_at_index` (`documentable_id`,`documentable_type`,`deleted_at`), CONSTRAINT `documents_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `expense_categories`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -908,7 +908,7 @@ CREATE TABLE `expense_categories` ( KEY `expense_categories_company_id_deleted_at_index` (`company_id`,`deleted_at`), KEY `expense_categories_company_id_index` (`company_id`), CONSTRAINT `expense_categories_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `expenses`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -967,7 +967,7 @@ CREATE TABLE `expenses` ( KEY `expenses_invoice_id_deleted_at_index` (`invoice_id`,`deleted_at`), CONSTRAINT `expenses_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `expenses_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `failed_jobs`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -982,7 +982,7 @@ CREATE TABLE `failed_jobs` ( `failed_at` timestamp NOT NULL DEFAULT current_timestamp(), PRIMARY KEY (`id`), UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `gateway_types`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -992,7 +992,7 @@ CREATE TABLE `gateway_types` ( `alias` varchar(191) DEFAULT NULL, `name` varchar(191) DEFAULT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `gateways`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -1013,7 +1013,7 @@ CREATE TABLE `gateways` ( `updated_at` timestamp(6) NULL DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `gateways_key_unique` (`key`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `group_settings`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -1032,7 +1032,7 @@ CREATE TABLE `group_settings` ( PRIMARY KEY (`id`), KEY `group_settings_company_id_deleted_at_index` (`company_id`,`deleted_at`), CONSTRAINT `group_settings_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `industries`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -1041,7 +1041,7 @@ CREATE TABLE `industries` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(191) NOT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `invoice_invitations`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -1078,7 +1078,7 @@ CREATE TABLE `invoice_invitations` ( CONSTRAINT `invoice_invitations_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `invoice_invitations_invoice_id_foreign` FOREIGN KEY (`invoice_id`) REFERENCES `invoices` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `invoice_invitations_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `invoices`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -1158,7 +1158,7 @@ CREATE TABLE `invoices` ( CONSTRAINT `invoices_client_id_foreign` FOREIGN KEY (`client_id`) REFERENCES `clients` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `invoices_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `invoices_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `jobs`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -1173,7 +1173,7 @@ CREATE TABLE `jobs` ( `created_at` int(10) unsigned NOT NULL, PRIMARY KEY (`id`), KEY `jobs_queue_index` (`queue`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `languages`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -1183,7 +1183,7 @@ CREATE TABLE `languages` ( `name` varchar(191) NOT NULL, `locale` varchar(191) NOT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `licenses`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -1203,7 +1203,7 @@ CREATE TABLE `licenses` ( `recurring_invoice_id` bigint(20) unsigned DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `licenses_license_key_unique` (`license_key`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `migrations`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -1213,7 +1213,7 @@ CREATE TABLE `migrations` ( `migration` varchar(191) NOT NULL, `batch` int(11) NOT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `password_resets`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -1223,7 +1223,7 @@ CREATE TABLE `password_resets` ( `token` varchar(255) NOT NULL, `created_at` timestamp NULL DEFAULT NULL, KEY `password_resets_email_index` (`email`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `payment_hashes`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -1241,7 +1241,7 @@ CREATE TABLE `payment_hashes` ( KEY `payment_hashes_payment_id_foreign` (`payment_id`), KEY `payment_hashes_hash_index` (`hash`), CONSTRAINT `payment_hashes_payment_id_foreign` FOREIGN KEY (`payment_id`) REFERENCES `payments` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `payment_libraries`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -1253,7 +1253,7 @@ CREATE TABLE `payment_libraries` ( `name` varchar(191) DEFAULT NULL, `visible` tinyint(1) NOT NULL DEFAULT 1, PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `payment_terms`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -1273,7 +1273,7 @@ CREATE TABLE `payment_terms` ( KEY `payment_terms_user_id_foreign` (`user_id`), CONSTRAINT `payment_terms_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `payment_terms_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `payment_types`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -1283,7 +1283,7 @@ CREATE TABLE `payment_types` ( `name` varchar(191) NOT NULL, `gateway_type_id` int(11) DEFAULT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `paymentables`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -1302,7 +1302,7 @@ CREATE TABLE `paymentables` ( KEY `paymentables_payment_id_foreign` (`payment_id`), KEY `paymentables_paymentable_id_index` (`paymentable_id`), CONSTRAINT `paymentables_payment_id_foreign` FOREIGN KEY (`payment_id`) REFERENCES `payments` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `payments`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -1361,7 +1361,7 @@ CREATE TABLE `payments` ( CONSTRAINT `payments_company_gateway_id_foreign` FOREIGN KEY (`company_gateway_id`) REFERENCES `company_gateways` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `payments_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `payments_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `products`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -1403,7 +1403,7 @@ CREATE TABLE `products` ( KEY `products_product_key_company_id_index` (`product_key`,`company_id`), CONSTRAINT `products_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `products_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `projects`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -1437,7 +1437,7 @@ CREATE TABLE `projects` ( KEY `projects_company_id_index` (`company_id`), CONSTRAINT `projects_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `projects_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `purchase_order_invitations`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -1473,7 +1473,7 @@ CREATE TABLE `purchase_order_invitations` ( CONSTRAINT `purchase_order_invitations_purchase_order_id_foreign` FOREIGN KEY (`purchase_order_id`) REFERENCES `purchase_orders` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `purchase_order_invitations_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `purchase_order_invitations_vendor_contact_id_foreign` FOREIGN KEY (`vendor_contact_id`) REFERENCES `vendor_contacts` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `purchase_orders`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -1550,7 +1550,7 @@ CREATE TABLE `purchase_orders` ( CONSTRAINT `purchase_orders_client_id_foreign` FOREIGN KEY (`client_id`) REFERENCES `clients` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `purchase_orders_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `purchase_orders_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `quote_invitations`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -1587,7 +1587,7 @@ CREATE TABLE `quote_invitations` ( CONSTRAINT `quote_invitations_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `quote_invitations_quote_id_foreign` FOREIGN KEY (`quote_id`) REFERENCES `quotes` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `quote_invitations_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `quotes`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -1664,7 +1664,7 @@ CREATE TABLE `quotes` ( CONSTRAINT `quotes_client_id_foreign` FOREIGN KEY (`client_id`) REFERENCES `clients` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `quotes_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `quotes_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `recurring_expenses`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -1728,7 +1728,7 @@ CREATE TABLE `recurring_expenses` ( KEY `recurring_expenses_company_id_index` (`company_id`), CONSTRAINT `recurring_expenses_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `recurring_expenses_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `recurring_invoice_invitations`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -1763,7 +1763,7 @@ CREATE TABLE `recurring_invoice_invitations` ( CONSTRAINT `recurring_invoice_invitations_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `recurring_invoice_invitations_recurring_invoice_id_foreign` FOREIGN KEY (`recurring_invoice_id`) REFERENCES `recurring_invoices` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `recurring_invoice_invitations_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `recurring_invoices`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -1840,7 +1840,7 @@ CREATE TABLE `recurring_invoices` ( CONSTRAINT `recurring_invoices_client_id_foreign` FOREIGN KEY (`client_id`) REFERENCES `clients` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `recurring_invoices_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `recurring_invoices_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `recurring_quote_invitations`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -1875,7 +1875,7 @@ CREATE TABLE `recurring_quote_invitations` ( CONSTRAINT `recurring_quote_invitations_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `recurring_quote_invitations_recurring_quote_id_foreign` FOREIGN KEY (`recurring_quote_id`) REFERENCES `recurring_invoices` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `recurring_quote_invitations_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `recurring_quotes`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -1949,7 +1949,7 @@ CREATE TABLE `recurring_quotes` ( CONSTRAINT `recurring_quotes_client_id_foreign` FOREIGN KEY (`client_id`) REFERENCES `clients` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `recurring_quotes_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `recurring_quotes_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `schedulers`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -1973,7 +1973,7 @@ CREATE TABLE `schedulers` ( UNIQUE KEY `schedulers_company_id_name_unique` (`company_id`,`name`), KEY `schedulers_company_id_deleted_at_index` (`company_id`,`deleted_at`), CONSTRAINT `schedulers_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `sizes`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -1982,7 +1982,7 @@ CREATE TABLE `sizes` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(191) NOT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `subscriptions`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -2027,7 +2027,7 @@ CREATE TABLE `subscriptions` ( UNIQUE KEY `subscriptions_company_id_name_unique` (`company_id`,`name`), KEY `billing_subscriptions_company_id_deleted_at_index` (`company_id`,`deleted_at`), CONSTRAINT `billing_subscriptions_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `system_logs`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -2049,7 +2049,7 @@ CREATE TABLE `system_logs` ( KEY `system_logs_client_id_foreign` (`client_id`), CONSTRAINT `system_logs_client_id_foreign` FOREIGN KEY (`client_id`) REFERENCES `clients` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `system_logs_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `task_statuses`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -2071,7 +2071,7 @@ CREATE TABLE `task_statuses` ( KEY `task_statuses_user_id_foreign` (`user_id`), CONSTRAINT `task_statuses_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `task_statuses_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `tasks`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -2114,7 +2114,7 @@ CREATE TABLE `tasks` ( CONSTRAINT `tasks_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `tasks_invoice_id_foreign` FOREIGN KEY (`invoice_id`) REFERENCES `invoices` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `tasks_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `tax_rates`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -2135,7 +2135,7 @@ CREATE TABLE `tax_rates` ( KEY `tax_rates_company_id_index` (`company_id`), CONSTRAINT `tax_rates_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `tax_rates_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `timezones`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -2146,7 +2146,7 @@ CREATE TABLE `timezones` ( `location` varchar(191) NOT NULL, `utc_offset` int(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `transaction_events`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -2180,7 +2180,7 @@ CREATE TABLE `transaction_events` ( PRIMARY KEY (`id`), KEY `transaction_events_client_id_index` (`client_id`), CONSTRAINT `transaction_events_client_id_foreign` FOREIGN KEY (`client_id`) REFERENCES `clients` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `users`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -2200,7 +2200,7 @@ CREATE TABLE `users` ( `failed_logins` smallint(6) DEFAULT NULL, `referral_code` varchar(191) DEFAULT NULL, `oauth_user_id` varchar(100) DEFAULT NULL, - `oauth_user_token` text DEFAULT NULL, + `oauth_user_token` varchar(191) DEFAULT NULL, `oauth_provider_id` varchar(191) DEFAULT NULL, `google_2fa_secret` text DEFAULT NULL, `accepted_terms_version` varchar(191) DEFAULT NULL, @@ -2231,7 +2231,7 @@ CREATE TABLE `users` ( UNIQUE KEY `users_oauth_user_id_oauth_provider_id_unique` (`oauth_user_id`,`oauth_provider_id`), KEY `users_account_id_index` (`account_id`), CONSTRAINT `users_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `accounts` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `vendor_contacts`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -2283,7 +2283,7 @@ CREATE TABLE `vendor_contacts` ( CONSTRAINT `vendor_contacts_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `vendor_contacts_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `vendor_contacts_vendor_id_foreign` FOREIGN KEY (`vendor_id`) REFERENCES `vendors` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `vendors`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -2328,7 +2328,7 @@ CREATE TABLE `vendors` ( CONSTRAINT `vendors_country_id_foreign` FOREIGN KEY (`country_id`) REFERENCES `countries` (`id`), CONSTRAINT `vendors_currency_id_foreign` FOREIGN KEY (`currency_id`) REFERENCES `currencies` (`id`), CONSTRAINT `vendors_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `webhooks`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -2350,7 +2350,7 @@ CREATE TABLE `webhooks` ( KEY `subscriptions_company_id_foreign` (`company_id`), KEY `subscriptions_event_id_company_id_index` (`event_id`,`company_id`), CONSTRAINT `subscriptions_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; @@ -2488,55 +2488,55 @@ INSERT INTO `migrations` VALUES (126,'2022_04_14_121548_forte_payment_gateway',1 INSERT INTO `migrations` VALUES (127,'2022_04_22_115838_client_settings_parse_for_types',1); INSERT INTO `migrations` VALUES (128,'2022_04_26_032252_convert_custom_fields_column_from_varchar_to_text',1); INSERT INTO `migrations` VALUES (129,'2022_05_08_004937_heal_stripe_gateway_configuration',1); -INSERT INTO `migrations` VALUES (130,'2022_05_16_224917_add_auto_bill_tries_to_invoices_table',1); -INSERT INTO `migrations` VALUES (131,'2022_05_18_055442_update_custom_value_four_columns',1); -INSERT INTO `migrations` VALUES (132,'2022_05_18_162152_create_scheduled_jobs_table',1); -INSERT INTO `migrations` VALUES (133,'2022_05_18_162443_create_schedulers_table',1); -INSERT INTO `migrations` VALUES (134,'2022_05_23_050754_drop_redundant_column_show_production_description_dropdown',1); -INSERT INTO `migrations` VALUES (135,'2022_05_28_234651_create_purchase_orders_table',1); -INSERT INTO `migrations` VALUES (136,'2022_05_30_181109_drop_scheduled_jobs_table',1); -INSERT INTO `migrations` VALUES (137,'2022_05_30_184320_add_job_related_fields_to_schedulers_table',1); -INSERT INTO `migrations` VALUES (138,'2022_05_31_101504_inventory_management_schema',1); -INSERT INTO `migrations` VALUES (139,'2022_06_01_215859_set_recurring_client_timestamp',1); -INSERT INTO `migrations` VALUES (140,'2022_06_01_224339_create_purchase_order_invitations_table',1); -INSERT INTO `migrations` VALUES (141,'2022_06_10_030503_set_account_flag_for_react',1); -INSERT INTO `migrations` VALUES (142,'2022_06_16_025156_add_react_switching_flag',1); -INSERT INTO `migrations` VALUES (143,'2022_06_17_082627_change_refresh_token_column_size',1); -INSERT INTO `migrations` VALUES (144,'2022_06_21_104350_fixes_for_description_in_pdf_designs',1); -INSERT INTO `migrations` VALUES (145,'2022_06_22_090547_set_oauth_expiry_column',1); -INSERT INTO `migrations` VALUES (146,'2022_06_24_141018_upgrade_failed_jobs_table',1); -INSERT INTO `migrations` VALUES (147,'2022_06_30_000126_add_flag_to_accounts_table',1); -INSERT INTO `migrations` VALUES (148,'2022_07_06_080127_add_purchase_order_to_expense',1); -INSERT INTO `migrations` VALUES (149,'2022_07_09_235510_add_index_to_payment_hash',1); -INSERT INTO `migrations` VALUES (150,'2022_07_18_033756_fixes_for_date_formats_table_react',1); -INSERT INTO `migrations` VALUES (151,'2022_07_21_023805_add_hebrew_language',1); -INSERT INTO `migrations` VALUES (152,'2022_07_26_091216_add_sms_verification_to_hosted_account',1); -INSERT INTO `migrations` VALUES (153,'2022_07_28_232340_enabled_expense_tax_rates_to_companies_table',1); -INSERT INTO `migrations` VALUES (154,'2022_07_29_091235_correction_for_companies_table_types',1); -INSERT INTO `migrations` VALUES (155,'2022_08_05_023357_bank_integration',1); -INSERT INTO `migrations` VALUES (156,'2022_08_11_011534_licenses_table_for_self_host',1); -INSERT INTO `migrations` VALUES (157,'2022_08_24_215917_invoice_task_project_companies_table',1); -INSERT INTO `migrations` VALUES (158,'2022_08_26_232500_add_email_status_column_to_purchase_order_invitations_table',1); -INSERT INTO `migrations` VALUES (159,'2022_08_28_210111_add_index_to_payments_table',1); -INSERT INTO `migrations` VALUES (160,'2022_09_05_024719_update_designs_for_tech_template',1); -INSERT INTO `migrations` VALUES (161,'2022_09_07_101731_add_reporting_option_to_companies_table',1); -INSERT INTO `migrations` VALUES (162,'2022_09_21_012417_add_threeds_to_braintree',1); -INSERT INTO `migrations` VALUES (163,'2022_09_30_235337_add_idempotency_key_to_payments',1); -INSERT INTO `migrations` VALUES (164,'2022_10_05_205645_add_indexes_to_client_hash',1); -INSERT INTO `migrations` VALUES (165,'2022_10_06_011344_add_key_to_products',1); -INSERT INTO `migrations` VALUES (166,'2022_10_07_065455_add_key_to_company_tokens_table',1); -INSERT INTO `migrations` VALUES (167,'2022_10_10_070137_add_documentable_index',1); -INSERT INTO `migrations` VALUES (168,'2022_10_27_044909_add_user_sms_verification_code',1); -INSERT INTO `migrations` VALUES (169,'2022_11_02_063742_add_verified_number_flag_to_users_table',1); -INSERT INTO `migrations` VALUES (170,'2022_11_04_013539_disabled_upstream_bank_integrations_table',1); -INSERT INTO `migrations` VALUES (171,'2022_11_06_215526_drop_html_backups_column_from_backups_table',1); -INSERT INTO `migrations` VALUES (172,'2022_11_13_034143_bank_transaction_rules_table',1); -INSERT INTO `migrations` VALUES (173,'2022_11_16_093535_calmness_design',1); -INSERT INTO `migrations` VALUES (174,'2022_11_22_215618_lock_tasks_when_invoiced',1); -INSERT INTO `migrations` VALUES (175,'2022_05_12_56879_add_stripe_klarna',2); -INSERT INTO `migrations` VALUES (176,'2022_07_12_45766_add_matomo',2); -INSERT INTO `migrations` VALUES (177,'2022_11_30_063229_add_payment_id_to_bank_transaction_table',2); -INSERT INTO `migrations` VALUES (178,'2022_12_07_024625_add_properties_to_companies_table',2); -INSERT INTO `migrations` VALUES (179,'2022_12_14_004639_vendor_currency_update',2); -INSERT INTO `migrations` VALUES (180,'2022_12_20_063038_set_proforma_invoice_type',2); -INSERT INTO `migrations` VALUES (181,'2023_01_12_125540_set_auto_bill_on_regular_invoice_setting',2); +INSERT INTO `migrations` VALUES (130,'2022_05_12_56879_add_stripe_klarna',1); +INSERT INTO `migrations` VALUES (131,'2022_05_16_224917_add_auto_bill_tries_to_invoices_table',1); +INSERT INTO `migrations` VALUES (132,'2022_05_18_055442_update_custom_value_four_columns',1); +INSERT INTO `migrations` VALUES (133,'2022_05_18_162152_create_scheduled_jobs_table',1); +INSERT INTO `migrations` VALUES (134,'2022_05_18_162443_create_schedulers_table',1); +INSERT INTO `migrations` VALUES (135,'2022_05_23_050754_drop_redundant_column_show_production_description_dropdown',1); +INSERT INTO `migrations` VALUES (136,'2022_05_28_234651_create_purchase_orders_table',1); +INSERT INTO `migrations` VALUES (137,'2022_05_30_181109_drop_scheduled_jobs_table',1); +INSERT INTO `migrations` VALUES (138,'2022_05_30_184320_add_job_related_fields_to_schedulers_table',1); +INSERT INTO `migrations` VALUES (139,'2022_05_31_101504_inventory_management_schema',1); +INSERT INTO `migrations` VALUES (140,'2022_06_01_215859_set_recurring_client_timestamp',1); +INSERT INTO `migrations` VALUES (141,'2022_06_01_224339_create_purchase_order_invitations_table',1); +INSERT INTO `migrations` VALUES (142,'2022_06_10_030503_set_account_flag_for_react',1); +INSERT INTO `migrations` VALUES (143,'2022_06_16_025156_add_react_switching_flag',1); +INSERT INTO `migrations` VALUES (144,'2022_06_17_082627_change_refresh_token_column_size',1); +INSERT INTO `migrations` VALUES (145,'2022_06_21_104350_fixes_for_description_in_pdf_designs',1); +INSERT INTO `migrations` VALUES (146,'2022_06_22_090547_set_oauth_expiry_column',1); +INSERT INTO `migrations` VALUES (147,'2022_06_24_141018_upgrade_failed_jobs_table',1); +INSERT INTO `migrations` VALUES (148,'2022_06_30_000126_add_flag_to_accounts_table',1); +INSERT INTO `migrations` VALUES (149,'2022_07_06_080127_add_purchase_order_to_expense',1); +INSERT INTO `migrations` VALUES (150,'2022_07_09_235510_add_index_to_payment_hash',1); +INSERT INTO `migrations` VALUES (151,'2022_07_12_45766_add_matomo',1); +INSERT INTO `migrations` VALUES (152,'2022_07_18_033756_fixes_for_date_formats_table_react',1); +INSERT INTO `migrations` VALUES (153,'2022_07_21_023805_add_hebrew_language',1); +INSERT INTO `migrations` VALUES (154,'2022_07_26_091216_add_sms_verification_to_hosted_account',1); +INSERT INTO `migrations` VALUES (155,'2022_07_28_232340_enabled_expense_tax_rates_to_companies_table',1); +INSERT INTO `migrations` VALUES (156,'2022_07_29_091235_correction_for_companies_table_types',1); +INSERT INTO `migrations` VALUES (157,'2022_08_05_023357_bank_integration',1); +INSERT INTO `migrations` VALUES (158,'2022_08_11_011534_licenses_table_for_self_host',1); +INSERT INTO `migrations` VALUES (159,'2022_08_24_215917_invoice_task_project_companies_table',1); +INSERT INTO `migrations` VALUES (160,'2022_08_26_232500_add_email_status_column_to_purchase_order_invitations_table',1); +INSERT INTO `migrations` VALUES (161,'2022_08_28_210111_add_index_to_payments_table',1); +INSERT INTO `migrations` VALUES (162,'2022_09_05_024719_update_designs_for_tech_template',1); +INSERT INTO `migrations` VALUES (163,'2022_09_07_101731_add_reporting_option_to_companies_table',1); +INSERT INTO `migrations` VALUES (164,'2022_09_21_012417_add_threeds_to_braintree',1); +INSERT INTO `migrations` VALUES (165,'2022_09_30_235337_add_idempotency_key_to_payments',1); +INSERT INTO `migrations` VALUES (166,'2022_10_05_205645_add_indexes_to_client_hash',1); +INSERT INTO `migrations` VALUES (167,'2022_10_06_011344_add_key_to_products',1); +INSERT INTO `migrations` VALUES (168,'2022_10_07_065455_add_key_to_company_tokens_table',1); +INSERT INTO `migrations` VALUES (169,'2022_10_10_070137_add_documentable_index',1); +INSERT INTO `migrations` VALUES (170,'2022_10_27_044909_add_user_sms_verification_code',1); +INSERT INTO `migrations` VALUES (171,'2022_11_02_063742_add_verified_number_flag_to_users_table',1); +INSERT INTO `migrations` VALUES (172,'2022_11_04_013539_disabled_upstream_bank_integrations_table',1); +INSERT INTO `migrations` VALUES (173,'2022_11_06_215526_drop_html_backups_column_from_backups_table',1); +INSERT INTO `migrations` VALUES (174,'2022_11_13_034143_bank_transaction_rules_table',1); +INSERT INTO `migrations` VALUES (175,'2022_11_16_093535_calmness_design',1); +INSERT INTO `migrations` VALUES (176,'2022_11_22_215618_lock_tasks_when_invoiced',1); +INSERT INTO `migrations` VALUES (177,'2022_11_30_063229_add_payment_id_to_bank_transaction_table',1); +INSERT INTO `migrations` VALUES (178,'2022_12_07_024625_add_properties_to_companies_table',1); +INSERT INTO `migrations` VALUES (179,'2022_12_14_004639_vendor_currency_update',1); +INSERT INTO `migrations` VALUES (180,'2022_12_20_063038_set_proforma_invoice_type',1); +INSERT INTO `migrations` VALUES (181,'2023_01_12_125540_set_auto_bill_on_regular_invoice_setting',1); From ce3bf784cae9787f6da2fce7ef59629d465d71a6 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sun, 22 Jan 2023 09:45:46 +1100 Subject: [PATCH 03/17] Tests for refactoring entity file names and formatting entity numbers for file names --- app/Models/BaseModel.php | 2 +- tests/Unit/EntityTranslationTest.php | 30 ++++++++++++++++++++++++++-- 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/app/Models/BaseModel.php b/app/Models/BaseModel.php index d9f8d345d2..366b717b39 100644 --- a/app/Models/BaseModel.php +++ b/app/Models/BaseModel.php @@ -188,7 +188,7 @@ class BaseModel extends Model public function numberFormatter() { - $number = strlen($this->number) >= 1 ? class_basename($this) . "_" . $this->number : class_basename($this) . "_" . Str::random(5); + $number = strlen($this->number) >= 1 ? $this->translate_entity() . "_" . $this->number : class_basename($this) . "_" . Str::random(5); $formatted_number = mb_ereg_replace("([^\w\s\d\-_~,;\[\]\(\).])", '', $number); diff --git a/tests/Unit/EntityTranslationTest.php b/tests/Unit/EntityTranslationTest.php index 82a1cc1273..4922b0e48d 100644 --- a/tests/Unit/EntityTranslationTest.php +++ b/tests/Unit/EntityTranslationTest.php @@ -20,6 +20,7 @@ use App\Models\Invoice; use App\Models\Payment; use App\Models\Product; use App\Models\Project; +use App\Models\PurchaseOrder; use App\Models\Quote; use App\Models\RecurringExpense; use App\Models\RecurringInvoice; @@ -27,8 +28,6 @@ use App\Models\RecurringQuote; use App\Models\Task; use App\Models\User; use App\Models\Vendor; -use Illuminate\Foundation\Testing\DatabaseTransactions; -use Tests\MockAccountData; use Tests\TestCase; /** @@ -70,6 +69,7 @@ class EntityTranslationTest extends TestCase 'company_id' => $company->id, 'user_id' => $u->id, 'client_id' => $client->id, + 'number' => 'xxx', ]); $expense = Expense::factory()->create([ @@ -82,6 +82,7 @@ class EntityTranslationTest extends TestCase 'company_id' => $company->id, 'user_id' => $u->id, 'client_id' => $client->id, + 'number' => 'xxx', ]); $payment = Payment::factory()->create([ @@ -105,6 +106,7 @@ class EntityTranslationTest extends TestCase 'company_id' => $company->id, 'user_id' => $u->id, 'client_id' => $client->id, + 'number' => 'xxx', ]); $recurring_expense = RecurringExpense::factory()->create([ @@ -117,6 +119,7 @@ class EntityTranslationTest extends TestCase 'company_id' => $company->id, 'user_id' => $u->id, 'client_id' => $client->id, + 'number' => 'xxx', ]); $recurring_quote = RecurringQuote::factory()->create([ @@ -131,11 +134,19 @@ class EntityTranslationTest extends TestCase 'client_id' => $client->id, ]); + $vendor = Vendor::factory()->create([ 'company_id' => $company->id, 'user_id' => $u->id, ]); + $po = PurchaseOrder::factory()->create([ + 'company_id' => $company->id, + 'user_id' => $u->id, + 'vendor_id' => $vendor->id, + 'number' => 'xxx', + ]); + $this->assertEquals(ctrans('texts.user'), $u->translate_entity()); $this->assertEquals(ctrans('texts.company'), $company->translate_entity()); $this->assertEquals(ctrans('texts.client'), $client->translate_entity()); @@ -151,5 +162,20 @@ class EntityTranslationTest extends TestCase $this->assertEquals(ctrans('texts.recurring_quote'), $recurring_quote->translate_entity()); $this->assertEquals(ctrans('texts.task'), $task->translate_entity()); $this->assertEquals(ctrans('texts.vendor'), $vendor->translate_entity()); + $this->assertEquals(ctrans('texts.purchase_order'), $po->translate_entity()); + + $this->assertEquals(str_replace(" ", "_", ctrans('texts.purchase_order')) . "_xxx.pdf", $po->getFileName()); + $this->assertEquals(str_replace(" ", "_", ctrans('texts.credit')) . "_xxx.pdf", $credit->getFileName()); + $this->assertEquals(str_replace(" ", "_", ctrans('texts.invoice')) . "_xxx.pdf", $invoice->getFileName()); + $this->assertEquals(str_replace(" ", "_", ctrans('texts.quote')) . "_xxx.pdf", $quote->getFileName()); + $this->assertEquals(str_replace(" ", "_", ctrans('texts.recurring_invoice')) . "_xxx.pdf", $recurring_invoice->getFileName()); + + $this->assertEquals(str_replace(" ", "_", ctrans('texts.recurring_invoice')) . "_xxx", $recurring_invoice->numberFormatter()); + $this->assertEquals(str_replace(" ", "_", ctrans('texts.credit')) . "_xxx", $credit->numberFormatter()); + $this->assertEquals(str_replace(" ", "_", ctrans('texts.invoice')) . "_xxx", $invoice->numberFormatter()); + $this->assertEquals(str_replace(" ", "_", ctrans('texts.quote')) . "_xxx", $quote->numberFormatter()); + $this->assertEquals(str_replace(" ", "_", ctrans('texts.purchase_order')) . "_xxx", $po->numberFormatter()); + + } } From 078e862c47d5a80b4cc656ca143bffd6c5865225 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sun, 22 Jan 2023 09:49:47 +1100 Subject: [PATCH 04/17] Change caching strategies for github actions --- .github/workflows/phpunit.yml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/phpunit.yml b/.github/workflows/phpunit.yml index 5112b4f9ef..1837451eea 100644 --- a/.github/workflows/phpunit.yml +++ b/.github/workflows/phpunit.yml @@ -90,22 +90,22 @@ jobs: run: | cp .env.ci .env - # - name: Get Composer Cache Directory - # id: composer-cache - # run: | - # echo "::set-output name=dir::$(composer config cache-files-dir)" - # - uses: actions/cache@v2 - # with: - # path: ${{ steps.composer-cache.outputs.dir }} - # key: ${{ runner.os }}-${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }} - # restore-keys: | - # ${{ runner.os }}-${{ matrix.php }}-composer- - - - name: Cache dependencies actions/cache@v3 - uses: actions/cache@v3 + - name: Get Composer Cache Directory + id: composer-cache + run: | + echo "::set-output name=dir::$(composer config cache-files-dir)" + - uses: actions/cache@v2 with: - path: ~/.composer/cache/files - key: dependencies-${{ matrix.dependency-version }}-laravel-${{ matrix.laravel }}-php-${{ matrix.php-versions }}-composer-${{ hashFiles('composer.json') }} + path: ${{ steps.composer-cache.outputs.dir }} + key: ${{ runner.os }}-${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }} + restore-keys: | + ${{ runner.os }}-${{ matrix.php }}-composer- + + # - name: Cache dependencies actions/cache@v3 + # uses: actions/cache@v3 + # with: + # path: ~/.composer/cache/files + # key: dependencies-${{ matrix.dependency-version }}-laravel-${{ matrix.laravel }}-php-${{ matrix.php-versions }}-composer-${{ hashFiles('composer.json') }} - name: Install composer dependencies run: | From daa21c19aaee0611918606785d00654ce320d3ab Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sun, 22 Jan 2023 14:10:57 +1100 Subject: [PATCH 05/17] Clean up for github actions --- .github/workflows/phpunit.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/phpunit.yml b/.github/workflows/phpunit.yml index 1837451eea..1847b94d14 100644 --- a/.github/workflows/phpunit.yml +++ b/.github/workflows/phpunit.yml @@ -125,12 +125,7 @@ jobs: - name: Migrate Database run: | php artisan migrate:fresh --seed --force && php artisan db:seed --force - - # - name: Prepare JS/CSS assets - # run: | - # npm i - # npm run production - + - name: Run Testsuite run: | cat .env @@ -140,5 +135,4 @@ jobs: DB_PORT: ${{ job.services.mysql.ports[3306] }} PHP_CS_FIXER_IGNORE_ENV: true CI_NODE_TOTAL: ${{ matrix.ci_node_total }} - # Use the index from matrix as an environment variable CI_NODE_INDEX: ${{ matrix.ci_node_index }} \ No newline at end of file From ec1d4392bdeaef1fdf4834a677db4ddb5f0ea8a8 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sun, 22 Jan 2023 14:40:22 +1100 Subject: [PATCH 06/17] Add form request for client bulk actions --- app/Http/Controllers/ClientController.php | 9 ++-- .../Requests/Client/BulkClientRequest.php | 37 ++++++++++++++++ tests/Feature/ClientApiTest.php | 43 ++++++++++++++++++- 3 files changed, 82 insertions(+), 7 deletions(-) create mode 100644 app/Http/Requests/Client/BulkClientRequest.php diff --git a/app/Http/Controllers/ClientController.php b/app/Http/Controllers/ClientController.php index 64fc4da9cb..72a82fbf4b 100644 --- a/app/Http/Controllers/ClientController.php +++ b/app/Http/Controllers/ClientController.php @@ -16,6 +16,7 @@ use App\Events\Client\ClientWasUpdated; use App\Factory\ClientFactory; use App\Filters\ClientFilters; use App\Http\Requests\Client\AdjustClientLedgerRequest; +use App\Http\Requests\Client\BulkClientRequest; use App\Http\Requests\Client\CreateClientRequest; use App\Http\Requests\Client\DestroyClientRequest; use App\Http\Requests\Client\EditClientRequest; @@ -494,16 +495,12 @@ class ClientController extends BaseController * ), * ) */ - public function bulk() + public function bulk(BulkClientRequest $request) { - $action = request()->input('action'); $ids = request()->input('ids'); $clients = Client::withTrashed()->whereIn('id', $this->transformKeys($ids))->cursor(); - - if (! in_array($action, ['restore', 'archive', 'delete'])) { - return response()->json(['message' => 'That action is not available.'], 400); - } + $action = $request->action; $clients->each(function ($client, $key) use ($action) { if (auth()->user()->can('edit', $client)) { diff --git a/app/Http/Requests/Client/BulkClientRequest.php b/app/Http/Requests/Client/BulkClientRequest.php new file mode 100644 index 0000000000..ecc11e2cbe --- /dev/null +++ b/app/Http/Requests/Client/BulkClientRequest.php @@ -0,0 +1,37 @@ + 'required|bail|array', + 'action' => 'in:archive,restore,delete' + ]; + + } +} diff --git a/tests/Feature/ClientApiTest.php b/tests/Feature/ClientApiTest.php index 5d561c346d..6406414d04 100644 --- a/tests/Feature/ClientApiTest.php +++ b/tests/Feature/ClientApiTest.php @@ -15,7 +15,6 @@ use App\DataMapper\ClientSettings; use App\Factory\ClientFactory; use App\Http\Requests\Client\StoreClientRequest; use App\Models\Client; -use App\Models\Country; use App\Repositories\ClientContactRepository; use App\Repositories\ClientRepository; use App\Utils\Number; @@ -51,6 +50,48 @@ class ClientApiTest extends TestCase $this->faker = \Faker\Factory::create(); Model::reguard(); + + } + + public function testClientBulkActionValidation() + { + $data = [ + 'action' => 'muppet', + 'ids' => [ + $this->client->hashed_id + ] + ]; + + $rules = [ + 'ids' => 'required|bail|array', + 'action' => 'in:archive,restore,delete' + ]; + + $v = $this->app['validator']->make($data, $rules); + $this->assertFalse($v->passes()); + + $data = [ + 'action' => 'archive', + 'ids' => [ + $this->client->hashed_id + ] + ]; + + $v = $this->app['validator']->make($data, $rules); + $this->assertTrue($v->passes()); + + + $data = [ + 'action' => 'archive', + 'ids' => + $this->client->hashed_id + + ]; + + $v = $this->app['validator']->make($data, $rules); + $this->assertFalse($v->passes()); + + } public function testClientStatement() From b7a49b97cda4ad6c1729a86a67bf20c1df016492 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sun, 22 Jan 2023 14:49:15 +1100 Subject: [PATCH 07/17] Bulk action request for bank transactions --- .../Controllers/BankIntegrationController.php | 10 ++--- .../Controllers/BankTransactionController.php | 19 +++------ .../BulkBankIntegrationRequest.php | 37 +++++++++++++++++ .../BulkBankTransactionRequest.php | 37 +++++++++++++++++ tests/Feature/Bank/BankTransactionTest.php | 40 +++++++++++++++++++ tests/Feature/BankIntegrationApiTest.php | 15 +++++++ 6 files changed, 138 insertions(+), 20 deletions(-) create mode 100644 app/Http/Requests/BankIntegration/BulkBankIntegrationRequest.php create mode 100644 app/Http/Requests/BankTransaction/BulkBankTransactionRequest.php diff --git a/app/Http/Controllers/BankIntegrationController.php b/app/Http/Controllers/BankIntegrationController.php index 3ec83fb919..369c1d08c5 100644 --- a/app/Http/Controllers/BankIntegrationController.php +++ b/app/Http/Controllers/BankIntegrationController.php @@ -15,6 +15,7 @@ use App\Factory\BankIntegrationFactory; use App\Filters\BankIntegrationFilters; use App\Helpers\Bank\Yodlee\Yodlee; use App\Http\Requests\BankIntegration\AdminBankIntegrationRequest; +use App\Http\Requests\BankIntegration\BulkBankIntegrationRequest; use App\Http\Requests\BankIntegration\CreateBankIntegrationRequest; use App\Http\Requests\BankIntegration\DestroyBankIntegrationRequest; use App\Http\Requests\BankIntegration\EditBankIntegrationRequest; @@ -465,21 +466,16 @@ class BankIntegrationController extends BaseController * ), * ) */ - public function bulk() + public function bulk(BulkBankIntegrationRequest $request) { $action = request()->input('action'); - if(!in_array($action, ['archive', 'restore', 'delete'])) - return response()->json(['message' => 'Unsupported action.'], 400); - $ids = request()->input('ids'); $bank_integrations = BankIntegration::withTrashed()->whereIn('id', $this->transformKeys($ids))->company()->get(); $bank_integrations->each(function ($bank_integration, $key) use ($action) { - if (auth()->user()->can('edit', $bank_integration)) { - $this->bank_integration_repo->{$action}($bank_integration); - } + $this->bank_integration_repo->{$action}($bank_integration); }); /* Need to understand which permission are required for the given bulk action ie. view / edit */ diff --git a/app/Http/Controllers/BankTransactionController.php b/app/Http/Controllers/BankTransactionController.php index 31a8dd333d..a8c1508ec7 100644 --- a/app/Http/Controllers/BankTransactionController.php +++ b/app/Http/Controllers/BankTransactionController.php @@ -15,6 +15,7 @@ use App\Factory\BankTransactionFactory; use App\Filters\BankTransactionFilters; use App\Helpers\Bank\Yodlee\Yodlee; use App\Http\Requests\BankTransaction\AdminBankTransactionRequest; +use App\Http\Requests\BankTransaction\BulkBankTransactionRequest; use App\Http\Requests\BankTransaction\CreateBankTransactionRequest; use App\Http\Requests\BankTransaction\DestroyBankTransactionRequest; use App\Http\Requests\BankTransaction\EditBankTransactionRequest; @@ -469,12 +470,9 @@ class BankTransactionController extends BaseController * ), * ) */ - public function bulk() + public function bulk(BulkBankTransactionRequest $request) { - $action = request()->input('action'); - - if(!in_array($action, ['archive', 'restore', 'delete', 'convert_matched'])) - return response()->json(['message' => 'Unsupported action.'], 400); + $action = $request->input('action'); $ids = request()->input('ids'); @@ -482,19 +480,14 @@ class BankTransactionController extends BaseController if($action == 'convert_matched') //catch this action { - if(auth()->user()->isAdmin()) - { - $this->bank_transaction_repo->convert_matched($bank_transactions); - } - else - return; + + $this->bank_transaction_repo->convert_matched($bank_transactions); + } else { $bank_transactions->each(function ($bank_transaction, $key) use ($action) { - if (auth()->user()->can('edit', $bank_transaction)) { $this->bank_transaction_repo->{$action}($bank_transaction); - } }); } diff --git a/app/Http/Requests/BankIntegration/BulkBankIntegrationRequest.php b/app/Http/Requests/BankIntegration/BulkBankIntegrationRequest.php new file mode 100644 index 0000000000..146678dfab --- /dev/null +++ b/app/Http/Requests/BankIntegration/BulkBankIntegrationRequest.php @@ -0,0 +1,37 @@ +user()->isAdmin(); + } + + public function rules() + { + + return [ + 'ids' => 'required|bail|array', + 'action' => 'in:archive,restore,delete' + ]; + + } +} diff --git a/app/Http/Requests/BankTransaction/BulkBankTransactionRequest.php b/app/Http/Requests/BankTransaction/BulkBankTransactionRequest.php new file mode 100644 index 0000000000..e0e2344e4e --- /dev/null +++ b/app/Http/Requests/BankTransaction/BulkBankTransactionRequest.php @@ -0,0 +1,37 @@ +user()->isAdmin(); + } + + public function rules() + { + + return [ + 'ids' => 'required|bail|array', + 'action' => 'in:archive,restore,delete,convert_matched' + ]; + + } +} diff --git a/tests/Feature/Bank/BankTransactionTest.php b/tests/Feature/Bank/BankTransactionTest.php index 8f96ccda2d..0a47c4d740 100644 --- a/tests/Feature/Bank/BankTransactionTest.php +++ b/tests/Feature/Bank/BankTransactionTest.php @@ -39,6 +39,46 @@ class BankTransactionTest extends TestCase ); } + + public function testBankTransactionBulkActions() + { + $data = [ + 'ids' => [$this->bank_integration->hashed_id], + 'action' => 'archive' + ]; + + $response = $this->withHeaders([ + 'X-API-SECRET' => config('ninja.api_secret'), + 'X-API-TOKEN' => $this->token, + ])->post('/api/v1/bank_transactions/bulk', $data) + ->assertStatus(200); + + $data = [ + 'ids' => [$this->bank_integration->hashed_id], + 'action' => 'restore' + ]; + + $response = $this->withHeaders([ + 'X-API-SECRET' => config('ninja.api_secret'), + 'X-API-TOKEN' => $this->token, + ])->post('/api/v1/bank_transactions/bulk', $data) + ->assertStatus(200); + + + $data = [ + 'ids' => [$this->bank_integration->hashed_id], + 'action' => 'delete' + ]; + + $response = $this->withHeaders([ + 'X-API-SECRET' => config('ninja.api_secret'), + 'X-API-TOKEN' => $this->token, + ])->post('/api/v1/bank_transactions/bulk', $data) + ->assertStatus(200); + + + } + public function testLinkExpenseToTransaction() { diff --git a/tests/Feature/BankIntegrationApiTest.php b/tests/Feature/BankIntegrationApiTest.php index 2b4f711b0a..13c317ffa7 100644 --- a/tests/Feature/BankIntegrationApiTest.php +++ b/tests/Feature/BankIntegrationApiTest.php @@ -42,6 +42,21 @@ class BankIntegrationApiTest extends TestCase Model::reguard(); } + + public function testBankIntegrationPost() + { + $data = [ + 'bank_account_name' => 'Nuevo Banko', + ]; + + $response = $this->withHeaders([ + 'X-API-TOKEN' => $this->token, + ])->post('/api/v1/bank_integrations/', $data); + + $response->assertStatus(200); + } + + public function testBankIntegrationGet() { $response = $this->withHeaders([ From 9628580be0cc238866a9f6e50a5bcc1712d9ed9a Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sun, 22 Jan 2023 15:03:23 +1100 Subject: [PATCH 08/17] Add statement date range to the statement --- app/Http/Controllers/ActivityController.php | 4 ++ .../BankTransactionRuleController.php | 25 ++++++------ .../Requests/Activity/ShowActivityRequest.php | 3 +- .../BulkBankTransactionRuleRequest.php | 37 ++++++++++++++++++ app/Services/PdfMaker/Design.php | 4 +- tests/Feature/ActivityApiTest.php | 11 ++++++ .../Feature/Bank/BankTransactionRuleTest.php | 38 +++++++++++++++++++ tests/Feature/Bank/BankTransactionTest.php | 1 - 8 files changed, 106 insertions(+), 17 deletions(-) create mode 100644 app/Http/Requests/BankTransactionRule/BulkBankTransactionRuleRequest.php diff --git a/app/Http/Controllers/ActivityController.php b/app/Http/Controllers/ActivityController.php index f222177b8d..12ce6c4f50 100644 --- a/app/Http/Controllers/ActivityController.php +++ b/app/Http/Controllers/ActivityController.php @@ -91,6 +91,10 @@ class ActivityController extends BaseController ->take($default_activities); if ($request->has('react')) { + + if(!auth()->user()->isAdmin()) + return response()->json(['data' => []], 200); + $system = ctrans('texts.system'); $data = $activities->cursor()->map(function ($activity) use ($system) { diff --git a/app/Http/Controllers/BankTransactionRuleController.php b/app/Http/Controllers/BankTransactionRuleController.php index ba9dab0a90..d507cdf2bd 100644 --- a/app/Http/Controllers/BankTransactionRuleController.php +++ b/app/Http/Controllers/BankTransactionRuleController.php @@ -16,6 +16,7 @@ use App\Factory\BankTransactionRuleFactory; use App\Filters\BankTransactionFilters; use App\Filters\BankTransactionRuleFilters; use App\Helpers\Bank\Yodlee\Yodlee; +use App\Http\Requests\BankTransactionRule\BulkBankTransactionRuleRequest; use App\Http\Requests\BankTransactionRule\CreateBankTransactionRuleRequest; use App\Http\Requests\BankTransactionRule\DestroyBankTransactionRuleRequest; use App\Http\Requests\BankTransactionRule\EditBankTransactionRuleRequest; @@ -472,25 +473,21 @@ class BankTransactionRuleController extends BaseController * ), * ) */ - public function bulk() + public function bulk(BulkBankTransactionRuleRequest $request) { - $action = request()->input('action'); + $action = $request->input('action'); - if(!in_array($action, ['archive', 'restore', 'delete'])) - return response()->json(['message' => 'Unsupported action.'], 400); - - $ids = request()->input('ids'); + $ids = $request->input('ids'); - $bank_transaction_rules = BankTransactionRule::withTrashed()->whereIn('id', $this->transformKeys($ids))->company()->get(); - - $bank_transaction_rules->each(function ($bank_transaction_rule, $key) use ($action) { - if (auth()->user()->can('edit', $bank_transaction_rule)) { - $this->bank_transaction_repo->{$action}($bank_transaction_rule); - } - }); + $bank_transaction_rules = BankTransactionRule::withTrashed() + ->whereIn('id', $this->transformKeys($ids)) + ->company() + ->cursor() + ->each(function ($bank_transaction_rule, $key) use ($action) { + $this->bank_transaction_repo->{$action}($bank_transaction_rule); + }); /* Need to understand which permission are required for the given bulk action ie. view / edit */ - return $this->listResponse(BankTransactionRule::withTrashed()->whereIn('id', $this->transformKeys($ids))->company()); } diff --git a/app/Http/Requests/Activity/ShowActivityRequest.php b/app/Http/Requests/Activity/ShowActivityRequest.php index 688ad62f34..3203aa5998 100644 --- a/app/Http/Requests/Activity/ShowActivityRequest.php +++ b/app/Http/Requests/Activity/ShowActivityRequest.php @@ -23,6 +23,7 @@ class ShowActivityRequest extends Request */ public function authorize() : bool { - return auth()->user()->can('view', Activity::class); + return auth()->user()->isAdmin(); + // return auth()->user()->can('view', Activity::class); } } diff --git a/app/Http/Requests/BankTransactionRule/BulkBankTransactionRuleRequest.php b/app/Http/Requests/BankTransactionRule/BulkBankTransactionRuleRequest.php new file mode 100644 index 0000000000..a491da5e63 --- /dev/null +++ b/app/Http/Requests/BankTransactionRule/BulkBankTransactionRuleRequest.php @@ -0,0 +1,37 @@ +user()->isAdmin(); + } + + public function rules() + { + + return [ + 'ids' => 'required|bail|array', + 'action' => 'in:archive,restore,delete' + ]; + + } +} diff --git a/app/Services/PdfMaker/Design.php b/app/Services/PdfMaker/Design.php index ea3b403815..1f97fb73f8 100644 --- a/app/Services/PdfMaker/Design.php +++ b/app/Services/PdfMaker/Design.php @@ -280,8 +280,10 @@ class Design extends BaseDesign if ($this->type === 'statement') { - $s_date = $this->translateDate(now(), $this->client->date_format(), $this->client->locale()); + // $s_date = $this->translateDate(now(), $this->client->date_format(), $this->client->locale()); + $s_date = $this->translateDate($this->options['start_date'], $this->client->date_format(), $this->client->locale()) . " - " . $this->translateDate($this->options['end_date'], $this->client->date_format(), $this->client->locale()); + return [ ['element' => 'tr', 'properties' => ['data-ref' => 'statement-label'], 'elements' => [ ['element' => 'th', 'properties' => [], 'content' => ""], diff --git a/tests/Feature/ActivityApiTest.php b/tests/Feature/ActivityApiTest.php index c5e6c6cbaa..115bed1732 100644 --- a/tests/Feature/ActivityApiTest.php +++ b/tests/Feature/ActivityApiTest.php @@ -45,4 +45,15 @@ class ActivityApiTest extends TestCase $response->assertStatus(200); } + + public function testActivityGetWithReact() + { + $response = $this->withHeaders([ + 'X-API-SECRET' => config('ninja.api_secret'), + 'X-API-TOKEN' => $this->token, + ])->get('/api/v1/activities?react=true'); + + $response->assertStatus(200); + } + } diff --git a/tests/Feature/Bank/BankTransactionRuleTest.php b/tests/Feature/Bank/BankTransactionRuleTest.php index 2f3b8c215e..87f0be350f 100644 --- a/tests/Feature/Bank/BankTransactionRuleTest.php +++ b/tests/Feature/Bank/BankTransactionRuleTest.php @@ -41,6 +41,44 @@ class BankTransactionRuleTest extends TestCase $this->withoutExceptionHandling(); } + public function testBankRuleBulkActions() + { + $data = [ + 'action' => 'archive', + 'ids' => [$this->bank_transaction_rule] + ]; + + $response = $this->withHeaders([ + 'X-API-TOKEN' => $this->token, + ])->post('/api/v1/bank_transaction_rules/bulk', $data) + ->assertStatus(200); + + + $data = [ + 'ids' => [$this->bank_transaction_rule->hashed_id], + 'action' => 'restore' + ]; + + $response = $this->withHeaders([ + 'X-API-SECRET' => config('ninja.api_secret'), + 'X-API-TOKEN' => $this->token, + ])->post('/api/v1/bank_transaction_rules/bulk', $data) + ->assertStatus(200); + + $data = [ + 'ids' => [$this->bank_transaction_rule->hashed_id], + 'action' => 'delete' + ]; + + $response = $this->withHeaders([ + 'X-API-SECRET' => config('ninja.api_secret'), + 'X-API-TOKEN' => $this->token, + ])->post('/api/v1/bank_transaction_rules/bulk', $data) + ->assertStatus(200); + + + } + public function testValidationContainsRule() { diff --git a/tests/Feature/Bank/BankTransactionTest.php b/tests/Feature/Bank/BankTransactionTest.php index 0a47c4d740..9be72919ff 100644 --- a/tests/Feature/Bank/BankTransactionTest.php +++ b/tests/Feature/Bank/BankTransactionTest.php @@ -64,7 +64,6 @@ class BankTransactionTest extends TestCase ])->post('/api/v1/bank_transactions/bulk', $data) ->assertStatus(200); - $data = [ 'ids' => [$this->bank_integration->hashed_id], 'action' => 'delete' From 7bd5a73d704c7efde6e25730f746bf00de3cd467 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sun, 22 Jan 2023 15:11:33 +1100 Subject: [PATCH 09/17] Bulk action request for company gateways --- .../Controllers/CompanyGatewayController.php | 20 ++++----- .../BulkCompanyGatewayRequest.php | 45 +++++++++++++++++++ .../Feature/Bank/BankTransactionRuleTest.php | 1 - tests/Feature/CompanyGatewayApiTest.php | 44 ++++++++++++++++++ 4 files changed, 99 insertions(+), 11 deletions(-) create mode 100644 app/Http/Requests/CompanyGateway/BulkCompanyGatewayRequest.php diff --git a/app/Http/Controllers/CompanyGatewayController.php b/app/Http/Controllers/CompanyGatewayController.php index 016884938f..a0239261fb 100644 --- a/app/Http/Controllers/CompanyGatewayController.php +++ b/app/Http/Controllers/CompanyGatewayController.php @@ -14,6 +14,7 @@ namespace App\Http\Controllers; use App\DataMapper\FeesAndLimits; use App\Factory\CompanyGatewayFactory; use App\Filters\CompanyGatewayFilters; +use App\Http\Requests\CompanyGateway\BulkCompanyGatewayRequest; use App\Http\Requests\CompanyGateway\CreateCompanyGatewayRequest; use App\Http\Requests\CompanyGateway\DestroyCompanyGatewayRequest; use App\Http\Requests\CompanyGateway\EditCompanyGatewayRequest; @@ -496,19 +497,18 @@ class CompanyGatewayController extends BaseController * ), * ) */ - public function bulk() + public function bulk(BulkCompanyGatewayRequest $request) { - $action = request()->input('action'); + $action = $request->input('action'); - $ids = request()->input('ids'); + $ids = $request->input('ids'); - $company_gateways = CompanyGateway::withTrashed()->find($this->transformKeys($ids)); - - $company_gateways->each(function ($company_gateway, $key) use ($action) { - if (auth()->user()->can('edit', $company_gateway)) { - $this->company_repo->{$action}($company_gateway); - } - }); + $company_gateways = CompanyGateway::withTrashed() + ->whereIn('id',$this->transformKeys($ids)) + ->cursor() + ->each(function ($company_gateway, $key) use ($action) { + $this->company_repo->{$action}($company_gateway); + }); return $this->listResponse(CompanyGateway::withTrashed()->whereIn('id', $this->transformKeys($ids))); } diff --git a/app/Http/Requests/CompanyGateway/BulkCompanyGatewayRequest.php b/app/Http/Requests/CompanyGateway/BulkCompanyGatewayRequest.php new file mode 100644 index 0000000000..3f28c367e0 --- /dev/null +++ b/app/Http/Requests/CompanyGateway/BulkCompanyGatewayRequest.php @@ -0,0 +1,45 @@ +user()->isAdmin(); + } + + public function rules() + { + + return [ + 'ids' => 'required|bail|array', + 'action' => 'in:archive,restore,delete' + ]; + + } + + +} diff --git a/tests/Feature/Bank/BankTransactionRuleTest.php b/tests/Feature/Bank/BankTransactionRuleTest.php index 87f0be350f..299c693998 100644 --- a/tests/Feature/Bank/BankTransactionRuleTest.php +++ b/tests/Feature/Bank/BankTransactionRuleTest.php @@ -76,7 +76,6 @@ class BankTransactionRuleTest extends TestCase ])->post('/api/v1/bank_transaction_rules/bulk', $data) ->assertStatus(200); - } public function testValidationContainsRule() diff --git a/tests/Feature/CompanyGatewayApiTest.php b/tests/Feature/CompanyGatewayApiTest.php index b036dd35c8..f976408188 100644 --- a/tests/Feature/CompanyGatewayApiTest.php +++ b/tests/Feature/CompanyGatewayApiTest.php @@ -12,6 +12,7 @@ namespace Tests\Feature; use App\DataMapper\FeesAndLimits; +use App\Factory\CompanyGatewayFactory; use App\Models\CompanyGateway; use App\Models\GatewayType; use App\Utils\Traits\CompanyGatewayFeesAndLimitsSaver; @@ -46,6 +47,49 @@ class CompanyGatewayApiTest extends TestCase Model::reguard(); } + public function testBulkActions() + { + $cg = CompanyGatewayFactory::create($this->company->id, $this->user->id); + $cg->gateway_key = 'd14dd26a37cecc30fdd65700bfb55b23'; + $cg->save(); + + $data = [ + 'action' => 'archive', + 'ids' => [$cg->hashed_id] + ]; + + $response = $this->withHeaders([ + 'X-API-TOKEN' => $this->token, + ])->post('/api/v1/company_gateways/bulk', $data) + ->assertStatus(200); + + + $data = [ + 'ids' => [$cg->hashed_id], + 'action' => 'restore' + ]; + + $response = $this->withHeaders([ + 'X-API-SECRET' => config('ninja.api_secret'), + 'X-API-TOKEN' => $this->token, + ])->post('/api/v1/company_gateways/bulk', $data) + ->assertStatus(200); + + $data = [ + 'ids' => [$cg->hashed_id], + 'action' => 'delete' + ]; + + $response = $this->withHeaders([ + 'X-API-SECRET' => config('ninja.api_secret'), + 'X-API-TOKEN' => $this->token, + ])->post('/api/v1/company_gateways/bulk', $data) + ->assertStatus(200); + + } + + + public function testCompanyGatewayEndPointsWithIncorrectFields() { $data = [ From c502177470336eb8c4780678a930f79faaf5c437 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sun, 22 Jan 2023 15:19:49 +1100 Subject: [PATCH 10/17] Bulk credit requests --- .../Controllers/CompanyUserController.php | 2 +- app/Http/Controllers/CreditController.php | 7 ++-- .../BulkCompanyGatewayRequest.php | 4 +- .../Requests/Credit/BulkCreditRequest.php | 40 +++++++++++++++++++ lang/en/texts.php | 2 + tests/Feature/CreditTest.php | 39 ++++++++++++++++++ 6 files changed, 88 insertions(+), 6 deletions(-) create mode 100644 app/Http/Requests/Credit/BulkCreditRequest.php diff --git a/app/Http/Controllers/CompanyUserController.php b/app/Http/Controllers/CompanyUserController.php index 957eba898f..bc40618ee7 100644 --- a/app/Http/Controllers/CompanyUserController.php +++ b/app/Http/Controllers/CompanyUserController.php @@ -11,11 +11,11 @@ namespace App\Http\Controllers; -use App\Exceptions\ModelNotFoundException; use App\Http\Requests\CompanyUser\UpdateCompanyUserRequest; use App\Models\CompanyUser; use App\Models\User; use App\Transformers\CompanyUserTransformer; +use Illuminate\Database\Eloquent\ModelNotFoundException; use Illuminate\Http\Response; class CompanyUserController extends BaseController diff --git a/app/Http/Controllers/CreditController.php b/app/Http/Controllers/CreditController.php index 5bf8fbc873..56ab93d571 100644 --- a/app/Http/Controllers/CreditController.php +++ b/app/Http/Controllers/CreditController.php @@ -17,6 +17,7 @@ use App\Factory\CloneCreditFactory; use App\Factory\CreditFactory; use App\Filters\CreditFilters; use App\Http\Requests\Credit\ActionCreditRequest; +use App\Http\Requests\Credit\BulkCreditRequest; use App\Http\Requests\Credit\CreateCreditRequest; use App\Http\Requests\Credit\DestroyCreditRequest; use App\Http\Requests\Credit\EditCreditRequest; @@ -494,11 +495,11 @@ class CreditController extends BaseController * ), * ) */ - public function bulk() + public function bulk(BulkCreditRequest $request) { - $action = request()->input('action'); + $action = $request->input('action'); - $ids = request()->input('ids'); + $ids = $request->input('ids'); if(Ninja::isHosted() && (stripos($action, 'email') !== false) && !auth()->user()->company()->account->account_sms_verified) return response(['message' => 'Please verify your account to send emails.'], 400); diff --git a/app/Http/Requests/CompanyGateway/BulkCompanyGatewayRequest.php b/app/Http/Requests/CompanyGateway/BulkCompanyGatewayRequest.php index 3f28c367e0..cdfed1325c 100644 --- a/app/Http/Requests/CompanyGateway/BulkCompanyGatewayRequest.php +++ b/app/Http/Requests/CompanyGateway/BulkCompanyGatewayRequest.php @@ -33,10 +33,10 @@ class BulkCompanyGatewayRequest extends Request public function rules() { - + return [ 'ids' => 'required|bail|array', - 'action' => 'in:archive,restore,delete' + 'action' => 'required|bail|in:archive,restore,delete' ]; } diff --git a/app/Http/Requests/Credit/BulkCreditRequest.php b/app/Http/Requests/Credit/BulkCreditRequest.php new file mode 100644 index 0000000000..ee74d180d4 --- /dev/null +++ b/app/Http/Requests/Credit/BulkCreditRequest.php @@ -0,0 +1,40 @@ + 'required|bail|array', + 'action' => 'required|bail|in:archive,restore,delete,email,bulk_download,bulk_print,mark_paid,clone_to_credit,history,mark_sent,download,send_email' + ]; + } +} diff --git a/lang/en/texts.php b/lang/en/texts.php index bb2ad322e4..2173a752c3 100644 --- a/lang/en/texts.php +++ b/lang/en/texts.php @@ -4926,6 +4926,8 @@ $LANG = array( 'import_completed' => 'Import completed', 'client_statement_body' => 'Your statement from :start_date to :end_date is attached.', 'email_queued' => 'Email queued', + 'clone_to_recurring_invoice' => 'Clone to Recurring Invoice', + ); diff --git a/tests/Feature/CreditTest.php b/tests/Feature/CreditTest.php index a33b005514..382a73c493 100644 --- a/tests/Feature/CreditTest.php +++ b/tests/Feature/CreditTest.php @@ -40,6 +40,45 @@ class CreditTest extends TestCase $this->makeTestData(); } + public function testBulkActions() + { + + $data = [ + 'action' => 'archive', + 'ids' => [$this->credit->hashed_id] + ]; + + $response = $this->withHeaders([ + 'X-API-TOKEN' => $this->token, + ])->post('/api/v1/credits/bulk', $data) + ->assertStatus(200); + + + $data = [ + 'ids' => [$this->credit->hashed_id], + 'action' => 'restore' + ]; + + $response = $this->withHeaders([ + 'X-API-SECRET' => config('ninja.api_secret'), + 'X-API-TOKEN' => $this->token, + ])->post('/api/v1/credits/bulk', $data) + ->assertStatus(200); + + $data = [ + 'ids' => [$this->credit->hashed_id], + 'action' => 'delete' + ]; + + $response = $this->withHeaders([ + 'X-API-SECRET' => config('ninja.api_secret'), + 'X-API-TOKEN' => $this->token, + ])->post('/api/v1/credits/bulk', $data) + ->assertStatus(200); + + } + + public function testCreditGetClientStatus() { $response = $this->withHeaders([ From 33b3ea73b8c36fc3af41f6f15ccb4614a83ce839 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sun, 22 Jan 2023 15:22:54 +1100 Subject: [PATCH 11/17] Update translations --- lang/en/texts.php | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/lang/en/texts.php b/lang/en/texts.php index 2173a752c3..9ac260107c 100644 --- a/lang/en/texts.php +++ b/lang/en/texts.php @@ -4927,7 +4927,29 @@ $LANG = array( 'client_statement_body' => 'Your statement from :start_date to :end_date is attached.', 'email_queued' => 'Email queued', 'clone_to_recurring_invoice' => 'Clone to Recurring Invoice', - + 'inventory_threshold' => 'Inventory Threshold', + 'emailed_statement' => 'Successfully queued statement to be sent', + 'show_email_footer' => 'Show Email Footer', + 'invoice_task_hours' => 'Invoice Task Hours', + 'invoice_task_hours_help' => 'Add the hours to the invoice line items', + 'auto_bill_standard_invoices' => 'Auto Bill Standard Invoices', + 'auto_bill_recurring_invoices' => 'Auto Bill Recurring Invoices', + 'email_alignment' => 'Email Alignment', + 'pdf_preview_location' => 'PDF Preview Location', + 'mailgun' => 'Mailgun', + 'postmark' => 'Postmark', + 'microsoft' => 'Microsoft', + 'click_plus_to_create_record' => 'Click + to create a record', + 'last365_days' => 'Last 365 Days', + 'import_design' => 'Import Design', + 'imported_design' => 'Successfully imported design', + 'invalid_design' => 'The design is invalid, the :value section is missing', + 'setup_wizard_logo' => 'Would you like to upload your logo?', + 'installed_version' => 'Installed Version', + 'notify_vendor_when_paid' => 'Notify Vendor When Paid', + 'notify_vendor_when_paid_help' => 'Send an email to the vendor when the expense is marked as paid', + 'update_payment' => 'Update Payment', + 'markup' => 'Markup', ); From 5888252267698477f35869082eaac65f8569e4fd Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sun, 22 Jan 2023 16:34:47 +1100 Subject: [PATCH 12/17] Enhance bulk action guards + validation layer --- .../Controllers/BankIntegrationController.php | 2 +- app/Http/Controllers/ClientController.php | 18 ++-- .../Controllers/CompanyGatewayController.php | 3 +- .../Controllers/CompanyLedgerController.php | 2 +- app/Http/Controllers/CreditController.php | 3 +- app/Http/Controllers/DesignController.php | 4 +- .../Requests/Client/BulkClientRequest.php | 17 +++- app/Models/Account.php | 5 +- app/Models/Activity.php | 28 +++--- app/Models/BaseModel.php | 1 + app/Models/ClientContact.php | 1 + app/Models/ClientGatewayToken.php | 24 ++--- app/Models/Company.php | 4 +- app/Models/CompanyGateway.php | 10 +- app/Models/GroupSetting.php | 12 --- app/Models/Payment.php | 13 +-- app/Models/StaticModel.php | 24 +++++ app/Models/SystemLog.php | 4 +- app/Models/User.php | 5 +- app/Models/VendorContact.php | 4 +- app/Providers/RouteServiceProvider.php | 4 +- tests/Feature/ClientApiTest.php | 93 +++++++++++++++++-- tests/Integration/EventTest.php | 2 - tests/MockAccountData.php | 7 ++ 24 files changed, 208 insertions(+), 82 deletions(-) diff --git a/app/Http/Controllers/BankIntegrationController.php b/app/Http/Controllers/BankIntegrationController.php index 369c1d08c5..bb87f5181f 100644 --- a/app/Http/Controllers/BankIntegrationController.php +++ b/app/Http/Controllers/BankIntegrationController.php @@ -619,7 +619,7 @@ class BankIntegrationController extends BaseController if(!$bank_account_id) return response()->json(['message' => 'Not yet authenticated with Bank Integration service'], 400); - $bi = BankIntegration::withTrashed()->where('bank_account_id', $acc_id)->where('company_id', auth()->user()->company()->id)->firstOrFail(); + $bi = BankIntegration::withTrashed()->where('bank_account_id', $acc_id)->company()->firstOrFail(); $yodlee = new Yodlee($bank_account_id); $res = $yodlee->deleteAccount($acc_id); diff --git a/app/Http/Controllers/ClientController.php b/app/Http/Controllers/ClientController.php index 72a82fbf4b..9930d47ddd 100644 --- a/app/Http/Controllers/ClientController.php +++ b/app/Http/Controllers/ClientController.php @@ -498,17 +498,19 @@ class ClientController extends BaseController public function bulk(BulkClientRequest $request) { - $ids = request()->input('ids'); - $clients = Client::withTrashed()->whereIn('id', $this->transformKeys($ids))->cursor(); $action = $request->action; - $clients->each(function ($client, $key) use ($action) { - if (auth()->user()->can('edit', $client)) { - $this->client_repo->{$action}($client); - } - }); + $clients = Client::withTrashed() + ->company() + ->whereIn('id', $request->ids) + ->cursor() + ->each(function ($client) use ($action) { + if (auth()->user()->can('edit', $client)) { + $this->client_repo->{$action}($client); + } + }); - return $this->listResponse(Client::withTrashed()->whereIn('id', $this->transformKeys($ids))); + return $this->listResponse(Client::withTrashed()->company()->whereIn('id', $request->ids)); } /** diff --git a/app/Http/Controllers/CompanyGatewayController.php b/app/Http/Controllers/CompanyGatewayController.php index a0239261fb..a1781a0dac 100644 --- a/app/Http/Controllers/CompanyGatewayController.php +++ b/app/Http/Controllers/CompanyGatewayController.php @@ -505,11 +505,12 @@ class CompanyGatewayController extends BaseController $company_gateways = CompanyGateway::withTrashed() ->whereIn('id',$this->transformKeys($ids)) + ->company() ->cursor() ->each(function ($company_gateway, $key) use ($action) { $this->company_repo->{$action}($company_gateway); }); - return $this->listResponse(CompanyGateway::withTrashed()->whereIn('id', $this->transformKeys($ids))); + return $this->listResponse(CompanyGateway::withTrashed()->company()->whereIn('id', $this->transformKeys($ids))); } } diff --git a/app/Http/Controllers/CompanyLedgerController.php b/app/Http/Controllers/CompanyLedgerController.php index 37bda0a5f2..ca95706c74 100644 --- a/app/Http/Controllers/CompanyLedgerController.php +++ b/app/Http/Controllers/CompanyLedgerController.php @@ -64,7 +64,7 @@ class CompanyLedgerController extends BaseController */ public function index(ShowCompanyLedgerRequest $request) { - $company_ledger = CompanyLedger::whereCompanyId(auth()->user()->company()->id)->orderBy('id', 'ASC'); + $company_ledger = CompanyLedger::where('company_id', auth()->user()->company()->id)->orderBy('id', 'ASC'); return $this->listResponse($company_ledger); } diff --git a/app/Http/Controllers/CreditController.php b/app/Http/Controllers/CreditController.php index 56ab93d571..7aa7845945 100644 --- a/app/Http/Controllers/CreditController.php +++ b/app/Http/Controllers/CreditController.php @@ -498,7 +498,6 @@ class CreditController extends BaseController public function bulk(BulkCreditRequest $request) { $action = $request->input('action'); - $ids = $request->input('ids'); if(Ninja::isHosted() && (stripos($action, 'email') !== false) && !auth()->user()->company()->account->account_sms_verified) @@ -548,7 +547,7 @@ class CreditController extends BaseController } }); - return $this->listResponse(Credit::withTrashed()->whereIn('id', $this->transformKeys($ids))); + return $this->listResponse(Credit::withTrashed()->company()->whereIn('id', $this->transformKeys($ids))); } public function action(ActionCreditRequest $request, Credit $credit, $action) diff --git a/app/Http/Controllers/DesignController.php b/app/Http/Controllers/DesignController.php index 112a646b2b..e127639e21 100644 --- a/app/Http/Controllers/DesignController.php +++ b/app/Http/Controllers/DesignController.php @@ -520,7 +520,7 @@ class DesignController extends BaseController $ids = request()->input('ids'); - $designs = Design::withTrashed()->find($this->transformKeys($ids)); + $designs = Design::withTrashed()->company()->whereIn('id', $this->transformKeys($ids)); $designs->each(function ($design, $key) use ($action) { if (auth()->user()->can('edit', $design)) { @@ -528,7 +528,7 @@ class DesignController extends BaseController } }); - return $this->listResponse(Design::withTrashed()->whereIn('id', $this->transformKeys($ids))); + return $this->listResponse(Design::withTrashed()->company()->whereIn('id', $this->transformKeys($ids))); } public function default(DefaultDesignRequest $request) diff --git a/app/Http/Requests/Client/BulkClientRequest.php b/app/Http/Requests/Client/BulkClientRequest.php index ecc11e2cbe..dab00c23a5 100644 --- a/app/Http/Requests/Client/BulkClientRequest.php +++ b/app/Http/Requests/Client/BulkClientRequest.php @@ -12,9 +12,14 @@ namespace App\Http\Requests\Client; use App\Http\Requests\Request; +use App\Models\Client; +use App\Utils\Traits\MakesHash; +use Illuminate\Validation\Rule; class BulkClientRequest extends Request { + use MakesHash; + /** * Determine if the user is authorized to make this request. * @@ -29,9 +34,19 @@ class BulkClientRequest extends Request { return [ - 'ids' => 'required|bail|array', + 'ids' => ['required','bail','array',Rule::exists('clients','id')->where('company_id', auth()->user()->company()->id)], 'action' => 'in:archive,restore,delete' ]; } + + public function prepareForValidation() + { + $input = $this->all(); + + if(isset($input['ids'])) + $input['ids'] = $this->transformKeys($input['ids']); + + $this->replace($input); + } } diff --git a/app/Models/Account.php b/app/Models/Account.php index 8aa870a9c3..134d11ded2 100644 --- a/app/Models/Account.php +++ b/app/Models/Account.php @@ -22,7 +22,7 @@ use App\Utils\Ninja; use App\Utils\Traits\MakesHash; use Carbon\Carbon; use DateTime; -use Illuminate\Database\Eloquent\ModelNotFoundException; +use Illuminate\Database\Eloquent\ModelNotFoundException as ModelNotFoundException; use Illuminate\Support\Facades\App; use Illuminate\Support\Facades\Cache; use Laracasts\Presenter\PresentableTrait; @@ -500,7 +500,8 @@ class Account extends BaseModel } return $this - ->where('id', $this->decodePrimaryKey($value))->firstOrFail(); + ->where('id', $this->decodePrimaryKey($value)) + ->firstOrFail(); } public function getTrialDays() diff --git a/app/Models/Activity.php b/app/Models/Activity.php index 9633382388..9673ecddd3 100644 --- a/app/Models/Activity.php +++ b/app/Models/Activity.php @@ -12,6 +12,7 @@ namespace App\Models; use App\Utils\Traits\MakesHash; +use Illuminate\Database\Eloquent\ModelNotFoundException as ModelNotFoundException; class Activity extends StaticModel { @@ -374,17 +375,18 @@ class Activity extends StaticModel return $this->belongsTo(Company::class); } - /** - * @return mixed - */ - public function resolveRouteBinding($value, $field = null) - { - if (is_numeric($value)) { - throw new ModelNotFoundException("Record with value {$value} not found"); - } +// /** +// * @return mixed +// */ +// public function resolveRouteBinding($value, $field = null) +// { +// if (is_numeric($value)) { +// throw new ModelNotFoundException("Record with value {$value} not found"); +// } - return $this - //->withTrashed() - ->where('id', $this->decodePrimaryKey($value))->firstOrFail(); - } -} +// return $this +// //->withTrashed() +// ->where('id', $this->decodePrimaryKey($value))->firstOrFail(); +// } + +} \ No newline at end of file diff --git a/app/Models/BaseModel.php b/app/Models/BaseModel.php index 366b717b39..0573f18648 100644 --- a/app/Models/BaseModel.php +++ b/app/Models/BaseModel.php @@ -174,6 +174,7 @@ class BaseModel extends Model return $this ->withTrashed() + ->company() ->where('id', $this->decodePrimaryKey($value))->firstOrFail(); } diff --git a/app/Models/ClientContact.php b/app/Models/ClientContact.php index 23041b0631..887607bd14 100644 --- a/app/Models/ClientContact.php +++ b/app/Models/ClientContact.php @@ -240,6 +240,7 @@ class ClientContact extends Authenticatable implements HasLocalePreference { return $this ->withTrashed() + ->company() ->where('id', $this->decodePrimaryKey($value))->firstOrFail(); } diff --git a/app/Models/ClientGatewayToken.php b/app/Models/ClientGatewayToken.php index e2654195e7..f040ab4ec0 100644 --- a/app/Models/ClientGatewayToken.php +++ b/app/Models/ClientGatewayToken.php @@ -70,16 +70,16 @@ class ClientGatewayToken extends BaseModel return $this->belongsTo(User::class)->withTrashed(); } - /** - * Retrieve the model for a bound value. - * - * @param mixed $value - * @param null $field - * @return Model|null - */ - public function resolveRouteBinding($value, $field = null) - { - return $this - ->where('id', $this->decodePrimaryKey($value))->firstOrFail(); - } + // /** + // * Retrieve the model for a bound value. + // * + // * @param mixed $value + // * @param null $field + // * @return Model|null + // */ + // public function resolveRouteBinding($value, $field = null) + // { + // return $this + // ->where('id', $this->decodePrimaryKey($value))->firstOrFail(); + // } } diff --git a/app/Models/Company.php b/app/Models/Company.php index 33f3f01046..889950bbe1 100644 --- a/app/Models/Company.php +++ b/app/Models/Company.php @@ -584,7 +584,9 @@ class Company extends BaseModel public function resolveRouteBinding($value, $field = null) { - return $this->where('id', $this->decodePrimaryKey($value))->firstOrFail(); + return $this->where('id', $this->decodePrimaryKey($value)) + ->where('account_id', auth()->user()->account_id) + ->firstOrFail(); } public function domain() diff --git a/app/Models/CompanyGateway.php b/app/Models/CompanyGateway.php index 0c72d9c4a5..88ad524689 100644 --- a/app/Models/CompanyGateway.php +++ b/app/Models/CompanyGateway.php @@ -412,12 +412,12 @@ class CompanyGateway extends BaseModel return route('payment_webhook', ['company_key' => $this->company->company_key, 'company_gateway_id' => $this->hashed_id]); } - public function resolveRouteBinding($value, $field = null) - { + // public function resolveRouteBinding($value, $field = null) + // { - return $this - ->where('id', $this->decodePrimaryKey($value))->withTrashed()->firstOrFail(); - } + // return $this + // ->where('id', $this->decodePrimaryKey($value))->withTrashed()->firstOrFail(); + // } } diff --git a/app/Models/GroupSetting.php b/app/Models/GroupSetting.php index fccae8b01c..89faa9cc41 100644 --- a/app/Models/GroupSetting.php +++ b/app/Models/GroupSetting.php @@ -65,16 +65,4 @@ class GroupSetting extends StaticModel return $this->morphMany(Document::class, 'documentable'); } - /** - * Retrieve the model for a bound value. - * - * @param mixed $value - * @param null $field - * @return Model|null - */ - public function resolveRouteBinding($value, $field = null) - { - return $this - ->where('id', $this->decodePrimaryKey($value))->firstOrFail(); - } } diff --git a/app/Models/Payment.php b/app/Models/Payment.php index 159fd2c358..cca89f79d0 100644 --- a/app/Models/Payment.php +++ b/app/Models/Payment.php @@ -292,12 +292,13 @@ class Payment extends BaseModel return new PaymentService($this); } - public function resolveRouteBinding($value, $field = null) - { - return $this - ->withTrashed() - ->where('id', $this->decodePrimaryKey($value))->firstOrFail(); - } + + // public function resolveRouteBinding($value, $field = null) + // { + // return $this + // ->withTrashed() + // ->where('id', $this->decodePrimaryKey($value))->firstOrFail(); + // } public function refund(array $data) :self { diff --git a/app/Models/StaticModel.php b/app/Models/StaticModel.php index 2cf5adc4d4..677a351936 100644 --- a/app/Models/StaticModel.php +++ b/app/Models/StaticModel.php @@ -11,10 +11,14 @@ namespace App\Models; +use App\Utils\Traits\MakesHash; use Illuminate\Database\Eloquent\Model; +use Illuminate\Database\Eloquent\ModelNotFoundException as ModelNotFoundException; class StaticModel extends Model { + use MakesHash; + protected $casts = [ 'updated_at' => 'timestamp', 'created_at' => 'timestamp', @@ -37,4 +41,24 @@ class StaticModel extends Model return $query; } + + /** + * Retrieve the model for a bound value. + * + * @param mixed $value + * @param null $field + * @return Model|null + */ + public function resolveRouteBinding($value, $field = null) + { + + if (is_numeric($value)) { + throw new ModelNotFoundException("Record with value {$value} not found"); + } + + return $this + ->withTrashed() + ->company() + ->where('id', $this->decodePrimaryKey($value))->firstOrFail(); + } } diff --git a/app/Models/SystemLog.php b/app/Models/SystemLog.php index 6d84e4b349..c4127396b4 100644 --- a/app/Models/SystemLog.php +++ b/app/Models/SystemLog.php @@ -148,7 +148,9 @@ class SystemLog extends Model } return $this - ->where('id', $this->decodePrimaryKey($value))->firstOrFail(); + ->where('id', $this->decodePrimaryKey($value)) + ->company() + ->firstOrFail(); } /* diff --git a/app/Models/User.php b/app/Models/User.php index c8ebf06922..63e94b633b 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -193,7 +193,6 @@ class User extends Authenticatable implements MustVerifyEmail return $truth->getCompany(); } elseif (request()->header('X-API-TOKEN')) { $company_token = CompanyToken::with(['company'])->where('token', request()->header('X-API-TOKEN'))->first(); - return $company_token->company; } @@ -441,7 +440,9 @@ class User extends Authenticatable implements MustVerifyEmail { return $this ->withTrashed() - ->where('id', $this->decodePrimaryKey($value))->firstOrFail(); + ->where('id', $this->decodePrimaryKey($value)) + ->where('account_id', auth()->user()->account_id) + ->firstOrFail(); } /** diff --git a/app/Models/VendorContact.php b/app/Models/VendorContact.php index 2fc72ade95..b4bcc27a51 100644 --- a/app/Models/VendorContact.php +++ b/app/Models/VendorContact.php @@ -145,7 +145,9 @@ class VendorContact extends Authenticatable implements HasLocalePreference { return $this ->withTrashed() - ->where('id', $this->decodePrimaryKey($value))->firstOrFail(); + ->company() + ->where('id', $this->decodePrimaryKey($value)) + ->firstOrFail(); } public function purchase_order_invitations(): \Illuminate\Database\Eloquent\Relations\HasMany diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php index 0a993436e4..466c5f2f8d 100644 --- a/app/Providers/RouteServiceProvider.php +++ b/app/Providers/RouteServiceProvider.php @@ -13,7 +13,7 @@ namespace App\Providers; use App\Models\Scheduler; use App\Utils\Traits\MakesHash; -use Illuminate\Database\Eloquent\ModelNotFoundException; +use Illuminate\Database\Eloquent\ModelNotFoundException as ModelNotFoundException; use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider; use Illuminate\Support\Facades\Route; @@ -30,7 +30,6 @@ class RouteServiceProvider extends ServiceProvider { parent::boot(); - Route::bind('task_scheduler', function ($value) { if (is_numeric($value)) { @@ -39,6 +38,7 @@ class RouteServiceProvider extends ServiceProvider return Scheduler::query() ->withTrashed() + ->company() ->where('id', $this->decodePrimaryKey($value))->firstOrFail(); }); diff --git a/tests/Feature/ClientApiTest.php b/tests/Feature/ClientApiTest.php index 6406414d04..8bc5fb4dc3 100644 --- a/tests/Feature/ClientApiTest.php +++ b/tests/Feature/ClientApiTest.php @@ -13,8 +13,13 @@ namespace Tests\Feature; use App\DataMapper\ClientSettings; use App\Factory\ClientFactory; +use App\Factory\CompanyUserFactory; use App\Http\Requests\Client\StoreClientRequest; +use App\Models\Account; use App\Models\Client; +use App\Models\Company; +use App\Models\CompanyToken; +use App\Models\User; use App\Repositories\ClientContactRepository; use App\Repositories\ClientRepository; use App\Utils\Number; @@ -53,6 +58,73 @@ class ClientApiTest extends TestCase } + public function testCrossCompanyBulkActionsFail() + { + + $account = Account::factory()->create([ + 'hosted_client_count' => 1000, + 'hosted_company_count' => 1000, + ]); + + $account->num_users = 3; + $account->save(); + + $company = Company::factory()->create([ + 'account_id' => $account->id, + ]); + + $user = User::factory()->create([ + 'account_id' => $account->id, + 'confirmation_code' => '123', + 'email' => $this->faker->safeEmail(), + ]); + + $cu = CompanyUserFactory::create($user->id, $company->id, $account->id); + $cu->is_owner = true; + $cu->is_admin = true; + $cu->is_locked = true; + $cu->permissions = '["view_client"]'; + $cu->save(); + + $different_company_token = \Illuminate\Support\Str::random(64); + + $company_token = new CompanyToken; + $company_token->user_id = $user->id; + $company_token->company_id = $company->id; + $company_token->account_id = $account->id; + $company_token->name = 'test token'; + $company_token->token = $different_company_token; + $company_token->is_system = true; + $company_token->save(); + + $data = [ + 'action' => 'archive', + 'ids' => [ + $this->client->id + ] + ]; + + $response = $this->withHeaders([ + 'X-API-TOKEN' => $this->token, + ])->post('/api/v1/clients/bulk', $data) + ->assertStatus(302); + + //using existing permissions, they must pass the ->edit guard() + $this->client->fresh(); + $this->assertNull($this->client->deleted_at); + + $rules = [ + 'ids' => 'required|bail|array|exists:clients,id,company_id,'.$company->id, + 'action' => 'in:archive,restore,delete' + ]; + + $v = $this->app['validator']->make($data, $rules); + + $this->assertFalse($v->passes()); + + } + + public function testClientBulkActionValidation() { $data = [ @@ -737,17 +809,24 @@ class ClientApiTest extends TestCase public function testClientArchived() { $data = [ - 'ids' => [$this->encodePrimaryKey($this->client->id)], + 'ids' => [$this->client->hashed_id], ]; - $response = $this->withHeaders([ - 'X-API-SECRET' => config('ninja.api_secret'), - 'X-API-TOKEN' => $this->token, - ])->post('/api/v1/clients/bulk?action=archive', $data); + $response = false; - $arr = $response->json(); + try{ + $response = $this->withHeaders([ + 'X-API-TOKEN' => $this->token, + ])->post('/api/v1/clients/bulk?action=archive', $data); + } catch (ValidationException $e) { + $message = json_decode($e->validator->getMessageBag(), 1); + nlog($message); + } - $this->assertNotNull($arr['data'][0]['archived_at']); + if($response){ + $arr = $response->json(); + $this->assertNotNull($arr['data'][0]['archived_at']); + } } public function testClientRestored() diff --git a/tests/Integration/EventTest.php b/tests/Integration/EventTest.php index 58bc6211c8..ccf565521f 100644 --- a/tests/Integration/EventTest.php +++ b/tests/Integration/EventTest.php @@ -639,7 +639,6 @@ class EventTest extends TestCase ])->postJson('/api/v1/clients/', $data) ->assertStatus(200); - $arr = $response->json(); $data = [ @@ -653,7 +652,6 @@ class EventTest extends TestCase ])->putJson('/api/v1/clients/' . $arr['data']['id'], $data) ->assertStatus(200); - $data = [ 'ids' => [$arr['data']['id']], ]; diff --git a/tests/MockAccountData.php b/tests/MockAccountData.php index 218f415ba5..8c3160c95b 100644 --- a/tests/MockAccountData.php +++ b/tests/MockAccountData.php @@ -57,6 +57,7 @@ use App\Models\Vendor; use App\Models\VendorContact; use App\Utils\Traits\GeneratesCounter; use App\Utils\Traits\MakesHash; +use App\Utils\TruthSource; use Illuminate\Foundation\Testing\WithoutEvents; use Illuminate\Support\Carbon; use Illuminate\Support\Facades\Cache; @@ -276,6 +277,7 @@ trait MockAccountData $this->user = $user; // auth()->login($user); + // auth()->user()->setCompany($this->company); CreateCompanyTaskStatuses::dispatchSync($this->company, $this->user); @@ -297,6 +299,11 @@ trait MockAccountData $company_token->save(); + $truth = app()->make(TruthSource::class); + $truth->setCompanyUser($company_token->first()); + $truth->setUser($this->user); + $truth->setCompany($this->company); + //todo create one token with token name TOKEN - use firstOrCreate Product::factory()->create([ From 3438d19a107de8aab182dfccb2c66088fdf167ae Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sun, 22 Jan 2023 16:40:02 +1100 Subject: [PATCH 13/17] Improve bulk route auth layer --- .../Controllers/CompanyGatewayController.php | 6 ++---- app/Http/Controllers/CreditController.php | 7 +++++-- .../BulkCompanyGatewayRequest.php | 19 +++++++++++++----- .../Requests/Credit/BulkCreditRequest.php | 20 ++++++++++++++++--- 4 files changed, 38 insertions(+), 14 deletions(-) diff --git a/app/Http/Controllers/CompanyGatewayController.php b/app/Http/Controllers/CompanyGatewayController.php index a1781a0dac..9ceef3e4fb 100644 --- a/app/Http/Controllers/CompanyGatewayController.php +++ b/app/Http/Controllers/CompanyGatewayController.php @@ -501,16 +501,14 @@ class CompanyGatewayController extends BaseController { $action = $request->input('action'); - $ids = $request->input('ids'); - $company_gateways = CompanyGateway::withTrashed() - ->whereIn('id',$this->transformKeys($ids)) + ->whereIn('id', $request->ids) ->company() ->cursor() ->each(function ($company_gateway, $key) use ($action) { $this->company_repo->{$action}($company_gateway); }); - return $this->listResponse(CompanyGateway::withTrashed()->company()->whereIn('id', $this->transformKeys($ids))); + return $this->listResponse(CompanyGateway::withTrashed()->company()->whereIn('id', $request->ids)); } } diff --git a/app/Http/Controllers/CreditController.php b/app/Http/Controllers/CreditController.php index 7aa7845945..5a297a0174 100644 --- a/app/Http/Controllers/CreditController.php +++ b/app/Http/Controllers/CreditController.php @@ -503,7 +503,10 @@ class CreditController extends BaseController if(Ninja::isHosted() && (stripos($action, 'email') !== false) && !auth()->user()->company()->account->account_sms_verified) return response(['message' => 'Please verify your account to send emails.'], 400); - $credits = Credit::withTrashed()->whereIn('id', $this->transformKeys($ids))->company()->get(); + $credits = Credit::withTrashed() + ->whereIn('id', $request->ids) + ->company() + ->get(); if (! $credits) { return response()->json(['message' => ctrans('texts.no_credits_found')]); @@ -547,7 +550,7 @@ class CreditController extends BaseController } }); - return $this->listResponse(Credit::withTrashed()->company()->whereIn('id', $this->transformKeys($ids))); + return $this->listResponse(Credit::withTrashed()->company()->whereIn('id', $request->ids)); } public function action(ActionCreditRequest $request, Credit $credit, $action) diff --git a/app/Http/Requests/CompanyGateway/BulkCompanyGatewayRequest.php b/app/Http/Requests/CompanyGateway/BulkCompanyGatewayRequest.php index cdfed1325c..f22eeaa8ce 100644 --- a/app/Http/Requests/CompanyGateway/BulkCompanyGatewayRequest.php +++ b/app/Http/Requests/CompanyGateway/BulkCompanyGatewayRequest.php @@ -12,14 +12,12 @@ namespace App\Http\Requests\CompanyGateway; use App\Http\Requests\Request; -use App\Http\ValidationRules\ValidCompanyGatewayFeesAndLimitsRule; -use App\Models\Gateway; -use App\Utils\Traits\CompanyGatewayFeesAndLimitsSaver; +use App\Utils\Traits\MakesHash; use Illuminate\Validation\Rule; class BulkCompanyGatewayRequest extends Request - { + use MakesHash; /** * Determine if the user is authorized to make this request. @@ -35,11 +33,22 @@ class BulkCompanyGatewayRequest extends Request { return [ - 'ids' => 'required|bail|array', + 'ids' => ['required','bail','array',Rule::exists('company_gateways','id')->where('company_id', auth()->user()->company()->id)], 'action' => 'required|bail|in:archive,restore,delete' ]; } + public function prepareForValidation() + { + $input = $this->all(); + + if(isset($input['ids'])) + $input['ids'] = $this->transformKeys($input['ids']); + + $this->replace($input); + } + + } diff --git a/app/Http/Requests/Credit/BulkCreditRequest.php b/app/Http/Requests/Credit/BulkCreditRequest.php index ee74d180d4..b1f07dbb25 100644 --- a/app/Http/Requests/Credit/BulkCreditRequest.php +++ b/app/Http/Requests/Credit/BulkCreditRequest.php @@ -11,10 +11,13 @@ namespace App\Http\Requests\Credit; +use App\Utils\Traits\MakesHash; use Illuminate\Foundation\Http\FormRequest; +use Illuminate\Validation\Rule; class BulkCreditRequest extends FormRequest { + use MakesHash; /** * Determine if the user is authorized to make this request. * @@ -33,8 +36,19 @@ class BulkCreditRequest extends FormRequest public function rules() { return [ - 'ids' => 'required|bail|array', - 'action' => 'required|bail|in:archive,restore,delete,email,bulk_download,bulk_print,mark_paid,clone_to_credit,history,mark_sent,download,send_email' - ]; + 'ids' => ['required','bail','array',Rule::exists('credits','id')->where('company_id', auth()->user()->company()->id)], + 'action' => 'required|bail|in:archive,restore,delete,email,bulk_download,bulk_print,mark_paid,clone_to_credit,history,mark_sent,download,send_email' + ]; } + + public function prepareForValidation() + { + $input = $this->all(); + + if(isset($input['ids'])) + $input['ids'] = $this->transformKeys($input['ids']); + + $this->replace($input); + } + } From 35726575c8488d65d5683f7d3abf291a609e83ed Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sun, 22 Jan 2023 16:49:39 +1100 Subject: [PATCH 14/17] Clean up for credit controller --- app/Http/Controllers/CreditController.php | 1 - app/Utils/HtmlEngine.php | 1 - 2 files changed, 2 deletions(-) diff --git a/app/Http/Controllers/CreditController.php b/app/Http/Controllers/CreditController.php index 5a297a0174..311c716d5f 100644 --- a/app/Http/Controllers/CreditController.php +++ b/app/Http/Controllers/CreditController.php @@ -498,7 +498,6 @@ class CreditController extends BaseController public function bulk(BulkCreditRequest $request) { $action = $request->input('action'); - $ids = $request->input('ids'); if(Ninja::isHosted() && (stripos($action, 'email') !== false) && !auth()->user()->company()->account->account_sms_verified) return response(['message' => 'Please verify your account to send emails.'], 400); diff --git a/app/Utils/HtmlEngine.php b/app/Utils/HtmlEngine.php index d85c5b5324..d2cafb536c 100644 --- a/app/Utils/HtmlEngine.php +++ b/app/Utils/HtmlEngine.php @@ -132,7 +132,6 @@ class HtmlEngine $data['$dueDate'] = &$data['$due_date']; - $data['$payment_due'] = ['value' => $this->translateDate($this->entity->due_date, $this->client->date_format(), $this->client->locale()) ?: ' ', 'label' => ctrans('texts.payment_due')]; $data['$invoice.due_date'] = &$data['$due_date']; $data['$invoice.number'] = ['value' => $this->entity->number ?: ' ', 'label' => ctrans('texts.invoice_number')]; From 3e61408ba56e547531fb84858b09386d5170df0e Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sun, 22 Jan 2023 17:46:56 +1100 Subject: [PATCH 15/17] Fixes for observers --- VERSION.txt | 2 +- app/Observers/ClientContactObserver.php | 6 +++--- app/Observers/VendorContactObserver.php | 2 +- app/Services/Email/EmailDefaults.php | 8 +++++++- app/Services/Email/EmailMailer.php | 16 ++++------------ config/ninja.php | 4 ++-- 6 files changed, 18 insertions(+), 20 deletions(-) diff --git a/VERSION.txt b/VERSION.txt index 989c3a1b34..e17a8ff63c 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -5.5.58 \ No newline at end of file +5.5.59 \ No newline at end of file diff --git a/app/Observers/ClientContactObserver.php b/app/Observers/ClientContactObserver.php index 2e98506958..54c49fff1d 100644 --- a/app/Observers/ClientContactObserver.php +++ b/app/Observers/ClientContactObserver.php @@ -57,7 +57,7 @@ class ClientContactObserver //ensure entity state is preserved - InvoiceInvitation::withTrashed()->where('client_contact_id', 1)->cursor()->each(function ($invite){ + InvoiceInvitation::withTrashed()->where('client_contact_id', $client_contact_id)->cursor()->each(function ($invite){ if($invite->invoice()->doesnthave('invitations')) $invite->invoice->service()->createInvitations(); @@ -65,14 +65,14 @@ class ClientContactObserver }); - QuoteInvitation::withTrashed()->where('client_contact_id', 1)->cursor()->each(function ($invite){ + QuoteInvitation::withTrashed()->where('client_contact_id', $client_contact_id)->cursor()->each(function ($invite){ if($invite->invoice()->doesnthave('invitations')) $invite->quote->service()->createInvitations(); }); - RecurringInvoiceInvitation::withTrashed()->where('client_contact_id', 1)->cursor()->each(function ($invite){ + RecurringInvoiceInvitation::withTrashed()->where('client_contact_id', $client_contact_id)->cursor()->each(function ($invite){ if($invite->recurring_invoice()->doesnthave('invitations')) $invite->quote->service()->createInvitations(); diff --git a/app/Observers/VendorContactObserver.php b/app/Observers/VendorContactObserver.php index 41e9833fa6..13061f3fcb 100644 --- a/app/Observers/VendorContactObserver.php +++ b/app/Observers/VendorContactObserver.php @@ -51,7 +51,7 @@ class VendorContactObserver $vendorContact->purchase_order_invitations()->delete(); - PurchaseOrderInvitation::withTrashed()->where('vendor_contact_id', 1)->cursor()->each(function ($invite){ + PurchaseOrderInvitation::withTrashed()->where('vendor_contact_id', $vendor_contact_id)->cursor()->each(function ($invite){ if($invite->purchase_order()->doesnthave('invitations')) $invite->purchase_order->service()->createInvitations(); diff --git a/app/Services/Email/EmailDefaults.php b/app/Services/Email/EmailDefaults.php index 3648a63dd3..5080336008 100644 --- a/app/Services/Email/EmailDefaults.php +++ b/app/Services/Email/EmailDefaults.php @@ -135,7 +135,13 @@ class EmailDefaults * Sets the FROM address */ private function setFrom(): self - { + { + + if(Ninja::isHosted() && $this->email_object->settings->email_sending_method == 'default'){ + $this->email_object->from = new Address(config('mail.from.address'), $this->email_service->company->owner()->name()); + return $this; + } + if($this->email_object->from) return $this; diff --git a/app/Services/Email/EmailMailer.php b/app/Services/Email/EmailMailer.php index a5be905327..cf6d4a7504 100644 --- a/app/Services/Email/EmailMailer.php +++ b/app/Services/Email/EmailMailer.php @@ -13,36 +13,28 @@ namespace App\Services\Email; use App\DataMapper\Analytics\EmailFailure; use App\DataMapper\Analytics\EmailSuccess; -use App\DataMapper\EmailTemplateDefaults; use App\Events\Invoice\InvoiceWasEmailedAndFailed; use App\Events\Payment\PaymentWasEmailedAndFailed; use App\Jobs\Util\SystemLogger; use App\Libraries\Google\Google; use App\Libraries\MultiDB; -use App\Models\Account; use App\Models\ClientContact; -use App\Models\Company; use App\Models\InvoiceInvitation; use App\Models\Payment; use App\Models\SystemLog; use App\Models\User; -use App\Services\Email\EmailObject; use App\Utils\Ninja; use App\Utils\Traits\MakesHash; use GuzzleHttp\Exception\ClientException; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Foundation\Bus\Dispatchable; -use Illuminate\Mail\Attachment; use Illuminate\Mail\Mailable; -use Illuminate\Mail\Mailables\Address; -use Illuminate\Mail\Mailer; use Illuminate\Queue\InteractsWithQueue; use Illuminate\Queue\SerializesModels; use Illuminate\Support\Facades\App; use Illuminate\Support\Facades\Cache; use Illuminate\Support\Facades\Mail; -use League\CommonMark\CommonMarkConverter; use Turbo124\Beacon\Facades\LightLogs; class EmailMailer implements ShouldQueue @@ -311,7 +303,7 @@ class EmailMailer implements ShouldQueue $user = $this->resolveSendingUser(); - $this->mailable + $this->email_mailable ->from($user->email, $user->name()); } @@ -331,7 +323,7 @@ class EmailMailer implements ShouldQueue $user = $this->resolveSendingUser(); - $this->mailable + $this->email_mailable ->from($user->email, $user->name()); } @@ -362,7 +354,7 @@ class EmailMailer implements ShouldQueue } - $this->mailable + $this->email_mailable ->from($user->email, $user->name()) ->withSymfonyMessage(function ($message) use($token) { $message->getHeaders()->addTextHeader('gmailtoken', $token); @@ -427,7 +419,7 @@ class EmailMailer implements ShouldQueue return $this->setMailDriver(); } - $this->mailable + $this->email_mailable ->from($user->email, $user->name()) ->withSymfonyMessage(function ($message) use($token) { $message->getHeaders()->addTextHeader('gmailtoken', $token); diff --git a/config/ninja.php b/config/ninja.php index 26966fd9ae..cd0e594e5c 100644 --- a/config/ninja.php +++ b/config/ninja.php @@ -14,8 +14,8 @@ return [ 'require_https' => env('REQUIRE_HTTPS', true), 'app_url' => rtrim(env('APP_URL', ''), '/'), 'app_domain' => env('APP_DOMAIN', 'invoicing.co'), - 'app_version' => '5.5.58', - 'app_tag' => '5.5.58', + 'app_version' => '5.5.59', + 'app_tag' => '5.5.59', 'minimum_client_version' => '5.0.16', 'terms_version' => '1.0.1', 'api_secret' => env('API_SECRET', ''), From c52a3dd8713739dd8acc79ee9307785735c7f02f Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sun, 22 Jan 2023 17:52:12 +1100 Subject: [PATCH 16/17] Send inventory notifications as a dispatched job --- app/Jobs/Inventory/AdjustProductInventory.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Jobs/Inventory/AdjustProductInventory.php b/app/Jobs/Inventory/AdjustProductInventory.php index 79b7963988..4673367b4b 100644 --- a/app/Jobs/Inventory/AdjustProductInventory.php +++ b/app/Jobs/Inventory/AdjustProductInventory.php @@ -154,7 +154,7 @@ class AdjustProductInventory implements ShouldQueue // { // $nmo->to_user = $cu->user; - // (new NinjaMailerJob($nmo))->handle(); + // NinjaMailerJob::dispatch($nmo); // } @@ -162,7 +162,7 @@ class AdjustProductInventory implements ShouldQueue $nmo->to_user = $this->company->owner(); - (new NinjaMailerJob($nmo))->handle(); + NinjaMailerJob::dispatch($nmo); } } From cb620f09ed8a934142f51e595cf8ae6dd087a0a8 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sun, 22 Jan 2023 18:25:04 +1100 Subject: [PATCH 17/17] Fixes for sending payment email on Mark Paid --- app/Services/Invoice/MarkPaid.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/Services/Invoice/MarkPaid.php b/app/Services/Invoice/MarkPaid.php index dedd6f1720..02af5d2e9f 100644 --- a/app/Services/Invoice/MarkPaid.php +++ b/app/Services/Invoice/MarkPaid.php @@ -91,16 +91,16 @@ class MarkPaid extends AbstractService $payment->service()->applyNumber()->save(); - if($payment->company->getSetting('send_email_on_mark_paid')) - $payment->service()->sendEmail(); - - $this->setExchangeRate($payment); - /* Create a payment relationship to the invoice entity */ $payment->invoices()->attach($this->invoice->id, [ 'amount' => $this->payable_balance, ]); + if($payment->company->getSetting('send_email_on_mark_paid')) + $payment->service()->sendEmail(); + + $this->setExchangeRate($payment); + event('eloquent.created: App\Models\Payment', $payment); $this->invoice->next_send_date = null;