Changeset 3296352
- Timestamp:
- 05/19/2025 10:24:16 AM (8 months ago)
- Location:
- integration-cds/trunk
- Files:
-
- 11 added
- 1 deleted
- 13 edited
-
core.php (modified) (12 diffs)
-
front/admin/index.html (modified) (1 diff)
-
front/admin/js/main.5b99fde2.js (added)
-
front/admin/js/main.e2c424a2.js (deleted)
-
integration-cds.php (modified) (2 diffs)
-
readme.txt (modified) (1 diff)
-
src/API/CreatedResponse.php (modified) (1 diff)
-
src/API/Endpoints/DeleteCache.php (modified) (2 diffs)
-
src/API/Endpoints/WebhookAdd.php (added)
-
src/API/Endpoints/WebhookDelete.php (added)
-
src/API/Endpoints/WebhookGet.php (added)
-
src/API/Endpoints/WebhookGetSettings.php (added)
-
src/API/Endpoints/WebhookList.php (added)
-
src/API/Endpoints/WebhookUpdate.php (added)
-
src/API/Endpoints/WebhookUpdateSettings.php (added)
-
src/API/Registrar.php (modified) (2 diffs)
-
src/CacheProvider.php (modified) (1 diff)
-
src/Forms/CustomFormModel.php (modified) (8 diffs)
-
src/WebhookSettings.php (added)
-
src/Webhooks/Runner.php (modified) (8 diffs)
-
src/Webhooks/WebhookForm.php (added)
-
src/Webhooks/WebhooksRunnerInterface.php (added)
-
vendor/composer/autoload_classmap.php (modified) (2 diffs)
-
vendor/composer/autoload_static.php (modified) (2 diffs)
-
vendor/composer/installed.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
integration-cds/trunk/core.php
r3232488 r3296352 57 57 if ( !$storedVersion || version_compare( $storedVersion, ICDS_VERSION, '==' ) ) { 58 58 return; 59 }59 } 60 60 61 61 if ( version_compare( $storedVersion, '2.26', '<' ) ) { … … 66 66 UpdateManager::updateCustomButtonLabels(); 67 67 } 68 69 68 70 69 update_option( 'icds_version', ICDS_VERSION ); … … 126 125 * Register advanced settings. 127 126 */ 128 add_filter( 'integration-cds/settings/advanced', function( $settings ) {127 add_filter( 'integration-cds/settings/advanced', function( $settings ) { 129 128 $advSetting = new AdvancedSetting( 'ICDS_COMPATIBLE_BINDING' ); 130 129 $advSetting->type = AdvancedSetting::TYPE_BOOLEAN; … … 269 268 $settingsMap['recaptcha'] = $settingsType; 270 269 270 $settingsType = new SettingsType( 'webhooks' ); 271 $settingsType->storageKey = 'icds_webhooks'; 272 $settingsType->className = WebhookSettings::class; 273 $settingsMap['webhooks'] = $settingsType; 274 271 275 $settingsType = new SettingsType( AdvancedSettings::SETTINGS_TYPE_NAME ); 272 276 $settingsType->storageKey = AdvancedSettings::STORAGE_KEY; … … 392 396 * Registers resources for Admin UI. 393 397 */ 394 function registerAdminScripts() {398 function registerAdminScripts() { 395 399 static $touched = false; 396 400 … … 469 473 ], 470 474 ] ); 471 } else{472 $scripts = array_merge( $scripts, [475 } else { 476 $scripts = array_merge( $scripts, [ 473 477 'icds/gutenberg-monaco-block' => [ 474 478 'src' => ICDS_URL . 'assets/js/gutenberg-text-block.js', … … 482 486 'inFooter' => true, 483 487 ], 484 ] );488 ] ); 485 489 } 486 490 … … 854 858 'entityrecords' => 'Table Records', 855 859 '__misc' => 'Misc', 860 'boundrecords' => 'Bound records', 856 861 ], 857 862 ]; … … 910 915 } 911 916 912 LoggerProvider::instance()->getLogger()->debug( 'Register special \'data-name\' attribute for Monaco editor style tag.', [ $tag, $handle, $href, $media, ] ); 917 LoggerProvider::instance()->getLogger()->debug( 'Register special \'data-name\' attribute for Monaco editor style tag.', [ 918 $tag, 919 $handle, 920 $href, 921 $media, 922 ] ); 913 923 914 924 return sprintf( '<link rel="stylesheet" data-name="vs/editor/editor.main" id="%1$s-css" href="%2$s" media="%3$s">', $handle, $href, $media ); … … 922 932 ] ); 923 933 924 LoggerProvider::instance()->getLogger()->debug( 'Register Monaco editor block for Gutenberg.' );934 LoggerProvider::instance()->getLogger()->debug( 'Register Monaco editor block for Gutenberg.' ); 925 935 register_block_type( 'icds/gutenberg-monaco-block', [ 926 936 'editor_script' => 'icds/gutenberg-monaco-block', … … 963 973 if ( !InformationProvider::instance()->isSolutionInstalled() ) { 964 974 ?> 965 <div class="notice notice-warning">966 <p>967 <?php printf(968 __( 'Thank you for using the free version of Dataverse Integration. Try our <a href="%s" class="alert-link" target="_blank">Power Platform solution</a> to unlock more exciting features.', 'integration-cds' ),969 InformationProvider::SOLUTION_MARKETPLACE_URL970 ); ?>971 </p>972 </div>975 <div class="notice notice-warning"> 976 <p> 977 <?php printf( 978 __( 'Thank you for using the free version of Dataverse Integration. Try our <a href="%s" class="alert-link" target="_blank">Power Platform solution</a> to unlock more exciting features.', 'integration-cds' ), 979 InformationProvider::SOLUTION_MARKETPLACE_URL 980 ); ?> 981 </p> 982 </div> 973 983 <?php 974 984 return; … … 978 988 $nonce = wp_create_nonce( 'install-plugin_integration-cds-premium' ); 979 989 ?> 980 <div class="notice notice-warning">981 <p>982 <?php printf(983 __( 'Thank you for using the free version of Dataverse Integration. <a href="%s" class="alert-link">Download & install</a> the premium add-on to unlock more exciting features.', 'integration-cds' ),984 admin_url( 'update.php?action=install-plugin&plugin=integration-cds-premium&_wpnonce=' . $nonce )985 ); ?>986 </p>987 </div>990 <div class="notice notice-warning"> 991 <p> 992 <?php printf( 993 __( 'Thank you for using the free version of Dataverse Integration. <a href="%s" class="alert-link">Download & install</a> the premium add-on to unlock more exciting features.', 'integration-cds' ), 994 admin_url( 'update.php?action=install-plugin&plugin=integration-cds-premium&_wpnonce=' . $nonce ) 995 ); ?> 996 </p> 997 </div> 988 998 <?php 989 999 } -
integration-cds/trunk/front/admin/index.html
r3274314 r3296352 1 <!DOCTYPE html><html lang="en" class="h-100"><head><base href="__ICDS_BASE_URL__"><meta charset="utf-8"><title>Dataverse Integration Settings</title><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="wp-content/plugins/integration-cds/front/admin/favicon.ico"><title></title><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-0b65ffb6.0581547d.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0a3196.2767fb51.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0a3577.d49dd877.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0a40c8.9d44158a.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0a43df.01950eda.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0aa90c.da8bb1b7.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0aab07.7d89f0aa.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0abc00.c87aa4af.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0ae937.e9d597f6.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0aeb45.30e41831.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0af08c.8bfc3337.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0afa49.8be77e90.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0b2762.9a3ef9c1.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0b6187.bb482c4a.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0ba136.f4db86fb.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0bb267.3b653658.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0bcec1.f4b0cdc8.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0bdf38.4e0f5394.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0bff92.61ff6812.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0c0494.8d2a802b.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0c0a09.4f675a04.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0c4313.44c897a0.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0c46d1.e54af410.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0c512b.13860129.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0c86e3.cafb52de.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0cf16e.d2fd45c4.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0d056d.5f8e5612.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0d0645.5a3cc879.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0d2f22.3a8b0702.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0d61fd.e655ebd2.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0d7e63.211649e0.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0dda4e.c83fb4ec.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0de971.737087c5.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0e1b57.410577ab.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0e1fbe.fb479130.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0e22d6.655d1080.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0e4fe5.80bff59d.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0e542a.d4c2210e.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0e57ec.abe5dc3a.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0e6553.1db13875.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0e6c86.7aa1aee7.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0ea098.1c1a63b4.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0f0a11.a12b9a60.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d208ac5.1b947dcc.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d209408.37ced34d.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d20f745.b79ac6a5.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d20ff23.9aa317e8.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d2138c7.09676ac5.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d216f3b.06a226d7.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d217e5b.f64c3699.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d21b84a.7ee44ed7.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d21dcd2.a87cc32c.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d21f327.d4a7a131.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d2214b3.09d0507d.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d221799.9ae3b728.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d221814.c6889716.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d221a34.a72781ab.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d22502a.82ddfe1a.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d226775.f405ccaa.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d229411.2f4d293d.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d2295e9.ce277453.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d22c171.dbd4c691.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d22c2b8.29707b7f.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d22ca58.8bd185bb.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d2311f7.aae84ba6.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d237ee7.532c2ff8.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d238465.223c7726.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-30597b4a.1f4d1e00.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-7532b3ea.7dae515a.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-e13e4362.3e9684d3.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/css/chunk-vendors.6b879ace.css" rel="preload" as="style"><link href="wp-content/plugins/integration-cds/front/admin/css/main.076b1dad.css" rel="preload" as="style"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-vendors.3b8a2693.js" rel="preload" as="script"><link href="wp-content/plugins/integration-cds/front/admin/js/main. e2c424a2.js" rel="preload" as="script"><link href="wp-content/plugins/integration-cds/front/admin/css/chunk-vendors.6b879ace.css" rel="stylesheet"><link href="wp-content/plugins/integration-cds/front/admin/css/main.076b1dad.css" rel="stylesheet"></head><body class="h-100 bg-light"><noscript><strong>We're sorry but doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="wp-content/plugins/integration-cds/front/admin/js/chunk-vendors.3b8a2693.js"></script><script src="wp-content/plugins/integration-cds/front/admin/js/main.e2c424a2.js"></script></body></html>1 <!DOCTYPE html><html lang="en" class="h-100"><head><base href="__ICDS_BASE_URL__"><meta charset="utf-8"><title>Dataverse Integration Settings</title><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="wp-content/plugins/integration-cds/front/admin/favicon.ico"><title></title><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-0b65ffb6.0581547d.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0a3196.2767fb51.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0a3577.d49dd877.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0a40c8.9d44158a.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0a43df.01950eda.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0aa90c.da8bb1b7.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0aab07.7d89f0aa.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0abc00.c87aa4af.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0ae937.e9d597f6.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0aeb45.30e41831.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0af08c.8bfc3337.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0afa49.8be77e90.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0b2762.9a3ef9c1.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0b6187.bb482c4a.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0ba136.f4db86fb.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0bb267.3b653658.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0bcec1.f4b0cdc8.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0bdf38.4e0f5394.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0bff92.61ff6812.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0c0494.8d2a802b.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0c0a09.4f675a04.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0c4313.44c897a0.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0c46d1.e54af410.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0c512b.13860129.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0c86e3.cafb52de.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0cf16e.d2fd45c4.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0d056d.5f8e5612.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0d0645.5a3cc879.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0d2f22.3a8b0702.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0d61fd.e655ebd2.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0d7e63.211649e0.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0dda4e.c83fb4ec.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0de971.737087c5.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0e1b57.410577ab.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0e1fbe.fb479130.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0e22d6.655d1080.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0e4fe5.80bff59d.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0e542a.d4c2210e.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0e57ec.abe5dc3a.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0e6553.1db13875.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0e6c86.7aa1aee7.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0ea098.1c1a63b4.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d0f0a11.a12b9a60.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d208ac5.1b947dcc.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d209408.37ced34d.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d20f745.b79ac6a5.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d20ff23.9aa317e8.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d2138c7.09676ac5.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d216f3b.06a226d7.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d217e5b.f64c3699.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d21b84a.7ee44ed7.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d21dcd2.a87cc32c.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d21f327.d4a7a131.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d2214b3.09d0507d.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d221799.9ae3b728.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d221814.c6889716.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d221a34.a72781ab.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d22502a.82ddfe1a.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d226775.f405ccaa.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d229411.2f4d293d.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d2295e9.ce277453.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d22c171.dbd4c691.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d22c2b8.29707b7f.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d22ca58.8bd185bb.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d2311f7.aae84ba6.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d237ee7.532c2ff8.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-2d238465.223c7726.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-30597b4a.1f4d1e00.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-7532b3ea.7dae515a.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-e13e4362.3e9684d3.js" rel="prefetch"><link href="wp-content/plugins/integration-cds/front/admin/css/chunk-vendors.6b879ace.css" rel="preload" as="style"><link href="wp-content/plugins/integration-cds/front/admin/css/main.076b1dad.css" rel="preload" as="style"><link href="wp-content/plugins/integration-cds/front/admin/js/chunk-vendors.3b8a2693.js" rel="preload" as="script"><link href="wp-content/plugins/integration-cds/front/admin/js/main.5b99fde2.js" rel="preload" as="script"><link href="wp-content/plugins/integration-cds/front/admin/css/chunk-vendors.6b879ace.css" rel="stylesheet"><link href="wp-content/plugins/integration-cds/front/admin/css/main.076b1dad.css" rel="stylesheet"></head><body class="h-100 bg-light"><noscript><strong>We're sorry but doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="wp-content/plugins/integration-cds/front/admin/js/chunk-vendors.3b8a2693.js"></script><script src="wp-content/plugins/integration-cds/front/admin/js/main.5b99fde2.js"></script></body></html> -
integration-cds/trunk/integration-cds.php
r3274314 r3296352 4 4 Plugin URI: https://alexacrm.com/ 5 5 Description: Integrate Microsoft Dataverse organizations with WordPress. 6 Version: 2.7 76 Version: 2.78 7 7 Requires at least: 6.1 8 8 Requires PHP: 8.2 … … 86 86 * Plugin version. 87 87 */ 88 define( 'ICDS_VERSION', '2.7 7' );88 define( 'ICDS_VERSION', '2.78' ); 89 89 90 90 /** -
integration-cds/trunk/readme.txt
r3274314 r3296352 62 62 == Changelog == 63 63 64 = 2.78 = 65 66 * Implemented webhooks management 67 * Made 'Verify Connection' button always visible 68 64 69 = 2.77 = 65 70 -
integration-cds/trunk/src/API/CreatedResponse.php
r2481802 r3296352 31 31 * Constructor. 32 32 * 33 * @param array $data 34 * @param array|null $headers Optional. HTTP header map. Default empty array. 35 * 33 36 * @since 4.4.0 34 37 * 35 * @param array $headers Optional. HTTP header map. Default empty array.36 38 */ 37 public function __construct( array $headers = [] ) {38 parent::__construct( null, 201, $headers );39 public function __construct(array $data, ?array $headers = [] ) { 40 parent::__construct( $data, 201, $headers ); 39 41 } 40 42 -
integration-cds/trunk/src/API/Endpoints/DeleteCache.php
r3013079 r3296352 61 61 $cacheHandlers = apply_filters( 'integration-cds/cache/delete-handlers', [ 62 62 'fetchxml' => [ $this, 'clearFetchxmlCache' ], 63 'boundrecords' => [ $this, 'clearBoundRecordsCache' ], 63 64 'entityrecords' => [ $this, 'clearEntityRecordsCache' ], 64 65 ] ); … … 96 97 97 98 return new NoContentResponse(); 99 } 100 101 /** 102 * Deletes specified item from 'boundrecords' cache pool. 103 * 104 * @param $cacheItem 105 * 106 * @return bool 107 */ 108 protected function clearBoundRecordsCache( $cacheItem ): bool { 109 return $this->clearPool( 'boundrecords', $cacheItem ); 98 110 } 99 111 -
integration-cds/trunk/src/API/Registrar.php
r3010565 r3296352 71 71 \AlexaCRM\Nextgen\API\Endpoints\CheckRecaptcha::class, 72 72 \AlexaCRM\Nextgen\API\Endpoints\GetRecaptchaSettings::class, 73 \AlexaCRM\Nextgen\API\Endpoints\GetWebhooks::class, 74 \AlexaCRM\Nextgen\API\Endpoints\RegisterWebhook::class, 75 \AlexaCRM\Nextgen\API\Endpoints\DeleteWebhook::class, 76 \AlexaCRM\Nextgen\API\Endpoints\UpdateWebhook::class, 73 \AlexaCRM\Nextgen\API\Endpoints\WebhookList::class, 74 \AlexaCRM\Nextgen\API\Endpoints\WebhookAdd::class, 75 \AlexaCRM\Nextgen\API\Endpoints\WebhookDelete::class, 76 \AlexaCRM\Nextgen\API\Endpoints\WebhookUpdate::class, 77 \AlexaCRM\Nextgen\API\Endpoints\WebhookGet::class, 77 78 \AlexaCRM\Nextgen\API\Endpoints\InstallAddon::class, 78 79 \AlexaCRM\Nextgen\API\Endpoints\ActivateAddon::class, … … 83 84 \AlexaCRM\Nextgen\API\Endpoints\GetFile::class, 84 85 \AlexaCRM\Nextgen\API\Endpoints\GetImage::class, 86 \AlexaCRM\Nextgen\API\Endpoints\WebhookUpdateSettings::class, 87 \AlexaCRM\Nextgen\API\Endpoints\WebhookGetSettings::class, 85 88 86 89 // V2 endpoints -
integration-cds/trunk/src/CacheProvider.php
r3274314 r3296352 202 202 'data', 203 203 'fetchxml', 204 'boundrecords', 204 205 'entityrecords', 205 206 ] ); -
integration-cds/trunk/src/Forms/CustomFormModel.php
r3274314 r3296352 31 31 use AlexaCRM\Nextgen\MetadataService; 32 32 use AlexaCRM\Nextgen\Twig\Util; 33 use AlexaCRM\Nextgen\Webhooks\Runner; 34 use AlexaCRM\Nextgen\Webhooks\WebhookForm; 33 35 use AlexaCRM\WebAPI\OData\AuthenticationException; 34 36 use AlexaCRM\WebAPI\OrganizationException; … … 215 217 */ 216 218 public function submitData( array $data, ?EntityReference $entityReference = null ): SubmissionResult { 217 $formEntity = new Entity( $this->formSettings->entity);219 $formEntity = new Entity( $this->formSettings->entity ); 218 220 $logger = LoggerProvider::instance()->getLogger(); 219 221 $formClone = clone $this; … … 248 250 249 251 if ( $this->formSettings->mode === CustomFormAttributes::MODE_UPDATE && $entityReference instanceof EntityReference ) { 252 $formActionType = Runner::FORM_UPDATE; 250 253 $record->Id = $entityReference->Id; 251 254 $client->Update( $record ); … … 256 259 ] ); 257 260 } else { 261 $formActionType = Runner::FORM_CREATE; 258 262 $id = $client->Create( $record ); 259 263 $record->Id = $id; … … 274 278 */ 275 279 do_action( 'integration-cds/forms/submit-success', $formClone, $record ); 280 281 $webhookForm = new WebhookForm( $formActionType, Runner::FORM_TYPE_CUSTOM ); 282 $runner = new Runner( $webhookForm ); 283 $runner->trigger( $record->Attributes ); 276 284 } catch ( \Exception $e ) { 277 $logger->error( __( 'Failed to submit custom form', 'integration-cds'), [285 $logger->error( __( 'Failed to submit custom form', 'integration-cds' ), [ 278 286 'record' => $record, 279 287 'error' => $e, … … 307 315 * @return SubmissionResult 308 316 */ 309 private function setCustomValidationResult( array $validationResult, Logger $logger, XrmEntity $record): SubmissionResult {317 private function setCustomValidationResult( array $validationResult, Logger $logger, XrmEntity $record ): SubmissionResult { 310 318 $errorMessage = $validationResult['payload'] ?? ''; 311 319 $logger->error( __( 'Failed to submit custom form', 'integration-cds' ), [ … … 317 325 $result->errorMessage = $errorMessage; 318 326 $result->exception = null; 327 319 328 return $result; 320 329 } … … 368 377 } 369 378 370 $recaptcha = $this->formSettings->recaptcha ? 'recaptcha' : 'norecaptcha';379 $recaptcha = $this->formSettings->recaptcha ? 'recaptcha' : 'norecaptcha'; 371 380 372 381 $str = sprintf( '%s,%s,%s(%s)', $this->formSettings->mode, $this->formSettings->entity, $recaptcha, $id ); -
integration-cds/trunk/src/Webhooks/Runner.php
r2628653 r3296352 23 23 use AlexaCRM\Nextgen\ConnectionService; 24 24 use AlexaCRM\Nextgen\LoggerProvider; 25 use AlexaCRM\Nextgen\SingletonTrait; 25 26 use Exception; 26 27 use GuzzleHttp\Client; 27 use WP_Query;28 use GuzzleHttp\Promise; 28 29 29 30 /** … … 31 32 */ 32 33 class Runner { 34 35 use SingletonTrait; 33 36 34 37 /** … … 48 51 49 52 /** 53 * Meta key to store the webhook description. 54 */ 55 public const TARGET_DESCRIPTION = 'icds_webhook_description'; 56 57 /** 58 * Meta key to store the webhook form. 59 */ 60 public const TARGET_FORM_TYPE = 'icds_webhook_form_type'; 61 62 /** 63 * Meta key to store the webhook form name. 64 */ 65 public const TARGET_FORM_NAME = 'icds_webhook_form_name'; 66 67 /** 68 * Meta key to store the webhook form name. 69 */ 70 public const TARGET_FORM_ID = 'icds_webhook_form_id'; 71 72 /** 50 73 * Wodpress 'post_status' field value for enabled webhook. 51 74 */ … … 57 80 public const DISABLED_STATUS = 'private'; 58 81 82 const FORM_CREATE = 'form/created'; 83 84 const FORM_UPDATE = 'form/updated'; 85 86 const USER_CREATE = 'user/created'; 87 88 const USER_UPDATE = 'user/updated'; 89 90 const USER_DELETE = 'user/deleted'; 91 92 const FORM_TYPE_ALL = 'all'; 93 94 const FORM_TYPE_GRAVITY = 'gravity'; 95 96 const FORM_TYPE_ELEMENTOR = 'elementor'; 97 98 const FORM_TYPE_PREMIUM = 'premium'; 99 100 const FORM_TYPE_CUSTOM = 'custom'; 101 59 102 protected string $topic; 60 103 61 /** 62 * @var string[] 63 */ 64 protected array $webhooks = []; 104 protected WebhooksRunnerInterface $webhookRunner; 65 105 66 public function __construct( string $topic ) { 67 $this->topic = $topic; 68 69 $q = new WP_Query( [ 70 'post_type' => Runner::POST_TYPE, 71 'post_status' => Runner::ENABLED_STATUS, 72 'meta_key' => Runner::TOPIC_KEY, 73 'meta_value' => $topic, 74 'fields' => 'ids', 75 'nopaging' => true, 76 ] ); 77 78 foreach ( $q->posts as $id ) { 79 $target = trim( get_post_meta( $id, static::TARGET_KEY, true ) ); 80 if ( $target === '' ) { 81 continue; 82 } 83 84 $this->webhooks[] = $target; 85 } 106 public function __construct( WebhooksRunnerInterface $webhookRunner, array $params = [] ) { 107 $this->webhookRunner = $webhookRunner; 86 108 } 87 109 … … 90 112 * 91 113 * @param $payload 114 * 115 * @throws \Throwable 92 116 */ 93 117 public function trigger( $payload ): void { 94 if ( count( $this->webhooks ) === 0 ) { 118 119 $webhooks = $this->webhookRunner->findWebhooks(); 120 121 if ( count( $webhooks ) === 0 ) { 95 122 return; 96 123 } … … 99 126 $logger = LoggerProvider::instance()->getLogger(); 100 127 101 foreach ( $this->webhooks as $target ) { 128 $promises = []; 129 foreach ( $webhooks as $target ) { 102 130 try { 103 $ client->post( $target, [131 $promises[] = $client->postAsync( $target, [ 104 132 'json' => $payload, 105 133 ] ); … … 109 137 ] ); 110 138 } 139 } 140 // Wait for all the requests to complete. 141 try { 142 Promise\Utils::unwrap( $promises ); 143 } 144 catch ( Exception $e ) { 145 return; 111 146 } 112 147 } … … 122 157 return new Client( [ 123 158 'verify' => $verify, 159 'timeout' => 30, 124 160 ] ); 125 161 } -
integration-cds/trunk/vendor/composer/autoload_classmap.php
r3274314 r3296352 46 46 'AlexaCRM\\Nextgen\\API\\Endpoints\\SubmitCustomForm' => $baseDir . '/src/API/Endpoints/SubmitCustomForm.php', 47 47 'AlexaCRM\\Nextgen\\API\\Endpoints\\UpdateWebhook' => $baseDir . '/src/API/Endpoints/UpdateWebhook.php', 48 'AlexaCRM\\Nextgen\\API\\Endpoints\\WebhookAdd' => $baseDir . '/src/API/Endpoints/WebhookAdd.php', 49 'AlexaCRM\\Nextgen\\API\\Endpoints\\WebhookDelete' => $baseDir . '/src/API/Endpoints/WebhookDelete.php', 50 'AlexaCRM\\Nextgen\\API\\Endpoints\\WebhookGet' => $baseDir . '/src/API/Endpoints/WebhookGet.php', 51 'AlexaCRM\\Nextgen\\API\\Endpoints\\WebhookGetSettings' => $baseDir . '/src/API/Endpoints/WebhookGetSettings.php', 52 'AlexaCRM\\Nextgen\\API\\Endpoints\\WebhookList' => $baseDir . '/src/API/Endpoints/WebhookList.php', 53 'AlexaCRM\\Nextgen\\API\\Endpoints\\WebhookUpdate' => $baseDir . '/src/API/Endpoints/WebhookUpdate.php', 54 'AlexaCRM\\Nextgen\\API\\Endpoints\\WebhookUpdateSettings' => $baseDir . '/src/API/Endpoints/WebhookUpdateSettings.php', 48 55 'AlexaCRM\\Nextgen\\API\\NoContentResponse' => $baseDir . '/src/API/NoContentResponse.php', 49 56 'AlexaCRM\\Nextgen\\API\\Registrar' => $baseDir . '/src/API/Registrar.php', … … 143 150 'AlexaCRM\\Nextgen\\WebApiClient' => $baseDir . '/src/WebApiClient.php', 144 151 'AlexaCRM\\Nextgen\\WebApi\\EndpointAccessType' => $baseDir . '/src/WebApi/EndpointAccessType.php', 152 'AlexaCRM\\Nextgen\\WebhookSettings' => $baseDir . '/src/WebhookSettings.php', 145 153 'AlexaCRM\\Nextgen\\Webhooks\\Runner' => $baseDir . '/src/Webhooks/Runner.php', 154 'AlexaCRM\\Nextgen\\Webhooks\\WebhookForm' => $baseDir . '/src/Webhooks/WebhookForm.php', 155 'AlexaCRM\\Nextgen\\Webhooks\\WebhooksRunnerInterface' => $baseDir . '/src/Webhooks/WebhooksRunnerInterface.php', 146 156 'AlexaCRM\\Nextgen\\WpServices' => $baseDir . '/src/WpServices.php', 147 157 'AlexaCRM\\StrongSerializer\\Deserializer' => $vendorDir . '/alexacrm/strong-serializer/src/Deserializer.php', -
integration-cds/trunk/vendor/composer/autoload_static.php
r3274314 r3296352 269 269 'AlexaCRM\\Nextgen\\API\\Endpoints\\SubmitCustomForm' => __DIR__ . '/../..' . '/src/API/Endpoints/SubmitCustomForm.php', 270 270 'AlexaCRM\\Nextgen\\API\\Endpoints\\UpdateWebhook' => __DIR__ . '/../..' . '/src/API/Endpoints/UpdateWebhook.php', 271 'AlexaCRM\\Nextgen\\API\\Endpoints\\WebhookAdd' => __DIR__ . '/../..' . '/src/API/Endpoints/WebhookAdd.php', 272 'AlexaCRM\\Nextgen\\API\\Endpoints\\WebhookDelete' => __DIR__ . '/../..' . '/src/API/Endpoints/WebhookDelete.php', 273 'AlexaCRM\\Nextgen\\API\\Endpoints\\WebhookGet' => __DIR__ . '/../..' . '/src/API/Endpoints/WebhookGet.php', 274 'AlexaCRM\\Nextgen\\API\\Endpoints\\WebhookGetSettings' => __DIR__ . '/../..' . '/src/API/Endpoints/WebhookGetSettings.php', 275 'AlexaCRM\\Nextgen\\API\\Endpoints\\WebhookList' => __DIR__ . '/../..' . '/src/API/Endpoints/WebhookList.php', 276 'AlexaCRM\\Nextgen\\API\\Endpoints\\WebhookUpdate' => __DIR__ . '/../..' . '/src/API/Endpoints/WebhookUpdate.php', 277 'AlexaCRM\\Nextgen\\API\\Endpoints\\WebhookUpdateSettings' => __DIR__ . '/../..' . '/src/API/Endpoints/WebhookUpdateSettings.php', 271 278 'AlexaCRM\\Nextgen\\API\\NoContentResponse' => __DIR__ . '/../..' . '/src/API/NoContentResponse.php', 272 279 'AlexaCRM\\Nextgen\\API\\Registrar' => __DIR__ . '/../..' . '/src/API/Registrar.php', … … 366 373 'AlexaCRM\\Nextgen\\WebApiClient' => __DIR__ . '/../..' . '/src/WebApiClient.php', 367 374 'AlexaCRM\\Nextgen\\WebApi\\EndpointAccessType' => __DIR__ . '/../..' . '/src/WebApi/EndpointAccessType.php', 375 'AlexaCRM\\Nextgen\\WebhookSettings' => __DIR__ . '/../..' . '/src/WebhookSettings.php', 368 376 'AlexaCRM\\Nextgen\\Webhooks\\Runner' => __DIR__ . '/../..' . '/src/Webhooks/Runner.php', 377 'AlexaCRM\\Nextgen\\Webhooks\\WebhookForm' => __DIR__ . '/../..' . '/src/Webhooks/WebhookForm.php', 378 'AlexaCRM\\Nextgen\\Webhooks\\WebhooksRunnerInterface' => __DIR__ . '/../..' . '/src/Webhooks/WebhooksRunnerInterface.php', 369 379 'AlexaCRM\\Nextgen\\WpServices' => __DIR__ . '/../..' . '/src/WpServices.php', 370 380 'AlexaCRM\\StrongSerializer\\Deserializer' => __DIR__ . '/..' . '/alexacrm/strong-serializer/src/Deserializer.php', -
integration-cds/trunk/vendor/composer/installed.php
r3274314 r3296352 4 4 'pretty_version' => 'dev-master', 5 5 'version' => 'dev-master', 6 'reference' => ' d84b9e07847e9d42817167943b53eb178d6174a9',6 'reference' => 'bafc8cfa87c77c8784dd07e40d108a05d7710c5e', 7 7 'type' => 'wordpress-plugin', 8 8 'install_path' => __DIR__ . '/../../', … … 23 23 'pretty_version' => 'dev-master', 24 24 'version' => 'dev-master', 25 'reference' => ' d84b9e07847e9d42817167943b53eb178d6174a9',25 'reference' => 'bafc8cfa87c77c8784dd07e40d108a05d7710c5e', 26 26 'type' => 'wordpress-plugin', 27 27 'install_path' => __DIR__ . '/../../',
Note: See TracChangeset
for help on using the changeset viewer.