+
+ {
+ handleOnChange( 'slug', slug ?? '' );
+ } }
+ uuid={ uuidFromProps }
+ />
+
+
+
+ {
+ handleOnChange( 'shortcode', shortCode ?? '' );
+ } }
+ value={ state.shortcode }
+ help={ __( 'The region-specific merchant identifier. Example: 0dnz6ope' ) }
+ autoComplete="off"
+ __next40pxDefaultSize
+ />
+
+
+
+ {
+ handleOnChange( 'organization_id', shortCode ?? '' );
+ } }
+ value={ state.organization_id }
+ help={ __( 'The organization ID. Example: f_ecom_mirl_012' ) }
+ autoComplete="off"
+ __next40pxDefaultSize
+ />
+
+
+
+ {
+ handleOnChange( 'client_id', shortCode ?? '' );
+ } }
+ value={ state.client_id }
+ help={ __( 'Example: bc2991f1-eec8-4976-8774-935cbbe84f18' ) }
+ autoComplete="off"
+ __next40pxDefaultSize
+ />
+
+
+
+
{
+ handleOnChange( 'client_secret', shortCode ?? '' );
+ } }
+ value={ state.client_secret }
+ />
+
+
+
+
+ );
+};
diff --git a/src/data-sources/types.ts b/src/data-sources/types.ts
index 2c7bba12..b8fe8029 100644
--- a/src/data-sources/types.ts
+++ b/src/data-sources/types.ts
@@ -44,12 +44,6 @@ export interface AirtableConfig extends BaseDataSourceConfig {
tables: AirtableTableConfig[];
}
-export interface ShopifyConfig extends BaseDataSourceConfig {
- service: 'shopify';
- access_token: string;
- store_name: string;
-}
-
export interface GoogleSheetsConfig extends BaseDataSourceConfig {
service: 'google-sheets';
credentials: GoogleServiceAccountKey;
@@ -63,7 +57,26 @@ export interface HttpConfig extends BaseDataSourceConfig {
auth: HttpAuth;
}
-export type DataSourceConfig = AirtableConfig | ShopifyConfig | GoogleSheetsConfig | HttpConfig;
+export interface SalesforceB2CConfig extends BaseDataSourceConfig {
+ service: 'salesforce-b2c';
+ shortcode: string;
+ organization_id: string;
+ client_id: string;
+ client_secret: string;
+}
+
+export interface ShopifyConfig extends BaseDataSourceConfig {
+ service: 'shopify';
+ access_token: string;
+ store_name: string;
+}
+
+export type DataSourceConfig =
+ | AirtableConfig
+ | GoogleSheetsConfig
+ | HttpConfig
+ | SalesforceB2CConfig
+ | ShopifyConfig;
export type SettingsComponentProps< T extends BaseDataSourceConfig > = {
mode: 'add' | 'edit';
diff --git a/src/settings/icons/SalesforceCommerceB2CIcon.tsx b/src/settings/icons/SalesforceCommerceB2CIcon.tsx
new file mode 100644
index 00000000..3fafb357
--- /dev/null
+++ b/src/settings/icons/SalesforceCommerceB2CIcon.tsx
@@ -0,0 +1,109 @@
+import { SVG, Path, G } from '@wordpress/primitives';
+
+const SalesforceCommerceB2CIcon = (
+