From 18ffbb55eaa3d8bb5adedc1eec01116d0127604d Mon Sep 17 00:00:00 2001 From: andreagostinho-meli Date: Wed, 16 Aug 2023 17:03:28 -0300 Subject: [PATCH] docs: update amount documentation --- package.json | 2 +- src/@types/global.d.ts | 10 ++++++++++ src/bricks/util/types/common.ts | 3 +++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index e6bf44c..83f41b5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@mercadopago/sdk-react", - "version": "0.0.13", + "version": "0.0.14", "description": "Mercado Pago SDK React", "main": "index.js", "keywords": [ diff --git a/src/@types/global.d.ts b/src/@types/global.d.ts index 48a92a2..7d85848 100644 --- a/src/@types/global.d.ts +++ b/src/@types/global.d.ts @@ -8,11 +8,21 @@ declare global { MercadoPago: any; paymentBrickController: { unmount: () => void; + /** + * Updates data in Payment Brick preserving the current instance. + * + * @see {@link https://www.mercadopago.com/developers/en/docs/checkout-bricks/payment-brick/additional-customization/update-data Payment Brick # Default rendering} documentation. + */ update: (updateValues: UpdateValues) => boolean; }; cardPaymentBrickController: { unmount: () => void; getFormData: () => Promise; + /** + * Updates data in Card Payment Brick preserving the current instance. + * + * @see {@link https://www.mercadopago.com/developers/en/docs/checkout-bricks/card-payment-brick/additional-customization/update-data Payment Brick # Default rendering} documentation. + */ update: (updateValues: UpdateValues) => boolean; }; walletBrickController: { diff --git a/src/bricks/util/types/common.ts b/src/bricks/util/types/common.ts index 3cb9085..637859b 100644 --- a/src/bricks/util/types/common.ts +++ b/src/bricks/util/types/common.ts @@ -153,6 +153,9 @@ export interface IBrickCustomVariables { formPadding?: string; } +/** + * Available update values. + */ export type UpdateValues = { amount: number; };