Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 326 |
|
0.00% |
0 / 4 |
CRAP | |
0.00% |
0 / 1 |
| ContactSourceRegistryService | |
0.00% |
0 / 326 |
|
0.00% |
0 / 4 |
56 | |
0.00% |
0 / 1 |
| all | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| find | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
12 | |||
| grouped | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
6 | |||
| sources | |
0.00% |
0 / 317 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace App\Modules\ContactModule\Services; |
| 4 | |
| 5 | class ContactSourceRegistryService |
| 6 | { |
| 7 | public function all(): array |
| 8 | { |
| 9 | return $this->sources(); |
| 10 | } |
| 11 | |
| 12 | public function find(string $type): ?array |
| 13 | { |
| 14 | foreach ($this->sources() as $source) { |
| 15 | if ($source['type'] === $type) { |
| 16 | return $source; |
| 17 | } |
| 18 | } |
| 19 | return null; |
| 20 | } |
| 21 | |
| 22 | public function grouped(): array |
| 23 | { |
| 24 | $grouped = []; |
| 25 | foreach ($this->sources() as $source) { |
| 26 | $grouped[$source['category']][] = $source; |
| 27 | } |
| 28 | return $grouped; |
| 29 | } |
| 30 | |
| 31 | /** |
| 32 | * REGISTRE MÉTIER CENTRAL – TOUTES LES SOURCES |
| 33 | */ |
| 34 | private function sources(): array |
| 35 | { |
| 36 | return [ |
| 37 | // ---------------------- LEAD ACQUISITION ---------------------- |
| 38 | [ |
| 39 | 'type' => 'webform', |
| 40 | 'label' => 'Formulaire Web', |
| 41 | 'category' => 'acquisition', |
| 42 | 'icon' => 'bi-ui-checks', |
| 43 | 'description' => 'Capture de leads via formulaires intégrés', |
| 44 | ], |
| 45 | [ |
| 46 | 'type' => 'landing_page', |
| 47 | 'label' => 'Landing Pages', |
| 48 | 'category' => 'acquisition', |
| 49 | 'icon' => 'bi-window', |
| 50 | 'description' => 'Pages marketing de conversion', |
| 51 | ], |
| 52 | [ |
| 53 | 'type' => 'popup_form', |
| 54 | 'label' => 'Popup Widget', |
| 55 | 'category' => 'acquisition', |
| 56 | 'icon' => 'bi-layout-text-window', |
| 57 | 'description' => 'Formulaires dynamiques sur site', |
| 58 | ], |
| 59 | [ |
| 60 | 'type' => 'facebook_leads', |
| 61 | 'label' => 'Facebook Lead Ads', |
| 62 | 'category' => 'acquisition', |
| 63 | 'icon' => 'bi-facebook', |
| 64 | 'description' => 'Captation leads Meta Ads', |
| 65 | ], |
| 66 | [ |
| 67 | 'type' => 'google_leads', |
| 68 | 'label' => 'Google Lead Forms', |
| 69 | 'category' => 'acquisition', |
| 70 | 'icon' => 'bi-google', |
| 71 | 'description' => 'Leads campagnes Google', |
| 72 | ], |
| 73 | [ |
| 74 | 'type' => 'linkedin_leads', |
| 75 | 'label' => 'LinkedIn Lead Gen', |
| 76 | 'category' => 'acquisition', |
| 77 | 'icon' => 'bi-linkedin', |
| 78 | 'description' => 'Prospection B2B LinkedIn', |
| 79 | ], |
| 80 | [ |
| 81 | 'type' => 'tiktok_leads', |
| 82 | 'label' => 'TikTok Lead Ads', |
| 83 | 'category' => 'acquisition', |
| 84 | 'icon' => 'bi-music-note-beamed', |
| 85 | 'description' => 'Leads campagnes TikTok', |
| 86 | ], |
| 87 | [ |
| 88 | 'type' => 'instagram_leads', |
| 89 | 'label' => 'Instagram Lead Ads', |
| 90 | 'category' => 'acquisition', |
| 91 | 'icon' => 'bi-instagram', |
| 92 | 'description' => 'Formulaires Instagram Ads', |
| 93 | ], |
| 94 | [ |
| 95 | 'type' => 'qr_capture', |
| 96 | 'label' => 'QR Code Capture', |
| 97 | 'category' => 'acquisition', |
| 98 | 'icon' => 'bi-qr-code', |
| 99 | 'description' => 'Scan QR pour inscription', |
| 100 | ], |
| 101 | [ |
| 102 | 'type' => 'event_registration', |
| 103 | 'label' => 'Inscription Événements', |
| 104 | 'category' => 'acquisition', |
| 105 | 'icon' => 'bi-calendar-event', |
| 106 | 'description' => 'Formulaires événements', |
| 107 | ], |
| 108 | |
| 109 | // ---------------------- E-COMMERCE / PAYMENTS ---------------------- |
| 110 | [ |
| 111 | 'type' => 'shopify_sync', |
| 112 | 'label' => 'Shopify Sync', |
| 113 | 'category' => 'ecommerce', |
| 114 | 'icon' => 'bi-shop', |
| 115 | 'description' => 'Clients Shopify', |
| 116 | ], |
| 117 | [ |
| 118 | 'type' => 'woocommerce_sync', |
| 119 | 'label' => 'WooCommerce Sync', |
| 120 | 'category' => 'ecommerce', |
| 121 | 'icon' => 'bi-wordpress', |
| 122 | 'description' => 'Clients WordPress e-commerce', |
| 123 | ], |
| 124 | [ |
| 125 | 'type' => 'prestashop_sync', |
| 126 | 'label' => 'PrestaShop Sync', |
| 127 | 'category' => 'ecommerce', |
| 128 | 'icon' => 'bi-cart', |
| 129 | 'description' => 'Base clients PrestaShop', |
| 130 | ], |
| 131 | [ |
| 132 | 'type' => 'magento_sync', |
| 133 | 'label' => 'Magento Sync', |
| 134 | 'category' => 'ecommerce', |
| 135 | 'icon' => 'bi-code-square', |
| 136 | 'description' => 'Clients Magento', |
| 137 | ], |
| 138 | [ |
| 139 | 'type' => 'stripe_events', |
| 140 | 'label' => 'Stripe Events', |
| 141 | 'category' => 'ecommerce', |
| 142 | 'icon' => 'bi-credit-card', |
| 143 | 'description' => 'Paiements Stripe', |
| 144 | ], |
| 145 | [ |
| 146 | 'type' => 'paypal_events', |
| 147 | 'label' => 'PayPal Events', |
| 148 | 'category' => 'ecommerce', |
| 149 | 'icon' => 'bi-paypal', |
| 150 | 'description' => 'Transactions PayPal', |
| 151 | ], |
| 152 | [ |
| 153 | 'type' => 'flutterwave', |
| 154 | 'label' => 'Flutterwave', |
| 155 | 'category' => 'ecommerce', |
| 156 | 'icon' => 'bi-globe', |
| 157 | 'description' => 'Paiements Afrique', |
| 158 | ], |
| 159 | [ |
| 160 | 'type' => 'cinetpay', |
| 161 | 'label' => 'CinetPay', |
| 162 | 'category' => 'ecommerce', |
| 163 | 'icon' => 'bi-phone', |
| 164 | 'description' => 'Mobile money', |
| 165 | ], |
| 166 | [ |
| 167 | 'type' => 'pos_sync', |
| 168 | 'label' => 'POS Sync', |
| 169 | 'category' => 'ecommerce', |
| 170 | 'icon' => 'bi-cash-stack', |
| 171 | 'description' => 'Données caisse', |
| 172 | ], |
| 173 | |
| 174 | // ---------------------- FILES / IMPORTS ---------------------- |
| 175 | [ |
| 176 | 'type' => 'csv_import', |
| 177 | 'label' => 'Import CSV', |
| 178 | 'category' => 'import', |
| 179 | 'icon' => 'bi-filetype-csv', |
| 180 | 'description' => 'Import fichiers CSV', |
| 181 | ], |
| 182 | [ |
| 183 | 'type' => 'excel_import', |
| 184 | 'label' => 'Import Excel', |
| 185 | 'category' => 'import', |
| 186 | 'icon' => 'bi-file-earmark-excel', |
| 187 | 'description' => 'Import fichiers Excel', |
| 188 | ], |
| 189 | [ |
| 190 | 'type' => 'google_sheets', |
| 191 | 'label' => 'Google Sheets', |
| 192 | 'category' => 'import', |
| 193 | 'icon' => 'bi-google', |
| 194 | 'description' => 'Synchronisation tableur', |
| 195 | ], |
| 196 | [ |
| 197 | 'type' => 'airtable', |
| 198 | 'label' => 'Airtable', |
| 199 | 'category' => 'import', |
| 200 | 'icon' => 'bi-grid-3x3-gap', |
| 201 | 'description' => 'Base Airtable', |
| 202 | ], |
| 203 | [ |
| 204 | 'type' => 'dropbox', |
| 205 | 'label' => 'Dropbox Sync', |
| 206 | 'category' => 'import', |
| 207 | 'icon' => 'bi-dropbox', |
| 208 | 'description' => 'Fichiers Dropbox', |
| 209 | ], |
| 210 | [ |
| 211 | 'type' => 'google_drive', |
| 212 | 'label' => 'Google Drive', |
| 213 | 'category' => 'import', |
| 214 | 'icon' => 'bi-google', |
| 215 | 'description' => 'Dossiers Drive', |
| 216 | ], |
| 217 | [ |
| 218 | 'type' => 'ftp_import', |
| 219 | 'label' => 'FTP Import', |
| 220 | 'category' => 'import', |
| 221 | 'icon' => 'bi-folder-symlink', |
| 222 | 'description' => 'Import FTP/SFTP', |
| 223 | ], |
| 224 | [ |
| 225 | 'type' => 'email_parser', |
| 226 | 'label' => 'Email Parser', |
| 227 | 'category' => 'import', |
| 228 | 'icon' => 'bi-envelope', |
| 229 | 'description' => 'Extraction emails', |
| 230 | ], |
| 231 | [ |
| 232 | 'type' => 'pdf_extraction', |
| 233 | 'label' => 'PDF Extraction', |
| 234 | 'category' => 'import', |
| 235 | 'icon' => 'bi-file-earmark-pdf', |
| 236 | 'description' => 'Extraction PDF', |
| 237 | ], |
| 238 | |
| 239 | // ---------------------- API / CRM ---------------------- |
| 240 | [ |
| 241 | 'type' => 'webhook', |
| 242 | 'label' => 'Webhook API', |
| 243 | 'category' => 'api', |
| 244 | 'icon' => 'bi-webhook', |
| 245 | 'description' => 'Événements temps réel', |
| 246 | ], |
| 247 | [ |
| 248 | 'type' => 'rest_api', |
| 249 | 'label' => 'REST API', |
| 250 | 'category' => 'api', |
| 251 | 'icon' => 'bi-plug', |
| 252 | 'description' => 'API externe', |
| 253 | ], |
| 254 | [ |
| 255 | 'type' => 'graphql_api', |
| 256 | 'label' => 'GraphQL API', |
| 257 | 'category' => 'api', |
| 258 | 'icon' => 'bi-diagram-3', |
| 259 | 'description' => 'API GraphQL', |
| 260 | ], |
| 261 | [ |
| 262 | 'type' => 'salesforce', |
| 263 | 'label' => 'Salesforce', |
| 264 | 'category' => 'api', |
| 265 | 'icon' => 'bi-cloud', |
| 266 | 'description' => 'CRM Salesforce', |
| 267 | ], |
| 268 | [ |
| 269 | 'type' => 'hubspot', |
| 270 | 'label' => 'HubSpot', |
| 271 | 'category' => 'api', |
| 272 | 'icon' => 'bi-diagram-3', |
| 273 | 'description' => 'CRM marketing', |
| 274 | ], |
| 275 | [ |
| 276 | 'type' => 'zoho_crm', |
| 277 | 'label' => 'Zoho CRM', |
| 278 | 'category' => 'api', |
| 279 | 'icon' => 'bi-building', |
| 280 | 'description' => 'CRM Zoho', |
| 281 | ], |
| 282 | [ |
| 283 | 'type' => 'dynamics_365', |
| 284 | 'label' => 'Dynamics 365', |
| 285 | 'category' => 'api', |
| 286 | 'icon' => 'bi-microsoft', |
| 287 | 'description' => 'CRM Microsoft', |
| 288 | ], |
| 289 | [ |
| 290 | 'type' => 'pipedrive', |
| 291 | 'label' => 'Pipedrive', |
| 292 | 'category' => 'api', |
| 293 | 'icon' => 'bi-pip', |
| 294 | 'description' => 'CRM ventes', |
| 295 | ], |
| 296 | [ |
| 297 | 'type' => 'close_crm', |
| 298 | 'label' => 'Close CRM', |
| 299 | 'category' => 'api', |
| 300 | 'icon' => 'bi-x-circle', |
| 301 | 'description' => 'CRM automation', |
| 302 | ], |
| 303 | [ |
| 304 | 'type' => 'custom_microservice', |
| 305 | 'label' => 'Microservice Custom', |
| 306 | 'category' => 'api', |
| 307 | 'icon' => 'bi-cpu', |
| 308 | 'description' => 'Service interne', |
| 309 | ], |
| 310 | |
| 311 | // ---------------------- AUTOMATION ---------------------- |
| 312 | [ |
| 313 | 'type' => 'zapier', |
| 314 | 'label' => 'Zapier', |
| 315 | 'category' => 'automation', |
| 316 | 'icon' => 'bi-lightning', |
| 317 | 'description' => 'Automation no-code', |
| 318 | ], |
| 319 | [ |
| 320 | 'type' => 'make', |
| 321 | 'label' => 'Make', |
| 322 | 'category' => 'automation', |
| 323 | 'icon' => 'bi-gear', |
| 324 | 'description' => 'Workflow automation', |
| 325 | ], |
| 326 | [ |
| 327 | 'type' => 'n8n', |
| 328 | 'label' => 'n8n', |
| 329 | 'category' => 'automation', |
| 330 | 'icon' => 'bi-diagram-2', |
| 331 | 'description' => 'Automation open-source', |
| 332 | ], |
| 333 | [ |
| 334 | 'type' => 'pabbly', |
| 335 | 'label' => 'Pabbly', |
| 336 | 'category' => 'automation', |
| 337 | 'icon' => 'bi-bezier2', |
| 338 | 'description' => 'Automation SaaS', |
| 339 | ], |
| 340 | [ |
| 341 | 'type' => 'shopify_flow', |
| 342 | 'label' => 'Shopify Flow', |
| 343 | 'category' => 'automation', |
| 344 | 'icon' => 'bi-shop', |
| 345 | 'description' => 'Automation Shopify', |
| 346 | ], |
| 347 | [ |
| 348 | 'type' => 'crm_trigger', |
| 349 | 'label' => 'CRM Trigger', |
| 350 | 'category' => 'automation', |
| 351 | 'icon' => 'bi-arrow-repeat', |
| 352 | 'description' => 'Triggers CRM', |
| 353 | ], |
| 354 | [ |
| 355 | 'type' => 'system_event', |
| 356 | 'label' => 'System Events', |
| 357 | 'category' => 'automation', |
| 358 | 'icon' => 'bi-hdd-stack', |
| 359 | 'description' => 'Événements système', |
| 360 | ], |
| 361 | ]; |
| 362 | } |
| 363 | } |