@yuno-payments/sdk-web-types 4.5.0 → 5.0.0-beta.1

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/global.d.ts CHANGED
@@ -718,6 +718,20 @@ interface SecureFields {
718
718
  unmountSync(): void;
719
719
  }
720
720
 
721
+ declare namespace ExternalButtonsNameSpace {
722
+ type ExternalButton = {
723
+ elementSelector: string;
724
+ paymentMethodType: string;
725
+ checkoutSession?: string;
726
+ };
727
+ type MountExternalButtonsArgs = ExternalButton[];
728
+ interface ExternalButtonMethods {
729
+ mountExternalButtons(args: MountExternalButtonsArgs): Promise<void>;
730
+ unmountExternalButton(paymentMethodType: string): Promise<void>;
731
+ unmountAllExternalButtons(): Promise<void>;
732
+ }
733
+ }
734
+
721
735
  interface ButtonTextCard {
722
736
  cardForm?: {
723
737
  enrollmentSubmitButton?: string;
@@ -855,8 +869,12 @@ interface YunoConfig {
855
869
  }): void;
856
870
  deviceFingerprints?: ExternalProviderId[];
857
871
  }
858
- type StartCheckoutArgs = Omit<YunoConfig, "yunoEnrollmentStatus" | "customerSession" | "publicApiKey">;
859
- type MountEnrollmentLiteArgs = Pick<YunoConfig, "language" | "countryCode" | "renderMode" | "yunoEnrollmentStatus" | "yunoError" | "showLoading" | "onRendered" | "onOneTimeTokenCreationStart" | "onLoading" | "customerSession" | "showPaymentStatus">;
872
+ type StartCheckoutArgs = Omit<YunoConfig, "yunoEnrollmentStatus" | "customerSession" | "publicApiKey" | "card"> & {
873
+ card?: CardConfig & {
874
+ onChange?(args: OnChangeArgs): void;
875
+ };
876
+ };
877
+ type MountEnrollmentLiteArgs = Pick<YunoConfig, "language" | "countryCode" | "renderMode" | "yunoEnrollmentStatus" | "yunoError" | "showLoading" | "onRendered" | "onOneTimeTokenCreationStart" | "onLoading" | "customerSession">;
860
878
  type mountFraudArgs = Pick<YunoConfig, "yunoCreatePayment" | "yunoError" | "language" | "checkoutSession">;
861
879
  interface MountCheckoutLiteArgs {
862
880
  paymentMethodType: string;
@@ -909,7 +927,7 @@ type ExternalButton = {
909
927
  checkoutSession?: string;
910
928
  };
911
929
  type MountSeamlessExternalButtonsArgs = ExternalButton[];
912
- interface YunoInstance {
930
+ interface YunoInstance extends ExternalButtonsNameSpace.ExternalButtonMethods {
913
931
  startCheckout(args: StartCheckoutArgs): Promise<void>;
914
932
  startSeamlessCheckout(args: StartSeamlessCheckoutArgs): Promise<void>;
915
933
  mountCheckout(): Promise<void>;
package/dist/index.d.ts CHANGED
@@ -718,6 +718,20 @@ interface SecureFields {
718
718
  unmountSync(): void;
719
719
  }
720
720
 
721
+ declare namespace ExternalButtonsNameSpace {
722
+ type ExternalButton = {
723
+ elementSelector: string;
724
+ paymentMethodType: string;
725
+ checkoutSession?: string;
726
+ };
727
+ type MountExternalButtonsArgs = ExternalButton[];
728
+ interface ExternalButtonMethods {
729
+ mountExternalButtons(args: MountExternalButtonsArgs): Promise<void>;
730
+ unmountExternalButton(paymentMethodType: string): Promise<void>;
731
+ unmountAllExternalButtons(): Promise<void>;
732
+ }
733
+ }
734
+
721
735
  interface ButtonTextCard {
722
736
  cardForm?: {
723
737
  enrollmentSubmitButton?: string;
@@ -855,8 +869,12 @@ interface YunoConfig {
855
869
  }): void;
856
870
  deviceFingerprints?: ExternalProviderId[];
857
871
  }
858
- type StartCheckoutArgs = Omit<YunoConfig, "yunoEnrollmentStatus" | "customerSession" | "publicApiKey">;
859
- type MountEnrollmentLiteArgs = Pick<YunoConfig, "language" | "countryCode" | "renderMode" | "yunoEnrollmentStatus" | "yunoError" | "showLoading" | "onRendered" | "onOneTimeTokenCreationStart" | "onLoading" | "customerSession" | "showPaymentStatus">;
872
+ type StartCheckoutArgs = Omit<YunoConfig, "yunoEnrollmentStatus" | "customerSession" | "publicApiKey" | "card"> & {
873
+ card?: CardConfig & {
874
+ onChange?(args: OnChangeArgs): void;
875
+ };
876
+ };
877
+ type MountEnrollmentLiteArgs = Pick<YunoConfig, "language" | "countryCode" | "renderMode" | "yunoEnrollmentStatus" | "yunoError" | "showLoading" | "onRendered" | "onOneTimeTokenCreationStart" | "onLoading" | "customerSession">;
860
878
  type mountFraudArgs = Pick<YunoConfig, "yunoCreatePayment" | "yunoError" | "language" | "checkoutSession">;
861
879
  interface MountCheckoutLiteArgs {
862
880
  paymentMethodType: string;
@@ -909,7 +927,7 @@ type ExternalButton = {
909
927
  checkoutSession?: string;
910
928
  };
911
929
  type MountSeamlessExternalButtonsArgs = ExternalButton[];
912
- interface YunoInstance {
930
+ interface YunoInstance extends ExternalButtonsNameSpace.ExternalButtonMethods {
913
931
  startCheckout(args: StartCheckoutArgs): Promise<void>;
914
932
  startSeamlessCheckout(args: StartSeamlessCheckoutArgs): Promise<void>;
915
933
  mountCheckout(): Promise<void>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yuno-payments/sdk-web-types",
3
- "version": "4.5.0",
3
+ "version": "5.0.0-beta.1",
4
4
  "types": "dist/index.d.ts",
5
5
  "type": "module",
6
6
  "publishConfig": {