Skip to content

Commit

Permalink
1.2.3-next release (#62)
Browse files Browse the repository at this point in the history
* 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: #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>
  • Loading branch information
danbillson and vijayasingam-paddle authored Oct 1, 2024
1 parent 3f96834 commit 40bd6c5
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 3 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
6 changes: 4 additions & 2 deletions types/checkout/checkout.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
DisplayMode,
Theme,
AvailablePaymentMethod,
Variant,
} from '../index';
import { CheckoutCustomer } from './customer';

Expand All @@ -21,6 +22,7 @@ export interface CheckoutSettings {
successUrl?: string;
allowedPaymentMethods?: AvailablePaymentMethod[];
allowDiscountRemoval?: boolean;
variant?: Variant;
}

export interface PaddleSetupPwCustomer {
Expand Down Expand Up @@ -78,11 +80,11 @@ interface CheckoutOpenOptionsWithTransactionId {
}
interface CheckoutOpenOptionsWithDiscountId {
discountCode?: never;
discountId?: string;
discountId?: string | null;
}

interface CheckoutOpenOptionsWithDiscountCode {
discountCode?: string;
discountCode?: string | null;
discountId?: never;
}

Expand Down
2 changes: 2 additions & 0 deletions types/shared/shared.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down

0 comments on commit 40bd6c5

Please sign in to comment.