1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00
invoiceninja/routes/api.php

381 lines
26 KiB
PHP
Raw Normal View History

2018-10-04 19:10:43 +02:00
<?php
/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/
2022-07-15 14:59:25 +02:00
use App\Http\Controllers\AccountController;
use App\Http\Controllers\ActivityController;
use App\Http\Controllers\Auth\ForgotPasswordController;
use App\Http\Controllers\Auth\LoginController;
2023-02-16 02:36:09 +01:00
use App\Http\Controllers\Bank\YodleeController;
2022-08-05 11:05:59 +02:00
use App\Http\Controllers\BankIntegrationController;
2022-08-11 09:13:40 +02:00
use App\Http\Controllers\BankTransactionController;
2022-11-13 05:21:37 +01:00
use App\Http\Controllers\BankTransactionRuleController;
2022-07-15 14:59:25 +02:00
use App\Http\Controllers\BaseController;
use App\Http\Controllers\ChartController;
use App\Http\Controllers\ClientController;
use App\Http\Controllers\ClientGatewayTokenController;
use App\Http\Controllers\ClientStatementController;
use App\Http\Controllers\CompanyController;
use App\Http\Controllers\CompanyGatewayController;
use App\Http\Controllers\CompanyLedgerController;
use App\Http\Controllers\CompanyUserController;
use App\Http\Controllers\ConnectedAccountController;
use App\Http\Controllers\CreditController;
use App\Http\Controllers\DesignController;
use App\Http\Controllers\DocumentController;
use App\Http\Controllers\EmailController;
use App\Http\Controllers\ExpenseCategoryController;
use App\Http\Controllers\ExpenseController;
2022-07-17 13:14:25 +02:00
use App\Http\Controllers\ExportController;
2022-07-15 14:59:25 +02:00
use App\Http\Controllers\FilterController;
use App\Http\Controllers\GroupSettingController;
2022-07-17 12:56:17 +02:00
use App\Http\Controllers\HostedMigrationController;
2022-07-15 14:59:25 +02:00
use App\Http\Controllers\ImportController;
use App\Http\Controllers\ImportJsonController;
2022-07-17 12:56:17 +02:00
use App\Http\Controllers\InAppPurchase\AppleController;
2022-07-15 14:59:25 +02:00
use App\Http\Controllers\InvoiceController;
use App\Http\Controllers\LicenseController;
use App\Http\Controllers\LogoutController;
use App\Http\Controllers\MigrationController;
use App\Http\Controllers\OneTimeTokenController;
use App\Http\Controllers\PaymentController;
2022-07-17 12:56:17 +02:00
use App\Http\Controllers\PaymentNotificationWebhookController;
2022-07-15 14:59:25 +02:00
use App\Http\Controllers\PaymentTermController;
2022-07-17 12:56:17 +02:00
use App\Http\Controllers\PaymentWebhookController;
2022-07-15 14:59:25 +02:00
use App\Http\Controllers\PingController;
2022-07-17 12:56:17 +02:00
use App\Http\Controllers\PostMarkController;
2022-07-15 14:59:25 +02:00
use App\Http\Controllers\PreviewController;
use App\Http\Controllers\PreviewPurchaseOrderController;
use App\Http\Controllers\ProductController;
use App\Http\Controllers\ProjectController;
use App\Http\Controllers\PurchaseOrderController;
use App\Http\Controllers\QuoteController;
use App\Http\Controllers\RecurringExpenseController;
use App\Http\Controllers\RecurringInvoiceController;
use App\Http\Controllers\RecurringQuoteController;
use App\Http\Controllers\Reports\ClientContactReportController;
use App\Http\Controllers\Reports\ClientReportController;
use App\Http\Controllers\Reports\CreditReportController;
use App\Http\Controllers\Reports\DocumentReportController;
use App\Http\Controllers\Reports\ExpenseReportController;
use App\Http\Controllers\Reports\InvoiceItemReportController;
use App\Http\Controllers\Reports\InvoiceReportController;
use App\Http\Controllers\Reports\PaymentReportController;
use App\Http\Controllers\Reports\ProductReportController;
2023-01-03 15:30:50 +01:00
use App\Http\Controllers\Reports\ProductSalesReportController;
2022-07-15 14:59:25 +02:00
use App\Http\Controllers\Reports\ProfitAndLossController;
use App\Http\Controllers\Reports\QuoteItemReportController;
use App\Http\Controllers\Reports\QuoteReportController;
use App\Http\Controllers\Reports\RecurringInvoiceReportController;
use App\Http\Controllers\Reports\TaskReportController;
use App\Http\Controllers\SchedulerController;
use App\Http\Controllers\SelfUpdateController;
2022-07-17 12:56:17 +02:00
use App\Http\Controllers\StaticController;
2022-07-18 00:21:17 +02:00
use App\Http\Controllers\StripeController;
2022-07-15 14:59:25 +02:00
use App\Http\Controllers\SubdomainController;
use App\Http\Controllers\SubscriptionController;
use App\Http\Controllers\Support\Messages\SendingController;
use App\Http\Controllers\SystemLogController;
use App\Http\Controllers\TaskController;
use App\Http\Controllers\TaskSchedulerController;
use App\Http\Controllers\TaskStatusController;
use App\Http\Controllers\TaxRateController;
use App\Http\Controllers\TemplateController;
use App\Http\Controllers\TokenController;
2022-07-27 03:21:12 +02:00
use App\Http\Controllers\TwilioController;
2022-07-15 14:59:25 +02:00
use App\Http\Controllers\TwoFactorController;
use App\Http\Controllers\UserController;
use App\Http\Controllers\VendorController;
2022-07-17 12:56:17 +02:00
use App\Http\Controllers\WebCronController;
2022-07-15 14:59:25 +02:00
use App\Http\Controllers\WebhookController;
use Illuminate\Support\Facades\Route;
Route::group(['middleware' => ['throttle:api', 'api_secret_check']], function () {
2022-07-15 14:59:25 +02:00
Route::post('api/v1/signup', [AccountController::class, 'store'])->name('signup.submit');
Route::post('api/v1/oauth_login', [LoginController::class, 'oauthApiLogin']);
});
2019-03-27 05:50:13 +01:00
Route::group(['middleware' => ['throttle:login','api_secret_check','email_db']], function () {
2023-03-09 13:29:44 +01:00
Route::post('api/v1/login', [LoginController::class, 'apiLogin'])->name('login.submit');
2022-07-15 14:59:25 +02:00
Route::post('api/v1/reset_password', [ForgotPasswordController::class, 'sendResetLinkEmail']);
});
2019-03-27 05:50:13 +01:00
Route::group(['middleware' => ['throttle:api', 'api_db', 'token_auth', 'locale'], 'prefix' => 'api/v1', 'as' => 'api.'], function () {
2022-07-15 14:59:25 +02:00
Route::put('accounts/{account}', [AccountController::class, 'update'])->name('account.update');
2022-08-05 11:05:59 +02:00
Route::resource('bank_integrations', BankIntegrationController::class); // name = (clients. index / create / show / update / destroy / edit
Route::post('bank_integrations/refresh_accounts', [BankIntegrationController::class, 'refreshAccounts'])->name('bank_integrations.refresh_accounts')->middleware('throttle:30,1');
2022-08-11 06:19:35 +02:00
Route::post('bank_integrations/remove_account/{acc_id}', [BankIntegrationController::class, 'removeAccount'])->name('bank_integrations.remove_account');
2022-09-15 05:49:57 +02:00
Route::post('bank_integrations/get_transactions/{acc_id}', [BankIntegrationController::class, 'getTransactions'])->name('bank_integrations.transactions')->middleware('throttle:1,1');
2022-08-12 05:41:55 +02:00
2022-08-11 09:05:33 +02:00
Route::post('bank_integrations/bulk', [BankIntegrationController::class, 'bulk'])->name('bank_integrations.bulk');
2022-08-11 06:19:35 +02:00
2022-08-11 09:13:40 +02:00
Route::resource('bank_transactions', BankTransactionController::class); // name = (clients. index / create / show / update / destroy / edit
Route::post('bank_transactions/bulk', [BankTransactionController::class, 'bulk'])->name('bank_transactions.bulk');
2022-09-15 05:58:42 +02:00
Route::post('bank_transactions/match', [BankTransactionController::class, 'match'])->name('bank_transactions.match');
2022-08-11 09:13:40 +02:00
2022-11-13 05:21:37 +01:00
Route::resource('bank_transaction_rules', BankTransactionRuleController::class); // name = (clients. index / create / show / update / destroy / edit
Route::post('bank_transaction_rules/bulk', [BankTransactionRuleController::class, 'bulk'])->name('bank_transaction_rules.bulk');
2022-07-15 14:59:25 +02:00
Route::post('check_subdomain', [SubdomainController::class, 'index'])->name('check_subdomain');
Route::get('ping', [PingController::class, 'index'])->name('ping');
Route::get('health_check', [PingController::class, 'health'])->name('health_check');
2020-07-30 02:30:49 +02:00
2022-07-15 14:59:25 +02:00
Route::get('activities', [ActivityController::class, 'index']);
Route::get('activities/download_entity/{activity}', [ActivityController::class, 'downloadHistoricalEntity']);
2019-03-27 05:50:13 +01:00
2022-01-21 02:00:32 +01:00
2022-07-15 14:59:25 +02:00
Route::post('charts/totals', [ChartController::class, 'totals'])->name('chart.totals');
Route::post('charts/chart_summary', [ChartController::class, 'chart_summary'])->name('chart.chart_summary');
2022-01-21 02:00:32 +01:00
2022-07-15 14:59:25 +02:00
Route::post('claim_license', [LicenseController::class, 'index'])->name('license.index');
2022-07-15 14:59:25 +02:00
Route::resource('clients', ClientController::class); // name = (clients. index / create / show / update / destroy / edit
Route::put('clients/{client}/upload', [ClientController::class, 'upload'])->name('clients.upload');
Route::post('clients/{client}/purge', [ClientController::class, 'purge'])->name('clients.purge')->middleware('password_protected');
Route::post('clients/{client}/{mergeable_client}/merge', [ClientController::class, 'merge'])->name('clients.merge')->middleware('password_protected');
Route::post('clients/bulk', [ClientController::class, 'bulk'])->name('clients.bulk');
2019-03-27 05:50:13 +01:00
2022-07-15 14:59:25 +02:00
Route::post('filters/{entity}', [FilterController::class, 'index'])->name('filters');
2021-11-20 01:34:43 +01:00
2022-07-15 14:59:25 +02:00
Route::resource('client_gateway_tokens', ClientGatewayTokenController::class);
2022-05-19 00:34:09 +02:00
2022-07-15 14:59:25 +02:00
Route::post('connected_account', [ConnectedAccountController::class, 'index']);
Route::post('connected_account/gmail', [ConnectedAccountController::class, 'handleGmailOauth']);
2021-02-21 22:27:00 +01:00
2022-07-15 14:59:25 +02:00
Route::post('client_statement', [ClientStatementController::class, 'statement'])->name('client.statement');
2019-03-27 10:38:28 +01:00
2022-07-15 14:59:25 +02:00
Route::post('companies/purge/{company}', [MigrationController::class, 'purgeCompany'])->middleware('password_protected');
Route::post('companies/purge_save_settings/{company}', [MigrationController::class, 'purgeCompanySaveSettings'])->middleware('password_protected');
2022-05-19 00:34:09 +02:00
2022-07-15 14:59:25 +02:00
Route::resource('companies', CompanyController::class); // name = (companies. index / create / show / update / destroy / edit
2022-05-19 00:34:09 +02:00
2022-07-15 14:59:25 +02:00
Route::put('companies/{company}/upload', [CompanyController::class, 'upload']);
Route::post('companies/{company}/default', [CompanyController::class, 'default']);
2020-11-04 02:27:07 +01:00
2022-07-15 14:59:25 +02:00
Route::get('company_ledger', [CompanyLedgerController::class, 'index'])->name('company_ledger.index');
2019-03-27 05:50:13 +01:00
2022-07-15 14:59:25 +02:00
Route::resource('company_gateways', CompanyGatewayController::class);
Route::post('company_gateways/bulk', [CompanyGatewayController::class, 'bulk'])->name('company_gateways.bulk');
2022-07-15 14:59:25 +02:00
Route::put('company_users/{user}', [CompanyUserController::class, 'update']);
2022-07-15 14:59:25 +02:00
Route::resource('credits', CreditController::class); // name = (credits. index / create / show / update / destroy / edit
Route::put('credits/{credit}/upload', [CreditController::class, 'upload'])->name('credits.upload');
Route::get('credits/{credit}/{action}', [CreditController::class, 'action'])->name('credits.action');
Route::post('credits/bulk', [CreditController::class, 'bulk'])->name('credits.bulk');
2023-02-01 09:54:30 +01:00
Route::get('credit/{invitation_key}/download', [CreditController::class, 'downloadPdf'])->name('credits.downloadPdf');
2019-04-03 02:09:22 +02:00
2022-07-15 14:59:25 +02:00
Route::resource('designs', DesignController::class); // name = (payments. index / create / show / update / destroy / edit
Route::post('designs/bulk', [DesignController::class, 'bulk'])->name('designs.bulk');
Route::post('designs/set/default', [DesignController::class, 'default'])->name('designs.default');
2019-05-05 02:49:01 +02:00
2022-07-15 14:59:25 +02:00
Route::resource('documents', DocumentController::class); // name = (documents. index / create / show / update / destroy / edit
Route::get('documents/{document}/download', [DocumentController::class, 'download'])->name('documents.download');
Route::post('documents/bulk', [DocumentController::class, 'bulk'])->name('documents.bulk');
2022-07-15 14:59:25 +02:00
Route::post('emails', [EmailController::class, 'send'])->name('email.send')->middleware('user_verified');
2022-07-15 14:59:25 +02:00
Route::resource('expenses', ExpenseController::class); // name = (expenses. index / create / show / update / destroy / edit
Route::put('expenses/{expense}/upload', [ExpenseController::class, 'upload']);
Route::post('expenses/bulk', [ExpenseController::class, 'bulk'])->name('expenses.bulk');
2022-12-01 23:45:38 +01:00
Route::post('export', [ExportController::class, 'index'])->name('export.index');
2021-05-13 08:01:12 +02:00
2022-07-15 14:59:25 +02:00
Route::resource('expense_categories', ExpenseCategoryController::class); // name = (expense_categories. index / create / show / update / destroy / edit
Route::post('expense_categories/bulk', [ExpenseCategoryController::class, 'bulk'])->name('expense_categories.bulk');
2020-10-13 06:08:56 +02:00
2022-07-15 14:59:25 +02:00
Route::resource('group_settings', GroupSettingController::class);
Route::post('group_settings/bulk', [GroupSettingController::class, 'bulk']);
Route::put('group_settings/{group_setting}/upload', [GroupSettingController::class, 'upload'])->name('group_settings.upload');
2022-07-15 14:59:25 +02:00
Route::post('import', [ImportController::class, 'import'])->name('import.import');
2022-12-01 23:45:38 +01:00
Route::post('import_json', [ImportJsonController::class, 'import'])->name('import.import_json');
2022-07-15 14:59:25 +02:00
Route::post('preimport', [ImportController::class, 'preimport'])->name('import.preimport');
2020-06-23 13:05:41 +02:00
2022-07-15 14:59:25 +02:00
Route::resource('invoices', InvoiceController::class); // name = (invoices. index / create / show / update / destroy / edit
Route::get('invoices/{invoice}/delivery_note', [InvoiceController::class, 'deliveryNote'])->name('invoices.delivery_note');
Route::get('invoices/{invoice}/{action}', [InvoiceController::class, 'action'])->name('invoices.action');
Route::put('invoices/{invoice}/upload', [InvoiceController::class, 'upload'])->name('invoices.upload');
Route::get('invoice/{invitation_key}/download', [InvoiceController::class, 'downloadPdf'])->name('invoices.downloadPdf');
Route::post('invoices/bulk', [InvoiceController::class, 'bulk'])->name('invoices.bulk');
Route::post('invoices/update_reminders', [InvoiceController::class, 'update_reminders'])->name('invoices.update_reminders');
2022-05-17 13:03:07 +02:00
2022-07-15 14:59:25 +02:00
Route::post('logout', [LogoutController::class, 'index'])->name('logout');
2022-07-15 14:59:25 +02:00
Route::post('migrate', [MigrationController::class, 'index'])->name('migrate.start');
2022-07-15 14:59:25 +02:00
Route::post('migration/purge/{company}', [MigrationController::class, 'purgeCompany'])->middleware('password_protected');
Route::post('migration/purge_save_settings/{company}', [MigrationController::class, 'purgeCompanySaveSettings'])->middleware('password_protected');
Route::post('migration/start', [MigrationController::class, 'startMigration']);
2022-07-15 14:59:25 +02:00
Route::post('one_time_token', [OneTimeTokenController::class, 'create']);
2021-03-02 08:52:25 +01:00
2022-07-15 14:59:25 +02:00
Route::resource('payments', PaymentController::class); // name = (payments. index / create / show / update / destroy / edit
Route::post('payments/refund', [PaymentController::class, 'refund'])->name('payments.refund');
Route::post('payments/bulk', [PaymentController::class, 'bulk'])->name('payments.bulk');
Route::put('payments/{payment}/upload', [PaymentController::class, 'upload']);
2022-07-15 14:59:25 +02:00
Route::resource('payment_terms', PaymentTermController::class); // name = (payments. index / create / show / update / destroy / edit
Route::post('payment_terms/bulk', [PaymentTermController::class, 'bulk'])->name('payment_terms.bulk');
2022-07-15 14:59:25 +02:00
Route::post('preview', [PreviewController::class, 'show'])->name('preview.show');
Route::post('live_preview', [PreviewController::class, 'live'])->name('preview.live');
2023-01-27 11:38:59 +01:00
Route::post('live_design', [PreviewController::class, 'design'])->name('preview.design');
2019-06-12 06:22:05 +02:00
2022-07-15 14:59:25 +02:00
Route::post('preview/purchase_order', [PreviewPurchaseOrderController::class, 'show'])->name('preview_purchase_order.show');
Route::post('live_preview/purchase_order', [PreviewPurchaseOrderController::class, 'live'])->name('preview_purchase_order.live');
2022-06-29 03:37:40 +02:00
2022-07-15 14:59:25 +02:00
Route::resource('products', ProductController::class); // name = (products. index / create / show / update / destroy / edit
Route::post('products/bulk', [ProductController::class, 'bulk'])->name('products.bulk');
Route::put('products/{product}/upload', [ProductController::class, 'upload']);
2022-07-15 14:59:25 +02:00
Route::resource('projects', ProjectController::class); // name = (projects. index / create / show / update / destroy / edit
Route::post('projects/bulk', [ProjectController::class, 'bulk'])->name('projects.bulk');
Route::put('projects/{project}/upload', [ProjectController::class, 'upload'])->name('projects.upload');
2021-03-08 15:17:40 +01:00
2023-02-01 10:00:55 +01:00
Route::resource('purchase_orders', PurchaseOrderController::class);
Route::post('purchase_orders/bulk', [PurchaseOrderController::class, 'bulk'])->name('purchase_orders.bulk');
Route::put('purchase_orders/{purchase_order}/upload', [PurchaseOrderController::class, 'upload']);
Route::get('purchase_orders/{purchase_order}/{action}', [PurchaseOrderController::class, 'action'])->name('purchase_orders.action');
Route::get('purchase_order/{invitation_key}/download', [PurchaseOrderController::class, 'downloadPdf'])->name('purchase_orders.downloadPdf');
2022-07-15 14:59:25 +02:00
Route::resource('quotes', QuoteController::class); // name = (quotes. index / create / show / update / destroy / edit
Route::get('quotes/{quote}/{action}', [QuoteController::class, 'action'])->name('quotes.action');
Route::post('quotes/bulk', [QuoteController::class, 'bulk'])->name('quotes.bulk');
Route::put('quotes/{quote}/upload', [QuoteController::class, 'upload']);
2023-02-01 09:52:38 +01:00
Route::get('quote/{invitation_key}/download', [QuoteController::class, 'downloadPdf'])->name('quotes.downloadPdf');
2020-08-11 05:21:43 +02:00
2022-07-15 14:59:25 +02:00
Route::resource('recurring_expenses', RecurringExpenseController::class);
Route::post('recurring_expenses/bulk', [RecurringExpenseController::class, 'bulk'])->name('recurring_expenses.bulk');
Route::put('recurring_expenses/{recurring_expense}/upload', [RecurringExpenseController::class, 'upload']);
2021-08-24 03:29:56 +02:00
2022-07-15 14:59:25 +02:00
Route::resource('recurring_invoices', RecurringInvoiceController::class); // name = (recurring_invoices. index / create / show / update / destroy / edit
Route::post('recurring_invoices/bulk', [RecurringInvoiceController::class, 'bulk'])->name('recurring_invoices.bulk');
Route::put('recurring_invoices/{recurring_invoice}/upload', [RecurringInvoiceController::class, 'upload']);
Route::resource('recurring_quotes', RecurringQuoteController::class); // name = (recurring_invoices. index / create / show / update / destroy / edit
Route::post('recurring_quotes/bulk', [RecurringQuoteController::class, 'bulk'])->name('recurring_quotes.bulk');
Route::put('recurring_quotes/{recurring_quote}/upload', [RecurringQuoteController::class, 'upload']);
2020-07-13 01:31:07 +02:00
Route::post('refresh', [LoginController::class, 'refresh'])->middleware('throttle:refresh');
2019-10-03 05:21:24 +02:00
2022-07-15 14:59:25 +02:00
Route::post('reports/clients', ClientReportController::class);
Route::post('reports/contacts', ClientContactReportController::class);
Route::post('reports/credits', CreditReportController::class);
Route::post('reports/documents', DocumentReportController::class);
Route::post('reports/expenses', ExpenseReportController::class);
Route::post('reports/invoices', InvoiceReportController::class);
Route::post('reports/invoice_items', InvoiceItemReportController::class);
Route::post('reports/quotes', QuoteReportController::class);
Route::post('reports/quote_items', QuoteItemReportController::class);
Route::post('reports/recurring_invoices', RecurringInvoiceReportController::class);
Route::post('reports/payments', PaymentReportController::class);
Route::post('reports/products', ProductReportController::class);
2023-01-03 15:30:50 +01:00
Route::post('reports/product_sales', ProductSalesReportController::class);
2022-07-15 14:59:25 +02:00
Route::post('reports/tasks', TaskReportController::class);
Route::post('reports/profitloss', ProfitAndLossController::class);
2022-04-06 12:14:54 +02:00
2023-01-13 02:43:38 +01:00
Route::resource('task_schedulers', TaskSchedulerController::class);
Route::post('task_schedulers/bulk', [TaskSchedulerController::class, 'bulk'])->name('task_schedulers.bulk');
2022-05-19 00:34:09 +02:00
2022-07-15 14:59:25 +02:00
Route::get('scheduler', [SchedulerController::class, 'index']);
2022-07-31 11:11:32 +02:00
Route::post('support/messages/send', SendingController::class);
2022-05-30 20:43:59 +02:00
2022-07-15 14:59:25 +02:00
Route::post('self-update', [SelfUpdateController::class, 'update'])->middleware('password_protected');
Route::post('self-update/check_version', [SelfUpdateController::class, 'checkVersion']);
2022-05-19 00:34:09 +02:00
2022-07-15 14:59:25 +02:00
Route::resource('system_logs', SystemLogController::class);
2022-07-15 14:59:25 +02:00
Route::resource('tasks', TaskController::class); // name = (tasks. index / create / show / update / destroy / edit
Route::post('tasks/bulk', [TaskController::class, 'bulk'])->name('tasks.bulk');
Route::put('tasks/{task}/upload', [TaskController::class, 'upload']);
Route::post('tasks/sort', [TaskController::class, 'sort']);
2020-06-04 00:18:27 +02:00
2022-07-15 14:59:25 +02:00
Route::resource('task_statuses', TaskStatusController::class); // name = (task_statuses. index / create / show / update / destroy / edit
Route::post('task_statuses/bulk', [TaskStatusController::class, 'bulk'])->name('task_statuses.bulk');
2019-10-05 00:58:51 +02:00
2022-07-15 14:59:25 +02:00
Route::resource('tax_rates', TaxRateController::class); // name = (tax_rates. index / create / show / update / destroy / edit
Route::post('tax_rates/bulk', [TaxRateController::class, 'bulk'])->name('tax_rates.bulk');
2022-07-15 14:59:25 +02:00
Route::post('templates', [TemplateController::class, 'show'])->name('templates.show');
2022-07-15 14:59:25 +02:00
Route::resource('tokens', TokenController::class); // name = (tokens. index / create / show / update / destroy / edit
Route::post('tokens/bulk', [TokenController::class, 'bulk'])->name('tokens.bulk');
2022-07-15 14:59:25 +02:00
Route::get('settings/enable_two_factor', [TwoFactorController::class, 'setupTwoFactor']);
Route::post('settings/enable_two_factor', [TwoFactorController::class, 'enableTwoFactor']);
Route::post('settings/disable_two_factor', [TwoFactorController::class, 'disableTwoFactor']);
2022-07-31 11:11:32 +02:00
Route::post('verify', [TwilioController::class, 'generate'])->name('verify.generate')->middleware('throttle:100,1');
2022-07-27 03:21:12 +02:00
Route::post('verify/confirm', [TwilioController::class, 'confirm'])->name('verify.confirm');
2022-07-15 14:59:25 +02:00
Route::resource('vendors', VendorController::class); // name = (vendors. index / create / show / update / destroy / edit
Route::post('vendors/bulk', [VendorController::class, 'bulk'])->name('vendors.bulk');
Route::put('vendors/{vendor}/upload', [VendorController::class, 'upload']);
2022-07-15 14:59:25 +02:00
Route::get('users', [UserController::class, 'index']);
Route::get('users/create', [UserController::class, 'create'])->middleware('password_protected');
Route::get('users/{user}', [UserController::class, 'show'])->middleware('password_protected');
Route::put('users/{user}', [UserController::class, 'update'])->middleware('password_protected');
Route::post('users', [UserController::class, 'store'])->middleware('password_protected');
//Route::post('users/{user}/attach_to_company', [UserController::class, 'attach')->middleware('password_protected');
Route::delete('users/{user}/detach_from_company', [UserController::class, 'detach'])->middleware('password_protected');
2022-07-06 07:18:41 +02:00
2022-07-15 14:59:25 +02:00
Route::post('users/bulk', [UserController::class, 'bulk'])->name('users.bulk')->middleware('password_protected');
Route::post('/users/{user}/invite', [UserController::class, 'invite'])->middleware('password_protected');
2023-04-05 03:18:10 +02:00
Route::post('/users/{user}/disconnect_mailer', [UserController::class, 'disconnectOauthMailer']);
2023-04-12 02:38:18 +02:00
Route::post('/users/{user}/disconnect_oauth', [UserController::class, 'disconnectOauth']);
2022-07-15 14:59:25 +02:00
Route::post('/user/{user}/reconfirm', [UserController::class, 'reconfirm']);
2022-05-29 04:06:51 +02:00
2022-07-15 14:59:25 +02:00
Route::resource('webhooks', WebhookController::class);
Route::post('webhooks/bulk', [WebhookController::class, 'bulk'])->name('webhooks.bulk');
2023-03-17 08:27:26 +01:00
Route::post('webhooks/{webhook}/retry', [WebhookController::class, 'retry'])->name('webhooks.retry');
/*Subscription and Webhook routes */
2022-07-15 14:59:25 +02:00
// Route::post('hooks', [SubscriptionController::class, 'subscribe'])->name('hooks.subscribe');
// Route::delete('hooks/{subscription_id}', [SubscriptionController::class, 'unsubscribe'])->name('hooks.unsubscribe');
2020-07-06 13:22:36 +02:00
2022-07-15 14:59:25 +02:00
Route::post('stripe/update_payment_methods', [StripeController::class, 'update'])->middleware('password_protected')->name('stripe.update');
Route::post('stripe/import_customers', [StripeController::class, 'import'])->middleware('password_protected')->name('stripe.import');
2021-05-17 06:02:43 +02:00
2022-07-15 14:59:25 +02:00
Route::post('stripe/verify', [StripeController::class, 'verify'])->middleware('password_protected')->name('stripe.verify');
Route::post('stripe/disconnect/{company_gateway_id}', [StripeController::class, 'disconnect'])->middleware('password_protected')->name('stripe.disconnect');
2021-08-15 07:13:20 +02:00
2022-07-15 14:59:25 +02:00
Route::resource('subscriptions', SubscriptionController::class);
Route::post('subscriptions/bulk', [SubscriptionController::class, 'bulk'])->name('subscriptions.bulk');
Route::get('statics', StaticController::class);
2022-07-15 14:59:25 +02:00
// Route::post('apple_pay/upload_file','ApplyPayController::class, 'upload');
});
2022-10-27 07:27:19 +02:00
Route::post('api/v1/sms_reset', [TwilioController::class, 'generate2faResetCode'])->name('sms_reset.generate')->middleware('throttle:10,1');
Route::post('api/v1/sms_reset/confirm', [TwilioController::class, 'confirm2faResetCode'])->name('sms_reset.confirm')->middleware('throttle:20,1');
2022-10-27 07:11:55 +02:00
2022-07-31 07:56:57 +02:00
Route::match(['get', 'post'], 'payment_webhook/{company_key}/{company_gateway_id}', PaymentWebhookController::class)
2022-07-31 11:11:32 +02:00
->middleware('throttle:1000,1')
2020-12-19 13:11:42 +01:00
->name('payment_webhook');
2022-07-31 07:56:57 +02:00
Route::match(['get', 'post'], 'payment_notification_webhook/{company_key}/{company_gateway_id}/{client}', PaymentNotificationWebhookController::class)
2022-07-31 11:11:32 +02:00
->middleware('throttle:1000,1')
2021-07-05 00:59:52 +02:00
->name('payment_notification_webhook');
2022-07-15 14:59:25 +02:00
Route::post('api/v1/postmark_webhook', [PostMarkController::class, 'webhook'])->middleware('throttle:1000,1');
Route::get('token_hash_router', [OneTimeTokenController::class, 'router'])->middleware('throttle:500,1');
2022-07-15 14:59:25 +02:00
Route::get('webcron', [WebCronController::class, 'index'])->middleware('throttle:100,1');
Route::post('api/v1/get_migration_account', [HostedMigrationController::class, 'getAccount'])->middleware('guest')->middleware('throttle:100,1');
Route::post('api/v1/confirm_forwarding', [HostedMigrationController::class, 'confirmForwarding'])->middleware('guest')->middleware('throttle:100,1');
2022-07-17 12:56:17 +02:00
Route::post('api/v1/process_webhook', [AppleController::class, 'process_webhook'])->middleware('throttle:1000,1');
Route::post('api/v1/confirm_purchase', [AppleController::class, 'confirm_purchase'])->middleware('throttle:1000,1');
2022-11-05 02:27:01 +01:00
Route::post('api/v1/yodlee/refresh', [YodleeController::class, 'refreshWebhook'])->middleware('throttle:100,1');
Route::post('api/v1/yodlee/data_updates', [YodleeController::class, 'dataUpdatesWebhook'])->middleware('throttle:100,1');
Route::post('api/v1/yodlee/refresh_updates', [YodleeController::class, 'refreshUpdatesWebhook'])->middleware('throttle:100,1');
Route::post('api/v1/yodlee/balance', [YodleeController::class, 'balanceWebhook'])->middleware('throttle:100,1');
Route::fallback([BaseController::class, 'notFound']);