breezi-shared
Version:
Shared types and utilities for Breezi SDK
50 lines • 1.12 kB
TypeScript
export interface PaymentResult {
id: string;
status: 'completed' | 'pending' | 'failed';
amount: number;
currency: string;
provider: 'paypal' | 'stripe';
createdAt: string;
}
export interface PaymentError {
code: string;
message: string;
retryable?: boolean;
}
export interface AuthProvider {
name: 'clerk';
config: Record<string, any>;
}
export type PaymentProvider = 'paypal' | 'stripe';
export type Environment = 'sandbox' | 'live';
export interface CreatePaymentResponse {
orderID?: string;
sessionId?: string;
provider: PaymentProvider;
status?: string;
links?: Array<{
href: string;
rel: string;
method: string;
}>;
}
export interface CapturePaymentResponse {
id: string;
status: string;
amount: {
value: string;
currency_code: string;
};
captureTime: string;
}
export interface ApiError {
code: string;
message: string;
retryable?: boolean;
}
export interface ApiResponse<T> {
success: boolean;
data?: T;
error?: ApiError;
}
//# sourceMappingURL=types.d.ts.map