diff --git a/src/Resources/app/administration/src/types/openapi.d.ts b/src/Resources/app/administration/src/types/openapi.d.ts index fcdcdbb75..c8801a035 100644 --- a/src/Resources/app/administration/src/types/openapi.d.ts +++ b/src/Resources/app/administration/src/types/openapi.d.ts @@ -516,22 +516,22 @@ export interface components { status: string; }; swag_paypal_v1_merchant_integrations_oauth_integration: { - integration_method: string; - integration_type: string; - status: string; - oauth_third_party: components["schemas"]["swag_paypal_v1_merchant_integrations_oauth_integration_oauth_third_party"][]; + integration_method?: string; + integration_type?: string; + status?: string; + oauth_third_party?: components["schemas"]["swag_paypal_v1_merchant_integrations_oauth_integration_oauth_third_party"][]; }; swag_paypal_v1_merchant_integrations_oauth_integration_oauth_third_party: { - access_token: string; - merchant_client_id: string; - partner_client_id: string; - refresh_token: string; + access_token?: string; + merchant_client_id?: string; + partner_client_id?: string; + refresh_token?: string; scopes: string[]; }; swag_paypal_v1_merchant_integrations_product: { name: string; - vetting_status: string; - capabilities: string[]; + vetting_status?: string; + capabilities?: string[]; }; swag_paypal_v1_oauth_credentials: { restId: string; diff --git a/src/Resources/app/administration/src/types/system-config.ts b/src/Resources/app/administration/src/types/system-config.ts index 4d05837d1..dd8ff973d 100644 --- a/src/Resources/app/administration/src/types/system-config.ts +++ b/src/Resources/app/administration/src/types/system-config.ts @@ -2,6 +2,7 @@ export const LANDING_PAGES = ['LOGIN', 'BILLING', 'NO_PREFERENCE'] as const; export const BUTTON_COLORS = ['gold', 'blue', 'black', 'silver', 'white'] as const; export const BUTTON_SHAPES = ['rect', 'pill', 'sharp'] as const; export const INTENTS = ['CAPTURE', 'AUTHORIZE'] as const; +export const COUNTRY_OVERRIDES = ['en-AU', 'de-DE', 'es-ES', 'fr-FR', 'en-GB', 'it-IT', 'en-US'] as const; export declare type SystemConfig = { 'SwagPayPal.settings.clientId'?: string; @@ -27,12 +28,12 @@ export declare type SystemConfig = { 'SwagPayPal.settings.ecsListingEnabled'?: boolean; 'SwagPayPal.settings.ecsButtonColor'?: typeof BUTTON_COLORS[number]; 'SwagPayPal.settings.ecsButtonShape'?: typeof BUTTON_SHAPES[number]; - 'SwagPayPal.settings.ecsButtonLanguageIso'?: string; + 'SwagPayPal.settings.ecsButtonLanguageIso'?: string | null; 'SwagPayPal.settings.ecsShowPayLater'?: boolean; 'SwagPayPal.settings.spbButtonColor'?: typeof BUTTON_COLORS[number]; 'SwagPayPal.settings.spbButtonShape'?: typeof BUTTON_SHAPES[number]; - 'SwagPayPal.settings.spbButtonLanguageIso'?: string; + 'SwagPayPal.settings.spbButtonLanguageIso'?: string | null; 'SwagPayPal.settings.acdcForce3DS'?: boolean; 'SwagPayPal.settings.puiCustomerServiceInstructions'?: string; 'SwagPayPal.settings.installmentBannerDetailPageEnabled'?: boolean; @@ -49,7 +50,7 @@ export declare type SystemConfig = { /** * @deprecated tag:v10.0.0 - Will be removed without replacement. */ - 'SwagPayPal.settings.merchantLocation'?: string; + 'SwagPayPal.settings.merchantLocation'?: 'other' | 'germany'; /** * @deprecated tag:v10.0.0 - Will be removed without replacement. @@ -63,7 +64,7 @@ export declare type SystemConfig = { 'SwagPayPal.settings.vaultingEnabledVenmo'?: boolean; 'SwagPayPal.settings.crossBorderMessagingEnabled'?: boolean; - 'SwagPayPal.settings.crossBorderBuyerCountry'?: string; + 'SwagPayPal.settings.crossBorderBuyerCountry'?: typeof COUNTRY_OVERRIDES[number] | null; }; /** diff --git a/src/RestApi/V1/Api/MerchantIntegrations/OauthIntegration.php b/src/RestApi/V1/Api/MerchantIntegrations/OauthIntegration.php index 70f530859..3e63c5c6e 100644 --- a/src/RestApi/V1/Api/MerchantIntegrations/OauthIntegration.php +++ b/src/RestApi/V1/Api/MerchantIntegrations/OauthIntegration.php @@ -13,7 +13,10 @@ use Swag\PayPal\RestApi\V1\Api\MerchantIntegrations\OauthIntegration\OauthThirdParty; use Swag\PayPal\RestApi\V1\Api\MerchantIntegrations\OauthIntegration\OauthThirdPartyCollection; -#[OA\Schema(schema: 'swag_paypal_v1_merchant_integrations_oauth_integration')] +#[OA\Schema( + schema: 'swag_paypal_v1_merchant_integrations_oauth_integration', + required: ['integrationMethod', 'integrationType', 'oauthThirdParty'] +)] #[Package('checkout')] class OauthIntegration extends PayPalApiStruct { diff --git a/src/RestApi/V1/Api/MerchantIntegrations/OauthIntegration/OauthThirdParty.php b/src/RestApi/V1/Api/MerchantIntegrations/OauthIntegration/OauthThirdParty.php index 997415291..ce3218415 100644 --- a/src/RestApi/V1/Api/MerchantIntegrations/OauthIntegration/OauthThirdParty.php +++ b/src/RestApi/V1/Api/MerchantIntegrations/OauthIntegration/OauthThirdParty.php @@ -11,7 +11,10 @@ use Shopware\Core\Framework\Log\Package; use Swag\PayPal\RestApi\PayPalApiStruct; -#[OA\Schema(schema: 'swag_paypal_v1_merchant_integrations_oauth_integration_oauth_third_party')] +#[OA\Schema( + schema: 'swag_paypal_v1_merchant_integrations_oauth_integration_oauth_third_party', + required: ['merchantClientId', 'partnerClientId', 'scopes'] +)] #[Package('checkout')] class OauthThirdParty extends PayPalApiStruct { diff --git a/src/RestApi/V1/Api/MerchantIntegrations/Product.php b/src/RestApi/V1/Api/MerchantIntegrations/Product.php index f8f434338..a934b3b76 100644 --- a/src/RestApi/V1/Api/MerchantIntegrations/Product.php +++ b/src/RestApi/V1/Api/MerchantIntegrations/Product.php @@ -11,7 +11,10 @@ use Shopware\Core\Framework\Log\Package; use Swag\PayPal\RestApi\PayPalApiStruct; -#[OA\Schema(schema: 'swag_paypal_v1_merchant_integrations_product')] +#[OA\Schema( + schema: 'swag_paypal_v1_merchant_integrations_product', + required: ['name'], +)] #[Package('checkout')] class Product extends PayPalApiStruct {