From 40bd6c5d372fec46dc888fc628b77fe3b6bbb8f6 Mon Sep 17 00:00:00 2001 From: Dan Billson Date: Tue, 1 Oct 2024 13:57:06 +0100 Subject: [PATCH] 1.2.3-next release (#62) * feat(types): add variant to checkout * fix(types): allow null discount in update checkout This is should be allowed to remove the discount which was previously applied Issue: https://github.com/PaddleHQ/paddle-js-wrapper/issues/49 * chore: create patch release * docs: update changelog * chore: update date of change Co-authored-by: Vijayasingam Thanasekaran <100207323+vijayasingam-paddle@users.noreply.github.com> --------- Co-authored-by: Vijayasingam Thanasekaran <100207323+vijayasingam-paddle@users.noreply.github.com> --- CHANGELOG.md | 12 ++++++++++++ package.json | 2 +- types/checkout/checkout.d.ts | 6 ++++-- types/shared/shared.d.ts | 2 ++ 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7043265..e498476 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,18 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), Check our main [developer changelog](https://developer.paddle.com/?utm_source=dx&utm_medium=paddle-js-wrapper) for information about changes to the Paddle Billing platform, the Paddle API, and other developer tools. +## 1.2.3-next.0 - 2024-10-01 + +### Fixed + +- `Checkout.updateCheckout` `discountId` and `discountCode` can both be `null`. + +### Added + +- Added `variant` to checkout settings. + +--- + ## 1.2.2-next.0 - 2024-09-27 ### Fixed diff --git a/package.json b/package.json index c48f79b..3126905 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@paddle/paddle-js", - "version": "1.2.2-next.0", + "version": "1.2.3-next.0", "description": "Wrapper to load Paddle.js as a module and use TypeScript definitions when working with methods.", "main": "dist/index.js", "module": "dist/index.esm.js", diff --git a/types/checkout/checkout.d.ts b/types/checkout/checkout.d.ts index b9ca13a..bb048a6 100644 --- a/types/checkout/checkout.d.ts +++ b/types/checkout/checkout.d.ts @@ -5,6 +5,7 @@ import { DisplayMode, Theme, AvailablePaymentMethod, + Variant, } from '../index'; import { CheckoutCustomer } from './customer'; @@ -21,6 +22,7 @@ export interface CheckoutSettings { successUrl?: string; allowedPaymentMethods?: AvailablePaymentMethod[]; allowDiscountRemoval?: boolean; + variant?: Variant; } export interface PaddleSetupPwCustomer { @@ -78,11 +80,11 @@ interface CheckoutOpenOptionsWithTransactionId { } interface CheckoutOpenOptionsWithDiscountId { discountCode?: never; - discountId?: string; + discountId?: string | null; } interface CheckoutOpenOptionsWithDiscountCode { - discountCode?: string; + discountCode?: string | null; discountId?: never; } diff --git a/types/shared/shared.d.ts b/types/shared/shared.d.ts index 83d4a39..5d3cda0 100644 --- a/types/shared/shared.d.ts +++ b/types/shared/shared.d.ts @@ -3,6 +3,8 @@ import { CurrencyCode } from './currency-code'; export type AvailablePaymentMethod = 'alipay' | 'apple_pay' | 'bancontact' | 'card' | 'google_pay' | 'ideal' | 'paypal'; +export type Variant = 'multi-page' | 'one-page'; + export type TaxMode = 'account_setting' | 'external' | 'internal'; export type Status = 'active' | 'archived';