@yuno-payments/sdk-web-types 3.5.1 → 4.1.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 +17 -23
- package/dist/index.d.ts +18 -24
- package/package.json +1 -1
package/dist/global.d.ts
CHANGED
|
@@ -452,7 +452,7 @@ type Font = {
|
|
|
452
452
|
};
|
|
453
453
|
interface CardConfig {
|
|
454
454
|
styles?: string;
|
|
455
|
-
type?:
|
|
455
|
+
type?: "extends" | "step";
|
|
456
456
|
cardSaveEnable?: boolean;
|
|
457
457
|
vaultOnSuccess?: boolean;
|
|
458
458
|
texts?: ButtonTextCard;
|
|
@@ -479,7 +479,7 @@ interface FormElementSelector {
|
|
|
479
479
|
actionForm?: string;
|
|
480
480
|
}
|
|
481
481
|
interface RenderMode {
|
|
482
|
-
type:
|
|
482
|
+
type: "modal" | "element";
|
|
483
483
|
elementSelector?: string | FormElementSelector;
|
|
484
484
|
}
|
|
485
485
|
declare enum ExternalPaymentButtonsTypes {
|
|
@@ -490,15 +490,15 @@ type ExternalPaymentButtons = {
|
|
|
490
490
|
elementSelector: string;
|
|
491
491
|
};
|
|
492
492
|
};
|
|
493
|
-
type LoadingType =
|
|
494
|
-
type Language =
|
|
493
|
+
type LoadingType = "DOCUMENT" | "ONE_TIME_TOKEN";
|
|
494
|
+
type Language = "es" | "en" | "pt" | "de" | "fil" | "fr" | "id" | "it" | "ms" | "nl" | "pl" | "po" | "ru" | "sv" | "th" | "tr" | "vi" | "zh-CN" | "zh-TW";
|
|
495
495
|
interface YunoConfig {
|
|
496
496
|
publicApiKey: string;
|
|
497
497
|
checkoutSession: string;
|
|
498
498
|
customerSession: string;
|
|
499
499
|
language: Language;
|
|
500
500
|
countryCode: string;
|
|
501
|
-
elementSelector
|
|
501
|
+
elementSelector: string;
|
|
502
502
|
vaultedToken?: string;
|
|
503
503
|
type?: string;
|
|
504
504
|
renderMode?: RenderMode;
|
|
@@ -520,7 +520,7 @@ interface YunoConfig {
|
|
|
520
520
|
isDynamicViewEnabled?: boolean;
|
|
521
521
|
showOnlyThesePaymentMethods?: string[];
|
|
522
522
|
showPayButton?: boolean;
|
|
523
|
-
yunoCreatePayment
|
|
523
|
+
yunoCreatePayment: (oneTimeToken: string, tokenWithInformation: OneTimeToken) => void;
|
|
524
524
|
yunoPaymentMethodSelected?: (arg: {
|
|
525
525
|
type: string;
|
|
526
526
|
name: string;
|
|
@@ -541,16 +541,11 @@ interface YunoConfig {
|
|
|
541
541
|
type: LoadingType;
|
|
542
542
|
}): void;
|
|
543
543
|
}
|
|
544
|
-
type StartCheckoutArgs = Omit<YunoConfig,
|
|
545
|
-
type MountEnrollmentLiteArgs = Pick<YunoConfig,
|
|
546
|
-
type mountFraudArgs = Pick<YunoConfig,
|
|
547
|
-
interface MountCheckoutArgs {
|
|
548
|
-
paymentMethodType?: string;
|
|
549
|
-
vaultedToken?: string;
|
|
550
|
-
category?: string;
|
|
551
|
-
}
|
|
544
|
+
type StartCheckoutArgs = Omit<YunoConfig, "yunoEnrollmentStatus" | "customerSession" | "publicApiKey">;
|
|
545
|
+
type MountEnrollmentLiteArgs = Pick<YunoConfig, "language" | "countryCode" | "renderMode" | "yunoEnrollmentStatus" | "yunoError" | "showLoading" | "onRendered" | "onOneTimeTokenCreationStart" | "onLoading" | "customerSession">;
|
|
546
|
+
type mountFraudArgs = Pick<YunoConfig, "yunoCreatePayment" | "yunoError" | "language" | "checkoutSession">;
|
|
552
547
|
interface MountCheckoutLiteArgs {
|
|
553
|
-
paymentMethodType
|
|
548
|
+
paymentMethodType: string;
|
|
554
549
|
vaultedToken?: string;
|
|
555
550
|
}
|
|
556
551
|
interface MountSeamlessCheckoutLiteArgs {
|
|
@@ -565,17 +560,17 @@ interface SecureFieldsArgs {
|
|
|
565
560
|
enableMultiplesCard?: boolean;
|
|
566
561
|
}
|
|
567
562
|
type SecureFieldInstance = SecureFields;
|
|
568
|
-
type OnChangeDataSF = OnChangeArgs[
|
|
563
|
+
type OnChangeDataSF = OnChangeArgs["data"];
|
|
569
564
|
type CreateArgsSF = CreateArgs;
|
|
570
565
|
interface MountStatusPaymentArgs {
|
|
571
566
|
checkoutSession: string;
|
|
572
567
|
language: Language;
|
|
573
568
|
countryCode: string;
|
|
574
|
-
yunoPaymentResult?: YunoConfig[
|
|
575
|
-
yunoError?: YunoConfig[
|
|
569
|
+
yunoPaymentResult?: YunoConfig["yunoPaymentResult"];
|
|
570
|
+
yunoError?: YunoConfig["yunoError"];
|
|
576
571
|
}
|
|
577
572
|
type ContinuePaymentResponse = {
|
|
578
|
-
action:
|
|
573
|
+
action: "REDIRECT_URL";
|
|
579
574
|
type: string;
|
|
580
575
|
redirect: {
|
|
581
576
|
init_url: string;
|
|
@@ -589,13 +584,12 @@ type ContinuePaymentArgs = {
|
|
|
589
584
|
*/
|
|
590
585
|
showPaymentStatus?: boolean;
|
|
591
586
|
};
|
|
592
|
-
type StartSeamlessCheckoutArgs = Omit<StartCheckoutArgs,
|
|
593
|
-
type MountSeamlessCheckoutArgs = MountCheckoutArgs;
|
|
587
|
+
type StartSeamlessCheckoutArgs = Omit<StartCheckoutArgs, "yunoCreatePayment">;
|
|
594
588
|
interface YunoInstance {
|
|
595
589
|
startCheckout(args: StartCheckoutArgs): Promise<void>;
|
|
596
590
|
startSeamlessCheckout(args: StartSeamlessCheckoutArgs): Promise<void>;
|
|
597
|
-
mountCheckout(
|
|
598
|
-
mountSeamlessCheckout(
|
|
591
|
+
mountCheckout(): Promise<void>;
|
|
592
|
+
mountSeamlessCheckout(): Promise<void>;
|
|
599
593
|
mountCheckoutLite(args: MountCheckoutLiteArgs): Promise<void>;
|
|
600
594
|
mountSeamlessCheckoutLite(args: MountSeamlessCheckoutLiteArgs): Promise<void>;
|
|
601
595
|
updateCheckoutSession(checkout: string): Promise<void>;
|
package/dist/index.d.ts
CHANGED
|
@@ -452,7 +452,7 @@ type Font = {
|
|
|
452
452
|
};
|
|
453
453
|
interface CardConfig {
|
|
454
454
|
styles?: string;
|
|
455
|
-
type?:
|
|
455
|
+
type?: "extends" | "step";
|
|
456
456
|
cardSaveEnable?: boolean;
|
|
457
457
|
vaultOnSuccess?: boolean;
|
|
458
458
|
texts?: ButtonTextCard;
|
|
@@ -479,7 +479,7 @@ interface FormElementSelector {
|
|
|
479
479
|
actionForm?: string;
|
|
480
480
|
}
|
|
481
481
|
interface RenderMode {
|
|
482
|
-
type:
|
|
482
|
+
type: "modal" | "element";
|
|
483
483
|
elementSelector?: string | FormElementSelector;
|
|
484
484
|
}
|
|
485
485
|
declare enum ExternalPaymentButtonsTypes {
|
|
@@ -490,15 +490,15 @@ type ExternalPaymentButtons = {
|
|
|
490
490
|
elementSelector: string;
|
|
491
491
|
};
|
|
492
492
|
};
|
|
493
|
-
type LoadingType =
|
|
494
|
-
type Language =
|
|
493
|
+
type LoadingType = "DOCUMENT" | "ONE_TIME_TOKEN";
|
|
494
|
+
type Language = "es" | "en" | "pt" | "de" | "fil" | "fr" | "id" | "it" | "ms" | "nl" | "pl" | "po" | "ru" | "sv" | "th" | "tr" | "vi" | "zh-CN" | "zh-TW";
|
|
495
495
|
interface YunoConfig {
|
|
496
496
|
publicApiKey: string;
|
|
497
497
|
checkoutSession: string;
|
|
498
498
|
customerSession: string;
|
|
499
499
|
language: Language;
|
|
500
500
|
countryCode: string;
|
|
501
|
-
elementSelector
|
|
501
|
+
elementSelector: string;
|
|
502
502
|
vaultedToken?: string;
|
|
503
503
|
type?: string;
|
|
504
504
|
renderMode?: RenderMode;
|
|
@@ -520,7 +520,7 @@ interface YunoConfig {
|
|
|
520
520
|
isDynamicViewEnabled?: boolean;
|
|
521
521
|
showOnlyThesePaymentMethods?: string[];
|
|
522
522
|
showPayButton?: boolean;
|
|
523
|
-
yunoCreatePayment
|
|
523
|
+
yunoCreatePayment: (oneTimeToken: string, tokenWithInformation: OneTimeToken) => void;
|
|
524
524
|
yunoPaymentMethodSelected?: (arg: {
|
|
525
525
|
type: string;
|
|
526
526
|
name: string;
|
|
@@ -541,16 +541,11 @@ interface YunoConfig {
|
|
|
541
541
|
type: LoadingType;
|
|
542
542
|
}): void;
|
|
543
543
|
}
|
|
544
|
-
type StartCheckoutArgs = Omit<YunoConfig,
|
|
545
|
-
type MountEnrollmentLiteArgs = Pick<YunoConfig,
|
|
546
|
-
type mountFraudArgs = Pick<YunoConfig,
|
|
547
|
-
interface MountCheckoutArgs {
|
|
548
|
-
paymentMethodType?: string;
|
|
549
|
-
vaultedToken?: string;
|
|
550
|
-
category?: string;
|
|
551
|
-
}
|
|
544
|
+
type StartCheckoutArgs = Omit<YunoConfig, "yunoEnrollmentStatus" | "customerSession" | "publicApiKey">;
|
|
545
|
+
type MountEnrollmentLiteArgs = Pick<YunoConfig, "language" | "countryCode" | "renderMode" | "yunoEnrollmentStatus" | "yunoError" | "showLoading" | "onRendered" | "onOneTimeTokenCreationStart" | "onLoading" | "customerSession">;
|
|
546
|
+
type mountFraudArgs = Pick<YunoConfig, "yunoCreatePayment" | "yunoError" | "language" | "checkoutSession">;
|
|
552
547
|
interface MountCheckoutLiteArgs {
|
|
553
|
-
paymentMethodType
|
|
548
|
+
paymentMethodType: string;
|
|
554
549
|
vaultedToken?: string;
|
|
555
550
|
}
|
|
556
551
|
interface MountSeamlessCheckoutLiteArgs {
|
|
@@ -565,17 +560,17 @@ interface SecureFieldsArgs {
|
|
|
565
560
|
enableMultiplesCard?: boolean;
|
|
566
561
|
}
|
|
567
562
|
type SecureFieldInstance = SecureFields;
|
|
568
|
-
type OnChangeDataSF = OnChangeArgs[
|
|
563
|
+
type OnChangeDataSF = OnChangeArgs["data"];
|
|
569
564
|
type CreateArgsSF = CreateArgs;
|
|
570
565
|
interface MountStatusPaymentArgs {
|
|
571
566
|
checkoutSession: string;
|
|
572
567
|
language: Language;
|
|
573
568
|
countryCode: string;
|
|
574
|
-
yunoPaymentResult?: YunoConfig[
|
|
575
|
-
yunoError?: YunoConfig[
|
|
569
|
+
yunoPaymentResult?: YunoConfig["yunoPaymentResult"];
|
|
570
|
+
yunoError?: YunoConfig["yunoError"];
|
|
576
571
|
}
|
|
577
572
|
type ContinuePaymentResponse = {
|
|
578
|
-
action:
|
|
573
|
+
action: "REDIRECT_URL";
|
|
579
574
|
type: string;
|
|
580
575
|
redirect: {
|
|
581
576
|
init_url: string;
|
|
@@ -589,13 +584,12 @@ type ContinuePaymentArgs = {
|
|
|
589
584
|
*/
|
|
590
585
|
showPaymentStatus?: boolean;
|
|
591
586
|
};
|
|
592
|
-
type StartSeamlessCheckoutArgs = Omit<StartCheckoutArgs,
|
|
593
|
-
type MountSeamlessCheckoutArgs = MountCheckoutArgs;
|
|
587
|
+
type StartSeamlessCheckoutArgs = Omit<StartCheckoutArgs, "yunoCreatePayment">;
|
|
594
588
|
interface YunoInstance {
|
|
595
589
|
startCheckout(args: StartCheckoutArgs): Promise<void>;
|
|
596
590
|
startSeamlessCheckout(args: StartSeamlessCheckoutArgs): Promise<void>;
|
|
597
|
-
mountCheckout(
|
|
598
|
-
mountSeamlessCheckout(
|
|
591
|
+
mountCheckout(): Promise<void>;
|
|
592
|
+
mountSeamlessCheckout(): Promise<void>;
|
|
599
593
|
mountCheckoutLite(args: MountCheckoutLiteArgs): Promise<void>;
|
|
600
594
|
mountSeamlessCheckoutLite(args: MountSeamlessCheckoutLiteArgs): Promise<void>;
|
|
601
595
|
updateCheckoutSession(checkout: string): Promise<void>;
|
|
@@ -618,4 +612,4 @@ interface Yuno {
|
|
|
618
612
|
initialize(publicApiKey: string, applicationSession?: string, options?: InitializeOptions): Promise<YunoInstance>;
|
|
619
613
|
}
|
|
620
614
|
|
|
621
|
-
export { type ButtonTextCard, type CardConfig, type ContinuePaymentArgs, type ContinuePaymentResponse, type CreateArgsSF, type ExternalPaymentButtons, ExternalPaymentButtonsTypes, type Font, type FormElementSelector, type Language, type LoadingType, type
|
|
615
|
+
export { type ButtonTextCard, type CardConfig, type ContinuePaymentArgs, type ContinuePaymentResponse, type CreateArgsSF, type ExternalPaymentButtons, ExternalPaymentButtonsTypes, type Font, type FormElementSelector, type Language, type LoadingType, type MountCheckoutLiteArgs, type MountEnrollmentLiteArgs, type MountSeamlessCheckoutLiteArgs, type MountStatusPaymentArgs, type OnChangeDataSF, type RenderMode, type SecureFieldInstance, type SecureFieldsArgs, type StartCheckoutArgs, type StartSeamlessCheckoutArgs, type TextsCustom, type Yuno, type YunoConfig, type YunoInstance, type mountFraudArgs };
|