@sunbay/checkout-sdk-js 0.0.9 → 0.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/README.md +4 -1
- package/dist/index.cjs +6 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.global.js +13 -4
- package/dist/index.global.js.map +1 -1
- package/dist/index.mjs +6 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ElementType, CommandName, EventName, ElementOptions, Appearance, ElementStatus, AvailableWallets, EventPayloadMap, PublicSessionView, WarningEvent, ConfirmReq, PaymentOutcome, GetPaymentStatusResp, AddressInfo, PaymentMethodFilter } from '@sunbay/checkout-sdk-protocol';
|
|
2
|
-
export { AddressElementOptions, AddressInfo, Appearance, AppearanceRuleStyle, AppearanceRuleTarget, AppearanceVariables, ApplePayButtonTheme, ApplePayButtonType, ApplePayOptions, AvailableWallets, BlurEvent, CardElementOptions, CardFieldElementOptions, ChangeEvent, CheckoutError, CheckoutErrorCategory, ElementOptions, ElementReadyEvent, ElementStatus, ElementType, ErrorCode, ErrorCodeValue, ErrorEvent, EventName, EventPayloadMap, ExpressAvailabilityChangeEvent, ExpressCheckoutElementOptions, FocusEvent, GooglePayButtonTheme, GooglePayButtonType, GooglePayOptions, LoadErrorEvent, PaymentAction, PaymentMethod, PaymentMethodFilter, PaymentOutcome, PaymentResultEvent, PaymentStateChangeEvent, PublicPaymentMethod, PublicProductLine, PublicSessionView, ReadyEvent, TxnStatus, WARNING_CODES, WalletErrorStage, WarningCode, WarningEvent } from '@sunbay/checkout-sdk-protocol';
|
|
2
|
+
export { AddressElementOptions, AddressFormStyle, AddressInfo, Appearance, AppearanceRuleStyle, AppearanceRuleTarget, AppearanceVariables, ApplePayButtonTheme, ApplePayButtonType, ApplePayOptions, AvailableWallets, BlurEvent, CardElementOptions, CardFieldElementOptions, ChangeEvent, CheckoutError, CheckoutErrorCategory, ElementOptions, ElementReadyEvent, ElementStatus, ElementType, ErrorCode, ErrorCodeValue, ErrorEvent, EventName, EventPayloadMap, ExpressAvailabilityChangeEvent, ExpressCheckoutElementOptions, FocusEvent, GooglePayButtonTheme, GooglePayButtonType, GooglePayOptions, LoadErrorEvent, PaymentAction, PaymentMethod, PaymentMethodFilter, PaymentOutcome, PaymentResultEvent, PaymentStateChangeEvent, PublicPaymentMethod, PublicProductLine, PublicSessionView, ReadyEvent, SessionStatus, TxnStatus, WARNING_CODES, WalletErrorStage, WarningCode, WarningEvent } from '@sunbay/checkout-sdk-protocol';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* CheckoutElement — the merchant-side Element handle (spec 6).
|
|
@@ -444,7 +444,7 @@ declare class CheckoutInstance {
|
|
|
444
444
|
/**
|
|
445
445
|
* Query the payment status (returns TxnStatus as-is, no transformation).
|
|
446
446
|
*
|
|
447
|
-
* @returns txnStatus (may
|
|
447
|
+
* @returns txnStatus (may be absent when the session is expired), sessionStatus and txnId.
|
|
448
448
|
* @throws rejects INSTANCE_DESTROYED when destroyed.
|
|
449
449
|
*/
|
|
450
450
|
getPaymentStatus(): Promise<GetPaymentStatusResp>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ElementType, CommandName, EventName, ElementOptions, Appearance, ElementStatus, AvailableWallets, EventPayloadMap, PublicSessionView, WarningEvent, ConfirmReq, PaymentOutcome, GetPaymentStatusResp, AddressInfo, PaymentMethodFilter } from '@sunbay/checkout-sdk-protocol';
|
|
2
|
-
export { AddressElementOptions, AddressInfo, Appearance, AppearanceRuleStyle, AppearanceRuleTarget, AppearanceVariables, ApplePayButtonTheme, ApplePayButtonType, ApplePayOptions, AvailableWallets, BlurEvent, CardElementOptions, CardFieldElementOptions, ChangeEvent, CheckoutError, CheckoutErrorCategory, ElementOptions, ElementReadyEvent, ElementStatus, ElementType, ErrorCode, ErrorCodeValue, ErrorEvent, EventName, EventPayloadMap, ExpressAvailabilityChangeEvent, ExpressCheckoutElementOptions, FocusEvent, GooglePayButtonTheme, GooglePayButtonType, GooglePayOptions, LoadErrorEvent, PaymentAction, PaymentMethod, PaymentMethodFilter, PaymentOutcome, PaymentResultEvent, PaymentStateChangeEvent, PublicPaymentMethod, PublicProductLine, PublicSessionView, ReadyEvent, TxnStatus, WARNING_CODES, WalletErrorStage, WarningCode, WarningEvent } from '@sunbay/checkout-sdk-protocol';
|
|
2
|
+
export { AddressElementOptions, AddressFormStyle, AddressInfo, Appearance, AppearanceRuleStyle, AppearanceRuleTarget, AppearanceVariables, ApplePayButtonTheme, ApplePayButtonType, ApplePayOptions, AvailableWallets, BlurEvent, CardElementOptions, CardFieldElementOptions, ChangeEvent, CheckoutError, CheckoutErrorCategory, ElementOptions, ElementReadyEvent, ElementStatus, ElementType, ErrorCode, ErrorCodeValue, ErrorEvent, EventName, EventPayloadMap, ExpressAvailabilityChangeEvent, ExpressCheckoutElementOptions, FocusEvent, GooglePayButtonTheme, GooglePayButtonType, GooglePayOptions, LoadErrorEvent, PaymentAction, PaymentMethod, PaymentMethodFilter, PaymentOutcome, PaymentResultEvent, PaymentStateChangeEvent, PublicPaymentMethod, PublicProductLine, PublicSessionView, ReadyEvent, SessionStatus, TxnStatus, WARNING_CODES, WalletErrorStage, WarningCode, WarningEvent } from '@sunbay/checkout-sdk-protocol';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* CheckoutElement — the merchant-side Element handle (spec 6).
|
|
@@ -444,7 +444,7 @@ declare class CheckoutInstance {
|
|
|
444
444
|
/**
|
|
445
445
|
* Query the payment status (returns TxnStatus as-is, no transformation).
|
|
446
446
|
*
|
|
447
|
-
* @returns txnStatus (may
|
|
447
|
+
* @returns txnStatus (may be absent when the session is expired), sessionStatus and txnId.
|
|
448
448
|
* @throws rejects INSTANCE_DESTROYED when destroyed.
|
|
449
449
|
*/
|
|
450
450
|
getPaymentStatus(): Promise<GetPaymentStatusResp>;
|
package/dist/index.global.js
CHANGED
|
@@ -137,7 +137,13 @@ var SunbayCheckout = (() => {
|
|
|
137
137
|
/** A host-provided billing/shipping address was incomplete, so it was treated as not provided. */
|
|
138
138
|
ADDRESS_INCOMPLETE: "ADDRESS_INCOMPLETE",
|
|
139
139
|
/** A host-provided address was ignored because our Address Element owns that mode. */
|
|
140
|
-
ADDRESS_ENTRY_IGNORED: "ADDRESS_ENTRY_IGNORED"
|
|
140
|
+
ADDRESS_ENTRY_IGNORED: "ADDRESS_ENTRY_IGNORED",
|
|
141
|
+
/**
|
|
142
|
+
* The wallet (Apple Pay / Google Pay) payment parameters delivered by the session were missing
|
|
143
|
+
* or invalid, so that wallet is not offered. Registered for the native SDKs (iOS first); the Web
|
|
144
|
+
* runtime currently only logs this condition and does not emit the event.
|
|
145
|
+
*/
|
|
146
|
+
WALLET_PARAMS_INVALID: "WALLET_PARAMS_INVALID"
|
|
141
147
|
};
|
|
142
148
|
var IFRAME_RESIZE_MESSAGE_TYPE = "sunbay:checkout:iframe-resize";
|
|
143
149
|
function isIframeResizeMessage(data) {
|
|
@@ -965,10 +971,13 @@ var SunbayCheckout = (() => {
|
|
|
965
971
|
let query = `?checkoutId=${encodeURIComponent(this.checkoutId)}`;
|
|
966
972
|
query += `&elementId=${encodeURIComponent(this.elementId)}`;
|
|
967
973
|
if (this.type === "address") {
|
|
968
|
-
const mode = this.options
|
|
974
|
+
const { mode, style } = this.options ?? {};
|
|
969
975
|
if (mode) {
|
|
970
976
|
query += `&mode=${encodeURIComponent(mode)}`;
|
|
971
977
|
}
|
|
978
|
+
if (style === "simple" || style === "full") {
|
|
979
|
+
query += `&style=${style}`;
|
|
980
|
+
}
|
|
972
981
|
}
|
|
973
982
|
if (this.colorScheme) {
|
|
974
983
|
query += `&colorScheme=${encodeURIComponent(this.colorScheme)}`;
|
|
@@ -1287,7 +1296,7 @@ var SunbayCheckout = (() => {
|
|
|
1287
1296
|
/**
|
|
1288
1297
|
* Query the payment status (returns TxnStatus as-is, no transformation).
|
|
1289
1298
|
*
|
|
1290
|
-
* @returns txnStatus (may
|
|
1299
|
+
* @returns txnStatus (may be absent when the session is expired), sessionStatus and txnId.
|
|
1291
1300
|
* @throws rejects INSTANCE_DESTROYED when destroyed.
|
|
1292
1301
|
*/
|
|
1293
1302
|
async getPaymentStatus() {
|
|
@@ -1569,7 +1578,7 @@ var SunbayCheckout = (() => {
|
|
|
1569
1578
|
const w = window;
|
|
1570
1579
|
w.SunbayCheckout = { ...w.SunbayCheckout ?? {}, createCheckout };
|
|
1571
1580
|
}
|
|
1572
|
-
var version = true ? "0.0
|
|
1581
|
+
var version = true ? "0.1.0" : "0.0.0";
|
|
1573
1582
|
return __toCommonJS(index_exports);
|
|
1574
1583
|
})();
|
|
1575
1584
|
//# sourceMappingURL=index.global.js.map
|