bitsnap-react 1.18.1 → 1.20.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/AGENTS.md +21 -0
- package/README.md +45 -0
- package/dist/BitsnapCart-LHJ6KOTV.css +2 -0
- package/dist/BitsnapCart-LHJ6KOTV.css.map +1 -0
- package/dist/BitsnapCart-V4S4EXYV.js +2 -0
- package/dist/BitsnapCart-V4S4EXYV.js.map +1 -0
- package/dist/BitsnapCart-Z6JFYNH2.mjs +2 -0
- package/dist/CartProvider-5NP4WACK.js +2 -0
- package/dist/CartProvider-5NP4WACK.js.map +1 -0
- package/dist/CartProvider-G7FQUPXL.mjs +2 -0
- package/dist/PanelModelFiles-EKQRLF46.js.map +1 -1
- package/dist/analytics.js +1 -1
- package/dist/analytics.js.map +1 -1
- package/dist/analytics.mjs +1 -1
- package/dist/catalog.js +1 -1
- package/dist/catalog.js.map +1 -1
- package/dist/catalog.mjs +1 -1
- package/dist/chat.css +2 -0
- package/dist/chat.css.map +1 -0
- package/dist/chat.d.mts +173 -0
- package/dist/chat.d.ts +173 -0
- package/dist/chat.js +2 -0
- package/dist/chat.js.map +1 -0
- package/dist/chat.mjs +2 -0
- package/dist/chat.mjs.map +1 -0
- package/dist/chunk-2G46TAUX.mjs +2 -0
- package/dist/chunk-2G46TAUX.mjs.map +1 -0
- package/dist/{chunk-N3B25GTY.js → chunk-4Y233NII.js} +2 -2
- package/dist/chunk-4Y233NII.js.map +1 -0
- package/dist/chunk-5M3OUOMU.mjs +5 -0
- package/dist/chunk-5M3OUOMU.mjs.map +1 -0
- package/dist/chunk-6Q3VGPSF.js.map +1 -1
- package/dist/chunk-A2ZDFN3J.mjs +2 -0
- package/dist/{chunk-ZM5T4TQW.mjs.map → chunk-A2ZDFN3J.mjs.map} +1 -1
- package/dist/{chunk-DR7WYI37.js → chunk-AQYHQY2Y.js} +2 -2
- package/dist/chunk-AQYHQY2Y.js.map +1 -0
- package/dist/{chunk-62WDFH7K.mjs → chunk-BTERIY6N.mjs} +2 -2
- package/dist/chunk-C736F727.js +2 -0
- package/dist/chunk-C736F727.js.map +1 -0
- package/dist/chunk-EFN4OW2C.js +2 -0
- package/dist/chunk-EFN4OW2C.js.map +1 -0
- package/dist/chunk-EMR4YXNY.mjs +2 -0
- package/dist/chunk-EMR4YXNY.mjs.map +1 -0
- package/dist/chunk-GHBRR665.js +2 -0
- package/dist/chunk-GHBRR665.js.map +1 -0
- package/dist/chunk-HKRH6FI6.mjs +2 -0
- package/dist/chunk-HKRH6FI6.mjs.map +1 -0
- package/dist/chunk-HP3I6D2R.js +2 -0
- package/dist/chunk-HP3I6D2R.js.map +1 -0
- package/dist/{chunk-G4SEOVLD.js → chunk-IRZJIPUF.js} +2 -2
- package/dist/chunk-IRZJIPUF.js.map +1 -0
- package/dist/chunk-IXQCN7MR.mjs +2 -0
- package/dist/chunk-IXQCN7MR.mjs.map +1 -0
- package/dist/chunk-IXX6SUMB.mjs +2 -0
- package/dist/chunk-IXX6SUMB.mjs.map +1 -0
- package/dist/chunk-JSDGZ4NY.js.map +1 -1
- package/dist/chunk-KDL35KEI.js +2 -0
- package/dist/chunk-KDL35KEI.js.map +1 -0
- package/dist/chunk-KO7ZERN5.mjs +2 -0
- package/dist/chunk-KO7ZERN5.mjs.map +1 -0
- package/dist/chunk-KOYBZORL.js.map +1 -1
- package/dist/chunk-KZWCVKLU.js +5 -0
- package/dist/chunk-KZWCVKLU.js.map +1 -0
- package/dist/chunk-LHNTSQYO.mjs +2 -0
- package/dist/chunk-LHNTSQYO.mjs.map +1 -0
- package/dist/chunk-LHQEM3CU.mjs +2 -0
- package/dist/chunk-LHQEM3CU.mjs.map +1 -0
- package/dist/chunk-MDAFPGPA.js +2 -0
- package/dist/chunk-MDAFPGPA.js.map +1 -0
- package/dist/chunk-Q337IQNA.js.map +1 -1
- package/dist/chunk-RJPQMDIQ.js +2 -0
- package/dist/chunk-RJPQMDIQ.js.map +1 -0
- package/dist/{chunk-GKJURMDO.mjs → chunk-TW25G7XX.mjs} +2 -2
- package/dist/{chunk-GKJURMDO.mjs.map → chunk-TW25G7XX.mjs.map} +1 -1
- package/dist/{chunk-UTUPPMLK.mjs → chunk-URQBHNJK.mjs} +2 -2
- package/dist/chunk-W3RGQYPD.js.map +1 -1
- package/dist/chunk-XEXPQFKN.mjs +2 -0
- package/dist/chunk-XEXPQFKN.mjs.map +1 -0
- package/dist/chunk-YPA6MMGJ.js +2 -0
- package/dist/chunk-YPA6MMGJ.js.map +1 -0
- package/dist/chunk-Z3YOJ6NZ.js +2 -0
- package/dist/chunk-Z3YOJ6NZ.js.map +1 -0
- package/dist/consent.js.map +1 -1
- package/dist/course.d.mts +2 -14
- package/dist/course.d.ts +2 -14
- package/dist/course.js +1 -1
- package/dist/course.js.map +1 -1
- package/dist/course.mjs +1 -1
- package/dist/course.mjs.map +1 -1
- package/dist/embed/analytics.js +1 -1
- package/dist/errors.js.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +50 -33
- package/dist/index.d.ts +50 -33
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/internal.js.map +1 -1
- package/dist/methods-33CWGKNA.mjs +2 -0
- package/dist/methods-33CWGKNA.mjs.map +1 -0
- package/dist/methods-4GB652MQ.js +2 -0
- package/dist/methods-4GB652MQ.js.map +1 -0
- package/dist/model-files-client-P4PORZJ6.js.map +1 -1
- package/dist/models.js.map +1 -1
- package/dist/returns.js +1 -1
- package/dist/returns.js.map +1 -1
- package/dist/returns.mjs +1 -1
- package/dist/texts-9kfgClsA.d.mts +14 -0
- package/dist/texts-9kfgClsA.d.ts +14 -0
- package/dist/{types-D6LsoycW.d.mts → types-CjWyHunk.d.mts} +9 -1
- package/dist/{types-ClFCVzk_.d.ts → types-DfqzDP9k.d.ts} +9 -1
- package/dist/viewer3d.js.map +1 -1
- package/dist/viewer3d.mjs +2 -2
- package/dist/viewer3d.mjs.map +1 -1
- package/dist/widgets-Bsojw94g.d.ts +556 -0
- package/dist/widgets-u7xMJbsY.d.mts +556 -0
- package/package.json +16 -2
- package/dist/CartProvider-CC6YIZVS.js +0 -2
- package/dist/CartProvider-CC6YIZVS.js.map +0 -1
- package/dist/CartProvider-ZL65WZN6.mjs +0 -2
- package/dist/chunk-2XSLIZ27.js +0 -2
- package/dist/chunk-2XSLIZ27.js.map +0 -1
- package/dist/chunk-5OCGXVLC.js +0 -2
- package/dist/chunk-5OCGXVLC.js.map +0 -1
- package/dist/chunk-5YN752OV.mjs +0 -2
- package/dist/chunk-5YN752OV.mjs.map +0 -1
- package/dist/chunk-7BG22YBF.js +0 -5
- package/dist/chunk-7BG22YBF.js.map +0 -1
- package/dist/chunk-AHISXVEE.js +0 -2
- package/dist/chunk-AHISXVEE.js.map +0 -1
- package/dist/chunk-DR7WYI37.js.map +0 -1
- package/dist/chunk-EOFJAQPT.js +0 -2
- package/dist/chunk-EOFJAQPT.js.map +0 -1
- package/dist/chunk-G4SEOVLD.js.map +0 -1
- package/dist/chunk-IGQZP4YR.mjs +0 -2
- package/dist/chunk-IGQZP4YR.mjs.map +0 -1
- package/dist/chunk-N3B25GTY.js.map +0 -1
- package/dist/chunk-VWA3ZCNI.mjs +0 -2
- package/dist/chunk-VWA3ZCNI.mjs.map +0 -1
- package/dist/chunk-YGE2223J.mjs +0 -5
- package/dist/chunk-YGE2223J.mjs.map +0 -1
- package/dist/chunk-ZKT4N553.mjs +0 -2
- package/dist/chunk-ZKT4N553.mjs.map +0 -1
- package/dist/chunk-ZM5T4TQW.mjs +0 -2
- package/dist/methods-7DWKFCPK.js +0 -2
- package/dist/methods-7DWKFCPK.js.map +0 -1
- package/dist/methods-DQTADIN4.mjs +0 -2
- /package/dist/{CartProvider-ZL65WZN6.mjs.map → BitsnapCart-Z6JFYNH2.mjs.map} +0 -0
- /package/dist/{methods-DQTADIN4.mjs.map → CartProvider-G7FQUPXL.mjs.map} +0 -0
- /package/dist/{chunk-62WDFH7K.mjs.map → chunk-BTERIY6N.mjs.map} +0 -0
- /package/dist/{chunk-UTUPPMLK.mjs.map → chunk-URQBHNJK.mjs.map} +0 -0
package/dist/index.d.mts
CHANGED
|
@@ -6,11 +6,14 @@ export { BitsnapReturns, BitsnapReturnsProps, BitsnapReturnsProvider, BitsnapRet
|
|
|
6
6
|
export { b as RETURNS_SLOT_NAMES, R as ReturnsAppearance, c as ReturnsAppearanceElements, d as ReturnsAppearanceTokens, e as ReturnsSlotAppearance, f as ReturnsSlotName, h as ReturnsTextKey, a as ReturnsTexts, g as ReturnsTheme } from './texts-LGhuQfA9.mjs';
|
|
7
7
|
import { CSSProperties, ReactNode } from 'react';
|
|
8
8
|
import z__default from 'zod';
|
|
9
|
-
import { P as PanelLoginProps, a as PanelProps, G as GetThemeOutput } from './types-
|
|
10
|
-
export { b as PanelScreen, c as PanelSearchParamsType } from './types-
|
|
9
|
+
import { P as PanelLoginProps, a as PanelProps, G as GetThemeOutput } from './types-CjWyHunk.mjs';
|
|
10
|
+
export { b as PanelScreen, c as PanelSearchParamsType } from './types-CjWyHunk.mjs';
|
|
11
|
+
import { e as ChatThreadProps, c as ChannelProps } from './widgets-u7xMJbsY.mjs';
|
|
12
|
+
export { d as ChatBuyRequest, C as ChatTexts, f as ChatWidgetBaseProps } from './widgets-u7xMJbsY.mjs';
|
|
11
13
|
import './models.mjs';
|
|
12
14
|
import '@bufbuild/protobuf/wkt';
|
|
13
15
|
import '@bufbuild/protobuf';
|
|
16
|
+
import './texts-9kfgClsA.mjs';
|
|
14
17
|
|
|
15
18
|
type AppleButtonType = "plain" | "add-money" | "book" | "buy" | "check-out" | "continue" | "contribute" | "donate" | "order" | "pay" | "reload" | "rent" | "set-up" | "subscribe" | "support" | "tip" | "top-up";
|
|
16
19
|
type ColorType = "black" | "white" | "white-outline";
|
|
@@ -719,36 +722,6 @@ type Err = {
|
|
|
719
722
|
};
|
|
720
723
|
declare function Err(message: string, type?: ErrTypes, data?: unknown): Err;
|
|
721
724
|
|
|
722
|
-
/**
|
|
723
|
-
* The buyer's choice between paying online, paying the seller by hand (bank
|
|
724
|
-
* transfer or "BLIK przelew na telefon") and paying the courier on delivery,
|
|
725
|
-
* offered when the seller turned on "show at checkout" for the manual payment
|
|
726
|
-
* gateway or offers cash on delivery.
|
|
727
|
-
*
|
|
728
|
-
* `POST /public-commerce/payment-methods` takes the body of `/buy` and answers
|
|
729
|
-
* `{ success: true, choice: null }` (nothing to choose) or
|
|
730
|
-
* `{ success: true, choice: { methods, manualAccountTypes } }`. The pick goes
|
|
731
|
-
* to `/buy` as `paymentMethod`. Anything else (an old backend, an error, a
|
|
732
|
-
* timeout) counts as "nothing to choose", so the cart buys as before.
|
|
733
|
-
*/
|
|
734
|
-
|
|
735
|
-
/** `cod` is cash on delivery: the buyer pays the courier (Poland only, shipped carts). */
|
|
736
|
-
type PaymentMethod = "online" | "manual" | "cod";
|
|
737
|
-
type ManualAccountType = "bankTransfer" | "blik";
|
|
738
|
-
type PaymentMethodChoice = {
|
|
739
|
-
/** In the seller's order (cash on delivery last); the first one is selected by default. */
|
|
740
|
-
methods: PaymentMethod[];
|
|
741
|
-
/** How the manual option is paid; decides its label. */
|
|
742
|
-
manualAccountTypes: ManualAccountType[];
|
|
743
|
-
};
|
|
744
|
-
|
|
745
|
-
declare function setLocale(locale?: string): void;
|
|
746
|
-
declare function getLocale(): string;
|
|
747
|
-
|
|
748
|
-
declare function setProjectID$1(projectID: string): void;
|
|
749
|
-
|
|
750
|
-
declare function setCustomHost(host: string): void;
|
|
751
|
-
|
|
752
725
|
declare enum BillingPeriod {
|
|
753
726
|
DAILY = "daily",
|
|
754
727
|
WEEKLY = "weekly",
|
|
@@ -799,6 +772,7 @@ declare const linkRequestSchema: z__default.ZodObject<{
|
|
|
799
772
|
id: z__default.ZodString;
|
|
800
773
|
quantity: z__default.ZodNumber;
|
|
801
774
|
priceVersion: z__default.ZodOptional<z__default.ZodString>;
|
|
775
|
+
amount: z__default.ZodOptional<z__default.ZodNumber>;
|
|
802
776
|
name: z__default.ZodOptional<z__default.ZodString>;
|
|
803
777
|
description: z__default.ZodOptional<z__default.ZodString>;
|
|
804
778
|
imageURL: z__default.ZodOptional<z__default.ZodString>;
|
|
@@ -838,6 +812,36 @@ declare const linkRequestSchema: z__default.ZodObject<{
|
|
|
838
812
|
}, z__default.core.$strip>>;
|
|
839
813
|
}, z__default.core.$strip>;
|
|
840
814
|
|
|
815
|
+
/**
|
|
816
|
+
* The buyer's choice between paying online, paying the seller by hand (bank
|
|
817
|
+
* transfer or "BLIK przelew na telefon") and paying the courier on delivery,
|
|
818
|
+
* offered when the seller turned on "show at checkout" for the manual payment
|
|
819
|
+
* gateway or offers cash on delivery.
|
|
820
|
+
*
|
|
821
|
+
* `POST /public-commerce/payment-methods` takes the body of `/buy` and answers
|
|
822
|
+
* `{ success: true, choice: null }` (nothing to choose) or
|
|
823
|
+
* `{ success: true, choice: { methods, manualAccountTypes } }`. The pick goes
|
|
824
|
+
* to `/buy` as `paymentMethod`. Anything else (an old backend, an error, a
|
|
825
|
+
* timeout) counts as "nothing to choose", so the cart buys as before.
|
|
826
|
+
*/
|
|
827
|
+
|
|
828
|
+
/** `cod` is cash on delivery: the buyer pays the courier (Poland only, shipped carts). */
|
|
829
|
+
type PaymentMethod = "online" | "manual" | "cod";
|
|
830
|
+
type ManualAccountType = "bankTransfer" | "blik";
|
|
831
|
+
type PaymentMethodChoice = {
|
|
832
|
+
/** In the seller's order (cash on delivery last); the first one is selected by default. */
|
|
833
|
+
methods: PaymentMethod[];
|
|
834
|
+
/** How the manual option is paid; decides its label. */
|
|
835
|
+
manualAccountTypes: ManualAccountType[];
|
|
836
|
+
};
|
|
837
|
+
|
|
838
|
+
declare function setLocale(locale?: string): void;
|
|
839
|
+
declare function getLocale(): string;
|
|
840
|
+
|
|
841
|
+
declare function setProjectID$1(projectID: string): void;
|
|
842
|
+
|
|
843
|
+
declare function setCustomHost(host: string): void;
|
|
844
|
+
|
|
841
845
|
declare namespace Bitsnap {
|
|
842
846
|
/**
|
|
843
847
|
* Adds a product or variant to the cart. Returns an `Err` instead of adding
|
|
@@ -854,6 +858,8 @@ declare namespace Bitsnap {
|
|
|
854
858
|
name?: string;
|
|
855
859
|
price?: number;
|
|
856
860
|
currency?: string;
|
|
861
|
+
/** Buyer chosen pay-what-you-want amount, in minor units. */
|
|
862
|
+
amount?: number;
|
|
857
863
|
/** Where `add_to_cart` is reported. Defaults to the mounted `<BitsnapCheckout>`. */
|
|
858
864
|
analytics?: Instrument;
|
|
859
865
|
}): Promise<Err | undefined>;
|
|
@@ -967,4 +973,15 @@ declare function persistReturnURL(returnURL: string | null): void;
|
|
|
967
973
|
declare function readPersistedReturnURL(): string | null;
|
|
968
974
|
declare function buildAccessTokenRedirect(returnURL: string, accessToken: string): string;
|
|
969
975
|
|
|
970
|
-
|
|
976
|
+
/**
|
|
977
|
+
* A buyer's pack thread for one service product. Loads the chat on demand;
|
|
978
|
+
* the same component is exported eagerly from `bitsnap-react/chat`.
|
|
979
|
+
*/
|
|
980
|
+
declare function ChatThread(props: ChatThreadProps): react_jsx_runtime.JSX.Element;
|
|
981
|
+
/**
|
|
982
|
+
* A community channel. Loads the chat on demand; the same component is
|
|
983
|
+
* exported eagerly from `bitsnap-react/chat`.
|
|
984
|
+
*/
|
|
985
|
+
declare function Channel(props: ChannelProps): react_jsx_runtime.JSX.Element;
|
|
986
|
+
|
|
987
|
+
export { AnalyticsOption, Wrapper$2 as ApplePayButton, type Props$3 as ApplePayButtonProps, Bitsnap, type BitsnapCartProps, BitsnapCart as BitsnapCheckout, type BuyErrorData, CHECKOUT_SLOT_NAMES, Channel, ChannelProps, ChatThread, ChatThreadProps, type CheckoutAppearance, type CheckoutAppearanceElements, type CheckoutAppearanceTokens, type CheckoutSlotAppearance, type CheckoutSlotName, type CheckoutTexts, type CheckoutTheme, type ComponentClassNames, type CreateCheckoutResult, type CustomizationTexts, type ExpressItem, GetThemeOutput, Wrapper$1 as GooglePayButton, type Props$2 as GooglePayButtonProps, ITEM_IDS_NOT_FOUND, InPostPayButton, type InPostPayButtonProps, type LinkRequest, type NotificationGroup, Wrapper as NotificationsComponent, type Props$1 as NotificationsComponentProps, type NotificationsComponentPublicProps, PanelPage as Panel, type PanelConfig, PanelLogin, PanelLoginProps, PanelProps, PanelProvider, type PublicNotificationGroup, PublicOrderPage, RevolutPayButton, type RevolutPayButtonProps, type RevolutPaymentOutcome, buildAccessTokenRedirect, createCheckout, createPaymentURL, getAllowedReturnOrigins, getLocale, getPanelConfig, getPaymentMethodChoice, getReferenceIfPossible, getReturnURLFromSearch, injectReferenceToRequestIfNeeded, persistReturnURL, readPersistedReturnURL, setAllowedReturnOrigins, setCustomHost, setHost, setLocale, setLoginURL, setPanelConfig, setProjectID as setPanelProjectID, setProjectID$1 as setProjectID, setTheme, usePanelConfig };
|
package/dist/index.d.ts
CHANGED
|
@@ -6,11 +6,14 @@ export { BitsnapReturns, BitsnapReturnsProps, BitsnapReturnsProvider, BitsnapRet
|
|
|
6
6
|
export { b as RETURNS_SLOT_NAMES, R as ReturnsAppearance, c as ReturnsAppearanceElements, d as ReturnsAppearanceTokens, e as ReturnsSlotAppearance, f as ReturnsSlotName, h as ReturnsTextKey, a as ReturnsTexts, g as ReturnsTheme } from './texts-m6XQGZ6w.js';
|
|
7
7
|
import { CSSProperties, ReactNode } from 'react';
|
|
8
8
|
import z__default from 'zod';
|
|
9
|
-
import { P as PanelLoginProps, a as PanelProps, G as GetThemeOutput } from './types-
|
|
10
|
-
export { b as PanelScreen, c as PanelSearchParamsType } from './types-
|
|
9
|
+
import { P as PanelLoginProps, a as PanelProps, G as GetThemeOutput } from './types-DfqzDP9k.js';
|
|
10
|
+
export { b as PanelScreen, c as PanelSearchParamsType } from './types-DfqzDP9k.js';
|
|
11
|
+
import { e as ChatThreadProps, c as ChannelProps } from './widgets-Bsojw94g.js';
|
|
12
|
+
export { d as ChatBuyRequest, C as ChatTexts, f as ChatWidgetBaseProps } from './widgets-Bsojw94g.js';
|
|
11
13
|
import './models.js';
|
|
12
14
|
import '@bufbuild/protobuf/wkt';
|
|
13
15
|
import '@bufbuild/protobuf';
|
|
16
|
+
import './texts-9kfgClsA.js';
|
|
14
17
|
|
|
15
18
|
type AppleButtonType = "plain" | "add-money" | "book" | "buy" | "check-out" | "continue" | "contribute" | "donate" | "order" | "pay" | "reload" | "rent" | "set-up" | "subscribe" | "support" | "tip" | "top-up";
|
|
16
19
|
type ColorType = "black" | "white" | "white-outline";
|
|
@@ -719,36 +722,6 @@ type Err = {
|
|
|
719
722
|
};
|
|
720
723
|
declare function Err(message: string, type?: ErrTypes, data?: unknown): Err;
|
|
721
724
|
|
|
722
|
-
/**
|
|
723
|
-
* The buyer's choice between paying online, paying the seller by hand (bank
|
|
724
|
-
* transfer or "BLIK przelew na telefon") and paying the courier on delivery,
|
|
725
|
-
* offered when the seller turned on "show at checkout" for the manual payment
|
|
726
|
-
* gateway or offers cash on delivery.
|
|
727
|
-
*
|
|
728
|
-
* `POST /public-commerce/payment-methods` takes the body of `/buy` and answers
|
|
729
|
-
* `{ success: true, choice: null }` (nothing to choose) or
|
|
730
|
-
* `{ success: true, choice: { methods, manualAccountTypes } }`. The pick goes
|
|
731
|
-
* to `/buy` as `paymentMethod`. Anything else (an old backend, an error, a
|
|
732
|
-
* timeout) counts as "nothing to choose", so the cart buys as before.
|
|
733
|
-
*/
|
|
734
|
-
|
|
735
|
-
/** `cod` is cash on delivery: the buyer pays the courier (Poland only, shipped carts). */
|
|
736
|
-
type PaymentMethod = "online" | "manual" | "cod";
|
|
737
|
-
type ManualAccountType = "bankTransfer" | "blik";
|
|
738
|
-
type PaymentMethodChoice = {
|
|
739
|
-
/** In the seller's order (cash on delivery last); the first one is selected by default. */
|
|
740
|
-
methods: PaymentMethod[];
|
|
741
|
-
/** How the manual option is paid; decides its label. */
|
|
742
|
-
manualAccountTypes: ManualAccountType[];
|
|
743
|
-
};
|
|
744
|
-
|
|
745
|
-
declare function setLocale(locale?: string): void;
|
|
746
|
-
declare function getLocale(): string;
|
|
747
|
-
|
|
748
|
-
declare function setProjectID$1(projectID: string): void;
|
|
749
|
-
|
|
750
|
-
declare function setCustomHost(host: string): void;
|
|
751
|
-
|
|
752
725
|
declare enum BillingPeriod {
|
|
753
726
|
DAILY = "daily",
|
|
754
727
|
WEEKLY = "weekly",
|
|
@@ -799,6 +772,7 @@ declare const linkRequestSchema: z__default.ZodObject<{
|
|
|
799
772
|
id: z__default.ZodString;
|
|
800
773
|
quantity: z__default.ZodNumber;
|
|
801
774
|
priceVersion: z__default.ZodOptional<z__default.ZodString>;
|
|
775
|
+
amount: z__default.ZodOptional<z__default.ZodNumber>;
|
|
802
776
|
name: z__default.ZodOptional<z__default.ZodString>;
|
|
803
777
|
description: z__default.ZodOptional<z__default.ZodString>;
|
|
804
778
|
imageURL: z__default.ZodOptional<z__default.ZodString>;
|
|
@@ -838,6 +812,36 @@ declare const linkRequestSchema: z__default.ZodObject<{
|
|
|
838
812
|
}, z__default.core.$strip>>;
|
|
839
813
|
}, z__default.core.$strip>;
|
|
840
814
|
|
|
815
|
+
/**
|
|
816
|
+
* The buyer's choice between paying online, paying the seller by hand (bank
|
|
817
|
+
* transfer or "BLIK przelew na telefon") and paying the courier on delivery,
|
|
818
|
+
* offered when the seller turned on "show at checkout" for the manual payment
|
|
819
|
+
* gateway or offers cash on delivery.
|
|
820
|
+
*
|
|
821
|
+
* `POST /public-commerce/payment-methods` takes the body of `/buy` and answers
|
|
822
|
+
* `{ success: true, choice: null }` (nothing to choose) or
|
|
823
|
+
* `{ success: true, choice: { methods, manualAccountTypes } }`. The pick goes
|
|
824
|
+
* to `/buy` as `paymentMethod`. Anything else (an old backend, an error, a
|
|
825
|
+
* timeout) counts as "nothing to choose", so the cart buys as before.
|
|
826
|
+
*/
|
|
827
|
+
|
|
828
|
+
/** `cod` is cash on delivery: the buyer pays the courier (Poland only, shipped carts). */
|
|
829
|
+
type PaymentMethod = "online" | "manual" | "cod";
|
|
830
|
+
type ManualAccountType = "bankTransfer" | "blik";
|
|
831
|
+
type PaymentMethodChoice = {
|
|
832
|
+
/** In the seller's order (cash on delivery last); the first one is selected by default. */
|
|
833
|
+
methods: PaymentMethod[];
|
|
834
|
+
/** How the manual option is paid; decides its label. */
|
|
835
|
+
manualAccountTypes: ManualAccountType[];
|
|
836
|
+
};
|
|
837
|
+
|
|
838
|
+
declare function setLocale(locale?: string): void;
|
|
839
|
+
declare function getLocale(): string;
|
|
840
|
+
|
|
841
|
+
declare function setProjectID$1(projectID: string): void;
|
|
842
|
+
|
|
843
|
+
declare function setCustomHost(host: string): void;
|
|
844
|
+
|
|
841
845
|
declare namespace Bitsnap {
|
|
842
846
|
/**
|
|
843
847
|
* Adds a product or variant to the cart. Returns an `Err` instead of adding
|
|
@@ -854,6 +858,8 @@ declare namespace Bitsnap {
|
|
|
854
858
|
name?: string;
|
|
855
859
|
price?: number;
|
|
856
860
|
currency?: string;
|
|
861
|
+
/** Buyer chosen pay-what-you-want amount, in minor units. */
|
|
862
|
+
amount?: number;
|
|
857
863
|
/** Where `add_to_cart` is reported. Defaults to the mounted `<BitsnapCheckout>`. */
|
|
858
864
|
analytics?: Instrument;
|
|
859
865
|
}): Promise<Err | undefined>;
|
|
@@ -967,4 +973,15 @@ declare function persistReturnURL(returnURL: string | null): void;
|
|
|
967
973
|
declare function readPersistedReturnURL(): string | null;
|
|
968
974
|
declare function buildAccessTokenRedirect(returnURL: string, accessToken: string): string;
|
|
969
975
|
|
|
970
|
-
|
|
976
|
+
/**
|
|
977
|
+
* A buyer's pack thread for one service product. Loads the chat on demand;
|
|
978
|
+
* the same component is exported eagerly from `bitsnap-react/chat`.
|
|
979
|
+
*/
|
|
980
|
+
declare function ChatThread(props: ChatThreadProps): react_jsx_runtime.JSX.Element;
|
|
981
|
+
/**
|
|
982
|
+
* A community channel. Loads the chat on demand; the same component is
|
|
983
|
+
* exported eagerly from `bitsnap-react/chat`.
|
|
984
|
+
*/
|
|
985
|
+
declare function Channel(props: ChannelProps): react_jsx_runtime.JSX.Element;
|
|
986
|
+
|
|
987
|
+
export { AnalyticsOption, Wrapper$2 as ApplePayButton, type Props$3 as ApplePayButtonProps, Bitsnap, type BitsnapCartProps, BitsnapCart as BitsnapCheckout, type BuyErrorData, CHECKOUT_SLOT_NAMES, Channel, ChannelProps, ChatThread, ChatThreadProps, type CheckoutAppearance, type CheckoutAppearanceElements, type CheckoutAppearanceTokens, type CheckoutSlotAppearance, type CheckoutSlotName, type CheckoutTexts, type CheckoutTheme, type ComponentClassNames, type CreateCheckoutResult, type CustomizationTexts, type ExpressItem, GetThemeOutput, Wrapper$1 as GooglePayButton, type Props$2 as GooglePayButtonProps, ITEM_IDS_NOT_FOUND, InPostPayButton, type InPostPayButtonProps, type LinkRequest, type NotificationGroup, Wrapper as NotificationsComponent, type Props$1 as NotificationsComponentProps, type NotificationsComponentPublicProps, PanelPage as Panel, type PanelConfig, PanelLogin, PanelLoginProps, PanelProps, PanelProvider, type PublicNotificationGroup, PublicOrderPage, RevolutPayButton, type RevolutPayButtonProps, type RevolutPaymentOutcome, buildAccessTokenRedirect, createCheckout, createPaymentURL, getAllowedReturnOrigins, getLocale, getPanelConfig, getPaymentMethodChoice, getReferenceIfPossible, getReturnURLFromSearch, injectReferenceToRequestIfNeeded, persistReturnURL, readPersistedReturnURL, setAllowedReturnOrigins, setCustomHost, setHost, setLocale, setLoginURL, setPanelConfig, setProjectID as setPanelProjectID, setProjectID$1 as setProjectID, setTheme, usePanelConfig };
|