@payrails/web-sdk 5.39.2-RC.0 → 5.39.2
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/README.md +4 -0
- package/index.js +4 -4
- package/package.json +1 -1
- package/payrails.d.ts +2 -113
- package/payrails.js +4 -4
package/package.json
CHANGED
package/payrails.d.ts
CHANGED
|
@@ -89,7 +89,6 @@ declare enum PAYMENT_METHOD_CODES {
|
|
|
89
89
|
'PAYPAL' = "payPal",
|
|
90
90
|
'APPLE_PAY' = "applePay",
|
|
91
91
|
'GENERIC_REDIRECT' = "genericRedirect",
|
|
92
|
-
'LEAN' = "lean",
|
|
93
92
|
'MERCADO_PAGO' = "mercadoPago",
|
|
94
93
|
'PIX' = "pix",
|
|
95
94
|
'BANK_ACCOUNT' = "bankAccount",
|
|
@@ -345,12 +344,6 @@ interface WorkflowExecutionResponse {
|
|
|
345
344
|
orderId?: string;
|
|
346
345
|
tokenId?: string;
|
|
347
346
|
};
|
|
348
|
-
paymentId?: string;
|
|
349
|
-
sdkToken?: string;
|
|
350
|
-
app_token?: string;
|
|
351
|
-
successUrl?: string;
|
|
352
|
-
failureUrl?: string;
|
|
353
|
-
sandbox?: boolean;
|
|
354
347
|
};
|
|
355
348
|
};
|
|
356
349
|
redirect?: string;
|
|
@@ -1551,92 +1544,6 @@ declare class GooglePayButton extends PayrailsElementWithStoreInstrumentCheckbox
|
|
|
1551
1544
|
unmount(): void;
|
|
1552
1545
|
}
|
|
1553
1546
|
|
|
1554
|
-
interface LeanButtonOptions {
|
|
1555
|
-
id?: string;
|
|
1556
|
-
events?: PaymentEvents;
|
|
1557
|
-
translations?: {
|
|
1558
|
-
label?: string;
|
|
1559
|
-
};
|
|
1560
|
-
styles?: {
|
|
1561
|
-
button?: {
|
|
1562
|
-
base?: Partial<CSSStyleDeclaration>;
|
|
1563
|
-
loading?: Partial<CSSStyleDeclaration>;
|
|
1564
|
-
hover?: Partial<CSSStyleDeclaration>;
|
|
1565
|
-
};
|
|
1566
|
-
dialog?: LeanCustomization;
|
|
1567
|
-
};
|
|
1568
|
-
returnInfo?: ReturnInfo;
|
|
1569
|
-
}
|
|
1570
|
-
type LeanCallbackResponse = {
|
|
1571
|
-
status?: string;
|
|
1572
|
-
message?: string;
|
|
1573
|
-
last_api_response?: string;
|
|
1574
|
-
exit_point?: string;
|
|
1575
|
-
secondary_status?: string;
|
|
1576
|
-
bank?: {
|
|
1577
|
-
bank_identifier?: string;
|
|
1578
|
-
is_supported?: boolean;
|
|
1579
|
-
};
|
|
1580
|
-
};
|
|
1581
|
-
type LeanCheckoutPayload = {
|
|
1582
|
-
app_token: string;
|
|
1583
|
-
access_token: string;
|
|
1584
|
-
payment_intent_id: string;
|
|
1585
|
-
success_redirect_url: string;
|
|
1586
|
-
fail_redirect_url: string;
|
|
1587
|
-
sandbox?: boolean;
|
|
1588
|
-
bank_identifier?: string;
|
|
1589
|
-
customization?: LeanCustomizationPayload;
|
|
1590
|
-
callback: (response: LeanCallbackResponse) => void;
|
|
1591
|
-
};
|
|
1592
|
-
type LeanCustomization = {
|
|
1593
|
-
themeColor?: string;
|
|
1594
|
-
buttonTextColor?: string;
|
|
1595
|
-
buttonBorderRadius?: string;
|
|
1596
|
-
linkColor?: string;
|
|
1597
|
-
overlayColor?: string;
|
|
1598
|
-
};
|
|
1599
|
-
type LeanCustomizationPayload = {
|
|
1600
|
-
theme_color?: string;
|
|
1601
|
-
button_text_color?: string;
|
|
1602
|
-
button_border_radius?: string;
|
|
1603
|
-
link_color?: string;
|
|
1604
|
-
overlay_color?: string;
|
|
1605
|
-
};
|
|
1606
|
-
declare global {
|
|
1607
|
-
interface Window {
|
|
1608
|
-
Lean?: {
|
|
1609
|
-
checkout: (payload: LeanCheckoutPayload) => void;
|
|
1610
|
-
};
|
|
1611
|
-
}
|
|
1612
|
-
}
|
|
1613
|
-
declare class LeanButton extends PayrailsElement {
|
|
1614
|
-
private static leanSdkClient;
|
|
1615
|
-
private readonly options;
|
|
1616
|
-
private isLoading;
|
|
1617
|
-
private readonly paymentExecutor;
|
|
1618
|
-
private readonly handleClick;
|
|
1619
|
-
private readonly handleMouseEnter;
|
|
1620
|
-
private readonly handleMouseLeave;
|
|
1621
|
-
private readonly handleSessionExpired;
|
|
1622
|
-
constructor(options: LeanButtonOptions);
|
|
1623
|
-
mount(location: string): void;
|
|
1624
|
-
unmount(): void;
|
|
1625
|
-
private static getLeanSDK;
|
|
1626
|
-
static resetLeanSDK(): void;
|
|
1627
|
-
private bindEvents;
|
|
1628
|
-
private unbindEvents;
|
|
1629
|
-
private setStyles;
|
|
1630
|
-
private removeStyles;
|
|
1631
|
-
private triggerLoading;
|
|
1632
|
-
private renderLoadingMarkup;
|
|
1633
|
-
private getConfirmActionParameters;
|
|
1634
|
-
private startLeanCheckout;
|
|
1635
|
-
private handleLeanCheckoutResponse;
|
|
1636
|
-
private toLeanCustomizationPayload;
|
|
1637
|
-
private onClick;
|
|
1638
|
-
}
|
|
1639
|
-
|
|
1640
1547
|
interface DropinElementEvents extends PaymentEvents {
|
|
1641
1548
|
onActivate?: () => void;
|
|
1642
1549
|
onDeactivate?: () => void;
|
|
@@ -1751,15 +1658,6 @@ interface GooglePayDropinOptions extends GooglePayButtonOptions {
|
|
|
1751
1658
|
events?: GooglePayButtonOptions['events'] & DropinElementEvents;
|
|
1752
1659
|
}
|
|
1753
1660
|
|
|
1754
|
-
interface LeanDropinOptions extends Omit<LeanButtonOptions, 'styles'> {
|
|
1755
|
-
paymentMethod: StorablePaymentCompositionOption;
|
|
1756
|
-
translations?: LeanButtonOptions['translations'];
|
|
1757
|
-
events?: LeanButtonOptions['events'] & DropinElementEvents;
|
|
1758
|
-
styles?: LeanButtonOptions['styles'];
|
|
1759
|
-
elementStyles?: DropinElementStyles;
|
|
1760
|
-
returnInfo?: ReturnInfo;
|
|
1761
|
-
}
|
|
1762
|
-
|
|
1763
1661
|
interface PaypalButtonOptions extends StoreInstrumentElementOptions {
|
|
1764
1662
|
events?: PaymentEvents & UIEvents & {
|
|
1765
1663
|
onPaypalAvailable?: () => void;
|
|
@@ -1835,7 +1733,6 @@ declare class Dropin extends PayrailsElement {
|
|
|
1835
1733
|
private applePay;
|
|
1836
1734
|
private cardForm;
|
|
1837
1735
|
private paypal;
|
|
1838
|
-
private lean;
|
|
1839
1736
|
private loadingScreen;
|
|
1840
1737
|
constructor(collectContainer: PayrailsCollectContainer, clientConfig: PayrailsClientOptions, dropinConfig: DropinOptions);
|
|
1841
1738
|
private get returnInfo();
|
|
@@ -1849,7 +1746,6 @@ declare class Dropin extends PayrailsElement {
|
|
|
1849
1746
|
private createCreditCardButton;
|
|
1850
1747
|
private createGooglePayButton;
|
|
1851
1748
|
private createPayPalButton;
|
|
1852
|
-
private createLeanButton;
|
|
1853
1749
|
private createCardForm;
|
|
1854
1750
|
private createApplePayButton;
|
|
1855
1751
|
private createCardPaymentButton;
|
|
@@ -1868,7 +1764,6 @@ interface StorablePaymentMethodConfiguration extends StoreInstrumentElementOptio
|
|
|
1868
1764
|
showStoredInstruments?: boolean;
|
|
1869
1765
|
showPaymentMethodLogo?: boolean;
|
|
1870
1766
|
}
|
|
1871
|
-
type LeanPaymentMethodConfiguration = Omit<StorablePaymentMethodConfiguration, 'showPaymentMethodLogo'>;
|
|
1872
1767
|
interface DropinOptions {
|
|
1873
1768
|
paymentMethodsConfiguration?: {
|
|
1874
1769
|
[key: string]: any;
|
|
@@ -1890,7 +1785,6 @@ interface DropinOptions {
|
|
|
1890
1785
|
applePay?: {
|
|
1891
1786
|
clientDomain?: string;
|
|
1892
1787
|
} & StorablePaymentMethodConfiguration;
|
|
1893
|
-
lean?: LeanPaymentMethodConfiguration;
|
|
1894
1788
|
};
|
|
1895
1789
|
returnInfo?: ReturnInfo;
|
|
1896
1790
|
events?: PayrailsSDKEvents;
|
|
@@ -1908,7 +1802,6 @@ interface DropinOptions {
|
|
|
1908
1802
|
mercadoPago?: GenericRedirectDropinOptions['translations'];
|
|
1909
1803
|
addressSelector?: AddressSelectorElementOptions['translations'];
|
|
1910
1804
|
applePayButton?: ApplePayDropinOptions['translations'];
|
|
1911
|
-
leanButton?: LeanDropinOptions['translations'];
|
|
1912
1805
|
errorMessages?: {
|
|
1913
1806
|
[key in ERROR_RESULT]?: string;
|
|
1914
1807
|
};
|
|
@@ -1920,7 +1813,6 @@ interface DropinOptions {
|
|
|
1920
1813
|
googlePayButton?: GooglePayButtonOptions['styles'];
|
|
1921
1814
|
paypalButton?: PaypalDropinOptions['styles'];
|
|
1922
1815
|
applePayButton?: ApplePayButtonOptions['styles'];
|
|
1923
|
-
leanButton?: LeanButtonOptions['styles'];
|
|
1924
1816
|
cardForm?: CardFormOptions['styles'];
|
|
1925
1817
|
cardPaymentButton?: CardPaymentButtonOptions['styles'];
|
|
1926
1818
|
authSuccess?: Partial<CSSStyleDeclaration>;
|
|
@@ -2064,8 +1956,7 @@ interface PayPalScriptConfig {
|
|
|
2064
1956
|
declare enum ThirdPartySDK {
|
|
2065
1957
|
ApplePay = "https://applepay.cdn-apple.com/jsapi/1.latest/apple-pay-sdk.js",
|
|
2066
1958
|
GooglePay = "https://pay.google.com/gp/p/js/pay.js",
|
|
2067
|
-
PayPal = "paypal-sdk"
|
|
2068
|
-
Lean = "https://cdn.leantech.me/link/loader/prod/ae/latest/lean-link-loader.min.js"
|
|
1959
|
+
PayPal = "paypal-sdk"
|
|
2069
1960
|
}
|
|
2070
1961
|
|
|
2071
1962
|
interface QueryDefinition<T> {
|
|
@@ -2101,7 +1992,6 @@ declare class Payrails {
|
|
|
2101
1992
|
private __cardList;
|
|
2102
1993
|
private __cardPaymentButton;
|
|
2103
1994
|
private __paypalButton;
|
|
2104
|
-
private __leanButton;
|
|
2105
1995
|
private __genericRedirectButton;
|
|
2106
1996
|
private __dynamicElementForm;
|
|
2107
1997
|
private __dropin;
|
|
@@ -2129,7 +2019,6 @@ declare class Payrails {
|
|
|
2129
2019
|
getAvailablePaymentMethods(): PaymentMethodCode[];
|
|
2130
2020
|
paymentButton(options: CardPaymentButtonOptions): CardPaymentButton;
|
|
2131
2021
|
paypalButton(options?: PaypalButtonOptions): PaypalButton;
|
|
2132
|
-
leanButton(options: LeanButtonOptions): LeanButton;
|
|
2133
2022
|
genericRedirectButton(options: GenericRedirectButtonOptions): GenericRedirectButton;
|
|
2134
2023
|
dynamicElement(options: DynamicElementOptions): DynamicElementForm;
|
|
2135
2024
|
getSavedPaypalAccounts(): StoredPaymentInstrument<PayPalMetadata>[];
|
|
@@ -2245,4 +2134,4 @@ interface PayrailsClientOptions {
|
|
|
2245
2134
|
}
|
|
2246
2135
|
|
|
2247
2136
|
export { AuthorizationFailureReasons, ElementType, INTEGRATION_TYPE, PAYMENT_METHOD_CODES, Payrails, PayrailsCollectContainer, PayrailsEnvironment };
|
|
2248
|
-
export type { ApplePayButtonOptions, CardFormOptions, CardListOptions, CardPaymentButtonOptions, CollectContainerOptions, DropinOptions, ExecutionMeta, ExecutionMetaCustomer, ExecutionMetaKey, GenericRedirectButtonOptions, GooglePayButtonOptions, InitOptions,
|
|
2137
|
+
export type { ApplePayButtonOptions, CardFormOptions, CardListOptions, CardPaymentButtonOptions, CollectContainerOptions, DropinOptions, ExecutionMeta, ExecutionMetaCustomer, ExecutionMetaKey, GenericRedirectButtonOptions, GooglePayButtonOptions, InitOptions, PaymentEvents, PaypalButtonOptions, PayrailsAmount, PayrailsClientOptions, PayrailsContainerType, PayrailsSecureField, PayrailsSecureFieldEvent, ReturnInfo, SaveInstrumentResponse, WorkflowExecutionResponse };
|