diff --git a/.changeset/olive-pugs-jam.md b/.changeset/olive-pugs-jam.md new file mode 100644 index 0000000..8f6e2a0 --- /dev/null +++ b/.changeset/olive-pugs-jam.md @@ -0,0 +1,7 @@ +--- +'@epilot/pricing': minor +--- + +Bump the `@epilot/sdk` peer dependency to `^2.19.3` and source `PriceTierEnhanced` from it. + +The SDK now ships the legacy "additional types" (carried over from `@epilot/pricing-client`) on the `@epilot/sdk/pricing` entrypoint, so the local `PriceTierEnhanced` declaration this package added during the SDK migration is no longer needed. It is re-exported from the SDK instead — the type shape is unchanged, so this is a no-op for consumers other than the raised minimum peer version. diff --git a/package.json b/package.json index 061c915..3135633 100644 --- a/package.json +++ b/package.json @@ -67,13 +67,13 @@ "dinero.js": "^1.9.1" }, "peerDependencies": { - "@epilot/sdk": "^2.18.31", + "@epilot/sdk": "^2.19.3", "i18next": "^25.1.2" }, "devDependencies": { "@changesets/cli": "^2.30.0", "@epilot/eslint-config": "^3.0.5", - "@epilot/sdk": "^2.18.31", + "@epilot/sdk": "^2.19.3", "@types/dinero.js": "^1.9.4", "@vitest/coverage-v8": "^1.6.1", "concurrently": "^9.1.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fea1183..2f4b9ca 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -19,8 +19,8 @@ importers: specifier: ^3.0.5 version: 3.0.5(eslint@9.28.0)(typescript@5.8.3) '@epilot/sdk': - specifier: ^2.18.31 - version: 2.18.31(@material-ui/core@4.12.4(@types/react@17.0.93)(react-dom@17.0.2(react@17.0.2))(react@17.0.2))(axios@1.9.0)(js-yaml@4.1.1)(openapi-client-axios@7.8.0(axios@1.9.0)(js-yaml@4.1.1)) + specifier: ^2.19.3 + version: 2.19.3(@material-ui/core@4.12.4(@types/react@17.0.93)(react-dom@17.0.2(react@17.0.2))(react@17.0.2))(axios@1.9.0)(js-yaml@4.1.1)(openapi-client-axios@7.8.0(axios@1.9.0)(js-yaml@4.1.1)) '@types/dinero.js': specifier: ^1.9.4 version: 1.9.4 @@ -177,8 +177,8 @@ packages: peerDependencies: axios: ^1.0.0 || >=0.25.0 <1.0.0 - '@epilot/sdk@2.18.31': - resolution: {integrity: sha512-8NFyxVTMYrtDN0U6J0xlXX0jM3bJOzgIujC77GRt8ay/Qvx7l0K1usF1pRkw/nd5cNOpw79IMeKNokoQ6cwjHA==} + '@epilot/sdk@2.19.3': + resolution: {integrity: sha512-j4+98+obHJ2vmHklDR3SvL589j8yE/vyStGF6h8m07rGIQs6UWpXBOUU0N8OGnzWCPItGJ7JXmU1pI6s/mIHXg==} hasBin: true peerDependencies: axios: ^1.0.0 @@ -2985,7 +2985,7 @@ snapshots: - js-yaml optional: true - '@epilot/sdk@2.18.31(@material-ui/core@4.12.4(@types/react@17.0.93)(react-dom@17.0.2(react@17.0.2))(react@17.0.2))(axios@1.9.0)(js-yaml@4.1.1)(openapi-client-axios@7.8.0(axios@1.9.0)(js-yaml@4.1.1))': + '@epilot/sdk@2.19.3(@material-ui/core@4.12.4(@types/react@17.0.93)(react-dom@17.0.2(react@17.0.2))(react@17.0.2))(axios@1.9.0)(js-yaml@4.1.1)(openapi-client-axios@7.8.0(axios@1.9.0)(js-yaml@4.1.1))': dependencies: axios: 1.9.0 openapi-client-axios: 7.8.0(axios@1.9.0)(js-yaml@4.1.1) diff --git a/src/shared/types.ts b/src/shared/types.ts index 7bc0afa..1883969 100644 --- a/src/shared/types.ts +++ b/src/shared/types.ts @@ -23,6 +23,7 @@ export type { PriceInputMappings, PriceInputMapping, PriceTier, + PriceTierEnhanced, PriceTierDisplayMode, CashbackAmount, RedeemedPromo, @@ -31,17 +32,5 @@ export type { CompositePriceItem, } from '@epilot/sdk/pricing'; export type { Currency, Dinero } from 'dinero.js'; -import type { PriceTier } from '@epilot/sdk/pricing'; import type { i18n } from 'i18next'; export type I18n = Pick; - -/** - * Legacy type formerly exported by @epilot/pricing-client. The gross fields - * were removed from the OpenAPI specification, so it lives here now. - */ -export interface PriceTierEnhanced extends PriceTier { - unit_amount_gross?: number; - unit_amount_gross_decimal?: string; - flat_fee_amount_gross?: number; - flat_fee_amount_gross_decimal?: string; -}