@lystech/core 3.0.65 → 3.0.69

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 CHANGED
@@ -26,7 +26,7 @@ export declare type AppliedPromoCodeType = {
26
26
  error: string;
27
27
  };
28
28
 
29
- export declare function AskPermissionsFloatingButtons({ enableInstallAppButton, enablePushNotificationButton }: Props_9): JSX.Element;
29
+ export declare function AskPermissionsFloatingButtons({ enableInstallAppButton, enablePushNotificationButton }: Props_10): JSX.Element;
30
30
 
31
31
  declare type AuthContextType = {
32
32
  user: SimplifiedUser | undefined;
@@ -289,7 +289,7 @@ declare interface ContextMenuState {
289
289
  title?: string;
290
290
  }
291
291
 
292
- export declare function Countdown({ countdown, useLabels, lang, showControls, loading, showYears, onClick, onDelete, onTriggerUpdate, onToggleFeatured, }: Props_10): JSX.Element;
292
+ export declare function Countdown({ countdown, useLabels, lang, showControls, loading, showYears, onClick, onDelete, onTriggerUpdate, onToggleFeatured, }: Props_11): JSX.Element;
293
293
 
294
294
  export declare type CountdownType = {
295
295
  id?: number;
@@ -313,6 +313,16 @@ declare type CountdownType_2 = {
313
313
  createdOn?: string;
314
314
  };
315
315
 
316
+ /**
317
+ * Crée une session Stripe Checkout (hébergée) côté backend et renvoie l'URL.
318
+ * Le backend résout l'organisation (clé Stripe chiffrée par org) via l'en-tête
319
+ * Organization ajouté automatiquement par axiosInstance.
320
+ */
321
+ export declare function createStripeCheckout(input: StripeCheckoutInput): Promise<{
322
+ id: string;
323
+ url: string;
324
+ }>;
325
+
316
326
  export declare function CurrentlyInvitedToOrdersSection({ onCollectionInvitationClick }: Props_4): JSX.Element;
317
327
 
318
328
  export declare type CustomerBill = {
@@ -480,7 +490,7 @@ export declare type ImageType = {
480
490
  src: string;
481
491
  };
482
492
 
483
- export declare function InstallPwaButton({ size, visible, forceVisible, text, knowMoreUrl, knowMoreText, onAction, onPopupClose }: Props_7): JSX.Element | null;
493
+ export declare function InstallPwaButton({ size, visible, forceVisible, text, knowMoreUrl, knowMoreText, onAction, onPopupClose }: Props_8): JSX.Element | null;
484
494
 
485
495
  export declare function LoadingCircle(): JSX.Element;
486
496
 
@@ -721,7 +731,7 @@ declare type ProductProp = {
721
731
  fk_organization: string;
722
732
  };
723
733
 
724
- export declare function Progress({ percentage, color, showPercentage, text, }: Props_11): JSX.Element;
734
+ export declare function Progress({ percentage, color, showPercentage, text, }: Props_12): JSX.Element;
725
735
 
726
736
  declare type ProgressiveWebAppContextType = {
727
737
  useProgressiveWebAppFeatures?: boolean | 'mobile';
@@ -732,7 +742,7 @@ declare type ProgressiveWebAppContextType = {
732
742
  installProgressiveWebApp: () => Promise<void>;
733
743
  };
734
744
 
735
- export declare function PromoCodeTag({ promoCode, showExpireInfo, onClick, isApplied, onRemove, }: Props_12): JSX.Element;
745
+ export declare function PromoCodeTag({ promoCode, showExpireInfo, onClick, isApplied, onRemove, }: Props_13): JSX.Element;
736
746
 
737
747
  export declare type PromoCodeType = {
738
748
  id: number;
@@ -772,6 +782,13 @@ declare type Props = {
772
782
  };
773
783
 
774
784
  declare type Props_10 = {
785
+ enableInstallAppButton?: boolean;
786
+ enablePushNotificationButton?: boolean;
787
+ knowMoreUrl?: string;
788
+ knowMoreText?: string;
789
+ };
790
+
791
+ declare type Props_11 = {
775
792
  countdown: CountdownType_2;
776
793
  useLabels?: boolean;
777
794
  lang?: "fr" | "en";
@@ -784,14 +801,14 @@ declare type Props_10 = {
784
801
  onToggleFeatured?: () => void;
785
802
  };
786
803
 
787
- declare type Props_11 = {
804
+ declare type Props_12 = {
788
805
  percentage?: number;
789
806
  color?: string;
790
807
  showPercentage?: boolean;
791
808
  text?: string;
792
809
  };
793
810
 
794
- declare type Props_12 = {
811
+ declare type Props_13 = {
795
812
  promoCode: PromoCodeType;
796
813
  showExpireInfo?: boolean;
797
814
  onClick?: () => void;
@@ -850,7 +867,27 @@ declare type Props_6 = {
850
867
  onError?: (error: string) => void;
851
868
  };
852
869
 
853
- declare interface Props_7 {
870
+ declare type Props_7 = {
871
+ /** Panier de produits Lystech (UID) — alternative à priceId. */
872
+ products?: {
873
+ UID: string;
874
+ quantity: number;
875
+ }[];
876
+ /** Un seul prix Stripe (ex. catalogue). */
877
+ priceId?: string;
878
+ quantity?: number;
879
+ successUrl?: string;
880
+ cancelUrl?: string;
881
+ customerEmail?: string;
882
+ label?: string;
883
+ block?: boolean;
884
+ disabled?: boolean;
885
+ onError?: (error: string) => void;
886
+ /** Si fourni, reçoit l'URL au lieu de rediriger automatiquement. */
887
+ onRedirect?: (url: string) => void;
888
+ };
889
+
890
+ declare interface Props_8 {
854
891
  forceVisible?: boolean;
855
892
  size?: number;
856
893
  visible?: boolean;
@@ -861,7 +898,7 @@ declare interface Props_7 {
861
898
  onPopupClose?: () => void;
862
899
  }
863
900
 
864
- declare type Props_8 = {
901
+ declare type Props_9 = {
865
902
  forceVisible?: boolean;
866
903
  size?: number;
867
904
  visible?: boolean;
@@ -872,13 +909,6 @@ declare type Props_8 = {
872
909
  onPopupClose?: () => void;
873
910
  };
874
911
 
875
- declare type Props_9 = {
876
- enableInstallAppButton?: boolean;
877
- enablePushNotificationButton?: boolean;
878
- knowMoreUrl?: string;
879
- knowMoreText?: string;
880
- };
881
-
882
912
  declare type ProviderType = {
883
913
  popupElement: default_2.ReactNode;
884
914
  confirmPopupElement: default_2.ReactNode;
@@ -1029,7 +1059,29 @@ declare interface SquareImageProps {
1029
1059
  imageStyle?: default_2.CSSProperties;
1030
1060
  }
1031
1061
 
1032
- export declare function SubscribeToPushNotification({ size, visible, forceVisible, text, knowMoreUrl, knowMoreText, onAction, onPopupClose }: Props_8): JSX.Element;
1062
+ /**
1063
+ * Bouton de checkout Stripe RÉUTILISABLE (hébergé), sibling de PaypalCheckout.
1064
+ * Accepte un panier `products` (UID Lystech) OU un `priceId` Stripe. Au clic :
1065
+ * crée la session côté backend (POST /stripe/checkout) puis redirige vers la
1066
+ * page de paiement Stripe. Aucun formulaire de carte côté client.
1067
+ */
1068
+ export declare function StripeCheckout({ products, priceId, quantity, successUrl, cancelUrl, customerEmail, label, block, disabled, onError, onRedirect, }: Props_7): JSX.Element;
1069
+
1070
+ export declare interface StripeCheckoutInput {
1071
+ /** Un seul prix Stripe (ex. depuis le catalogue). */
1072
+ priceId?: string;
1073
+ /** Panier de produits Lystech (UID) — résolus en line_items côté backend. */
1074
+ products?: {
1075
+ UID: string;
1076
+ quantity: number;
1077
+ }[];
1078
+ quantity?: number;
1079
+ successUrl: string;
1080
+ cancelUrl: string;
1081
+ customerEmail?: string;
1082
+ }
1083
+
1084
+ export declare function SubscribeToPushNotification({ size, visible, forceVisible, text, knowMoreUrl, knowMoreText, onAction, onPopupClose }: Props_9): JSX.Element;
1033
1085
 
1034
1086
  export declare type Subscription = {
1035
1087
  UID?: string;