Skip to content

Commit

Permalink
Merge pull request #58 from shopware/ppi-1030/fixed-wrong-openapi-typ…
Browse files Browse the repository at this point in the history
…es-65

PPI-1030 - Fixed wrong openapi types
  • Loading branch information
mstegmeyer authored Dec 10, 2024
2 parents fd50218 + 94a33de commit 4b81e92
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 17 deletions.
20 changes: 10 additions & 10 deletions src/Resources/app/administration/src/types/openapi.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
9 changes: 5 additions & 4 deletions src/Resources/app/administration/src/types/system-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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.
Expand All @@ -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;
};

/**
Expand Down
5 changes: 4 additions & 1 deletion src/RestApi/V1/Api/MerchantIntegrations/OauthIntegration.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
5 changes: 4 additions & 1 deletion src/RestApi/V1/Api/MerchantIntegrations/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down

0 comments on commit 4b81e92

Please sign in to comment.