diff --git a/packages/adapters/CHANGELOG.md b/packages/adapters/CHANGELOG.md new file mode 100644 index 0000000..b7eab27 --- /dev/null +++ b/packages/adapters/CHANGELOG.md @@ -0,0 +1,26 @@ +# Changelog + +All notable changes to `@abacatepay/adapters` are documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). + +## [2.0.2] - 2026-07-27 + +### Changed + +- The build no longer inlines `@abacatepay/zod`'s full runtime into `dist` — it's now a real `import` resolved via `node_modules` at install time. `webhooks/index.js` dropped from ~500KB to ~2.6KB. No behavior change; `@abacatepay/zod` was already listed as a real `dependency`. + +## [2.0.1] - 2026-07-27 + +### Fixed + +- Package now bundles with `bun build` instead of emitting raw `tsc` output. `@abacatepay/adapters/webhooks` failed with `ERR_MODULE_NOT_FOUND` transitively, because it imports `@abacatepay/zod` at runtime (not just for types) and that package had the same bug. + +## [2.0.0] - 2026-07-27 + +### Changed + +- **Breaking:** `WebhookOptions` and `dispatch()` updated to the corrected v2 event taxonomy: + - `onPayoutDone` → `onPayoutCompleted` + - `onBillingPaid` split into `onCheckoutCompleted` and `onTransparentCompleted` (checkout and transparent charges have distinct completion payloads in v2) + - Added handlers for every other documented v2 event: `onCheckoutRefunded`/`Disputed`/`Lost`, `onTransparentRefunded`/`Disputed`/`Lost`, `onSubscriptionCompleted`/`Cancelled`/`Renewed`/`TrialStarted`, `onTransferCompleted`/`Failed`. These are tagged `@unstable` since AbacatePay doesn't document their payload shape yet. diff --git a/packages/adapters/package.json b/packages/adapters/package.json index abb660b..90b3adb 100644 --- a/packages/adapters/package.json +++ b/packages/adapters/package.json @@ -1,6 +1,6 @@ { "name": "@abacatepay/adapters", - "version": "2.0.1", + "version": "2.0.2", "repository": { "type": "git", "url": "git+https://github.com/AbacatePay/ecosystem.git" @@ -37,7 +37,8 @@ "bun": ">=1.0.0" }, "files": [ - "dist" + "dist", + "CHANGELOG.md" ], "keywords": [ "abacatepay", @@ -52,7 +53,7 @@ }, "scripts": { "test": "bun test", - "build": "rm -rf dist && bun run scripts/version.ts && bun build src/index.ts src/webhooks/index.ts --outdir dist --target node && bun run types", + "build": "rm -rf dist && bun run scripts/version.ts && bun build src/index.ts src/webhooks/index.ts --outdir dist --target node --external '@abacatepay/zod' --external '@abacatepay/zod/*' && bun run types", "types": "bunx tsc --emitDeclarationOnly", "prepublishOnly": "bun run build" }, diff --git a/packages/adapters/src/version.ts b/packages/adapters/src/version.ts index af6b5c5..6d25f7f 100644 --- a/packages/adapters/src/version.ts +++ b/packages/adapters/src/version.ts @@ -3,4 +3,4 @@ /** * Current version of [@abacatepay/adapters](https://www.npmjs.com/package/@abacatepay/adapters). */ -export const version = '2.0.1' as const; +export const version = '2.0.2' as const; diff --git a/packages/better-auth/CHANGELOG.md b/packages/better-auth/CHANGELOG.md new file mode 100644 index 0000000..1ef0719 --- /dev/null +++ b/packages/better-auth/CHANGELOG.md @@ -0,0 +1,15 @@ +# Changelog + +All notable changes to `@abacatepay/better-auth` are documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). + +## [1.0.1] - 2026-07-27 + +### Fixed + +- Package now bundles with `bun build` instead of emitting raw `tsc` output, fixing `ERR_MODULE_NOT_FOUND` under real Node.js ESM resolution. + +### Note + +This package is currently a stub — despite its description ("Checkouts, Webhooks and OAuth made simple with AbacatePay"), no integration logic is implemented yet. diff --git a/packages/better-auth/package.json b/packages/better-auth/package.json index 2e2bdea..8c0fbff 100644 --- a/packages/better-auth/package.json +++ b/packages/better-auth/package.json @@ -34,7 +34,8 @@ "bun": ">=1.0.0" }, "files": [ - "dist" + "dist", + "CHANGELOG.md" ], "keywords": [ "abacatepay", diff --git a/packages/elysia/CHANGELOG.md b/packages/elysia/CHANGELOG.md new file mode 100644 index 0000000..50fe194 --- /dev/null +++ b/packages/elysia/CHANGELOG.md @@ -0,0 +1,31 @@ +# Changelog + +All notable changes to `@abacatepay/elysia` are documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). + +## [2.0.2] - 2026-07-27 + +### Changed + +- The build no longer inlines `@abacatepay/adapters` (and transitively `@abacatepay/zod`) or the `elysia` framework itself into `dist` — all are now real `import`s resolved via `node_modules` at install time. Bundle size dropped from ~1MB to ~1.1KB. No behavior change; both were already listed as real dependencies (`@abacatepay/adapters` as a `dependency`, `elysia` as a `peerDependency` — bundling a peer dependency was never correct to begin with). + +## [2.0.1] - 2026-07-27 + +### Fixed + +- Package now bundles with `bun build` instead of emitting raw `tsc` output. Failed with `ERR_MODULE_NOT_FOUND` transitively, because it imports `@abacatepay/adapters` at runtime and that package had the same bug. + +## [2.0.0] - 2026-07-27 + +### Changed + +- **Breaking:** `Webhooks(options)` no longer throws when called without a `secret`. It returns `{ ok: false, handler: null, error: string }` instead of `{ ok: true, handler }` — check `.ok` before using `.handler`. + +### Removed + +- **Breaking:** `AbacatePayElysiaError` class removed — nothing throws it anymore. + +### Fixed + +- Event handler names updated to match the corrected v2 taxonomy (see `@abacatepay/adapters`'s changelog): `onBillingPaid`/`onPayoutDone` → `onCheckoutCompleted`/`onPayoutCompleted`. diff --git a/packages/elysia/package.json b/packages/elysia/package.json index 7a8f593..56f90ae 100644 --- a/packages/elysia/package.json +++ b/packages/elysia/package.json @@ -1,6 +1,6 @@ { "name": "@abacatepay/elysia", - "version": "2.0.1", + "version": "2.0.2", "repository": { "type": "git", "url": "git+https://github.com/AbacatePay/ecosystem.git" @@ -37,7 +37,8 @@ "bun": ">=1.0.0" }, "files": [ - "dist" + "dist", + "CHANGELOG.md" ], "keywords": [ "abacatepay", @@ -52,7 +53,7 @@ }, "scripts": { "test": "bun test", - "build": "rm -rf dist && bun run scripts/version.ts && bun build src/index.ts --outdir dist --target node && bun run types", + "build": "rm -rf dist && bun run scripts/version.ts && bun build src/index.ts --outdir dist --target node --external '@abacatepay/adapters' --external '@abacatepay/adapters/*' --external elysia && bun run types", "types": "bunx tsc --emitDeclarationOnly", "prepublishOnly": "bun run build" }, diff --git a/packages/elysia/src/version.ts b/packages/elysia/src/version.ts index 881b3b5..67878f8 100644 --- a/packages/elysia/src/version.ts +++ b/packages/elysia/src/version.ts @@ -3,4 +3,4 @@ /** * Current version of [@abacatepay/elysia](https://www.npmjs.com/package/@abacatepay/elysia). */ -export const version = '2.0.1' as const; +export const version = '2.0.2' as const; diff --git a/packages/eslint-plugin/CHANGELOG.md b/packages/eslint-plugin/CHANGELOG.md new file mode 100644 index 0000000..99ec7e8 --- /dev/null +++ b/packages/eslint-plugin/CHANGELOG.md @@ -0,0 +1,12 @@ +# Changelog + +All notable changes to `@abacatepay/eslint-plugin` are documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). + +## [0.1.3] - 2026-07-27 + +### Fixed + +- Package now bundles with `bun build` instead of emitting raw `tsc` output, fixing `ERR_MODULE_NOT_FOUND` under real Node.js ESM resolution. +- `build` and `types` npm scripts had swapped bodies — `types` called `bun run types` recursively (an infinite loop) and was never actually invoked by `prepublishOnly`, which is why this went unnoticed. Scripts are now correctly assigned. diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index 9161735..c369610 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -10,7 +10,8 @@ } }, "files": [ - "dist" + "dist", + "CHANGELOG.md" ], "author": { "name": "AbacatePay", diff --git a/packages/express/CHANGELOG.md b/packages/express/CHANGELOG.md new file mode 100644 index 0000000..7a43203 --- /dev/null +++ b/packages/express/CHANGELOG.md @@ -0,0 +1,31 @@ +# Changelog + +All notable changes to `@abacatepay/express` are documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). + +## [2.0.2] - 2026-07-27 + +### Changed + +- The build no longer inlines `@abacatepay/adapters` (and transitively `@abacatepay/zod`) into `dist` — they're now real `import`s resolved via `node_modules` at install time. Bundle size dropped from ~480KB to ~1.6KB. No behavior change; `@abacatepay/adapters` was already listed as a real `dependency`. + +## [2.0.1] - 2026-07-27 + +### Fixed + +- Package now bundles with `bun build` instead of emitting raw `tsc` output. Failed with `ERR_MODULE_NOT_FOUND` transitively, because it imports `@abacatepay/adapters` at runtime and that package had the same bug. + +## [2.0.0] - 2026-07-27 + +### Changed + +- **Breaking:** `Webhooks(options)` no longer throws when called without a `secret`. It returns `{ ok: false, handler: null, error: string }` instead of `{ ok: true, handler }` — check `.ok` before using `.handler`. + +### Removed + +- **Breaking:** `AbacatePayExpressError` class removed — nothing throws it anymore. + +### Fixed + +- Event handler names updated to match the corrected v2 taxonomy (see `@abacatepay/adapters`'s changelog): `onBillingPaid`/`onPayoutDone` → `onCheckoutCompleted`/`onPayoutCompleted`. diff --git a/packages/express/package.json b/packages/express/package.json index a869f72..32808f4 100644 --- a/packages/express/package.json +++ b/packages/express/package.json @@ -1,6 +1,6 @@ { "name": "@abacatepay/express", - "version": "2.0.1", + "version": "2.0.2", "repository": { "type": "git", "url": "git+https://github.com/AbacatePay/ecosystem.git" @@ -38,7 +38,8 @@ "bun": ">=1.0.0" }, "files": [ - "dist" + "dist", + "CHANGELOG.md" ], "keywords": [ "abacatepay", @@ -53,7 +54,7 @@ }, "scripts": { "test": "bun test", - "build": "rm -rf dist && bun run scripts/version.ts && bun build src/index.ts --outdir dist --target node && bun run types", + "build": "rm -rf dist && bun run scripts/version.ts && bun build src/index.ts --outdir dist --target node --external '@abacatepay/adapters' --external '@abacatepay/adapters/*' && bun run types", "types": "bunx tsc --emitDeclarationOnly", "prepublishOnly": "bun run build" }, diff --git a/packages/express/src/version.ts b/packages/express/src/version.ts index 6f9e8f8..dbb112e 100644 --- a/packages/express/src/version.ts +++ b/packages/express/src/version.ts @@ -3,4 +3,4 @@ /** * Current version of [@abacatepay/express](https://www.npmjs.com/package/@abacatepay/express). */ -export const version = '2.0.1' as const; +export const version = '2.0.2' as const; diff --git a/packages/fastify/CHANGELOG.md b/packages/fastify/CHANGELOG.md new file mode 100644 index 0000000..2625539 --- /dev/null +++ b/packages/fastify/CHANGELOG.md @@ -0,0 +1,32 @@ +# Changelog + +All notable changes to `@abacatepay/fastify` are documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). + +## [2.0.2] - 2026-07-27 + +### Changed + +- The build no longer inlines `@abacatepay/adapters` (and transitively `@abacatepay/zod`) into `dist` — they're now real `import`s resolved via `node_modules` at install time. Bundle size dropped from ~480KB to ~1.6KB. No behavior change; `@abacatepay/adapters` was already listed as a real `dependency`. + +## [2.0.1] - 2026-07-27 + +### Fixed + +- Package now bundles with `bun build` instead of emitting raw `tsc` output. Failed with `ERR_MODULE_NOT_FOUND` transitively, because it imports `@abacatepay/adapters` at runtime and that package had the same bug. + +## [2.0.0] - 2026-07-27 + +### Changed + +- **Breaking:** `Webhooks(options)` no longer throws when called without a `secret`. It returns `{ ok: false, handler: null, error: string }` instead of `{ ok: true, handler }` — check `.ok` before using `.handler`. + +### Removed + +- **Breaking:** `AbacatePayFastifyError` class removed — nothing throws it anymore. + +### Fixed + +- A malformed JSON request body no longer throws uncaught inside the request handler — `JSON.parse` is now wrapped in a `try/catch` and returns a `400` instead (matching `express`/`supabase`, which already did this). +- Event handler names updated to match the corrected v2 taxonomy (see `@abacatepay/adapters`'s changelog): `onBillingPaid`/`onPayoutDone` → `onCheckoutCompleted`/`onPayoutCompleted`. diff --git a/packages/fastify/package.json b/packages/fastify/package.json index 66721f7..09408ee 100644 --- a/packages/fastify/package.json +++ b/packages/fastify/package.json @@ -1,6 +1,6 @@ { "name": "@abacatepay/fastify", - "version": "2.0.1", + "version": "2.0.2", "repository": { "type": "git", "url": "git+https://github.com/AbacatePay/ecosystem.git" @@ -37,7 +37,8 @@ "bun": ">=1.0.0" }, "files": [ - "dist" + "dist", + "CHANGELOG.md" ], "keywords": [ "abacatepay", @@ -52,7 +53,7 @@ }, "scripts": { "test": "bun test", - "build": "rm -rf dist && bun run scripts/version.ts && bun build src/index.ts --outdir dist --target node && bun run types", + "build": "rm -rf dist && bun run scripts/version.ts && bun build src/index.ts --outdir dist --target node --external '@abacatepay/adapters' --external '@abacatepay/adapters/*' && bun run types", "types": "bunx tsc --emitDeclarationOnly", "prepublishOnly": "bun run build" }, diff --git a/packages/fastify/src/version.ts b/packages/fastify/src/version.ts index 85f2040..2c3bb31 100644 --- a/packages/fastify/src/version.ts +++ b/packages/fastify/src/version.ts @@ -3,4 +3,4 @@ /** * Current version of [@abacatepay/fastify](https://www.npmjs.com/package/@abacatepay/fastify). */ -export const version = '2.0.1' as const; +export const version = '2.0.2' as const; diff --git a/packages/hono/CHANGELOG.md b/packages/hono/CHANGELOG.md new file mode 100644 index 0000000..7e83afe --- /dev/null +++ b/packages/hono/CHANGELOG.md @@ -0,0 +1,32 @@ +# Changelog + +All notable changes to `@abacatepay/hono` are documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). + +## [2.0.2] - 2026-07-27 + +### Changed + +- The build no longer inlines `@abacatepay/adapters` (and transitively `@abacatepay/zod`) into `dist` — they're now real `import`s resolved via `node_modules` at install time. Bundle size dropped from ~480KB to ~1.3KB. No behavior change; `@abacatepay/adapters` was already listed as a real `dependency`. + +## [2.0.1] - 2026-07-27 + +### Fixed + +- Package now bundles with `bun build` instead of emitting raw `tsc` output. Failed with `ERR_MODULE_NOT_FOUND` transitively, because it imports `@abacatepay/adapters` at runtime and that package had the same bug. + +## [2.0.0] - 2026-07-27 + +### Changed + +- **Breaking:** `Webhooks(options)` no longer throws when called without a `secret`. It returns `{ ok: false, handler: null, error: string }` instead of `{ ok: true, handler }` — check `.ok` before using `.handler`. + +### Removed + +- **Breaking:** `AbacatePayHonoError` class removed — nothing throws it anymore. + +### Fixed + +- A malformed JSON request body no longer throws uncaught inside the request handler — `JSON.parse` is now wrapped in a `try/catch` and returns a `400` instead (matching `express`/`supabase`, which already did this). +- Event handler names updated to match the corrected v2 taxonomy (see `@abacatepay/adapters`'s changelog): `onBillingPaid`/`onPayoutDone` → `onCheckoutCompleted`/`onPayoutCompleted`. diff --git a/packages/hono/package.json b/packages/hono/package.json index 84340e3..1188732 100644 --- a/packages/hono/package.json +++ b/packages/hono/package.json @@ -1,6 +1,6 @@ { "name": "@abacatepay/hono", - "version": "2.0.1", + "version": "2.0.2", "repository": { "type": "git", "url": "git+https://github.com/AbacatePay/ecosystem.git" @@ -37,7 +37,8 @@ "bun": ">=1.0.0" }, "files": [ - "dist" + "dist", + "CHANGELOG.md" ], "keywords": [ "abacatepay", @@ -52,7 +53,7 @@ }, "scripts": { "test": "bun test", - "build": "rm -rf dist && bun run scripts/version.ts && bun build src/index.ts --outdir dist --target node && bun run types", + "build": "rm -rf dist && bun run scripts/version.ts && bun build src/index.ts --outdir dist --target node --external '@abacatepay/adapters' --external '@abacatepay/adapters/*' && bun run types", "types": "bunx tsc --emitDeclarationOnly", "prepublishOnly": "bun run build" }, diff --git a/packages/hono/src/version.ts b/packages/hono/src/version.ts index 28ab6c3..7178af3 100644 --- a/packages/hono/src/version.ts +++ b/packages/hono/src/version.ts @@ -3,4 +3,4 @@ /** * Current version of [@abacatepay/hono](https://www.npmjs.com/package/@abacatepay/hono). */ -export const version = '2.0.1' as const; +export const version = '2.0.2' as const; diff --git a/packages/rest/CHANGELOG.md b/packages/rest/CHANGELOG.md new file mode 100644 index 0000000..9973221 --- /dev/null +++ b/packages/rest/CHANGELOG.md @@ -0,0 +1,14 @@ +# Changelog + +All notable changes to `@abacatepay/rest` are documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). + +## [1.0.0] - 2026-07-27 + +### Changed + +- **Breaking:** `REST` class replaced with a `createREST()` factory function. `new REST({ ... })` no longer works — use `createREST({ ... })`. +- **Breaking:** nothing throws anymore. Every request resolves to `{ data, error, success }`, matching the shape the AbacatePay API itself returns — including client-side failures (network errors, timeouts, a missing secret), which are normalized into the same shape instead of being thrown. +- **Breaking:** `AbacatePayError` and `HTTPError` classes removed — there's nothing left to `throw` them, and the error is just the `string` already present in the envelope's `.error` field. +- Default API version is now `2` (was `1`). diff --git a/packages/rest/package.json b/packages/rest/package.json index 82d46d3..4ee042d 100644 --- a/packages/rest/package.json +++ b/packages/rest/package.json @@ -14,7 +14,8 @@ "main": "./dist/index.js", "types": "./dist/index.d.ts", "files": [ - "dist" + "dist", + "CHANGELOG.md" ], "author": { "name": "AbacatePay", diff --git a/packages/sdk/CHANGELOG.md b/packages/sdk/CHANGELOG.md new file mode 100644 index 0000000..2288fcb --- /dev/null +++ b/packages/sdk/CHANGELOG.md @@ -0,0 +1,37 @@ +# Changelog + +All notable changes to `@abacatepay/sdk` are documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). + +## [2.0.2] - 2026-07-27 + +### Changed + +- The build no longer inlines `@abacatepay/rest` and `@abacatepay/types` into `dist` — they're now real `import`s resolved via `node_modules` at install time, like any other npm dependency. Bundle size dropped from ~14KB to ~5KB. No behavior change; both were already listed as real `dependencies`. + +### Fixed + +- Fixed a bug this change surfaced: `sdk/v1` imported `Routes` from the deep subpath `@abacatepay/types/v1/routes`, which was never actually produced by `types`' bundled build. Now imports it from the `@abacatepay/types/v1` barrel instead (see `@abacatepay/types`'s changelog). + +## [2.0.1] - 2026-07-27 + +### Fixed + +- `/v1` and `/v2` subpath exports now actually resolve under Node.js. The build only ever bundled the root entrypoint despite `package.json` declaring these subpaths — `@abacatepay/sdk/v1` failed with `ERR_MODULE_NOT_FOUND` for every real npm consumer, even before the 2.0.0 rewrite. + +## [2.0.0] - 2026-07-27 + +### Added + +- v2: `webhooks`, `paymentLinks`, `transfers`, and `boleto` domains; `checkouts.refund`, `pix.list`/`pix.refund`, `subscriptions.cancel`/`changePlan`/`recordUsage`, `products.delete`. + +### Changed + +- **Breaking:** no method throws anymore — every call resolves to `{ data, error, success }`, the same shape the AbacatePay API returns. +- **Breaking:** `customers.delete`, `coupons.delete`, and `coupons.toggleStatus` now send `POST` instead of `DELETE`/`PATCH` — those never matched what the real API expects. +- `AbacatePay` from `@abacatepay/sdk/v1` is now deprecated: frozen (no new features) and emits a one-time `console.warn` pointing at the v2 default export. + +### Removed + +- **Breaking:** `AbacatePayError`/`HTTPError` re-exports removed (nothing throws them anymore; see `@abacatepay/rest`'s changelog). diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 6c64f42..3a88eff 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@abacatepay/sdk", - "version": "2.0.1", + "version": "2.0.2", "type": "module", "sideEffects": false, "license": "Apache-2.0", @@ -30,7 +30,8 @@ "main": "./dist/index.js", "types": "./dist/index.d.ts", "files": [ - "dist" + "dist", + "CHANGELOG.md" ], "author": { "name": "AbacatePay", @@ -45,7 +46,7 @@ ], "scripts": { "test": "bun test", - "build": "rm -rf dist && bun run scripts/version.ts && bun build src/index.ts src/v1/index.ts src/v2/index.ts --outdir dist --target node && bun run types", + "build": "rm -rf dist && bun run scripts/version.ts && bun build src/index.ts src/v1/index.ts src/v2/index.ts --outdir dist --target node --external '@abacatepay/rest' --external '@abacatepay/rest/*' --external '@abacatepay/types' --external '@abacatepay/types/*' && bun run types", "types": "bunx tsc --emitDeclarationOnly", "prepublishOnly": "bun run build" }, diff --git a/packages/sdk/src/v1/index.ts b/packages/sdk/src/v1/index.ts index ba6c9eb..900d0a1 100644 --- a/packages/sdk/src/v1/index.ts +++ b/packages/sdk/src/v1/index.ts @@ -1,26 +1,26 @@ import { createREST } from '@abacatepay/rest'; -import type { - APIWithdraw, - RESTGetCheckQRCodePixStatusData, - RESTGetListBillingsData, - RESTGetListCouponsData, - RESTGetListCustomersData, - RESTGetListWithdrawsData, - RESTGetMerchantData, - RESTGetMRRData, - RESTGetStoreDetailsData, - RESTPostCreateCouponBody, - RESTPostCreateCouponData, - RESTPostCreateCustomerBody, - RESTPostCreateCustomerData, - RESTPostCreateNewChargeBody, - RESTPostCreateNewChargeData, - RESTPostCreateNewWithdrawBody, - RESTPostCreateNewWithdrawData, - RESTPostCreateQRCodePixBody, - RESTPostSimulatePaymentData, +import { + type APIWithdraw, + type RESTGetCheckQRCodePixStatusData, + type RESTGetListBillingsData, + type RESTGetListCouponsData, + type RESTGetListCustomersData, + type RESTGetListWithdrawsData, + type RESTGetMerchantData, + type RESTGetMRRData, + type RESTGetStoreDetailsData, + type RESTPostCreateCouponBody, + type RESTPostCreateCouponData, + type RESTPostCreateCustomerBody, + type RESTPostCreateCustomerData, + type RESTPostCreateNewChargeBody, + type RESTPostCreateNewChargeData, + type RESTPostCreateNewWithdrawBody, + type RESTPostCreateNewWithdrawData, + type RESTPostCreateQRCodePixBody, + type RESTPostSimulatePaymentData, + Routes, } from '@abacatepay/types/v1'; -import { Routes } from '@abacatepay/types/v1/routes'; import type { AbacatePayOptions } from './types'; export * from './types'; diff --git a/packages/sdk/src/version.ts b/packages/sdk/src/version.ts index 476ce19..9dda0bf 100644 --- a/packages/sdk/src/version.ts +++ b/packages/sdk/src/version.ts @@ -3,4 +3,4 @@ /** * Current version of [@abacatepay/sdk](https://www.npmjs.com/package/@abacatepay/sdk). */ -export const version = '2.0.1' as const; +export const version = '2.0.2' as const; diff --git a/packages/supabase/CHANGELOG.md b/packages/supabase/CHANGELOG.md new file mode 100644 index 0000000..51522b5 --- /dev/null +++ b/packages/supabase/CHANGELOG.md @@ -0,0 +1,31 @@ +# Changelog + +All notable changes to `@abacatepay/supabase` are documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). + +## [2.0.2] - 2026-07-27 + +### Changed + +- The build no longer inlines `@abacatepay/adapters` (and transitively `@abacatepay/zod`) into `dist` — they're now real `import`s resolved via `node_modules` at install time. Bundle size dropped from ~480KB to ~1.6KB. No behavior change; `@abacatepay/adapters` was already listed as a real `dependency`. + +## [2.0.1] - 2026-07-27 + +### Fixed + +- Package now bundles with `bun build` instead of emitting raw `tsc` output. Failed with `ERR_MODULE_NOT_FOUND` transitively, because it imports `@abacatepay/adapters` at runtime and that package had the same bug. + +## [2.0.0] - 2026-07-27 + +### Changed + +- **Breaking:** `Webhooks(options)` no longer throws when called without a `secret`. It returns `{ ok: false, handler: null, error: string }` instead of `{ ok: true, handler }` — check `.ok` before using `.handler`. If your handler is exported directly (e.g. `export const POST = Webhooks({...})` in a Supabase Edge Function), you now need `export const POST = handler` after checking `.ok`. + +### Removed + +- **Breaking:** `AbacatePaySupabaseError` class removed — nothing throws it anymore. + +### Fixed + +- Event handler names updated to match the corrected v2 taxonomy (see `@abacatepay/adapters`'s changelog): `onBillingPaid`/`onPayoutDone` → `onCheckoutCompleted`/`onPayoutCompleted`. diff --git a/packages/supabase/package.json b/packages/supabase/package.json index 9c0fd50..1d29254 100644 --- a/packages/supabase/package.json +++ b/packages/supabase/package.json @@ -1,6 +1,6 @@ { "name": "@abacatepay/supabase", - "version": "2.0.1", + "version": "2.0.2", "repository": { "type": "git", "url": "git+https://github.com/AbacatePay/ecosystem.git" @@ -34,7 +34,8 @@ "bun": ">=1.0.0" }, "files": [ - "dist" + "dist", + "CHANGELOG.md" ], "keywords": [ "abacatepay", @@ -49,7 +50,7 @@ }, "scripts": { "test": "bun test", - "build": "rm -rf dist && bun run scripts/version.ts && bun build src/index.ts --outdir dist --target node && bun run types", + "build": "rm -rf dist && bun run scripts/version.ts && bun build src/index.ts --outdir dist --target node --external '@abacatepay/adapters' --external '@abacatepay/adapters/*' && bun run types", "types": "bunx tsc --emitDeclarationOnly", "prepublishOnly": "bun run build" }, diff --git a/packages/supabase/src/version.ts b/packages/supabase/src/version.ts index 95534e6..2cc2ca7 100644 --- a/packages/supabase/src/version.ts +++ b/packages/supabase/src/version.ts @@ -3,4 +3,4 @@ /** * Current version of [@abacatepay/supabase](https://www.npmjs.com/package/@abacatepay/supabase). */ -export const version = '2.0.1' as const; +export const version = '2.0.2' as const; diff --git a/packages/typebox/CHANGELOG.md b/packages/typebox/CHANGELOG.md new file mode 100644 index 0000000..203cb72 --- /dev/null +++ b/packages/typebox/CHANGELOG.md @@ -0,0 +1,23 @@ +# Changelog + +All notable changes to `@abacatepay/typebox` are documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). + +## [2.0.1] - 2026-07-27 + +### Fixed + +- Package now bundles with `bun build` instead of emitting raw `tsc` output. The root export and the `/v1`/`/v2` subpaths were failing with `ERR_MODULE_NOT_FOUND` under real Node.js ESM resolution. + +## [2.0.0] - 2026-07-27 + +### Added + +- v2 schemas for payment links, the webhooks resource (`APIWebhook`), outbound PIX transfers (`APIPixTransfer`), Boleto (`APIBoleto`), and the subscription lifecycle (cancel, change-plan, record-usage). + +### Changed + +- **Breaking:** the webhook event taxonomy now matches what's actually documented: `payout.done` → `payout.completed`, `billing.paid` split into `checkout.completed` and `transparent.completed`, plus the full set of other v2 events. +- **Breaking:** `RESTPatchToggleCouponStatusBody`/`Data` renamed to `RESTPostToggleCouponStatusBody`/`Data`, matching the real HTTP method. +- `PaymentMethod` gained `BOLETO`; `APICheckout` gained `frequency`, `upSellProductId`, `interest`, `fine`. diff --git a/packages/typebox/package.json b/packages/typebox/package.json index 8c77dbd..1c23ff3 100644 --- a/packages/typebox/package.json +++ b/packages/typebox/package.json @@ -53,7 +53,8 @@ "main": "./dist/index.js", "types": "./dist/index.d.ts", "files": [ - "dist" + "dist", + "CHANGELOG.md" ], "scripts": { "test": "bun test", diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md new file mode 100644 index 0000000..e6ab87d --- /dev/null +++ b/packages/types/CHANGELOG.md @@ -0,0 +1,29 @@ +# Changelog + +All notable changes to `@abacatepay/types` are documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). + +## [3.0.2] - 2026-07-27 + +### Fixed + +- `types/v1` didn't re-export `Routes` the way `types/v2` already did, forcing consumers to import the deep subpath `@abacatepay/types/v1/routes` directly. That subpath was never actually produced by the bundled build (only `index`, `v1/index`, `v2/index` are built as complete bundles), so it broke under real Node.js resolution as soon as anything stopped inlining `@abacatepay/types` wholesale. `types/v1` now re-exports `Routes`, matching `v2`. + +## [3.0.1] - 2026-07-27 + +### Fixed + +- Package now bundles with `bun build` instead of emitting raw `tsc` output. The root export and the `/v1`/`/v2` subpaths were failing with `ERR_MODULE_NOT_FOUND` under real Node.js ESM resolution (the previous build relied on `moduleResolution: "bundler"`, which emits extension-less relative imports that require an actual bundling step afterward — one never ran). + +## [3.0.0] - 2026-07-27 + +### Added + +- v2: types for payment links, the webhooks resource (`APIWebhook`), outbound PIX transfers (`APIPixTransfer`), Boleto (`APIBoleto`), and the subscription lifecycle (cancel, change-plan, record-usage). + +### Changed + +- **Breaking:** every `RESTxxxData` type is now the full API response envelope (`APIResponse` / `APIResponseWithPagination` / `APIResponseWithCursorBasedPagination`) instead of an unwrapped entity. This is what lets `@abacatepay/rest` stop unwrapping responses and throwing on API errors. +- **Breaking:** the webhook event taxonomy now matches what's actually documented: `payout.done` → `payout.completed`, `billing.paid` split into `checkout.completed` and `transparent.completed`, plus the full set of other v2 events (`checkout.refunded`/`disputed`/`lost`, `transparent.refunded`/`disputed`/`lost`, `subscription.*`, `transfer.*`). +- `PaymentMethod` gained `BOLETO`; `APICheckout` gained `frequency`, `upSellProductId`, `interest`, `fine`. diff --git a/packages/types/package.json b/packages/types/package.json index de883c8..6c9a9ae 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,5 +1,5 @@ { - "version": "3.0.1", + "version": "3.0.2", "name": "@abacatepay/types", "description": "Abacate Pay API typings that are always up to date.", "type": "module", @@ -40,7 +40,8 @@ } }, "files": [ - "dist" + "dist", + "CHANGELOG.md" ], "scripts": { "build": "rm -rf dist && bun run gen:version && bun build types/index.ts types/v1/index.ts types/v2/index.ts --outdir dist --target node && bun run types", diff --git a/packages/types/types/v1/index.ts b/packages/types/types/v1/index.ts index 6380bae..baa2c78 100644 --- a/packages/types/types/v1/index.ts +++ b/packages/types/types/v1/index.ts @@ -5,4 +5,5 @@ export * from './entities/pix'; export * from './entities/store'; export * from './entities/withdraw'; export * from './rest'; +export { Routes } from './routes'; export * from './webhook'; diff --git a/packages/types/types/version.ts b/packages/types/types/version.ts index 043bb82..0e51873 100644 --- a/packages/types/types/version.ts +++ b/packages/types/types/version.ts @@ -3,7 +3,7 @@ /** * Current version of [@abacatepay/types](https://www.npmjs.com/package/@abacatepay/types). */ -export const version = '3.0.1' as const; +export const version = '3.0.2' as const; /** * Current version of the AbacatePay API. */ diff --git a/packages/zod/CHANGELOG.md b/packages/zod/CHANGELOG.md new file mode 100644 index 0000000..ca76475 --- /dev/null +++ b/packages/zod/CHANGELOG.md @@ -0,0 +1,27 @@ +# Changelog + +All notable changes to `@abacatepay/zod` are documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). + +## [2.0.1] - 2026-07-27 + +### Fixed + +- Package now bundles with `bun build` instead of emitting raw `tsc` output. The root export and the `/v1`/`/v2` subpaths were failing with `ERR_MODULE_NOT_FOUND` under real Node.js ESM resolution. + +## [2.0.0] - 2026-07-27 + +### Added + +- v2 schemas for payment links, the webhooks resource (`APIWebhook`), outbound PIX transfers (`APIPixTransfer`), Boleto (`APIBoleto`), and the subscription lifecycle (cancel, change-plan, record-usage). + +### Fixed + +- `APISubscription.frequency.dayOfProcessing` was a sibling field instead of being nested inside `frequency` (typebox already had this right). + +### Changed + +- **Breaking:** the webhook event taxonomy now matches what's actually documented: `payout.done` → `payout.completed`, `billing.paid` split into `checkout.completed` and `transparent.completed`, plus the full set of other v2 events. +- **Breaking:** `RESTPatchToggleCouponStatusBody`/`Data` renamed to `RESTPostToggleCouponStatusBody`/`Data`, matching the real HTTP method. +- `PaymentMethod` gained `BOLETO`; `APICheckout` gained `frequency`, `upSellProductId`, `interest`, `fine`. diff --git a/packages/zod/package.json b/packages/zod/package.json index 7d33e4a..d397e42 100644 --- a/packages/zod/package.json +++ b/packages/zod/package.json @@ -57,7 +57,8 @@ "main": "./dist/index.js", "types": "./dist/index.d.ts", "files": [ - "dist" + "dist", + "CHANGELOG.md" ], "scripts": { "test": "bun test",