| @@ -31,8 +31,9 @@ | ||
| 31 | 31 | $router->get('/label-search', 'TicketController@fetchLabelSearch'); |
| 32 | 32 | $router->post('/label-search', 'TicketController@storeOrUpdateLabelSearch'); |
| 33 | 33 | $router->delete('/{label_search_id}/label-search', 'TicketController@deleteLabelSearch')->int('label_search_id'); |
| 34 | 34 | |
| 35 | + $router->get('/{ticket_id}/mentionable-agents', 'TicketController@getMentionableAgents')->int('ticket_id'); | |
| 35 | 36 | $router->get('/{ticket_id}', 'TicketController@getTicket')->int('ticket_id'); |
| 36 | 37 | |
| 37 | 38 | $router->get('/{ticket_id}/widgets', 'TicketController@getTicketWidgets')->int('ticket_id'); |
| 38 | 39 | $router->post('/{ticket_id}/responses', 'TicketController@createResponse')->int('ticket_id'); |
| @@ -55,11 +56,8 @@ | ||
| 55 | 56 | $router->delete('/{ticket_id}/responses/{response_id}', 'TicketController@deleteResponse') |
| 56 | 57 | ->int('ticket_id') |
| 57 | 58 | ->int('response_id'); |
| 58 | 59 | |
| 59 | - $router->post('/{ticket_id}/customer-responses', 'ConversationController@createCustomerReply') | |
| 60 | - ->int('ticket_id'); | |
| 61 | - | |
| 62 | 60 | $router->put('/{ticket_id}/property', 'TicketController@updateTicketProperty')->int('ticket_id'); |
| 63 | 61 | |
| 64 | 62 | $router->post('/{ticket_id}/tags', 'TicketController@addTag')->int('ticket_id'); |
| 65 | 63 | $router->delete('/{ticket_id}/tags/{tag_id}', 'TicketController@detachTag')->int('ticket_id')->int('tag_id'); |
| @@ -69,17 +67,22 @@ | ||
| 69 | 67 | $router->post('/{ticket_id}/re-open', 'TicketController@reOpenTicket')->int('ticket_id'); |
| 70 | 68 | $router->put('/{ticket_id}/change-customer', 'TicketController@changeTicketCustomer')->int('ticket_id'); |
| 71 | 69 | $router->get('/{ticket_id}/custom-data', 'TicketController@getTicketCustomData')->int('ticket_id'); |
| 72 | 70 | |
| 73 | - $router->post('bulk-actions', 'TicketController@doBulkActions'); // close_tickets | delete_tickets | assign_agent | assign_tags | |
| 71 | + $router->get('fluent-booking/event-types', 'TicketController@getFluentBookingEventTypes'); | |
| 72 | + $router->get('/{ticket_id}/fluent-booking/availability', 'TicketController@getFluentBookingAvailability')->int('ticket_id'); | |
| 73 | + $router->post('/{ticket_id}/fluent-booking/booking-link', 'TicketController@createFluentBookingLink')->int('ticket_id'); | |
| 74 | + $router->get('/{ticket_id}/fluent-booking/meetings', 'TicketController@getFluentBookingMeetings')->int('ticket_id'); | |
| 75 | + | |
| 76 | + $router->post('bulk-actions', 'TicketController@doBulkActions'); // close_tickets, delete_tickets, reopen_tickets, assign_agent, assign_agent_group, assign_tags, remove_tags, change_priority, change_product | |
| 74 | 77 | $router->post('bulk-reply', 'TicketController@doBulkReplies'); |
| 75 | 78 | |
| 76 | 79 | $router->post('sync-fluentcrm-tags', 'TicketController@syncFluentCrmTags'); |
| 77 | 80 | $router->post('sync-fluentcrm-lists', 'TicketController@syncFluentCrmLists'); |
| 78 | 81 | |
| 79 | - $router->get('fluent-boards/boards', 'TicketController@getBoards'); | |
| 80 | - $router->get('fluent-boards/stages/{board_id}', 'TicketController@getStages')->int('board_id'); | |
| 81 | - $router->post('fluent-boards/stages', 'TicketController@createTask'); | |
| 82 | + $router->get('fluent-boards/boards', 'FluentBoardsController@getBoards'); | |
| 83 | + $router->get('fluent-boards/stages/{board_id}', 'FluentBoardsController@getStages')->int('board_id'); | |
| 84 | + $router->post('fluent-boards/stages', 'FluentBoardsController@createTask'); | |
| 82 | 85 | |
| 83 | 86 | $router->get('search-contact', 'CustomerController@searchContact'); |
| 84 | 87 | |
| 85 | 88 | $router->get('ping', 'AgentController@ping'); |
| @@ -86,8 +89,18 @@ | ||
| 86 | 89 | $router->get('ticket-essentials', 'TicketController@getTicketEssentials'); |
| 87 | 90 | $router->get('agent-insights', 'AgentController@getAgentInsights'); |
| 88 | 91 | }); |
| 89 | 92 | |
| 93 | +$router->get('widgets', 'WidgetsController')->withPolicy('AgentTicketPolicy'); | |
| 94 | + | |
| 95 | +$router->prefix('notifications')->withPolicy('AgentTicketPolicy')->group(function ($router) { | |
| 96 | + $router->get('/', 'NotificationController@index'); | |
| 97 | + $router->get('/unread', 'NotificationController@unread'); | |
| 98 | + $router->get('/unread-count', 'NotificationController@unreadCount'); | |
| 99 | + $router->post('/mark-all-read', 'NotificationController@markAllRead'); | |
| 100 | + $router->post('/{notification_id}/mark-read', 'NotificationController@markRead')->int('notification_id'); | |
| 101 | +}); | |
| 102 | + | |
| 90 | 103 | $router->prefix('products')->withPolicy('AdminSettingsPolicy')->group(function ($router) { |
| 91 | 104 | $router->get('/', 'ProductController@index'); |
| 92 | 105 | $router->post('/', 'ProductController@create'); |
| 93 | 106 | $router->get('/{product_id}', 'ProductController@get')->int('product_id'); |
| @@ -118,39 +131,48 @@ | ||
| 118 | 131 | $router->get('/recaptcha-settings', 'SettingsController@getReCaptchaSettings'); |
| 119 | 132 | $router->get('/integration-statuses', 'SettingsController@integrationStatuses'); |
| 120 | 133 | |
| 121 | 134 | $router->get('/fluentcrm-settings', 'SettingsController@getFluentCRMSettings'); |
| 122 | - $router->post('/intsall-fluentcrm', 'SettingsController@installFluentCRM'); | |
| 135 | + $router->post('/install-fluentcrm', 'SettingsController@installFluentCRM'); | |
| 123 | 136 | |
| 124 | 137 | // Upload Settings |
| 125 | 138 | $router->get('/remote-upload-settings', 'SettingsController@getRemoteUploadSettings'); |
| 126 | 139 | $router->post('/update-remote-upload-driver', 'SettingsController@updateRemoteUploadDriver'); |
| 127 | 140 | |
| 128 | - $router->get('/openai-integration', 'SettingsController@getOpenAISettings'); | |
| 129 | - $router->post('/openai-integration', 'SettingsController@saveOpenAISettings'); | |
| 130 | - $router->post('/openai-integration/disconnect', 'SettingsController@disconnectOpenAI'); | |
| 141 | + $router->get('/ai-integration', 'SettingsController@getAIProviderSettings'); | |
| 142 | + $router->post('/ai-integration', 'SettingsController@saveAIProviderSettings'); | |
| 143 | + $router->post('/ai-integration/disconnect', 'SettingsController@disconnectAIProvider'); | |
| 131 | 144 | $router->get('/settings-menu', 'SettingsController@getSettingsMenu'); |
| 132 | 145 | $router->get('/fluent-bot-integration', 'SettingsController@getFluentBotSettings'); |
| 133 | 146 | $router->post('/fluent-bot-integration', 'SettingsController@saveFluentBotSettings'); |
| 147 | + $router->get('/fluent-bot-presets', 'SettingsController@getFluentBotPresets'); | |
| 148 | + $router->post('/fluent-bot-presets', 'SettingsController@saveFluentBotPresets'); | |
| 149 | + | |
| 150 | + $router->get('/mcp', 'McpSettingsController@getStatus'); | |
| 151 | + $router->post('/mcp/toggle', 'McpSettingsController@toggle'); | |
| 152 | + $router->post('/mcp/install-adapter', 'McpSettingsController@installAdapter'); | |
| 153 | + $router->get('/mcp/config-snippets', 'McpSettingsController@getConfigSnippets'); | |
| 134 | 154 | }); |
| 135 | 155 | |
| 136 | -$router->prefix('agents')->withPolicy('AdminSensitivePolicy')->group(function ($router) { | |
| 156 | +$router->prefix('agents')->withPolicy('AgentPolicy')->group(function ($router) { | |
| 137 | 157 | $router->get('/', 'AgentController@index'); |
| 138 | 158 | $router->post('/', 'AgentController@addAgent'); |
| 139 | 159 | $router->put('/{agent_id}', 'AgentController@updateAgent')->int('agent_id'); |
| 140 | 160 | $router->delete('/{agent_id}', 'AgentController@deleteAgent')->int('agent_id'); |
| 141 | 161 | $router->post('/avatar/{agent_id}', 'AgentController@addOrUpdateProfileImage')->int('agent_id'); |
| 142 | - $router->post('/reset_avatar/{agent_id}', 'AgentController@resetAvatar')->int('agent_id'); | |
| 162 | + $router->post('/reset_avatar/{agent}', 'AgentController@resetAvatar')->int('agent'); | |
| 143 | 163 | }); |
| 144 | 164 | |
| 165 | +$router->prefix('agent-groups')->withPolicy('AdminSensitivePolicy')->group(function ($router) { | |
| 166 | + $router->get('/', 'AgentGroupController@index'); | |
| 167 | + $router->post('/', 'AgentGroupController@create'); | |
| 168 | + $router->get('/{group_id}', 'AgentGroupController@get')->int('group_id'); | |
| 169 | + $router->put('/{group_id}', 'AgentGroupController@update')->int('group_id'); | |
| 170 | + $router->delete('/{group_id}', 'AgentGroupController@delete')->int('group_id'); | |
| 171 | +}); | |
| 172 | + | |
| 145 | 173 | $router->prefix('reports')->withPolicy('ReportPolicy')->group(function ($router) { |
| 146 | - $router->get('/', 'ReportingController@getOverallReports'); | |
| 147 | - $router->get('/tickets-growth', 'ReportingController@getTicketsChart'); | |
| 148 | - $router->get('/tickets-resolve-growth', 'ReportingController@getResolveChart'); | |
| 149 | - $router->get('/response-growth', 'ReportingController@getResponseChart'); | |
| 150 | - $router->get('/agents-summary', 'ReportingController@getAgentsSummary'); | |
| 151 | - $router->get('/day-time-stats', 'ReportingController@dayTimeStats'); | |
| 152 | - $router->get('/ticket-response-stats', 'ReportingController@ticketResponseStats'); | |
| 174 | + $router->get('/stats', 'ReportingController@getStats'); | |
| 153 | 175 | }); |
| 154 | 176 | |
| 155 | 177 | $router->prefix('my-reports')->withPolicy('AgentTicketPolicy')->group(function ($router) { |
| 156 | 178 | $router->get('/', 'ReportingController@getAgentOverallReports'); |
| @@ -158,23 +180,9 @@ | ||
| 158 | 180 | $router->get('/response-growth', 'ReportingController@getAgentResponseChart'); |
| 159 | 181 | $router->get('/my-summary', 'ReportingController@getPersonalSummary'); |
| 160 | 182 | }); |
| 161 | 183 | |
| 162 | -$router->prefix('product-reports')->withPolicy('AdminSensitivePolicy')->group(function ($router) { | |
| 163 | - $router->get('/tickets-growth', 'ReportingController@getTicketsChart'); | |
| 164 | - $router->get('/tickets-resolve-growth', 'ReportingController@getResolveChart'); | |
| 165 | - $router->get('/response-growth', 'ReportingController@getResponseGrowthChart'); | |
| 166 | - $router->get('/product-reports-summary', 'ReportingController@getProductsSummary'); | |
| 167 | -}); | |
| 168 | - | |
| 169 | -$router->prefix('mailbox-reports')->withPolicy('AdminSensitivePolicy')->group(function ($router) { | |
| 170 | - $router->get('/tickets-growth', 'ReportingController@getTicketsChart'); | |
| 171 | - $router->get('/tickets-resolve-growth', 'ReportingController@getResolveChart'); | |
| 172 | - $router->get('/response-growth', 'ReportingController@getResponseGrowthChart'); | |
| 173 | - $router->get('/mailbox-reports-summary', 'ReportingController@getMailBoxesSummary'); | |
| 174 | -}); | |
| 175 | - | |
| 176 | -$router->prefix('customers')->withPolicy('AdminSensitivePolicy')->group(function ($router) { | |
| 184 | +$router->prefix('customers')->withPolicy('CustomerPolicy')->group(function ($router) { | |
| 177 | 185 | $router->get('/', 'CustomerController@index'); |
| 178 | 186 | $router->post('/', 'CustomerController@create'); |
| 179 | 187 | $router->get('/customerField/{customer_id}', 'CustomerController@customerField')->int('customer_id'); |
| 180 | 188 | |
| @@ -179,12 +187,15 @@ | ||
| 179 | 187 | $router->get('/customerField/{customer_id}', 'CustomerController@customerField')->int('customer_id'); |
| 180 | 188 | |
| 181 | 189 | $router->get('/{customer_id}', 'CustomerController@getCustomer')->int('customer_id'); |
| 182 | 190 | $router->put('/{customer_id}', 'CustomerController@update')->int('customer_id'); |
| 191 | + | |
| 192 | + //We will remove this method. | |
| 183 | 193 | $router->delete('/{customer_id}', 'CustomerController@delete')->int('customer_id'); |
| 194 | + $router->delete('/bulk-delete', 'CustomerController@bulkDelete'); | |
| 184 | 195 | |
| 185 | 196 | $router->post('/profile_image/{customer_id}', 'CustomerController@addOrUpdateProfileImage')->int('customer_id'); |
| 186 | - $router->post('/reset_avatar/{customer_id}', 'CustomerController@resetAvatar')->int('customer_id'); | |
| 197 | + $router->post('/reset_avatar/{customer}', 'CustomerController@resetAvatar')->int('customer'); | |
| 187 | 198 | }); |
| 188 | 199 | |
| 189 | 200 | $router->prefix('customer-portal')->withPolicy('PortalPolicy')->group(function ($router) { |
| 190 | 201 | |
| @@ -215,13 +226,25 @@ | ||
| 215 | 226 | $router->get('/authorize', 'AuthorizeController@handleHelpScoutAuthorization'); |
| 216 | 227 | }); |
| 217 | 228 | |
| 218 | 229 | $router->prefix('fluent-bot')->withPolicy('AgentTicketPolicy')->group(function ($router) { |
| 219 | - $router->get('/preset-prompts', 'FluentBotController@getPresetPrompts')->int('id'); | |
| 230 | + $router->get('/preset-prompts', 'FluentBotController@getPresetPrompts'); | |
| 231 | + $router->get('/runtime-config', 'FluentBotController@getRuntimeConfig'); | |
| 232 | + $router->post('/{id}/feedback', 'FluentBotController@createFeedback')->int('id'); | |
| 233 | + $router->delete('/{id}/feedback/{feedback_id}', 'FluentBotController@deleteFeedback')->int('id')->int('feedback_id'); | |
| 220 | 234 | $router->post('/{id}/generate-response', 'FluentBotController@generateResponse')->int('id'); |
| 221 | 235 | $router->post('/{id}/generate-stream-response', 'FluentBotController@generateStreamResponse')->int('id'); |
| 222 | 236 | $router->post('/{id}/get-ticket-summary', 'FluentBotController@getTicketSummary')->int('id'); |
| 223 | 237 | $router->post('/{id}/get-ticket-tone', 'FluentBotController@getTicketTone')->int('id'); |
| 238 | + $router->get('/{id}/chat-id', 'FluentBotController@getChatId')->int('id'); | |
| 239 | + $router->post('/{id}/chat-id', 'FluentBotController@saveChatId')->int('id'); | |
| 240 | + $router->delete('/{id}/chat-id', 'FluentBotController@deleteChatId')->int('id'); | |
| 241 | + $router->get('/{id}/chat-messages', 'FluentBotController@getChatMessages')->int('id'); | |
| 242 | + $router->get('/{id}/chat-stream', 'FluentBotController@resumeChatStream')->int('id'); | |
| 243 | + $router->get('/{id}/conversations', 'FluentBotController@getConversations')->int('id'); | |
| 244 | + $router->post('/{id}/conversations/switch', 'FluentBotController@switchConversation')->int('id'); | |
| 245 | + $router->get('/{id}/context-selection', 'FluentBotController@getContextSelection')->int('id'); | |
| 246 | + $router->post('/{id}/context-selection', 'FluentBotController@saveContextSelection')->int('id'); | |
| 224 | 247 | }); |
| 225 | 248 | |
| 226 | 249 | $router->prefix('activity-logger')->withPolicy('ActivityLoggerPolicy')->group(function ($router) { |
| 227 | 250 | $router->get('/', 'ActivityLoggerController@getActivities'); |
| @@ -253,5 +276,4 @@ | ||
| 253 | 276 | }); |
| 254 | 277 | |
| 255 | 278 | $router->post('ticket_image_upload', 'UploaderController@uploadImage') |
| 256 | 279 | ->withPolicy('AgentTicketPolicy'); |
| 257 | - | |