@suportepos/split-checkout 0.1.2 → 0.1.3
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/react/index.es.js +5239 -0
- package/dist/react/index.umd.js +103 -0
- package/dist/standalone/suportepos-checkout.js +481 -0
- package/dist/types/CheckoutFlow.d.ts +32 -0
- package/dist/types/OrderSummary.d.ts +14 -0
- package/dist/types/SplitCardForm.d.ts +13 -0
- package/dist/types/SplitPixForm.d.ts +12 -0
- package/dist/types/theme.d.ts +12 -0
- package/dist/types/validators.d.ts +3 -0
- package/package.json +1 -1
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export type Product = {
|
|
2
|
+
id?: string;
|
|
3
|
+
name: string;
|
|
4
|
+
unitPrice: number;
|
|
5
|
+
quantity?: number;
|
|
6
|
+
};
|
|
7
|
+
export type Split = {
|
|
8
|
+
subordinateMerchantId?: string;
|
|
9
|
+
valor: number;
|
|
10
|
+
};
|
|
11
|
+
export type PaymentResult = {
|
|
12
|
+
success: boolean;
|
|
13
|
+
status?: number;
|
|
14
|
+
label?: string;
|
|
15
|
+
paymentId?: string;
|
|
16
|
+
amount?: number;
|
|
17
|
+
buyerName?: string;
|
|
18
|
+
buyerEmail?: string;
|
|
19
|
+
buyerPhone?: string;
|
|
20
|
+
message: string;
|
|
21
|
+
raw?: any;
|
|
22
|
+
};
|
|
23
|
+
export type CheckoutFlowProps = {
|
|
24
|
+
merchantId: string;
|
|
25
|
+
products: Product[];
|
|
26
|
+
splits: Split[];
|
|
27
|
+
merchantName?: string;
|
|
28
|
+
description?: string;
|
|
29
|
+
amountOverride?: number;
|
|
30
|
+
onResponse?: (payload: PaymentResult) => void;
|
|
31
|
+
};
|
|
32
|
+
export default function CheckoutFlow({ merchantId, products, merchantName, amountOverride, splits, onResponse, }: CheckoutFlowProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type Product = {
|
|
2
|
+
id?: string;
|
|
3
|
+
name: string;
|
|
4
|
+
unitPrice: number;
|
|
5
|
+
quantity?: number;
|
|
6
|
+
};
|
|
7
|
+
type Props = {
|
|
8
|
+
amount: number;
|
|
9
|
+
merchantName?: string;
|
|
10
|
+
sticky?: boolean;
|
|
11
|
+
items?: Product[];
|
|
12
|
+
};
|
|
13
|
+
export default function OrderSummary({ amount, merchantName, sticky, items }: Props): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Product } from './OrderSummary';
|
|
2
|
+
import { PaymentResult, Split } from './CheckoutFlow';
|
|
3
|
+
export type SplitCardFormProps = {
|
|
4
|
+
merchantId: string;
|
|
5
|
+
amount: number;
|
|
6
|
+
merchantName?: string;
|
|
7
|
+
summaryItems?: Product[];
|
|
8
|
+
splits: Split[];
|
|
9
|
+
installmentsOptions?: number[];
|
|
10
|
+
onBack?: () => void;
|
|
11
|
+
onResponse?: (payload: PaymentResult) => void;
|
|
12
|
+
};
|
|
13
|
+
export default function SplitCheckoutForm({ merchantId, amount, splits, summaryItems, merchantName, installmentsOptions, onBack, onResponse, }: SplitCardFormProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Product } from './OrderSummary';
|
|
2
|
+
import { PaymentResult, Split } from './CheckoutFlow';
|
|
3
|
+
export type SplitPixFormProps = {
|
|
4
|
+
merchantId: string;
|
|
5
|
+
amount: number;
|
|
6
|
+
merchantName?: string;
|
|
7
|
+
summaryItems?: Product[];
|
|
8
|
+
splits: Split[];
|
|
9
|
+
onBack?: () => void;
|
|
10
|
+
onResponse?: (payload: PaymentResult) => void;
|
|
11
|
+
};
|
|
12
|
+
export default function SplitPixForm({ merchantId, amount, merchantName, summaryItems, splits, onBack, onResponse, }: SplitPixFormProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const brand: {
|
|
2
|
+
primary: string;
|
|
3
|
+
primaryHover: string;
|
|
4
|
+
ink: string;
|
|
5
|
+
muted: string;
|
|
6
|
+
bg: string;
|
|
7
|
+
surface: string;
|
|
8
|
+
border: string;
|
|
9
|
+
ring: string;
|
|
10
|
+
};
|
|
11
|
+
declare const theme: import('@mui/material').Theme;
|
|
12
|
+
export default theme;
|