@suportepos/split-checkout 0.3.3 → 0.3.4

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.
@@ -1,48 +1,45 @@
1
1
  export type Product = {
2
2
  id?: string;
3
- name: string;
4
- unitPrice: number;
5
- quantity?: number;
3
+ nome: string;
4
+ preco: number;
5
+ quantidade?: number;
6
6
  };
7
7
  export type Split = {
8
8
  subordinateMerchantId?: string;
9
9
  valor: number;
10
10
  };
11
11
  export type Customer = {
12
- buyerName?: string;
13
- buyerEmail?: string;
14
- buyerPhone?: string;
15
- docType?: string;
16
- docNumber?: string;
12
+ nomeComprador?: string;
13
+ emailComprador?: string;
14
+ telefoneComprador?: string;
15
+ tipoDoc?: string;
16
+ numeroDoc?: string;
17
17
  cep?: string;
18
- address?: string;
19
- neighborhood?: string;
20
- number?: string;
21
- complement?: string;
22
- city?: string;
23
- uf?: string;
18
+ endereco?: string;
19
+ bairro?: string;
20
+ numero?: string;
21
+ complemento?: string;
22
+ cidade?: string;
23
+ estado?: string;
24
24
  };
25
25
  export type PaymentResult = {
26
- success: boolean;
27
- status?: number;
28
- label?: string;
29
- paymentId?: string;
30
- amount?: number;
31
- buyerName?: string;
32
- buyerEmail?: string;
33
- buyerPhone?: string;
34
- message: string;
35
- raw?: any;
26
+ successo: boolean;
27
+ payment_id?: string;
28
+ valor?: number;
29
+ nomeComprador?: string;
30
+ emailComprador?: string;
31
+ telefoneComprador?: string;
32
+ mensagem: string;
36
33
  };
37
34
  export type CheckoutFlowProps = {
38
35
  merchantId: string;
39
- orderId: string;
40
- production: boolean;
41
- products: Product[];
36
+ codigoPedido: string;
37
+ producao: boolean;
38
+ produtos: Product[];
42
39
  splits: Split[];
43
- customer?: Customer;
40
+ cliente?: Customer;
44
41
  merchantName?: string;
45
- amountOverride?: number;
42
+ valorTotal?: number;
46
43
  onResponse?: (payload: PaymentResult) => void;
47
44
  uuid?: string;
48
45
  };
@@ -1 +1 @@
1
- export default function CheckoutFlowContent({ step, setStep, amount, merchantName, products, splits, customer, merchantId, orderId, uuid, production, onResponse, paymentEnabled, }: any): import("react/jsx-runtime").JSX.Element;
1
+ export default function CheckoutFlowContent({ step, setStep, valor, merchantName, produtos, splits, cliente, merchantId, codigoPedido, uuid, producao, onResponse, paymentEnabled, }: any): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export default function Header(): import("react/jsx-runtime").JSX.Element;
@@ -1,14 +1,9 @@
1
- export type Product = {
2
- id?: string;
3
- name: string;
4
- unitPrice: number;
5
- quantity?: number;
6
- };
1
+ import { Product } from "./CheckoutFlow";
7
2
  type Props = {
8
3
  amount: number;
9
4
  merchantName?: string;
10
5
  sticky?: boolean;
11
6
  items?: Product[];
12
7
  };
13
- export default function OrderSummary({ amount, merchantName, sticky, items }: Props): import("react/jsx-runtime").JSX.Element;
8
+ export default function OrderSummary({ amount, merchantName, items }: Props): import("react/jsx-runtime").JSX.Element;
14
9
  export {};
@@ -1,17 +1,16 @@
1
- import { Product } from "./OrderSummary";
2
- import { PaymentResult, Split, Customer } from "./CheckoutFlow";
1
+ import { PaymentResult, Split, Customer, Product } from "./CheckoutFlow";
3
2
  export type SplitCardFormProps = {
4
3
  merchantId: string;
5
- orderId: string;
6
- production: boolean;
7
- amount: number;
4
+ codigoPedido: string;
5
+ producao: boolean;
6
+ valor: number;
8
7
  merchantName?: string;
9
- summaryItems?: Product[];
8
+ produtos?: Product[];
10
9
  splits: Split[];
11
- customer?: Customer;
10
+ cliente?: Customer;
12
11
  installmentsOptions?: number[];
13
12
  onBack?: () => void;
14
13
  onResponse?: (payload: PaymentResult) => void;
15
14
  uuid?: string;
16
15
  };
17
- export default function SplitCheckoutForm({ merchantId, orderId, production, amount, splits, summaryItems, merchantName, customer, installmentsOptions, onBack, onResponse, uuid }: SplitCardFormProps): import("react/jsx-runtime").JSX.Element;
16
+ export default function SplitCheckoutForm({ merchantId, codigoPedido, producao, valor, splits, produtos, merchantName, cliente, installmentsOptions, onBack, onResponse, uuid }: SplitCardFormProps): import("react/jsx-runtime").JSX.Element;
@@ -1,16 +1,15 @@
1
- import { Product } from "./OrderSummary";
2
- import { PaymentResult, Split, Customer } from "./CheckoutFlow";
1
+ import { PaymentResult, Split, Customer, Product } from "./CheckoutFlow";
3
2
  export type SplitPixFormProps = {
4
3
  merchantId: string;
5
- orderId: string;
6
- production: boolean;
7
- amount: number;
4
+ codigoPedido: string;
5
+ producao: boolean;
6
+ valor: number;
8
7
  merchantName?: string;
9
- summaryItems?: Product[];
8
+ produtos?: Product[];
10
9
  splits: Split[];
11
- customer?: Customer;
10
+ cliente?: Customer;
12
11
  onBack?: () => void;
13
12
  onResponse?: (payload: PaymentResult) => void;
14
13
  uuid?: string;
15
14
  };
16
- export default function SplitPixForm({ merchantId, orderId, production, amount, merchantName, summaryItems, splits, customer, onBack, onResponse, uuid }: SplitPixFormProps): import("react/jsx-runtime").JSX.Element;
15
+ export default function SplitPixForm({ merchantId, codigoPedido, producao, valor, merchantName, produtos, splits, cliente, onBack, onResponse, uuid }: SplitPixFormProps): import("react/jsx-runtime").JSX.Element;
@@ -1,48 +1,45 @@
1
1
  export type Product = {
2
2
  id?: string;
3
- name: string;
4
- unitPrice: number;
5
- quantity?: number;
3
+ nome: string;
4
+ preco: number;
5
+ quantidade?: number;
6
6
  };
7
7
  export type Split = {
8
8
  subordinateMerchantId?: string;
9
9
  valor: number;
10
10
  };
11
11
  export type Customer = {
12
- buyerName?: string;
13
- buyerEmail?: string;
14
- buyerPhone?: string;
15
- docType?: string;
16
- docNumber?: string;
12
+ nomeComprador?: string;
13
+ emailComprador?: string;
14
+ telefoneComprador?: string;
15
+ tipoDoc?: string;
16
+ numeroDoc?: string;
17
17
  cep?: string;
18
- address?: string;
19
- neighborhood?: string;
20
- number?: string;
21
- complement?: string;
22
- city?: string;
23
- uf?: string;
18
+ endereco?: string;
19
+ bairro?: string;
20
+ numero?: string;
21
+ complemento?: string;
22
+ cidade?: string;
23
+ estado?: string;
24
24
  };
25
25
  export type PaymentResult = {
26
- success: boolean;
27
- status?: number;
28
- label?: string;
29
- paymentId?: string;
30
- amount?: number;
31
- buyerName?: string;
32
- buyerEmail?: string;
33
- buyerPhone?: string;
34
- message: string;
35
- raw?: any;
26
+ successo: boolean;
27
+ payment_id?: string;
28
+ valor?: number;
29
+ nomeComprador?: string;
30
+ emailComprador?: string;
31
+ telefoneComprador?: string;
32
+ mensagem: string;
36
33
  };
37
34
  export type CheckoutFlowProps = {
38
35
  merchantId: string;
39
- orderId: string;
40
- production: boolean;
41
- products: Product[];
36
+ codigoPedido: string;
37
+ producao: boolean;
38
+ produtos: Product[];
42
39
  splits: Split[];
43
- customer?: Customer;
40
+ cliente?: Customer;
44
41
  merchantName?: string;
45
- amountOverride?: number;
42
+ valorTotal?: number;
46
43
  onResponse?: (payload: PaymentResult) => void;
47
44
  uuid?: string;
48
45
  };
@@ -1 +1 @@
1
- export default function CheckoutFlowContent({ step, setStep, amount, merchantName, products, splits, customer, merchantId, orderId, uuid, production, onResponse, paymentEnabled, }: any): import("react/jsx-runtime").JSX.Element;
1
+ export default function CheckoutFlowContent({ step, setStep, valor, merchantName, produtos, splits, cliente, merchantId, codigoPedido, uuid, producao, onResponse, paymentEnabled, }: any): import("react/jsx-runtime").JSX.Element;
@@ -1,14 +1,9 @@
1
- export type Product = {
2
- id?: string;
3
- name: string;
4
- unitPrice: number;
5
- quantity?: number;
6
- };
1
+ import { Product } from "./CheckoutFlow";
7
2
  type Props = {
8
3
  amount: number;
9
4
  merchantName?: string;
10
5
  sticky?: boolean;
11
6
  items?: Product[];
12
7
  };
13
- export default function OrderSummary({ amount, merchantName, sticky, items }: Props): import("react/jsx-runtime").JSX.Element;
8
+ export default function OrderSummary({ amount, merchantName, items }: Props): import("react/jsx-runtime").JSX.Element;
14
9
  export {};
@@ -1,17 +1,16 @@
1
- import { Product } from "./OrderSummary";
2
- import { PaymentResult, Split, Customer } from "./CheckoutFlow";
1
+ import { PaymentResult, Split, Customer, Product } from "./CheckoutFlow";
3
2
  export type SplitCardFormProps = {
4
3
  merchantId: string;
5
- orderId: string;
6
- production: boolean;
7
- amount: number;
4
+ codigoPedido: string;
5
+ producao: boolean;
6
+ valor: number;
8
7
  merchantName?: string;
9
- summaryItems?: Product[];
8
+ produtos?: Product[];
10
9
  splits: Split[];
11
- customer?: Customer;
10
+ cliente?: Customer;
12
11
  installmentsOptions?: number[];
13
12
  onBack?: () => void;
14
13
  onResponse?: (payload: PaymentResult) => void;
15
14
  uuid?: string;
16
15
  };
17
- export default function SplitCheckoutForm({ merchantId, orderId, production, amount, splits, summaryItems, merchantName, customer, installmentsOptions, onBack, onResponse, uuid }: SplitCardFormProps): import("react/jsx-runtime").JSX.Element;
16
+ export default function SplitCheckoutForm({ merchantId, codigoPedido, producao, valor, splits, produtos, merchantName, cliente, installmentsOptions, onBack, onResponse, uuid }: SplitCardFormProps): import("react/jsx-runtime").JSX.Element;
@@ -1,16 +1,15 @@
1
- import { Product } from "./OrderSummary";
2
- import { PaymentResult, Split, Customer } from "./CheckoutFlow";
1
+ import { PaymentResult, Split, Customer, Product } from "./CheckoutFlow";
3
2
  export type SplitPixFormProps = {
4
3
  merchantId: string;
5
- orderId: string;
6
- production: boolean;
7
- amount: number;
4
+ codigoPedido: string;
5
+ producao: boolean;
6
+ valor: number;
8
7
  merchantName?: string;
9
- summaryItems?: Product[];
8
+ produtos?: Product[];
10
9
  splits: Split[];
11
- customer?: Customer;
10
+ cliente?: Customer;
12
11
  onBack?: () => void;
13
12
  onResponse?: (payload: PaymentResult) => void;
14
13
  uuid?: string;
15
14
  };
16
- export default function SplitPixForm({ merchantId, orderId, production, amount, merchantName, summaryItems, splits, customer, onBack, onResponse, uuid }: SplitPixFormProps): import("react/jsx-runtime").JSX.Element;
15
+ export default function SplitPixForm({ merchantId, codigoPedido, producao, valor, merchantName, produtos, splits, cliente, onBack, onResponse, uuid }: SplitPixFormProps): import("react/jsx-runtime").JSX.Element;
@@ -1,13 +1,13 @@
1
1
  import { Product, Split, PaymentResult, Customer } from "./lib/CheckoutFlow";
2
- export declare function renderCheckout({ elementId, merchantId, production, orderId, products, splits, customer, merchantName, amountOverride, onResponse, }: {
2
+ export declare function renderCheckout({ elementId, merchantId, producao, codigoPedido, produtos, splits, cliente, merchantName, valorTotal, onResponse, }: {
3
3
  elementId: string;
4
4
  merchantId: string;
5
- orderId: string;
6
- production: boolean;
7
- products: Product[];
5
+ codigoPedido: string;
6
+ producao: boolean;
7
+ produtos: Product[];
8
8
  splits?: Split[];
9
- customer?: Customer;
9
+ cliente?: Customer;
10
10
  merchantName: string;
11
- amountOverride?: number;
11
+ valorTotal?: number;
12
12
  onResponse?: (result: PaymentResult) => void;
13
13
  }): void;
package/package.json CHANGED
@@ -1,46 +1,46 @@
1
- {
2
- "name": "@suportepos/split-checkout",
3
- "version": "0.3.3",
4
- "type": "module",
5
- "main": "dist/index.umd.js",
6
- "module": "dist/index.es.js",
7
- "types": "dist/types/index.d.ts",
8
- "files": [
9
- "dist"
10
- ],
11
- "scripts": {
12
- "dev": "vite",
13
- "build": "vite build && tsc --project tsconfig.build.json",
14
- "preview": "vite preview",
15
- "build:types": "tsc --emitDeclarationOnly --declaration --declarationDir dist/types",
16
- "build:standalone": "vite build --config vite.config.standalone.ts && npm run build:types",
17
- "prepublishOnly": "npm run build && npm run build:standalone && cp README.md dist/README.md"
18
- },
19
- "peerDependencies": {
20
- "@emotion/react": ">=11.0.0",
21
- "@emotion/styled": ">=11.0.0",
22
- "@mui/icons-material": "^5.0.0 || ^7.0.0",
23
- "@mui/material": "^5.0.0 || ^7.0.0",
24
- "react": ">=18.0.0 <20.0.0",
25
- "react-dom": ">=18.0.0 <20.0.0"
26
- },
27
- "devDependencies": {
28
- "@emotion/react": "11.14.0",
29
- "@emotion/styled": "11.14.1",
30
- "@mui/icons-material": "7.3.1",
31
- "@mui/material": "7.3.1",
32
- "@types/react": "18.3.11",
33
- "@types/react-dom": "18.3.0",
34
- "@vitejs/plugin-react": "^4.2.0",
35
- "react": "18.3.1",
36
- "react-dom": "18.3.1",
37
- "terser": "^5.43.1",
38
- "typescript": "^5.5.4",
39
- "vite": "^7.1.3",
40
- "vite-plugin-dts": "^4.5.4",
41
- "rollup": "^4.49.0"
42
- },
43
- "publishConfig": {
44
- "access": "public"
45
- }
46
- }
1
+ {
2
+ "name": "@suportepos/split-checkout",
3
+ "version": "0.3.4",
4
+ "type": "module",
5
+ "main": "dist/index.umd.js",
6
+ "module": "dist/index.es.js",
7
+ "types": "dist/types/index.d.ts",
8
+ "files": [
9
+ "dist"
10
+ ],
11
+ "scripts": {
12
+ "dev": "vite",
13
+ "build": "vite build && tsc --project tsconfig.build.json",
14
+ "preview": "vite preview",
15
+ "build:types": "tsc --emitDeclarationOnly --declaration --declarationDir dist/types",
16
+ "build:standalone": "vite build --config vite.config.standalone.ts && npm run build:types",
17
+ "prepublishOnly": "npm run build && npm run build:standalone && cp README.md dist/README.md"
18
+ },
19
+ "peerDependencies": {
20
+ "@emotion/react": ">=11.0.0",
21
+ "@emotion/styled": ">=11.0.0",
22
+ "@mui/icons-material": "^5.0.0 || ^7.0.0",
23
+ "@mui/material": "^5.0.0 || ^7.0.0",
24
+ "react": ">=18.0.0 <20.0.0",
25
+ "react-dom": ">=18.0.0 <20.0.0"
26
+ },
27
+ "devDependencies": {
28
+ "@emotion/react": "11.14.0",
29
+ "@emotion/styled": "11.14.1",
30
+ "@mui/icons-material": "7.3.1",
31
+ "@mui/material": "7.3.1",
32
+ "@types/react": "18.3.11",
33
+ "@types/react-dom": "18.3.0",
34
+ "@vitejs/plugin-react": "^4.2.0",
35
+ "react": "18.3.1",
36
+ "react-dom": "18.3.1",
37
+ "rollup": "^4.49.0",
38
+ "terser": "^5.44.0",
39
+ "typescript": "^5.5.4",
40
+ "vite": "^7.1.3",
41
+ "vite-plugin-dts": "^4.5.4"
42
+ },
43
+ "publishConfig": {
44
+ "access": "public"
45
+ }
46
+ }