mirror of
https://github.com/xtr-dev/payload-billing.git
synced 2025-12-10 10:53:23 +00:00
- Replace all @/ path aliases with proper relative imports and .js extensions - Update @mollie/api-client peer dependency to support v4.x (^3.7.0 || ^4.0.0) - Bump version to 0.1.5 - Ensure ESM compatibility for plugin distribution Fixes module resolution error: "Cannot find package '@/collections'" when using the plugin in external PayloadCMS projects. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
22 lines
610 B
TypeScript
22 lines
610 B
TypeScript
import type { Payment } from '../plugin/types/payments.js'
|
|
import type { Config, Payload } from 'payload'
|
|
import type { BillingPluginConfig } from '../plugin/config.js'
|
|
|
|
export type InitPayment = (payload: Payload, payment: Partial<Payment>) => Promise<Partial<Payment>>
|
|
|
|
export type PaymentProvider = {
|
|
key: string
|
|
onConfig?: (config: Config, pluginConfig: BillingPluginConfig) => void
|
|
onInit?: (payload: Payload) => Promise<void> | void
|
|
initPayment: InitPayment
|
|
}
|
|
|
|
/**
|
|
* Type-safe provider data wrapper
|
|
*/
|
|
export type ProviderData<T = unknown> = {
|
|
raw: T
|
|
timestamp: string
|
|
provider: string
|
|
}
|