@fundly.ai/payment-sdk 1.1.0 → 1.2.0
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/dist/config/environment.config.d.ts +0 -1
- package/dist/config/environment.config.d.ts.map +1 -1
- package/dist/config/sdk.config.d.ts +18 -0
- package/dist/config/sdk.config.d.ts.map +1 -1
- package/dist/embed/index.d.ts +5 -0
- package/dist/embed/index.d.ts.map +1 -1
- package/dist/embed.css +1 -1
- package/dist/embed.js +27 -27
- package/dist/index.d.ts +21 -2
- package/dist/index.js +20 -20
- package/dist/index.mjs +2552 -2528
- package/dist/sdk/index.d.ts +3 -3
- package/dist/sdk/index.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ import type { TransactionConfig as TransactionConfigType } from "../types/transa
|
|
|
6
6
|
export type { PaymentInvoice } from "./context/PaymentContext";
|
|
7
7
|
export type { Lender, Loan, BulletLoan, EMILoan, EMI, PartialPayment, RepaymentMetadata, RepaymentConfig, } from "../types/repayment.types";
|
|
8
8
|
export type { Transaction, LoanRepaymentTransaction, SupplierPaymentTransaction, InvoiceDetail, SettlementDetail, TransactionType, TransactionStatus, TransactionFilter, TransactionFilterType, TransactionFilterStatus, TransactionFilterPaymentMethod, TransactionConfig, } from "../types/transaction.types";
|
|
9
|
+
export type { SDKCallbacks, ImageFile, FeatureFlags } from "./config/sdk.config";
|
|
9
10
|
export type { Environment } from "./details";
|
|
10
11
|
export { PaymentProvider };
|
|
11
12
|
export { RepaymentProvider };
|
|
@@ -67,10 +68,16 @@ export interface SDKCallbacks {
|
|
|
67
68
|
*/
|
|
68
69
|
onShowToast?: (message: string, type?: 'success' | 'error' | 'warning' | 'info') => void;
|
|
69
70
|
}
|
|
71
|
+
export interface FeatureFlags {
|
|
72
|
+
enableRepaymentFlow?: boolean;
|
|
73
|
+
enableTransactionHistory?: boolean;
|
|
74
|
+
enableCssIsolation?: boolean;
|
|
75
|
+
}
|
|
70
76
|
export declare class PaymentSDKConfig {
|
|
71
77
|
private static instance;
|
|
72
78
|
private callbacks;
|
|
73
79
|
private source;
|
|
80
|
+
private features;
|
|
74
81
|
private constructor();
|
|
75
82
|
static getInstance(): PaymentSDKConfig;
|
|
76
83
|
/**
|
|
@@ -89,6 +96,18 @@ export declare class PaymentSDKConfig {
|
|
|
89
96
|
* Get the source/typeOfApp value
|
|
90
97
|
*/
|
|
91
98
|
getSource(): string | null;
|
|
99
|
+
/**
|
|
100
|
+
* Set feature flags (merges with existing)
|
|
101
|
+
*/
|
|
102
|
+
setFeatures(flags: FeatureFlags): void;
|
|
103
|
+
/**
|
|
104
|
+
* Get all feature flags with defaults
|
|
105
|
+
*/
|
|
106
|
+
getFeatures(): Required<FeatureFlags>;
|
|
107
|
+
/**
|
|
108
|
+
* Check if a specific feature is enabled
|
|
109
|
+
*/
|
|
110
|
+
isFeatureEnabled(flag: keyof FeatureFlags): boolean;
|
|
92
111
|
/**
|
|
93
112
|
* Navigate to home
|
|
94
113
|
*/
|
|
@@ -206,7 +225,7 @@ export interface RepaymentFlowProps {
|
|
|
206
225
|
* RepaymentFlow - Component for loan repayment by retailers
|
|
207
226
|
* Handles lender selection, loan selection, and repayment execution
|
|
208
227
|
*/
|
|
209
|
-
export declare function RepaymentFlow({ config, onPaymentComplete, onNavigateHome }: RepaymentFlowProps): import("react/jsx-runtime").JSX.Element;
|
|
228
|
+
export declare function RepaymentFlow({ config, onPaymentComplete, onNavigateHome }: RepaymentFlowProps): import("react/jsx-runtime").JSX.Element | null;
|
|
210
229
|
/**
|
|
211
230
|
* Props for TransactionHistory component
|
|
212
231
|
*/
|
|
@@ -220,4 +239,4 @@ export interface TransactionHistoryProps {
|
|
|
220
239
|
* TransactionHistory - Component for viewing all payment transactions
|
|
221
240
|
* Displays transaction list with filtering, search, and detail views
|
|
222
241
|
*/
|
|
223
|
-
export declare function TransactionHistory({ config, onNavigateHome }: TransactionHistoryProps): import("react/jsx-runtime").JSX.Element;
|
|
242
|
+
export declare function TransactionHistory({ config, onNavigateHome }: TransactionHistoryProps): import("react/jsx-runtime").JSX.Element | null;
|