@lystech/core 3.0.139 → 3.0.140
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/index.d.ts +12 -3
- package/dist/lystech-core-provider.es.js +4706 -4653
- package/dist/lystech-core-provider.umd.js +146 -146
- package/dist/lystech-core-styles.css +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -241,7 +241,7 @@ export declare type CheckoutPanelProps = {
|
|
|
241
241
|
promoCodes?: string[];
|
|
242
242
|
/** Paiement confirmé (PayPal tout de suite ; carte au retour, voir useCheckoutReturn). */
|
|
243
243
|
onPaid?: (info: {
|
|
244
|
-
provider: "paypal" | "stripe";
|
|
244
|
+
provider: "paypal" | "stripe" | "store_credit";
|
|
245
245
|
orderId?: string;
|
|
246
246
|
}) => void;
|
|
247
247
|
/** Adresse de retour après un paiement par carte (défaut : la page actuelle). */
|
|
@@ -618,6 +618,10 @@ declare type OrderBreakdown = {
|
|
|
618
618
|
taxTotal?: number;
|
|
619
619
|
/** true : les prix affichés contiennent déjà la taxe. */
|
|
620
620
|
taxesIncluded?: boolean;
|
|
621
|
+
/** Crédit boutique du client connecté (dollars) : disponible, appliqué, reste à payer. */
|
|
622
|
+
storeCreditAvailable?: number;
|
|
623
|
+
storeCreditApplied?: number;
|
|
624
|
+
amountDue?: number;
|
|
621
625
|
appliedPromoCodes?: {
|
|
622
626
|
code: string;
|
|
623
627
|
promo: string;
|
|
@@ -1014,6 +1018,7 @@ declare type Props_8 = {
|
|
|
1014
1018
|
customerEmail?: string;
|
|
1015
1019
|
promoCodes?: string[];
|
|
1016
1020
|
shippingOptionId?: number | string | null;
|
|
1021
|
+
useStoreCredit?: boolean;
|
|
1017
1022
|
label?: string;
|
|
1018
1023
|
block?: boolean;
|
|
1019
1024
|
disabled?: boolean;
|
|
@@ -1232,7 +1237,7 @@ declare interface SquareImageProps {
|
|
|
1232
1237
|
* crée la session côté backend (POST /stripe/checkout) puis redirige vers la
|
|
1233
1238
|
* page de paiement Stripe. Aucun formulaire de carte côté client.
|
|
1234
1239
|
*/
|
|
1235
|
-
export declare function StripeCheckout({ products, priceId, quantity, successUrl, cancelUrl, customerEmail, promoCodes, shippingOptionId, label, block, disabled, onError, onRedirect, }: Props_8): JSX.Element;
|
|
1240
|
+
export declare function StripeCheckout({ products, priceId, quantity, successUrl, cancelUrl, customerEmail, promoCodes, shippingOptionId, useStoreCredit, label, block, disabled, onError, onRedirect, }: Props_8): JSX.Element;
|
|
1236
1241
|
|
|
1237
1242
|
export declare interface StripeCheckoutInput {
|
|
1238
1243
|
/** Un seul prix Stripe (ex. depuis le catalogue). */
|
|
@@ -1250,6 +1255,8 @@ export declare interface StripeCheckoutInput {
|
|
|
1250
1255
|
promoCodes?: string[];
|
|
1251
1256
|
/** Option de livraison choisie dans le panier. */
|
|
1252
1257
|
shippingOptionId?: number | string | null;
|
|
1258
|
+
/** Utiliser le crédit boutique : Stripe ne prélève que le reste. */
|
|
1259
|
+
useStoreCredit?: boolean;
|
|
1253
1260
|
}
|
|
1254
1261
|
|
|
1255
1262
|
export declare function SubscribeToPushNotification({ size, visible, forceVisible, text, knowMoreUrl, knowMoreText, onAction, onPopupClose }: Props_10): JSX.Element;
|
|
@@ -1512,7 +1519,9 @@ export declare const useOrderDetailsBreakdown: (organizationUID: string, product
|
|
|
1512
1519
|
quantity: number;
|
|
1513
1520
|
}[], promoCodes: string[],
|
|
1514
1521
|
/** Option de livraison choisie : le récapitulatif compte son prix (lu en base). */
|
|
1515
|
-
shippingOptionId?: number | string | null
|
|
1522
|
+
shippingOptionId?: number | string | null,
|
|
1523
|
+
/** Le client choisit d'utiliser son crédit boutique. */
|
|
1524
|
+
useStoreCredit?: boolean) => UseQueryResult<OrderBreakdown, unknown>;
|
|
1516
1525
|
|
|
1517
1526
|
export declare function useOrganization(): OrganizationContext;
|
|
1518
1527
|
|