@openhive-eu/payment 0.0.0-beta.2 → 0.0.0-beta.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.
@@ -0,0 +1,5 @@
1
+ import type { Pay } from "~/lib/pay";
2
+ declare const PayMockContext: import("react").Context<Pay | undefined>;
3
+ declare const PayMockProvider: import("react").Provider<Pay | undefined>;
4
+ declare const usePayMock: () => Pay | undefined;
5
+ export { PayMockContext, PayMockProvider, usePayMock };
@@ -1,9 +1,9 @@
1
1
  import React from "react";
2
- import { OpenPay } from "~/lib/openpay";
3
- declare const OpenPayProvider: ({ token, children, }: {
2
+ import { Pay } from "~/lib/pay";
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 useOpenPay: () => OpenPay;
7
+ declare const usePay: () => Pay;
8
8
  declare const usePayEvent: (eventName: string, callback: (event: CustomEvent) => void) => null;
9
- export { OpenPayProvider, useOpenPay, usePayEvent };
9
+ export { PayProvider, usePay, usePayEvent };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import "./app.css";
2
- import { OpenPayProvider } from "./components/openpay-provider";
2
+ import { PayProvider } from "./components/pay-provider";
3
3
  import type { RequestToPay } from "./lib/api-client";
4
- declare const Root: ({ onClose, onSuccess, customer, maxAmount, readOnlyAmount, defaultAmount, defaultReference, ...props }: Omit<React.ComponentProps<typeof OpenPayProvider>, "children"> & {
4
+ declare const Root: ({ onClose, onSuccess, customer, maxAmount, readOnlyAmount, defaultAmount, defaultReference, ...props }: Omit<React.ComponentProps<typeof PayProvider>, "children"> & {
5
5
  onClose?: () => void;
6
6
  onSuccess?: (requestToPay: RequestToPay) => void;
7
7
  customer: {
@@ -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 { PayMockProvider } from "./components/pay-mock";
17
18
  export default Root;