| @@ -72,9 +72,9 @@ | ||
| 72 | 72 | $router->get('/{ticket_id}/fluent-booking/availability', 'TicketController@getFluentBookingAvailability')->int('ticket_id'); |
| 73 | 73 | $router->post('/{ticket_id}/fluent-booking/booking-link', 'TicketController@createFluentBookingLink')->int('ticket_id'); |
| 74 | 74 | $router->get('/{ticket_id}/fluent-booking/meetings', 'TicketController@getFluentBookingMeetings')->int('ticket_id'); |
| 75 | 75 | |
| 76 | - $router->post('bulk-actions', 'TicketController@doBulkActions'); // close_tickets | delete_tickets | assign_agent | assign_tags | |
| 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 | |
| 77 | 77 | $router->post('bulk-reply', 'TicketController@doBulkReplies'); |
| 78 | 78 | |
| 79 | 79 | $router->post('sync-fluentcrm-tags', 'TicketController@syncFluentCrmTags'); |
| 80 | 80 | $router->post('sync-fluentcrm-lists', 'TicketController@syncFluentCrmLists'); |
| @@ -137,19 +137,24 @@ | ||
| 137 | 137 | // Upload Settings |
| 138 | 138 | $router->get('/remote-upload-settings', 'SettingsController@getRemoteUploadSettings'); |
| 139 | 139 | $router->post('/update-remote-upload-driver', 'SettingsController@updateRemoteUploadDriver'); |
| 140 | 140 | |
| 141 | - $router->get('/openai-integration', 'SettingsController@getOpenAISettings'); | |
| 142 | - $router->post('/openai-integration', 'SettingsController@saveOpenAISettings'); | |
| 143 | - $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'); | |
| 144 | 144 | $router->get('/settings-menu', 'SettingsController@getSettingsMenu'); |
| 145 | 145 | $router->get('/fluent-bot-integration', 'SettingsController@getFluentBotSettings'); |
| 146 | 146 | $router->post('/fluent-bot-integration', 'SettingsController@saveFluentBotSettings'); |
| 147 | 147 | $router->get('/fluent-bot-presets', 'SettingsController@getFluentBotPresets'); |
| 148 | 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'); | |
| 149 | 154 | }); |
| 150 | 155 | |
| 151 | -$router->prefix('agents')->withPolicy('AdminSensitivePolicy')->group(function ($router) { | |
| 156 | +$router->prefix('agents')->withPolicy('AgentPolicy')->group(function ($router) { | |
| 152 | 157 | $router->get('/', 'AgentController@index'); |
| 153 | 158 | $router->post('/', 'AgentController@addAgent'); |
| 154 | 159 | $router->put('/{agent_id}', 'AgentController@updateAgent')->int('agent_id'); |
| 155 | 160 | $router->delete('/{agent_id}', 'AgentController@deleteAgent')->int('agent_id'); |
| @@ -165,15 +170,8 @@ | ||
| 165 | 170 | $router->delete('/{group_id}', 'AgentGroupController@delete')->int('group_id'); |
| 166 | 171 | }); |
| 167 | 172 | |
| 168 | 173 | $router->prefix('reports')->withPolicy('ReportPolicy')->group(function ($router) { |
| 169 | - $router->get('/', 'ReportingController@getOverallReports'); | |
| 170 | - $router->get('/tickets-growth', 'ReportingController@getTicketsChart'); | |
| 171 | - $router->get('/tickets-resolve-growth', 'ReportingController@getResolveChart'); | |
| 172 | - $router->get('/response-growth', 'ReportingController@getResponseChart'); | |
| 173 | - $router->get('/agents-summary', 'ReportingController@getAgentsSummary'); | |
| 174 | - $router->get('/day-time-stats', 'ReportingController@dayTimeStats'); | |
| 175 | - $router->get('/ticket-response-stats', 'ReportingController@ticketResponseStats'); | |
| 176 | 174 | $router->get('/stats', 'ReportingController@getStats'); |
| 177 | 175 | }); |
| 178 | 176 | |
| 179 | 177 | $router->prefix('my-reports')->withPolicy('AgentTicketPolicy')->group(function ($router) { |
| @@ -182,30 +180,9 @@ | ||
| 182 | 180 | $router->get('/response-growth', 'ReportingController@getAgentResponseChart'); |
| 183 | 181 | $router->get('/my-summary', 'ReportingController@getPersonalSummary'); |
| 184 | 182 | }); |
| 185 | 183 | |
| 186 | -$router->prefix('product-reports')->withPolicy('AdminSensitivePolicy')->group(function ($router) { | |
| 187 | - $router->get('/tickets-growth', 'ReportingController@getTicketsChart'); | |
| 188 | - $router->get('/tickets-resolve-growth', 'ReportingController@getResolveChart'); | |
| 189 | - $router->get('/response-growth', 'ReportingController@getResponseGrowthChart'); | |
| 190 | - $router->get('/product-reports-summary', 'ReportingController@getProductsSummary'); | |
| 191 | -}); | |
| 192 | - | |
| 193 | -$router->prefix('mailbox-reports')->withPolicy('AdminSensitivePolicy')->group(function ($router) { | |
| 194 | - $router->get('/tickets-growth', 'ReportingController@getTicketsChart'); | |
| 195 | - $router->get('/tickets-resolve-growth', 'ReportingController@getResolveChart'); | |
| 196 | - $router->get('/response-growth', 'ReportingController@getResponseGrowthChart'); | |
| 197 | - $router->get('/mailbox-reports-summary', 'ReportingController@getMailBoxesSummary'); | |
| 198 | -}); | |
| 199 | - | |
| 200 | -$router->prefix('agent-group-reports')->withPolicy('AdminSensitivePolicy')->group(function ($router) { | |
| 201 | - $router->get('/tickets-growth', 'ReportingController@getTicketsChart'); | |
| 202 | - $router->get('/tickets-resolve-growth', 'ReportingController@getResolveChart'); | |
| 203 | - $router->get('/response-growth', 'ReportingController@getResponseChart'); | |
| 204 | - $router->get('/agent-groups-summary', 'ReportingController@getAgentGroupsSummary'); | |
| 205 | -}); | |
| 206 | - | |
| 207 | -$router->prefix('customers')->withPolicy('AdminSensitivePolicy')->group(function ($router) { | |
| 184 | +$router->prefix('customers')->withPolicy('CustomerPolicy')->group(function ($router) { | |
| 208 | 185 | $router->get('/', 'CustomerController@index'); |
| 209 | 186 | $router->post('/', 'CustomerController@create'); |
| 210 | 187 | $router->get('/customerField/{customer_id}', 'CustomerController@customerField')->int('customer_id'); |
| 211 | 188 | |
| @@ -261,8 +238,11 @@ | ||
| 261 | 238 | $router->get('/{id}/chat-id', 'FluentBotController@getChatId')->int('id'); |
| 262 | 239 | $router->post('/{id}/chat-id', 'FluentBotController@saveChatId')->int('id'); |
| 263 | 240 | $router->delete('/{id}/chat-id', 'FluentBotController@deleteChatId')->int('id'); |
| 264 | 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'); | |
| 265 | 245 | $router->get('/{id}/context-selection', 'FluentBotController@getContextSelection')->int('id'); |
| 266 | 246 | $router->post('/{id}/context-selection', 'FluentBotController@saveContextSelection')->int('id'); |
| 267 | 247 | }); |
| 268 | 248 | |