@yuno-payments/sdk-web-types 5.5.0 → 5.7.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/dist/global.d.ts CHANGED
@@ -784,10 +784,18 @@ declare namespace ExternalButtonsNameSpace {
784
784
  borderRadius?: number;
785
785
  locale?: string;
786
786
  };
787
+ type RevolutPayButtonConfig = {
788
+ variant?: 'dark' | 'light' | 'light-outlined';
789
+ size?: 'large' | 'small';
790
+ radius?: 'none' | 'small' | 'large' | 'round';
791
+ action?: 'pay' | 'buy' | 'donate' | 'subscribe';
792
+ locale?: string;
793
+ };
787
794
  type ExternalButtonsConfig = {
788
795
  googlePay?: GooglePayButtonConfig;
789
796
  applePay?: ApplePayButtonConfig;
790
797
  paypal?: PayPalButtonConfig;
798
+ revolutPay?: RevolutPayButtonConfig;
791
799
  };
792
800
  }
793
801
 
@@ -987,19 +995,21 @@ interface MountStatusPaymentArgs {
987
995
  yunoError?: SdkPaymentsConfig["error"];
988
996
  }
989
997
  type ContinuePaymentResponse = {
990
- action: "REDIRECT_URL";
991
998
  type: string;
992
- redirect: {
993
- init_url: string;
994
- success_url: string;
995
- error_url: string;
999
+ action: string;
1000
+ redirect_url?: {
1001
+ init_url?: string;
1002
+ success_url?: string;
1003
+ error_url?: string;
996
1004
  };
997
- } | null;
1005
+ };
1006
+ type OnActionExecuted = (result: ContinuePaymentResponse) => void;
998
1007
  type ContinuePaymentArgs = {
999
1008
  /**
1000
1009
  * @default true
1001
1010
  */
1002
1011
  showPaymentStatus?: boolean;
1012
+ onActionExecuted?: OnActionExecuted;
1003
1013
  };
1004
1014
  type StartSeamlessCheckoutArgs = Omit<StartCheckoutArgs, "createPayment" | "yunoCreatePayment">;
1005
1015
  type ShowLoaderOptions = {
@@ -1025,7 +1035,7 @@ interface SdkPaymentsInstance extends ExternalButtonsNameSpace.ExternalButtonMet
1025
1035
  updateCheckoutSession(checkout: string): Promise<void>;
1026
1036
  submitOneTimeTokenForm(): Promise<void>;
1027
1037
  startPayment(): Promise<void>;
1028
- continuePayment(args?: ContinuePaymentArgs): Promise<ContinuePaymentResponse>;
1038
+ continuePayment(args?: ContinuePaymentArgs): Promise<ContinuePaymentResponse | null>;
1029
1039
  notifyError(): Promise<void>;
1030
1040
  mountEnrollmentLite(args: MountEnrollmentLiteArgs): Promise<void>;
1031
1041
  showLoader(args?: ShowLoaderOptions): Promise<void>;
package/dist/index.d.ts CHANGED
@@ -784,10 +784,18 @@ declare namespace ExternalButtonsNameSpace {
784
784
  borderRadius?: number;
785
785
  locale?: string;
786
786
  };
787
+ type RevolutPayButtonConfig = {
788
+ variant?: 'dark' | 'light' | 'light-outlined';
789
+ size?: 'large' | 'small';
790
+ radius?: 'none' | 'small' | 'large' | 'round';
791
+ action?: 'pay' | 'buy' | 'donate' | 'subscribe';
792
+ locale?: string;
793
+ };
787
794
  type ExternalButtonsConfig = {
788
795
  googlePay?: GooglePayButtonConfig;
789
796
  applePay?: ApplePayButtonConfig;
790
797
  paypal?: PayPalButtonConfig;
798
+ revolutPay?: RevolutPayButtonConfig;
791
799
  };
792
800
  }
793
801
 
@@ -987,19 +995,21 @@ interface MountStatusPaymentArgs {
987
995
  yunoError?: SdkPaymentsConfig["error"];
988
996
  }
989
997
  type ContinuePaymentResponse = {
990
- action: "REDIRECT_URL";
991
998
  type: string;
992
- redirect: {
993
- init_url: string;
994
- success_url: string;
995
- error_url: string;
999
+ action: string;
1000
+ redirect_url?: {
1001
+ init_url?: string;
1002
+ success_url?: string;
1003
+ error_url?: string;
996
1004
  };
997
- } | null;
1005
+ };
1006
+ type OnActionExecuted = (result: ContinuePaymentResponse) => void;
998
1007
  type ContinuePaymentArgs = {
999
1008
  /**
1000
1009
  * @default true
1001
1010
  */
1002
1011
  showPaymentStatus?: boolean;
1012
+ onActionExecuted?: OnActionExecuted;
1003
1013
  };
1004
1014
  type StartSeamlessCheckoutArgs = Omit<StartCheckoutArgs, "createPayment" | "yunoCreatePayment">;
1005
1015
  type ShowLoaderOptions = {
@@ -1025,7 +1035,7 @@ interface SdkPaymentsInstance extends ExternalButtonsNameSpace.ExternalButtonMet
1025
1035
  updateCheckoutSession(checkout: string): Promise<void>;
1026
1036
  submitOneTimeTokenForm(): Promise<void>;
1027
1037
  startPayment(): Promise<void>;
1028
- continuePayment(args?: ContinuePaymentArgs): Promise<ContinuePaymentResponse>;
1038
+ continuePayment(args?: ContinuePaymentArgs): Promise<ContinuePaymentResponse | null>;
1029
1039
  notifyError(): Promise<void>;
1030
1040
  mountEnrollmentLite(args: MountEnrollmentLiteArgs): Promise<void>;
1031
1041
  showLoader(args?: ShowLoaderOptions): Promise<void>;
@@ -1056,4 +1066,4 @@ interface SdkPayments {
1056
1066
  interface Yuno extends SdkPayments {
1057
1067
  }
1058
1068
 
1059
- export { type ButtonTextCard, C2PHeadless, type CardConfig, type ContinuePaymentArgs, type ContinuePaymentResponse, type CreateArgsSF, type ExternalButton, type ExternalPaymentButtons, ExternalPaymentButtonsTypes, type ExternalProviderId, type Font, type FormElementSelector, type Language, type LoadingType, type MountCheckoutLiteArgs, type MountEnrollmentLiteArgs, type MountSeamlessCheckoutLiteArgs, type MountSeamlessExternalButtonsArgs, type MountStatusPaymentArgs, type OnChangeDataSF, type RenderMode, type SdkPayments, type SdkPaymentsConfig, type SdkPaymentsInstance, type SecureFieldInstance, type SecureFieldsArgs, type StartCheckoutArgs, type StartSeamlessCheckoutArgs, type TextsCustom, type Yuno, type YunoConfig, type YunoInstance, type mountFraudArgs };
1069
+ export { type ButtonTextCard, C2PHeadless, type CardConfig, type ContinuePaymentArgs, type ContinuePaymentResponse, type CreateArgsSF, type ExternalButton, type ExternalPaymentButtons, ExternalPaymentButtonsTypes, type ExternalProviderId, type Font, type FormElementSelector, type Language, type LoadingType, type MountCheckoutLiteArgs, type MountEnrollmentLiteArgs, type MountSeamlessCheckoutLiteArgs, type MountSeamlessExternalButtonsArgs, type MountStatusPaymentArgs, type OnActionExecuted, type OnChangeDataSF, type RenderMode, type SdkPayments, type SdkPaymentsConfig, type SdkPaymentsInstance, type SecureFieldInstance, type SecureFieldsArgs, type StartCheckoutArgs, type StartSeamlessCheckoutArgs, type TextsCustom, type Yuno, type YunoConfig, type YunoInstance, type mountFraudArgs };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yuno-payments/sdk-web-types",
3
- "version": "5.5.0",
3
+ "version": "5.7.0",
4
4
  "types": "dist/index.d.ts",
5
5
  "type": "module",
6
6
  "publishConfig": {