import { BaseResource } from './BaseResource.js'; import type { RequestOptions } from '../types/common.js'; import type { PaymentFlow, PaymentFlowCreateParams, PaymentFlowUpdateParams } from '../types/paymentFlows.js'; /** * Payment Flows are the heart of Tagada's PSP-agnostic architecture. They * define how payments are routed across multiple processors with strategies * like weighted distribution, cascading fallbacks, and sticky routing. */ export declare class PaymentFlows extends BaseResource { /** * List all payment flows for the account. */ list(opts?: RequestOptions): Promise; /** * List payment flows with full processor details attached. */ listWithProcessors(opts?: RequestOptions): Promise<{ flows: PaymentFlow[]; allProcessors: unknown[]; }>; /** * Retrieve a single payment flow. */ retrieve(flowId: string, opts?: RequestOptions): Promise; /** * Retrieve a payment flow with full processor configuration details. */ retrieveWithProcessors(flowId: string, opts?: RequestOptions): Promise; /** * Create a new payment flow with processor routing strategy. * * @example * const flow = await tagada.paymentFlows.create({ * data: { * name: 'Primary Flow', * strategy: 'cascade', * fallbackMode: true, * maxFallbackRetries: 3, * threeDsEnabled: true, * stickyProcessorEnabled: true, * pickProcessorStrategy: 'weighted', * processorConfigs: [ * { processorId: 'proc_stripe', weight: 70, disabled: false, nonStickable: false }, * { processorId: 'proc_adyen', weight: 30, disabled: false, nonStickable: false }, * ], * fallbackProcessorConfigs: [ * { processorId: 'proc_nmi', orderIndex: 0 }, * ], * }, * }); */ create(params: PaymentFlowCreateParams, opts?: RequestOptions): Promise; /** * Update an existing payment flow's routing configuration. */ update(params: PaymentFlowUpdateParams, opts?: RequestOptions): Promise; /** * Delete a payment flow. */ del(flowId: string, opts?: RequestOptions): Promise; } //# sourceMappingURL=PaymentFlows.d.ts.map