@openhive-eu/payment 0.0.0-beta.2 → 0.0.0-beta.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.
- package/dist/components/pay-client-provider.d.ts +5 -0
- package/dist/components/pay-provider.d.ts +4 -5
- package/dist/components/pay-terminal.d.ts +2 -2
- package/dist/index.d.ts +5 -4
- package/dist/index.js +5975 -5913
- package/dist/index.umd.cjs +37 -37
- package/dist/lib/pay-client.d.ts +29 -0
- package/package.json +1 -1
- package/dist/components/openpay-provider.d.ts +0 -9
- package/dist/components/openpay-terminal.d.ts +0 -15
- package/dist/lib/openpay.d.ts +0 -35
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { PayClientInterface } from "~/lib/pay-client";
|
|
2
|
+
declare const PayClientContext: import("react").Context<PayClientInterface | undefined>;
|
|
3
|
+
declare const PayClientProvider: import("react").Provider<PayClientInterface | undefined>;
|
|
4
|
+
declare const usePayClient: () => PayClientInterface | undefined;
|
|
5
|
+
export { PayClientContext, PayClientProvider, usePayClient };
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
3
|
-
declare const
|
|
2
|
+
import { type PayClientInterface } from "~/lib/pay-client";
|
|
3
|
+
declare const PayProvider: ({ token, children, }: {
|
|
4
4
|
token?: string;
|
|
5
5
|
children: React.ReactNode;
|
|
6
6
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
declare const
|
|
8
|
-
|
|
9
|
-
export { OpenPayProvider, useOpenPay, usePayEvent };
|
|
7
|
+
declare const usePay: () => PayClientInterface;
|
|
8
|
+
export { PayProvider, usePay };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Currency, RequestToPay } from "~/lib/api-client";
|
|
2
|
-
declare function PaymentWidgetBase({ defaultAmount, readOnlyAmount, defaultReference, customer, onClose,
|
|
2
|
+
declare function PaymentWidgetBase({ defaultAmount, readOnlyAmount, defaultReference, customer, onClose, onRequestToPay, currency, }: {
|
|
3
3
|
defaultAmount?: string;
|
|
4
4
|
maxAmount?: number;
|
|
5
5
|
readOnlyAmount?: boolean;
|
|
@@ -12,7 +12,7 @@ declare function PaymentWidgetBase({ defaultAmount, readOnlyAmount, defaultRefer
|
|
|
12
12
|
phone?: string;
|
|
13
13
|
};
|
|
14
14
|
onClose?: () => void;
|
|
15
|
-
|
|
15
|
+
onRequestToPay?: (requestToPay: RequestToPay) => void;
|
|
16
16
|
}): import("react/jsx-runtime").JSX.Element;
|
|
17
17
|
declare const PaymentWidget: (props: React.ComponentProps<typeof PaymentWidgetBase>) => import("react/jsx-runtime").JSX.Element;
|
|
18
18
|
export { PaymentWidget };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "./app.css";
|
|
2
|
-
import {
|
|
2
|
+
import { PayProvider } from "./components/pay-provider";
|
|
3
3
|
import type { RequestToPay } from "./lib/api-client";
|
|
4
|
-
declare const Root: ({ onClose,
|
|
4
|
+
declare const Root: ({ onClose, onRequestToPay, customer, maxAmount, readOnlyAmount, defaultAmount, defaultReference, ...props }: Omit<React.ComponentProps<typeof PayProvider>, "children"> & {
|
|
5
5
|
onClose?: () => void;
|
|
6
|
-
|
|
6
|
+
onRequestToPay?: (requestToPay: RequestToPay) => Promise<void>;
|
|
7
7
|
customer: {
|
|
8
8
|
name?: string;
|
|
9
9
|
email?: string;
|
|
@@ -14,4 +14,5 @@ declare const Root: ({ onClose, onSuccess, customer, maxAmount, readOnlyAmount,
|
|
|
14
14
|
readOnlyAmount?: boolean;
|
|
15
15
|
defaultReference?: string;
|
|
16
16
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
-
export
|
|
17
|
+
export { PayClientProvider } from "./components/pay-client-provider";
|
|
18
|
+
export { Root as PaymentWidget };
|