Initial Commit

This commit is contained in:
2026-05-27 23:29:53 +01:00
commit fbc70f96e6
10000 changed files with 1102152 additions and 0 deletions

View File

@@ -0,0 +1,104 @@
// Side-effect imports — surface the registry + context augmentations to
// every consumer importing the package barrel.
import "./middleware/context-augmentation.js";
import "./services/registry-augmentation.js";
// Error codes
export {
PAYMENT_PLUGIN_CODES,
PaymentPluginError,
type PaymentPluginErrorCode,
type PaymentPluginErrorContext,
} from "./error-codes/error-codes.js";
// Middleware
export {
type CreatePaymentIdempotencyMiddlewareOptions,
createPaymentIdempotencyMiddleware,
type PaymentIdempotencyStore,
} from "./middleware/idempotency-middleware.js";
// OTel instruments
export {
getPaymentInstruments,
type PaymentInstruments,
resetPaymentInstruments,
} from "./otel/instruments.js";
// Plugin factory
export { createPaymentPlugin } from "./plugin/plugin.js";
// Routes
export {
type BuildPaymentRoutesOptions,
buildPaymentRoutes,
} from "./routes/build-routes.js";
// Schemas
export { type Money, MoneySchema } from "./schemas/money.js";
export {
type PaymentPluginOptionsInput,
type PaymentPluginOptionsResolved,
PaymentPluginOptionsSchema,
} from "./schemas/options.js";
export {
type CaptureBody,
CaptureBodySchema,
type CreatePaymentIntentBody,
CreatePaymentIntentBodySchema,
type EmptyBody,
EmptyBodySchema,
type ListPaymentIntentsQuery,
ListPaymentIntentsQuerySchema,
type PaymentIntentEnvelope,
type PaymentIntentIdParam,
PaymentIntentIdParamSchema,
type PaymentIntentListResponse,
PaymentIntentListResponseSchema,
type PaymentIntentResponse,
PaymentIntentResponseSchema,
PaymentIntentSchema,
type PaymentStatusName,
PaymentStatusSchema,
type RefundBody,
RefundBodySchema,
type RefundEnvelope,
type RefundResponse,
RefundResponseSchema,
RefundSchema,
type WebhookResponse,
WebhookResponseSchema,
} from "./schemas/routes/index.js";
// Services
export {
type CaptureArgs,
type CreateIntentArgs,
type CreatePaymentServiceOptions,
createPaymentService,
type IntentByIdArgs,
type OwnerScopedArgs,
type PaymentService,
type RefundArgs,
} from "./services/payment-service.js";
// Store
export { MemoryPaymentIntentStore } from "./store/memory-store.js";
export type {
OwnedIntent,
PaymentIntentStore,
} from "./store/payment-intent-store.js";
// Types
export type {
PaymentPluginConfig,
PaymentPluginOptions,
} from "./types/types.js";
// Webhook
export {
signPaymentWebhook,
type VerifyPaymentWebhookOptions,
verifyPaymentWebhook,
type WebhookAlgorithmName,
} from "./webhook/verify-webhook.js";