better-auth-paystack 3.5.3 → 3.5.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.es-ES.md +981 -0
- package/dist/client.d.mts +1 -1
- package/dist/client.mjs +1 -1
- package/dist/{index-CHDZijmM.d.mts → index-BhxgbWeq.d.mts} +2 -2
- package/dist/{index-CHDZijmM.d.mts.map → index-BhxgbWeq.d.mts.map} +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/dist/{version-Bi2L-9Ee.mjs → version-BlEaud3g.mjs} +2 -2
- package/dist/{version-Bi2L-9Ee.mjs.map → version-BlEaud3g.mjs.map} +1 -1
- package/package.json +2 -2
- package/skills/better-auth-paystack-setup/SKILL.md +1 -1
- package/skills/paystack-billing-flows/SKILL.md +1 -1
- package/skills/paystack-catalog-limits/SKILL.md +1 -1
- package/skills/paystack-client-api/SKILL.md +1 -1
- package/skills/paystack-local-subscriptions/SKILL.md +1 -1
- package/skills/paystack-organization-billing/SKILL.md +1 -1
- package/skills/paystack-schema-migrations/SKILL.md +1 -1
- package/skills/paystack-tanstack-start/SKILL.md +1 -1
- package/skills/paystack-testing-fixtures/SKILL.md +1 -1
- package/skills/paystack-webhooks-events/SKILL.md +1 -1
|
@@ -66,8 +66,8 @@ function createRenewalMetadata(input) {
|
|
|
66
66
|
}
|
|
67
67
|
//#endregion
|
|
68
68
|
//#region src/version.ts
|
|
69
|
-
const PACKAGE_VERSION = "3.5.
|
|
69
|
+
const PACKAGE_VERSION = "3.5.5";
|
|
70
70
|
//#endregion
|
|
71
71
|
export { getMetadataBoolean as a, hasPaystackMetadata as c, createRenewalMetadata as i, parsePaystackMetadata as l, createCheckoutMetadata as n, getMetadataNumber as o, createProrationMetadata as r, getMetadataString as s, PACKAGE_VERSION as t, stringifyPaystackMetadata as u };
|
|
72
72
|
|
|
73
|
-
//# sourceMappingURL=version-
|
|
73
|
+
//# sourceMappingURL=version-BlEaud3g.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version-
|
|
1
|
+
{"version":3,"file":"version-BlEaud3g.mjs","names":[],"sources":["../src/metadata.ts","../src/version.ts"],"sourcesContent":["export type PaystackMetadata = Record<string, unknown>;\n\nexport interface CheckoutMetadataInput {\n referenceId: string;\n userId: string;\n plan?: string;\n groupId?: string | null;\n product?: string;\n extra?: PaystackMetadata;\n trial: {\n isTrial: boolean;\n requested: boolean;\n granted: boolean;\n deniedReason?: \"already_used\";\n endsAt?: Date;\n };\n}\n\nexport interface ProrationMetadataInput {\n subscriptionId: string;\n referenceId: string;\n newPlan: string;\n oldPlan: string;\n newSeatCount: number;\n remainingDays: number;\n}\n\nexport interface RenewalMetadataInput {\n subscriptionId: string;\n referenceId: string;\n}\n\nfunction isMetadataRecord(value: unknown): value is PaystackMetadata {\n return value !== null && typeof value === \"object\" && !Array.isArray(value);\n}\n\nexport function parsePaystackMetadata(value: unknown): PaystackMetadata {\n if (value === undefined || value === null || value === \"\") return {};\n\n if (typeof value === \"string\") {\n try {\n const parsed: unknown = JSON.parse(value);\n return isMetadataRecord(parsed) ? parsed : {};\n } catch {\n return {};\n }\n }\n\n return isMetadataRecord(value) ? value : {};\n}\n\nexport function stringifyPaystackMetadata(value: unknown): string | undefined {\n if (value === undefined || value === null || value === \"\") return undefined;\n return JSON.stringify(parsePaystackMetadata(value));\n}\n\nexport function hasPaystackMetadata(value: unknown): boolean {\n return Object.keys(parsePaystackMetadata(value)).length > 0;\n}\n\nexport function getMetadataString(metadata: PaystackMetadata, key: string): string | undefined {\n const value = metadata[key];\n return typeof value === \"string\" && value !== \"\" ? value : undefined;\n}\n\nexport function getMetadataNumber(metadata: PaystackMetadata, key: string): number | undefined {\n const value = metadata[key];\n return typeof value === \"number\" && Number.isFinite(value) ? value : undefined;\n}\n\nexport function getMetadataBoolean(metadata: PaystackMetadata, key: string): boolean {\n const value = metadata[key];\n return value === true || value === \"true\";\n}\n\nexport function createCheckoutMetadata(input: CheckoutMetadataInput): PaystackMetadata {\n return {\n referenceId: input.referenceId,\n userId: input.userId,\n plan: input.plan,\n groupId: input.groupId,\n product: input.product,\n ...input.extra,\n isTrial: input.trial.isTrial,\n trialRequested: input.trial.requested,\n trialGranted: input.trial.granted,\n trialDeniedReason: input.trial.deniedReason,\n trialEnd: input.trial.endsAt?.toISOString(),\n };\n}\n\nexport function createProrationMetadata(input: ProrationMetadataInput): PaystackMetadata {\n return {\n type: \"proration\",\n subscriptionId: input.subscriptionId,\n referenceId: input.referenceId,\n newPlan: input.newPlan,\n oldPlan: input.oldPlan,\n newSeatCount: input.newSeatCount,\n remainingDays: input.remainingDays,\n };\n}\n\nexport function createRenewalMetadata(input: RenewalMetadataInput): PaystackMetadata {\n return {\n type: \"renewal\",\n subscriptionId: input.subscriptionId,\n referenceId: input.referenceId,\n };\n}\n","export const PACKAGE_VERSION = \"3.5.5\"; // x-release-please-version\n"],"mappings":";AAgCA,SAAS,iBAAiB,OAA2C;CACnE,OAAO,UAAU,QAAQ,OAAO,UAAU,YAAY,CAAC,MAAM,QAAQ,KAAK;AAC5E;AAEA,SAAgB,sBAAsB,OAAkC;CACtE,IAAI,UAAU,KAAA,KAAa,UAAU,QAAQ,UAAU,IAAI,OAAO,CAAC;CAEnE,IAAI,OAAO,UAAU,UACnB,IAAI;EACF,MAAM,SAAkB,KAAK,MAAM,KAAK;EACxC,OAAO,iBAAiB,MAAM,IAAI,SAAS,CAAC;CAC9C,QAAQ;EACN,OAAO,CAAC;CACV;CAGF,OAAO,iBAAiB,KAAK,IAAI,QAAQ,CAAC;AAC5C;AAEA,SAAgB,0BAA0B,OAAoC;CAC5E,IAAI,UAAU,KAAA,KAAa,UAAU,QAAQ,UAAU,IAAI,OAAO,KAAA;CAClE,OAAO,KAAK,UAAU,sBAAsB,KAAK,CAAC;AACpD;AAEA,SAAgB,oBAAoB,OAAyB;CAC3D,OAAO,OAAO,KAAK,sBAAsB,KAAK,CAAC,CAAC,CAAC,SAAS;AAC5D;AAEA,SAAgB,kBAAkB,UAA4B,KAAiC;CAC7F,MAAM,QAAQ,SAAS;CACvB,OAAO,OAAO,UAAU,YAAY,UAAU,KAAK,QAAQ,KAAA;AAC7D;AAEA,SAAgB,kBAAkB,UAA4B,KAAiC;CAC7F,MAAM,QAAQ,SAAS;CACvB,OAAO,OAAO,UAAU,YAAY,OAAO,SAAS,KAAK,IAAI,QAAQ,KAAA;AACvE;AAEA,SAAgB,mBAAmB,UAA4B,KAAsB;CACnF,MAAM,QAAQ,SAAS;CACvB,OAAO,UAAU,QAAQ,UAAU;AACrC;AAEA,SAAgB,uBAAuB,OAAgD;CACrF,OAAO;EACL,aAAa,MAAM;EACnB,QAAQ,MAAM;EACd,MAAM,MAAM;EACZ,SAAS,MAAM;EACf,SAAS,MAAM;EACf,GAAG,MAAM;EACT,SAAS,MAAM,MAAM;EACrB,gBAAgB,MAAM,MAAM;EAC5B,cAAc,MAAM,MAAM;EAC1B,mBAAmB,MAAM,MAAM;EAC/B,UAAU,MAAM,MAAM,QAAQ,YAAY;CAC5C;AACF;AAEA,SAAgB,wBAAwB,OAAiD;CACvF,OAAO;EACL,MAAM;EACN,gBAAgB,MAAM;EACtB,aAAa,MAAM;EACnB,SAAS,MAAM;EACf,SAAS,MAAM;EACf,cAAc,MAAM;EACpB,eAAe,MAAM;CACvB;AACF;AAEA,SAAgB,sBAAsB,OAA+C;CACnF,OAAO;EACL,MAAM;EACN,gBAAgB,MAAM;EACtB,aAAa,MAAM;CACrB;AACF;;;AC7GA,MAAa,kBAAkB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "better-auth-paystack",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.5",
|
|
4
4
|
"description": "Production-ready Paystack billing plugin for Better Auth. Supports subscriptions, one-time payments, organization billing, secure webhooks and more",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"africa",
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"@commitlint/cli": "^21.2.3",
|
|
78
78
|
"@commitlint/config-conventional": "^21.2.3",
|
|
79
79
|
"@tanstack/intent": "^0.5.5",
|
|
80
|
-
"@types/node": "^
|
|
80
|
+
"@types/node": "^26.6.5",
|
|
81
81
|
"@vitest/coverage-v8": "5.0.3",
|
|
82
82
|
"better-auth": "1.7.7",
|
|
83
83
|
"publint": "^0.3.25",
|
|
@@ -4,7 +4,7 @@ description: >
|
|
|
4
4
|
Configure better-auth-paystack with Better Auth. Use when adding the paystack() server plugin, paystackClient() client plugin, schema overrides, products/plans, webhook verification, or canonical authClient.paystack/subscription/transaction actions.
|
|
5
5
|
type: core
|
|
6
6
|
library: "better-auth-paystack"
|
|
7
|
-
library_version: "3.5.
|
|
7
|
+
library_version: "3.5.5" # x-release-please-version
|
|
8
8
|
license: "MIT"
|
|
9
9
|
compatibility: "Node.js >=22.0.0; better-auth ^1.6.9; @alexasomba/paystack-node 1.12.x; better-auth-paystack >=3.0.0 <4.0.0"
|
|
10
10
|
sources:
|
|
@@ -4,7 +4,7 @@ description: >
|
|
|
4
4
|
Build Paystack transaction and subscription flows with better-auth-paystack. Use for initialize/verify transaction, create/upgrade/cancel/restore/list subscriptions, products/plans, billing portal links, webhooks, reconcilePaystackTransaction, chargeSubscriptionRenewal, syncPaystackProducts, and syncPaystackPlans.
|
|
5
5
|
type: core
|
|
6
6
|
library: "better-auth-paystack"
|
|
7
|
-
library_version: "3.5.
|
|
7
|
+
library_version: "3.5.5" # x-release-please-version
|
|
8
8
|
license: "MIT"
|
|
9
9
|
compatibility: "Node.js >=22.0.0; better-auth ^1.6.9; @alexasomba/paystack-node 1.12.x; better-auth-paystack >=3.0.0 <4.0.0"
|
|
10
10
|
sources:
|
|
@@ -4,7 +4,7 @@ description: >
|
|
|
4
4
|
Configure products, Paystack-native plans, local-managed plans, free trials, seat billing, resource limits, and catalog sync in better-auth-paystack. Use when tasks mention planCode, freeTrial, trial eligibility, seatAmount, seatPlanCode, limits, products, syncPaystackProducts, or syncPaystackPlans.
|
|
5
5
|
type: core
|
|
6
6
|
library: "better-auth-paystack"
|
|
7
|
-
library_version: "3.5.
|
|
7
|
+
library_version: "3.5.5" # x-release-please-version
|
|
8
8
|
license: "MIT"
|
|
9
9
|
compatibility: "Node.js >=22.0.0; better-auth ^1.6.9; @alexasomba/paystack-node 1.12.x; better-auth-paystack >=3.0.0 <4.0.0"
|
|
10
10
|
sources:
|
|
@@ -4,7 +4,7 @@ description: >
|
|
|
4
4
|
Modify or use the better-auth-paystack browser client API. Use for paystackClient(), authClient.paystack, authClient.transaction, authClient.subscription, initializeTransaction, verifyTransaction, listTransactions, listSubscriptions, listProducts, listPlans, subscription billingPortal/manageLink, cancel/restore methods, BetterFetch throw option return types, and legacy disable/enable aliases.
|
|
5
5
|
type: core
|
|
6
6
|
library: "better-auth-paystack"
|
|
7
|
-
library_version: "3.5.
|
|
7
|
+
library_version: "3.5.5" # x-release-please-version
|
|
8
8
|
license: "MIT"
|
|
9
9
|
compatibility: "Node.js >=22.0.0; better-auth ^1.6.9; @alexasomba/paystack-node 1.12.x; better-auth-paystack >=3.0.0 <4.0.0"
|
|
10
10
|
sources:
|
|
@@ -4,7 +4,7 @@ description: >
|
|
|
4
4
|
Implement, debug, or test local-managed subscription behavior in better-auth-paystack. Use for local plans without planCode, saved authorization renewal, chargeSubscriptionRenewal, seat billing, prorateAndCharge, pendingPlan, LOC_ subscription codes, trial transitions, schedule-at-period-end upgrades, and Paystack-managed vs local-managed behavior.
|
|
5
5
|
type: core
|
|
6
6
|
library: "better-auth-paystack"
|
|
7
|
-
library_version: "3.5.
|
|
7
|
+
library_version: "3.5.5" # x-release-please-version
|
|
8
8
|
license: "MIT"
|
|
9
9
|
compatibility: "Node.js >=22.0.0; better-auth ^1.6.9; @alexasomba/paystack-node 1.12.x; better-auth-paystack >=3.0.0 <4.0.0"
|
|
10
10
|
sources:
|
|
@@ -4,7 +4,7 @@ description: >
|
|
|
4
4
|
Configure organization billing in better-auth-paystack. Use for organization.enabled, Better Auth organization plugin setup, owner/admin default billing authorization, organization.billingRoles, subscription.authorizeReference, organization Paystack customers, seats, invitations, members, and team limits.
|
|
5
5
|
type: core
|
|
6
6
|
library: "better-auth-paystack"
|
|
7
|
-
library_version: "3.5.
|
|
7
|
+
library_version: "3.5.5" # x-release-please-version
|
|
8
8
|
license: "MIT"
|
|
9
9
|
compatibility: "Node.js >=22.0.0; better-auth ^1.6.9; @alexasomba/paystack-node 1.12.x; better-auth-paystack >=3.0.0 <4.0.0"
|
|
10
10
|
sources:
|
|
@@ -4,7 +4,7 @@ description: >
|
|
|
4
4
|
Modify or review better-auth-paystack database schema behavior. Use for paystackProduct, paystackPlan, paystackTransaction, subscription, user.paystackCustomerCode, organization.paystackCustomerCode/email, Better Auth schema overrides, mergeSchema behavior, migrations, indexes, unique fields, and backward-compatible table or field changes.
|
|
5
5
|
type: core
|
|
6
6
|
library: "better-auth-paystack"
|
|
7
|
-
library_version: "3.5.
|
|
7
|
+
library_version: "3.5.5" # x-release-please-version
|
|
8
8
|
license: "MIT"
|
|
9
9
|
compatibility: "Node.js >=22.0.0; better-auth ^1.6.9; @alexasomba/paystack-node 1.12.x; better-auth-paystack >=3.0.0 <4.0.0"
|
|
10
10
|
sources:
|
|
@@ -4,7 +4,7 @@ description: >
|
|
|
4
4
|
Integrate better-auth-paystack in TanStack Start. Use for Better Auth API routes, tanstackStartCookies(), server functions, getRequestHeaders(), authClient Paystack actions, admin billing server functions, and Cloudflare Workers deployment.
|
|
5
5
|
type: composition
|
|
6
6
|
library: "better-auth-paystack"
|
|
7
|
-
library_version: "3.5.
|
|
7
|
+
library_version: "3.5.5" # x-release-please-version
|
|
8
8
|
license: "MIT"
|
|
9
9
|
compatibility: "Node.js >=22.0.0; better-auth ^1.6.9; @alexasomba/paystack-node 1.12.x; better-auth-paystack >=3.0.0 <4.0.0"
|
|
10
10
|
sources:
|
|
@@ -4,7 +4,7 @@ description: >
|
|
|
4
4
|
Test better-auth-paystack changes. Use for choosing focused vp test commands, Better Auth test clients, in-memory adapters, mocked Paystack SDK responses, webhook signatures, TanStack example tests, integration tests, type-safety tests, and verification before landing changes.
|
|
5
5
|
type: core
|
|
6
6
|
library: "better-auth-paystack"
|
|
7
|
-
library_version: "3.5.
|
|
7
|
+
library_version: "3.5.5" # x-release-please-version
|
|
8
8
|
license: "MIT"
|
|
9
9
|
compatibility: "Node.js >=22.0.0; better-auth ^1.6.9; @alexasomba/paystack-node 1.12.x; better-auth-paystack >=3.0.0 <4.0.0"
|
|
10
10
|
sources:
|
|
@@ -4,7 +4,7 @@ description: >
|
|
|
4
4
|
Implement, debug, or test better-auth-paystack webhook handling. Use for Paystack webhook signatures, secretKey verification, trusted IP checks, charge.success, reconcilePaystackTransaction, subscription.create, subscription.disable, subscription.enable, product quantity updates, subscription status changes, metadata parsing, and event hooks.
|
|
5
5
|
type: core
|
|
6
6
|
library: "better-auth-paystack"
|
|
7
|
-
library_version: "3.5.
|
|
7
|
+
library_version: "3.5.5" # x-release-please-version
|
|
8
8
|
license: "MIT"
|
|
9
9
|
compatibility: "Node.js >=22.0.0; better-auth ^1.6.9; @alexasomba/paystack-node 1.12.x; better-auth-paystack >=3.0.0 <4.0.0"
|
|
10
10
|
sources:
|