From 289ba6d917aeb7413934025ae19894e5cded2804 Mon Sep 17 00:00:00 2001 From: Alexander Asomba <3323537+alexasomba@users.noreply.github.com> Date: Sat, 10 Oct 2026 08:06:13 +0100 Subject: [PATCH 1/2] chore: sync Paystack SDK release 1.12.0 --- .github/workflows/ci.yml | 4 +- .github/workflows/publish-npm.yml | 4 +- .release-please-manifest.json | 3 - CHANGELOG.md | 6 + openapi.yaml | 404 +++++++++++++++++++----------- package.json | 2 +- pnpm-workspace.yaml | 16 ++ src/openapi-types.ts | 161 +++++++----- 8 files changed, 383 insertions(+), 217 deletions(-) delete mode 100644 .release-please-manifest.json diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a5a55cb..ab87449 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,10 +12,10 @@ jobs: - uses: actions/checkout@v6 - uses: pnpm/action-setup@v6 with: - version: 12.11.2 + version: 11.26.0 - uses: actions/setup-node@v6 with: - node-version: "22.x" + node-version: "24.x" package-manager-cache: false - run: pnpm install --frozen-lockfile - run: pnpm build diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml index 0d353a4..ebaba8d 100644 --- a/.github/workflows/publish-npm.yml +++ b/.github/workflows/publish-npm.yml @@ -24,12 +24,12 @@ jobs: - name: Setup pnpm uses: pnpm/action-setup@v6 with: - version: 12.11.2 + version: 11.26.0 - name: Setup Node uses: actions/setup-node@v6 with: - node-version: "22.x" + node-version: "24.x" registry-url: "https://registry.npmjs.org" package-manager-cache: false diff --git a/.release-please-manifest.json b/.release-please-manifest.json deleted file mode 100644 index cf198b9..0000000 --- a/.release-please-manifest.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - ".": "1.11.0" -} diff --git a/CHANGELOG.md b/CHANGELOG.md index 49f9ced..26543dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## [1.12.0](https://github.com/alexasomba/paystack-node/compare/v1.11.1...v1.12.0) (2026-10-10) + +### Features + +- Include the current Paystack webhook lifecycle events in generated SDK types. + ## [1.11.1](https://github.com/alexasomba/paystack-node/compare/v1.11.0...v1.11.1) (2026-10-10) ### Miscellaneous Chores diff --git a/openapi.yaml b/openapi.yaml index 0b0d0a7..4feb06f 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -5622,9 +5622,12 @@ components: event: type: string enum: - - invoice.failed + - invoice.payment_failed data: - $ref: "#/components/schemas/data-4" + type: object + description: The invoice payment failure payload. Inspect status and invoice + details before changing access. + additionalProperties: true required: - event - data @@ -5633,12 +5636,107 @@ components: event: type: string enum: - - dedicatedaccount.assign.success + - charge.dispute.remind data: $ref: "#/components/schemas/data-5" required: - event - data + - type: object + properties: + event: + type: string + enum: + - refund.pending + - refund.processing + - refund.needs-attention + data: + type: object + description: Refund lifecycle details. Payload fields vary with processor and + refund state. + additionalProperties: true + required: + - event + - data + - type: object + properties: + event: + type: string + enum: + - customeridentification.success + - customeridentification.failed + data: + type: object + description: Customer identification result and verification details. + additionalProperties: true + required: + - event + - data + - type: object + properties: + event: + type: string + enum: + - paymentrequest.pending + - paymentrequest.success + data: + type: object + description: Payment request lifecycle details. + additionalProperties: true + required: + - event + - data + - type: object + properties: + event: + type: string + enum: + - subscription.expiring_cards + data: + type: object + description: Subscription and card expiry information for the affected customer. + additionalProperties: true + required: + - event + - data + - type: object + properties: + event: + type: string + enum: + - direct_debit.authorization.created + - direct_debit.authorization.active + data: + type: object + description: Direct Debit authorization and mandate status details. + additionalProperties: true + required: + - event + - data + - type: object + properties: + event: + type: string + enum: + - zero_charge_authorization.success + data: + type: object + description: Zero-charge card authorization result. + additionalProperties: true + required: + - event + - data + - type: object + properties: + event: + type: string + enum: + - dedicatedaccount.assign.success + data: + $ref: "#/components/schemas/data-6" + required: + - event + - data - type: object properties: event: @@ -5646,7 +5744,7 @@ components: enum: - dedicatedaccount.assign.failed data: - $ref: "#/components/schemas/data-5" + $ref: "#/components/schemas/data-6" required: - event - data @@ -5657,7 +5755,7 @@ components: enum: - refund.processed data: - $ref: "#/components/schemas/data-6" + $ref: "#/components/schemas/data-7" required: - event - data @@ -5668,7 +5766,7 @@ components: enum: - refund.failed data: - $ref: "#/components/schemas/data-6" + $ref: "#/components/schemas/data-7" required: - event - data @@ -5679,7 +5777,7 @@ components: enum: - charge.dispute.create data: - $ref: "#/components/schemas/data-7" + $ref: "#/components/schemas/data-5" required: - event - data @@ -5690,7 +5788,7 @@ components: enum: - charge.dispute.resolve data: - $ref: "#/components/schemas/data-7" + $ref: "#/components/schemas/data-5" required: - event - data @@ -20680,151 +20778,6 @@ components: - created_at - pending_amount data-5: - type: object - properties: - customer: - type: object - properties: - id: - type: integer - first_name: - type: string - last_name: - type: string - email: - type: string - customer_code: - type: string - phone: - type: string - nullable: true - metadata: - type: object - nullable: true - risk_action: - type: string - international_format_phone: - type: string - nullable: true - required: - - id - - first_name - - last_name - - email - - customer_code - - phone - - metadata - - risk_action - bank: - type: object - properties: - name: - type: string - id: - type: integer - slug: - type: string - required: - - name - - id - - slug - id: - type: integer - account_name: - type: string - account_number: - type: string - created_at: - type: string - updated_at: - type: string - currency: - type: string - split_config: - anyOf: - - type: string - - type: object - nullable: true - active: - type: boolean - assigned: - type: boolean - required: - - customer - - bank - - id - - account_name - - account_number - - created_at - - updated_at - - currency - - split_config - - active - - assigned - data-6: - type: object - properties: - integration: - type: integer - transaction: - type: integer - dispute: - type: integer - nullable: true - settlement: - type: integer - nullable: true - domain: - type: string - amount: - type: integer - deducted_amount: - type: integer - fully_deducted: - type: boolean - currency: - type: string - channel: - type: string - status: - type: string - refunded_by: - type: string - refunded_at: - type: string - expected_at: - type: string - customer_note: - type: string - merchant_note: - type: string - id: - type: integer - createdAt: - type: string - updatedAt: - type: string - required: - - integration - - transaction - - dispute - - settlement - - domain - - amount - - deducted_amount - - fully_deducted - - currency - - channel - - status - - refunded_by - - refunded_at - - expected_at - - customer_note - - merchant_note - - id - - createdAt - - updatedAt - data-7: type: object properties: id: @@ -21066,6 +21019,151 @@ components: - messages - createdAt - updatedAt + data-6: + type: object + properties: + customer: + type: object + properties: + id: + type: integer + first_name: + type: string + last_name: + type: string + email: + type: string + customer_code: + type: string + phone: + type: string + nullable: true + metadata: + type: object + nullable: true + risk_action: + type: string + international_format_phone: + type: string + nullable: true + required: + - id + - first_name + - last_name + - email + - customer_code + - phone + - metadata + - risk_action + bank: + type: object + properties: + name: + type: string + id: + type: integer + slug: + type: string + required: + - name + - id + - slug + id: + type: integer + account_name: + type: string + account_number: + type: string + created_at: + type: string + updated_at: + type: string + currency: + type: string + split_config: + anyOf: + - type: string + - type: object + nullable: true + active: + type: boolean + assigned: + type: boolean + required: + - customer + - bank + - id + - account_name + - account_number + - created_at + - updated_at + - currency + - split_config + - active + - assigned + data-7: + type: object + properties: + integration: + type: integer + transaction: + type: integer + dispute: + type: integer + nullable: true + settlement: + type: integer + nullable: true + domain: + type: string + amount: + type: integer + deducted_amount: + type: integer + fully_deducted: + type: boolean + currency: + type: string + channel: + type: string + status: + type: string + refunded_by: + type: string + refunded_at: + type: string + expected_at: + type: string + customer_note: + type: string + merchant_note: + type: string + id: + type: integer + createdAt: + type: string + updatedAt: + type: string + required: + - integration + - transaction + - dispute + - settlement + - domain + - amount + - deducted_amount + - fully_deducted + - currency + - channel + - status + - refunded_by + - refunded_at + - expected_at + - customer_note + - merchant_note + - id + - createdAt + - updatedAt responses: TransactionInitializeBadRequestResponse: description: Responses from the Transaction Initialize endpoint diff --git a/package.json b/package.json index 64e5a02..10dceff 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@alexasomba/paystack-node", - "version": "1.11.1", + "version": "1.12.0", "description": "The most comprehensive Node.js SDK for Paystack - Complete, Type-safe, and Spec-compliant with full OpenAPI coverage and webhook verification.", "keywords": [ "africa", diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index df7d867..4f1824e 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -15,6 +15,21 @@ catalog: minimumReleaseAgeExclude: - "@redocly/cli@2.62.1" - express@5.3.0 + - "@pnpm/exe.android-arm64@12.11.2" + - "@pnpm/exe.android-x64@12.11.2" + - "@pnpm/exe.darwin-arm64@12.11.2" + - "@pnpm/exe.darwin-x64@12.11.2" + - "@pnpm/exe.freebsd-x64@12.11.2" + - "@pnpm/exe.linux-arm64-musl@12.11.2" + - "@pnpm/exe.linux-arm64@12.11.2" + - "@pnpm/exe.linux-ppc64@12.11.2" + - "@pnpm/exe.linux-riscv64@12.11.2" + - "@pnpm/exe.linux-s390x@12.11.2" + - "@pnpm/exe.linux-x64-musl@12.11.2" + - "@pnpm/exe.linux-x64@12.11.2" + - "@pnpm/exe.win32-arm64@12.11.2" + - "@pnpm/exe.win32-x64@12.11.2" + - pnpm@12.11.2 overrides: axios: ^1.20.0 form-data: ^4.0.6 @@ -50,3 +65,4 @@ peerDependencyRules: allowedVersions: vite: "*" vitest: "*" + typescript: 6.x diff --git a/src/openapi-types.ts b/src/openapi-types.ts index 51e2fb3..933a1fa 100644 --- a/src/openapi-types.ts +++ b/src/openapi-types.ts @@ -3146,32 +3146,81 @@ export interface components { data: components["schemas"]["data-4"]; } | { /** @enum {string} */ - event: "invoice.failed"; - data: components["schemas"]["data-4"]; + event: "invoice.payment_failed"; + /** @description The invoice payment failure payload. Inspect status and invoice details before changing access. */ + data: { + [key: string]: unknown; + }; } | { /** @enum {string} */ - event: "dedicatedaccount.assign.success"; + event: "charge.dispute.remind"; data: components["schemas"]["data-5"]; + } | { + /** @enum {string} */ + event: "refund.pending" | "refund.processing" | "refund.needs-attention"; + /** @description Refund lifecycle details. Payload fields vary with processor and refund state. */ + data: { + [key: string]: unknown; + }; + } | { + /** @enum {string} */ + event: "customeridentification.success" | "customeridentification.failed"; + /** @description Customer identification result and verification details. */ + data: { + [key: string]: unknown; + }; + } | { + /** @enum {string} */ + event: "paymentrequest.pending" | "paymentrequest.success"; + /** @description Payment request lifecycle details. */ + data: { + [key: string]: unknown; + }; + } | { + /** @enum {string} */ + event: "subscription.expiring_cards"; + /** @description Subscription and card expiry information for the affected customer. */ + data: { + [key: string]: unknown; + }; + } | { + /** @enum {string} */ + event: "direct_debit.authorization.created" | "direct_debit.authorization.active"; + /** @description Direct Debit authorization and mandate status details. */ + data: { + [key: string]: unknown; + }; + } | { + /** @enum {string} */ + event: "zero_charge_authorization.success"; + /** @description Zero-charge card authorization result. */ + data: { + [key: string]: unknown; + }; + } | { + /** @enum {string} */ + event: "dedicatedaccount.assign.success"; + data: components["schemas"]["data-6"]; } | { /** @enum {string} */ event: "dedicatedaccount.assign.failed"; - data: components["schemas"]["data-5"]; + data: components["schemas"]["data-6"]; } | { /** @enum {string} */ event: "refund.processed"; - data: components["schemas"]["data-6"]; + data: components["schemas"]["data-7"]; } | { /** @enum {string} */ event: "refund.failed"; - data: components["schemas"]["data-6"]; + data: components["schemas"]["data-7"]; } | { /** @enum {string} */ event: "charge.dispute.create"; - data: components["schemas"]["data-7"]; + data: components["schemas"]["data-5"]; } | { /** @enum {string} */ event: "charge.dispute.resolve"; - data: components["schemas"]["data-7"]; + data: components["schemas"]["data-5"]; }); /** * @description List of all support currencies @@ -9175,54 +9224,6 @@ export interface components { pending_amount: number; }; "data-5": { - customer: { - id: number; - first_name: string; - last_name: string; - email: string; - customer_code: string; - phone: string | null; - metadata: Record | null; - risk_action: string; - international_format_phone?: string | null; - }; - bank: { - name: string; - id: number; - slug: string; - }; - id: number; - account_name: string; - account_number: string; - created_at: string; - updated_at: string; - currency: string; - split_config: (string | Record) | null; - active: boolean; - assigned: boolean; - }; - "data-6": { - integration: number; - transaction: number; - dispute: number | null; - settlement: number | null; - domain: string; - amount: number; - deducted_amount: number; - fully_deducted: boolean; - currency: string; - channel: string; - status: string; - refunded_by: string; - refunded_at: string; - expected_at: string; - customer_note: string; - merchant_note: string; - id: number; - createdAt: string; - updatedAt: string; - }; - "data-7": { id: number; refund_amount: number | null; currency: string | null; @@ -9304,6 +9305,54 @@ export interface components { createdAt: string; updatedAt: string; }; + "data-6": { + customer: { + id: number; + first_name: string; + last_name: string; + email: string; + customer_code: string; + phone: string | null; + metadata: Record | null; + risk_action: string; + international_format_phone?: string | null; + }; + bank: { + name: string; + id: number; + slug: string; + }; + id: number; + account_name: string; + account_number: string; + created_at: string; + updated_at: string; + currency: string; + split_config: (string | Record) | null; + active: boolean; + assigned: boolean; + }; + "data-7": { + integration: number; + transaction: number; + dispute: number | null; + settlement: number | null; + domain: string; + amount: number; + deducted_amount: number; + fully_deducted: boolean; + currency: string; + channel: string; + status: string; + refunded_by: string; + refunded_at: string; + expected_at: string; + customer_note: string; + merchant_note: string; + id: number; + createdAt: string; + updatedAt: string; + }; }; responses: { /** @description Responses from the Transaction Initialize endpoint */ From 79b941da500fb9c62e589a5956cfbe6dab590881 Mon Sep 17 00:00:00 2001 From: Alexander Asomba <3323537+alexasomba@users.noreply.github.com> Date: Sat, 10 Oct 2026 08:10:52 +0100 Subject: [PATCH 2/2] fix: align Node 22 and pnpm 12.11.2 workflow pins --- .github/workflows/ci.yml | 4 ++-- .github/workflows/publish-npm.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ab87449..a5a55cb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,10 +12,10 @@ jobs: - uses: actions/checkout@v6 - uses: pnpm/action-setup@v6 with: - version: 11.26.0 + version: 12.11.2 - uses: actions/setup-node@v6 with: - node-version: "24.x" + node-version: "22.x" package-manager-cache: false - run: pnpm install --frozen-lockfile - run: pnpm build diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml index ebaba8d..0d353a4 100644 --- a/.github/workflows/publish-npm.yml +++ b/.github/workflows/publish-npm.yml @@ -24,12 +24,12 @@ jobs: - name: Setup pnpm uses: pnpm/action-setup@v6 with: - version: 11.26.0 + version: 12.11.2 - name: Setup Node uses: actions/setup-node@v6 with: - node-version: "24.x" + node-version: "22.x" registry-url: "https://registry.npmjs.org" package-manager-cache: false