| @@ -31,9 +31,8 @@ | ||
| 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'); | |
| 36 | 35 | $router->get('/{ticket_id}', 'TicketController@getTicket')->int('ticket_id'); |
| 37 | 36 | |
| 38 | 37 | $router->get('/{ticket_id}/widgets', 'TicketController@getTicketWidgets')->int('ticket_id'); |
| 39 | 38 | $router->post('/{ticket_id}/responses', 'TicketController@createResponse')->int('ticket_id'); |
| @@ -67,13 +66,8 @@ | ||
| 67 | 66 | $router->post('/{ticket_id}/re-open', 'TicketController@reOpenTicket')->int('ticket_id'); |
| 68 | 67 | $router->put('/{ticket_id}/change-customer', 'TicketController@changeTicketCustomer')->int('ticket_id'); |
| 69 | 68 | $router->get('/{ticket_id}/custom-data', 'TicketController@getTicketCustomData')->int('ticket_id'); |
| 70 | 69 | |
| 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 | 70 | $router->post('bulk-actions', 'TicketController@doBulkActions'); // close_tickets | delete_tickets | assign_agent | assign_tags |
| 77 | 71 | $router->post('bulk-reply', 'TicketController@doBulkReplies'); |
| 78 | 72 | |
| 79 | 73 | $router->post('sync-fluentcrm-tags', 'TicketController@syncFluentCrmTags'); |
| @@ -91,16 +85,8 @@ | ||
| 91 | 85 | }); |
| 92 | 86 | |
| 93 | 87 | $router->get('widgets', 'WidgetsController')->withPolicy('AgentTicketPolicy'); |
| 94 | 88 | |
| 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 | - | |
| 103 | 89 | $router->prefix('products')->withPolicy('AdminSettingsPolicy')->group(function ($router) { |
| 104 | 90 | $router->get('/', 'ProductController@index'); |
| 105 | 91 | $router->post('/', 'ProductController@create'); |
| 106 | 92 | $router->get('/{product_id}', 'ProductController@get')->int('product_id'); |
| @@ -137,24 +123,17 @@ | ||
| 137 | 123 | // Upload Settings |
| 138 | 124 | $router->get('/remote-upload-settings', 'SettingsController@getRemoteUploadSettings'); |
| 139 | 125 | $router->post('/update-remote-upload-driver', 'SettingsController@updateRemoteUploadDriver'); |
| 140 | 126 | |
| 141 | - $router->get('/ai-integration', 'SettingsController@getAIProviderSettings'); | |
| 142 | - $router->post('/ai-integration', 'SettingsController@saveAIProviderSettings'); | |
| 143 | - $router->post('/ai-integration/disconnect', 'SettingsController@disconnectAIProvider'); | |
| 127 | + $router->get('/openai-integration', 'SettingsController@getOpenAISettings'); | |
| 128 | + $router->post('/openai-integration', 'SettingsController@saveOpenAISettings'); | |
| 129 | + $router->post('/openai-integration/disconnect', 'SettingsController@disconnectOpenAI'); | |
| 144 | 130 | $router->get('/settings-menu', 'SettingsController@getSettingsMenu'); |
| 145 | 131 | $router->get('/fluent-bot-integration', 'SettingsController@getFluentBotSettings'); |
| 146 | 132 | $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'); | |
| 154 | 133 | }); |
| 155 | 134 | |
| 156 | -$router->prefix('agents')->withPolicy('AgentPolicy')->group(function ($router) { | |
| 135 | +$router->prefix('agents')->withPolicy('AdminSensitivePolicy')->group(function ($router) { | |
| 157 | 136 | $router->get('/', 'AgentController@index'); |
| 158 | 137 | $router->post('/', 'AgentController@addAgent'); |
| 159 | 138 | $router->put('/{agent_id}', 'AgentController@updateAgent')->int('agent_id'); |
| 160 | 139 | $router->delete('/{agent_id}', 'AgentController@deleteAgent')->int('agent_id'); |
| @@ -170,8 +149,15 @@ | ||
| 170 | 149 | $router->delete('/{group_id}', 'AgentGroupController@delete')->int('group_id'); |
| 171 | 150 | }); |
| 172 | 151 | |
| 173 | 152 | $router->prefix('reports')->withPolicy('ReportPolicy')->group(function ($router) { |
| 153 | + $router->get('/', 'ReportingController@getOverallReports'); | |
| 154 | + $router->get('/tickets-growth', 'ReportingController@getTicketsChart'); | |
| 155 | + $router->get('/tickets-resolve-growth', 'ReportingController@getResolveChart'); | |
| 156 | + $router->get('/response-growth', 'ReportingController@getResponseChart'); | |
| 157 | + $router->get('/agents-summary', 'ReportingController@getAgentsSummary'); | |
| 158 | + $router->get('/day-time-stats', 'ReportingController@dayTimeStats'); | |
| 159 | + $router->get('/ticket-response-stats', 'ReportingController@ticketResponseStats'); | |
| 174 | 160 | $router->get('/stats', 'ReportingController@getStats'); |
| 175 | 161 | }); |
| 176 | 162 | |
| 177 | 163 | $router->prefix('my-reports')->withPolicy('AgentTicketPolicy')->group(function ($router) { |
| @@ -180,9 +166,30 @@ | ||
| 180 | 166 | $router->get('/response-growth', 'ReportingController@getAgentResponseChart'); |
| 181 | 167 | $router->get('/my-summary', 'ReportingController@getPersonalSummary'); |
| 182 | 168 | }); |
| 183 | 169 | |
| 184 | -$router->prefix('customers')->withPolicy('CustomerPolicy')->group(function ($router) { | |
| 170 | +$router->prefix('product-reports')->withPolicy('AdminSensitivePolicy')->group(function ($router) { | |
| 171 | + $router->get('/tickets-growth', 'ReportingController@getTicketsChart'); | |
| 172 | + $router->get('/tickets-resolve-growth', 'ReportingController@getResolveChart'); | |
| 173 | + $router->get('/response-growth', 'ReportingController@getResponseGrowthChart'); | |
| 174 | + $router->get('/product-reports-summary', 'ReportingController@getProductsSummary'); | |
| 175 | +}); | |
| 176 | + | |
| 177 | +$router->prefix('mailbox-reports')->withPolicy('AdminSensitivePolicy')->group(function ($router) { | |
| 178 | + $router->get('/tickets-growth', 'ReportingController@getTicketsChart'); | |
| 179 | + $router->get('/tickets-resolve-growth', 'ReportingController@getResolveChart'); | |
| 180 | + $router->get('/response-growth', 'ReportingController@getResponseGrowthChart'); | |
| 181 | + $router->get('/mailbox-reports-summary', 'ReportingController@getMailBoxesSummary'); | |
| 182 | +}); | |
| 183 | + | |
| 184 | +$router->prefix('agent-group-reports')->withPolicy('AdminSensitivePolicy')->group(function ($router) { | |
| 185 | + $router->get('/tickets-growth', 'ReportingController@getTicketsChart'); | |
| 186 | + $router->get('/tickets-resolve-growth', 'ReportingController@getResolveChart'); | |
| 187 | + $router->get('/response-growth', 'ReportingController@getResponseChart'); | |
| 188 | + $router->get('/agent-groups-summary', 'ReportingController@getAgentGroupsSummary'); | |
| 189 | +}); | |
| 190 | + | |
| 191 | +$router->prefix('customers')->withPolicy('AdminSensitivePolicy')->group(function ($router) { | |
| 185 | 192 | $router->get('/', 'CustomerController@index'); |
| 186 | 193 | $router->post('/', 'CustomerController@create'); |
| 187 | 194 | $router->get('/customerField/{customer_id}', 'CustomerController@customerField')->int('customer_id'); |
| 188 | 195 | |
| @@ -227,24 +234,12 @@ | ||
| 227 | 234 | }); |
| 228 | 235 | |
| 229 | 236 | $router->prefix('fluent-bot')->withPolicy('AgentTicketPolicy')->group(function ($router) { |
| 230 | 237 | $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'); | |
| 234 | 238 | $router->post('/{id}/generate-response', 'FluentBotController@generateResponse')->int('id'); |
| 235 | 239 | $router->post('/{id}/generate-stream-response', 'FluentBotController@generateStreamResponse')->int('id'); |
| 236 | 240 | $router->post('/{id}/get-ticket-summary', 'FluentBotController@getTicketSummary')->int('id'); |
| 237 | 241 | $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'); | |
| 247 | 242 | }); |
| 248 | 243 | |
| 249 | 244 | $router->prefix('activity-logger')->withPolicy('ActivityLoggerPolicy')->group(function ($router) { |
| 250 | 245 | $router->get('/', 'ActivityLoggerController@getActivities'); |
| @@ -276,4 +271,5 @@ | ||
| 276 | 271 | }); |
| 277 | 272 | |
| 278 | 273 | $router->post('ticket_image_upload', 'UploaderController@uploadImage') |
| 279 | 274 | ->withPolicy('AgentTicketPolicy'); |
| 275 | + | |