Skip to content

Mark various interfaces as api #32157

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions app/code/Magento/GraphQl/Model/Query/ContextInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
*
* GraphQL will pass the same instance of this interface to each field resolver, so these resolvers could have
* shared access to the same data for ease of implementation purposes.
*
* @api
*/
interface ContextInterface extends BaseContextInterface, ExtensibleDataInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);

namespace Magento\Msrp\Pricing;

use Magento\Catalog\Api\Data\ProductInterface;

/**
* Provide information about MSRP price of a product.
*
* @api
*/
interface MsrpPriceCalculatorInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

/**
* Interface to update newsletter subscription status
*
* @api
*/
interface SubscriptionManagerInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

/**
* Interface for page tags preprocessors
*
* @api
*/
interface PageCacheTagsPreprocessorInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

/**
* Payment additional info interface.
*
* @api
*/
interface PaymentAdditionalInfoInterface extends KeyValueObjectInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
/**
* Interface TransparentInterface need to be implemented by Payment Method service
* which supports transparent redirect feature
*
* @package Magento\Payment\Model\Method
* @api
*/
interface TransparentInterface extends MethodInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/

namespace Magento\Paypal\Helper\Shortcut;

/**
* Interface \Magento\Paypal\Helper\Shortcut\ValidatorInterface
*
* @api
*/
interface ValidatorInterface
{
Expand Down
2 changes: 2 additions & 0 deletions app/code/Magento/Paypal/Model/Billing/AbstractAgreement.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

/**
* Billing Agreement abstract class
*
* @api
*/
abstract class AbstractAgreement extends \Magento\Framework\Model\AbstractModel
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

/**
* Interface for payment methods that support billing agreements management
*
* @api
*/
interface MethodInterface
{
Expand Down
1 change: 1 addition & 0 deletions app/code/Magento/Paypal/Model/IpnInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
/**
* Interface \Magento\Paypal\Model\IpnInterface
*
* @api
*/
interface IpnInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@

/**
* Interface HandlerInterface used for error handling of gateway response
*
* @package Magento\Paypal\Model\Payflow\Service\Response\Handler
* @api
*/
interface HandlerInterface
{
Expand Down
3 changes: 2 additions & 1 deletion app/code/Magento/Quote/Api/ChangeQuoteControlInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/

declare(strict_types=1);

namespace Magento\Quote\Api;
Expand All @@ -12,6 +11,8 @@

/**
* Service checks if the user has ability to change the quote.
*
* @api
*/
interface ChangeQuoteControlInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

/**
* Provides data for buy request for different types of products
*
* @api
*/
interface BuyRequestDataProviderInterface
{
Expand Down
2 changes: 2 additions & 0 deletions app/code/Magento/Quote/Model/Cart/Data/CartItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

/**
* DTO represents Cart Item data
*
* @api
*/
class CartItem
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
/**
* Interface \Magento\Quote\Model\Product\QuoteItemsCleanerInterface
*
* @api
*/
interface QuoteItemsCleanerInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
/**
* Interface \Magento\Quote\Model\Quote\Address\CustomAttributeListInterface
*
* @api
*/
interface CustomAttributeListInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
/**
* Interface \Magento\Quote\Model\Quote\Address\Total\CollectorInterface
*
* @api
*/
interface CollectorInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
/**
* Interface \Magento\Quote\Model\Quote\Address\Total\ReaderInterface
*
* @api
*/
interface ReaderInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

/**
* Interface CartItemProcessorInterface
*
* @api
*/
interface CartItemProcessorInterface
{
Expand Down
2 changes: 2 additions & 0 deletions app/code/Magento/Quote/Model/Quote/Item/Option.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
* @method string getCode()
* @method \Magento\Quote\Model\Quote\Item\Option setCode(string $value)
* @method \Magento\Quote\Model\Quote\Item\Option setValue(string $value)
*
* @api
*/
class Option extends \Magento\Framework\Model\AbstractModel implements
\Magento\Catalog\Model\Product\Configuration\Item\Option\OptionInterface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

/**
* Provides validation of Quote model.
*
* @api
*/
interface QuoteValidationRuleInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

/**
* Build buy request for adding products to cart
*
* @api
*/
interface BuyRequestDataProviderInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

/**
* Interface for payment method additional data provider
*
* @api
*/
interface AdditionalDataProviderInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@

/**
* Extension point for setting shipping addresses for a specified shopping cart
*
* All objects that are responsible for setting shipping addresses on a cart via GraphQl
* should implement this interface.
*
* @api
*/
interface SetShippingAddressesOnCartInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@

/**
* Extension point for setting shipping methods for a specified shopping cart
*
* All objects that are responsible for setting shipping methods on a cart via GraphQl
* should implement this interface.
*
* @api
*/
interface SetShippingMethodsOnCartInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@

/**
* Customizable Option Value Data provider
*
* @api
*/
interface CustomizableOptionValueInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

/**
* Process Cart Item Data
*
* @api
*/
interface ItemDataProcessorInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@

/**
* Exception for GraphQL to be thrown when authentication fails
*
* @api
*/
class GraphQlAuthenticationException extends AuthenticationException implements ClientAware
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

/**
* Exception for GraphQL to be thrown when authorization fails
*
* @api
*/
class GraphQlAuthorizationException extends AuthorizationException implements \GraphQL\Error\ClientAware
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

/**
* Exception for GraphQL to be thrown when user supplies invalid input
*
* @api
*/
class GraphQlInputException extends LocalizedException implements AggregateExceptionInterface, ClientAware
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

/**
* Exception for GraphQL to be thrown when entity does not exists
*
* @api
*/
class GraphQlNoSuchEntityException extends NoSuchEntityException implements \GraphQL\Error\ClientAware
{
Expand Down Expand Up @@ -39,15 +41,15 @@ public function __construct(Phrase $phrase, \Exception $cause = null, $code = 0,
/**
* @inheritdoc
*/
public function isClientSafe() : bool
public function isClientSafe(): bool
{
return $this->isSafe;
}

/**
* @inheritdoc
*/
public function getCategory() : string
public function getCategory(): string
{
return self::EXCEPTION_CATEGORY;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
*
* GraphQL will pass the same instance of this interface to each field resolver, so these resolvers could have
* shared access to the same data for ease of implementation purposes.
*
* @api
*/
interface ContextInterface
{
Expand Down