@getopenpay/openpay-js 0.3.14-alpha.8f138b8 → 0.3.15-alpha.41e5b07
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/{Resource-BMFoas9C.js → Resource-DY_YMY5j.js} +2 -2
- package/dist/{SimpleSpanProcessor-Cl1w3Xey.js → SimpleSpanProcessor-BmxS0icJ.js} +6 -6
- package/dist/{detect-resources-jpL1dRng.js → detect-resources-LJMlTW7M.js} +6 -6
- package/dist/{diag-api-BN9T6L7B.js → diag-api-BsiZ_woC.js} +1 -1
- package/dist/{index-DTA_Pss5.js → index-A6yr82Z3.js} +5 -5
- package/dist/{index-DcioXMG4.js → index-BGb0UtNb.js} +1 -1
- package/dist/{index-EIgbb7nY.js → index-BesDt8EU.js} +4 -4
- package/dist/{index-CCm9RgdV.js → index-BfmvI4KX.js} +1 -1
- package/dist/index-BhCgte3r.js +6009 -0
- package/dist/{index-C-NpI566.js → index-CH2aqRh8.js} +5 -5
- package/dist/{index-QOxZTXA5.js → index-CQgNnIiR.js} +4 -4
- package/dist/{index-BahS5IBN.js → index-ChNL4E99.js} +1 -1
- package/dist/{index-CEnMSssP.js → index-DJY_hEsj.js} +1 -1
- package/dist/{index-BL9za57F.js → index-yiicqvwG.js} +4 -4
- package/dist/index.d.ts +60 -17
- package/dist/index.es.js +1 -1
- package/dist/index.umd.js +18 -18
- package/dist/{metrics-api-B8t6v6Vc.js → metrics-api-CCzeVi2v.js} +1 -1
- package/dist/{sdk-info-CJCZvkge.js → sdk-info-DLIyWda0.js} +1 -1
- package/dist/{url-CrXLOr4i.js → url-BvGZe3w3.js} +1 -1
- package/dist/{utils-BLas2Cjc.js → utils-CM15rmbc.js} +3 -3
- package/dist/{utils-BlDzfhzX.js → utils-sxo4OUi9.js} +1 -1
- package/package.json +1 -1
- package/dist/index-IhVTmqce.js +0 -5528
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { m as s } from "./metrics-api-
|
|
2
|
-
import { t as d } from "./index-
|
|
3
|
-
import { l as u } from "./utils-
|
|
4
|
-
import { I as N, i as T, s as w, a as E } from "./utils-
|
|
5
|
-
import { d as f } from "./diag-api-
|
|
1
|
+
import { m as s } from "./metrics-api-CCzeVi2v.js";
|
|
2
|
+
import { t as d } from "./index-BhCgte3r.js";
|
|
3
|
+
import { l as u } from "./utils-CM15rmbc.js";
|
|
4
|
+
import { I as N, i as T, s as w, a as E } from "./utils-CM15rmbc.js";
|
|
5
|
+
import { d as f } from "./diag-api-BsiZ_woC.js";
|
|
6
6
|
function l(e, r, t, o) {
|
|
7
7
|
for (var n = 0, a = e.length; n < a; n++) {
|
|
8
8
|
var i = e[n];
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { z as de, p as T, r as _e, w as ye, j as ve, n as he, y as me, dJ as ge, h as Se, dK as Ae, l as Ee, q as Te, i as Pe, m as Re, o as Oe, t as be, u as Ce } from "./url-
|
|
2
|
-
import { b as k, t as O, i as Y, T as b, d as Ie, c as B } from "./index-
|
|
3
|
-
import { d as _ } from "./diag-api-
|
|
1
|
+
import { z as de, p as T, r as _e, w as ye, j as ve, n as he, y as me, dJ as ge, h as Se, dK as Ae, l as Ee, q as Te, i as Pe, m as Re, o as Oe, t as be, u as Ce } from "./url-BvGZe3w3.js";
|
|
2
|
+
import { b as k, t as O, i as Y, T as b, d as Ie, c as B } from "./index-BhCgte3r.js";
|
|
3
|
+
import { d as _ } from "./diag-api-BsiZ_woC.js";
|
|
4
4
|
import { h as X, E as je } from "./ExportResult-Bo1QOwfo.js";
|
|
5
|
-
import { D as Me, j as Ne, br as we, bs as De, bt as Le, b as xe, T as Ge, bu as Be, h as Ve, i as Ue, bv as He } from "./sdk-info-
|
|
5
|
+
import { D as Me, j as Ne, br as we, bs as De, bt as Le, b as xe, T as Ge, bu as Be, h as Ve, i as Ue, bv as He } from "./sdk-info-DLIyWda0.js";
|
|
6
6
|
import { _ as Ke } from "./utils-BGeftTvk.js";
|
|
7
7
|
var p;
|
|
8
8
|
(function(e) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as I, t as l, i as D, T as o, d as T, e as b } from "./index-
|
|
1
|
+
import { b as I, t as l, i as D, T as o, d as T, e as b } from "./index-BhCgte3r.js";
|
|
2
2
|
var C = I("OpenTelemetry SDK Context Key SUPPRESS_TRACING");
|
|
3
3
|
function A(r) {
|
|
4
4
|
return r.getValue(C) === !0;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as diag } from "./diag-api-
|
|
1
|
+
import { d as diag } from "./diag-api-BsiZ_woC.js";
|
|
2
2
|
import { E as ExportResultCode, h as hexToBinary } from "./ExportResult-Bo1QOwfo.js";
|
|
3
3
|
import { c as commonjsGlobal } from "./_commonjsHelpers-DnMzE-71.js";
|
|
4
4
|
var OTLPExporterBase = (
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { R as l } from "./Resource-
|
|
2
|
-
import { d as ee } from "./Resource-
|
|
3
|
-
import { d as v } from "./diag-api-
|
|
4
|
-
import { e as A, f as m, g as b, h as w, S as D } from "./sdk-info-
|
|
1
|
+
import { R as l } from "./Resource-DY_YMY5j.js";
|
|
2
|
+
import { d as ee } from "./Resource-DY_YMY5j.js";
|
|
3
|
+
import { d as v } from "./diag-api-BsiZ_woC.js";
|
|
4
|
+
import { e as A, f as m, g as b, h as w, S as D } from "./sdk-info-DLIyWda0.js";
|
|
5
5
|
var T = (
|
|
6
6
|
/** @class */
|
|
7
7
|
function() {
|
package/dist/index.d.ts
CHANGED
|
@@ -166,7 +166,14 @@ declare type CustomInitParams = {
|
|
|
166
166
|
|
|
167
167
|
declare type CustomStyles = string;
|
|
168
168
|
|
|
169
|
-
declare type DefaultFieldValues = Partial<Record<FieldNameEnum, string
|
|
169
|
+
declare type DefaultFieldValues = Partial<Record<FieldNameEnum, string>> & {
|
|
170
|
+
show_all_prices?: boolean;
|
|
171
|
+
exclusive_prices?: boolean;
|
|
172
|
+
price_id_product_mapping?: Record<string, string>;
|
|
173
|
+
require_zip_code?: boolean;
|
|
174
|
+
require_full_billing_address?: boolean;
|
|
175
|
+
require_full_shipping_address?: boolean;
|
|
176
|
+
};
|
|
170
177
|
|
|
171
178
|
declare type ElementProps<PlaceholderType extends z.ZodTypeAny = z.ZodString> = {
|
|
172
179
|
styles?: ElementsStyle<z.ZodOptional<PlaceholderType>>;
|
|
@@ -240,13 +247,23 @@ declare type ErrorStatus = {
|
|
|
240
247
|
export declare enum FieldName {
|
|
241
248
|
FIRST_NAME = 'firstName',
|
|
242
249
|
LAST_NAME = 'lastName',
|
|
250
|
+
PHONE = 'phone',
|
|
243
251
|
EMAIL = 'email',
|
|
244
|
-
|
|
252
|
+
LINE1 = 'line1',
|
|
253
|
+
LINE2 = 'line2',
|
|
254
|
+
LINE3 = 'line3',
|
|
245
255
|
CITY = 'city',
|
|
246
256
|
STATE = 'state',
|
|
247
257
|
COUNTRY = 'country',
|
|
248
|
-
|
|
249
|
-
|
|
258
|
+
ZIP_CODE = 'zipCode',
|
|
259
|
+
SHIPPING_LINE1 = 'shippingAddressLine1',
|
|
260
|
+
SHIPPING_LINE2 = 'shippingAddressLine2',
|
|
261
|
+
SHIPPING_LINE3 = 'shippingAddressLine3',
|
|
262
|
+
SHIPPING_CITY = 'shippingAddressCity',
|
|
263
|
+
SHIPPING_STATE = 'shippingAddressState',
|
|
264
|
+
SHIPPING_COUNTRY = 'shippingAddressCountry',
|
|
265
|
+
SHIPPING_ZIP_CODE = 'shippingAddressZipCode',
|
|
266
|
+
IS_SHIPPING_NOT_SAME_AS_BILLING = 'isShippingSameAsBilling',
|
|
250
267
|
PROMOTION_CODE = 'promotionCode',
|
|
251
268
|
}
|
|
252
269
|
|
|
@@ -691,6 +708,17 @@ declare const OjsFlows = {
|
|
|
691
708
|
init: initAuthnetGooglePayFlow,
|
|
692
709
|
run: runAuthnetGooglePayFlow,
|
|
693
710
|
},
|
|
711
|
+
|
|
712
|
+
adyenGooglePay: {
|
|
713
|
+
init: initAdyenGooglePayFlow,
|
|
714
|
+
run: runAdyenGooglePayFlow,
|
|
715
|
+
},
|
|
716
|
+
|
|
717
|
+
adyenApplePay: {
|
|
718
|
+
init: initAdyenApplePayFlow,
|
|
719
|
+
run: runAdyenApplePayFlow,
|
|
720
|
+
},
|
|
721
|
+
|
|
694
722
|
// 👉 Add more flows here
|
|
695
723
|
|
|
696
724
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -768,6 +796,14 @@ export declare class OpenPayForm {
|
|
|
768
796
|
publisher: LoadedOncePublisher<InitApplePayFlowResult>;
|
|
769
797
|
initialize: (initParams: InitOjsFlowParams) => Promise<void>;
|
|
770
798
|
};
|
|
799
|
+
readonly adyenGooglePay: {
|
|
800
|
+
publisher: LoadedOncePublisher<InitGooglePayFlowResult>;
|
|
801
|
+
initialize: (initParams: InitOjsFlowParams) => Promise<void>;
|
|
802
|
+
};
|
|
803
|
+
readonly adyenApplePay: {
|
|
804
|
+
publisher: LoadedOncePublisher<InitApplePayFlowResult>;
|
|
805
|
+
initialize: (initParams: InitOjsFlowParams) => Promise<void>;
|
|
806
|
+
};
|
|
771
807
|
};
|
|
772
808
|
private deviceToken;
|
|
773
809
|
private isSubmitting;
|
|
@@ -804,18 +840,6 @@ export declare class OpenPayForm {
|
|
|
804
840
|
private checkValidFormInstance;
|
|
805
841
|
getAvailablePaymentMethods: () => Promise<({
|
|
806
842
|
name: string;
|
|
807
|
-
} | {
|
|
808
|
-
processor: PaymentProcessor;
|
|
809
|
-
isAvailable: boolean;
|
|
810
|
-
isLoading: boolean;
|
|
811
|
-
startFlow: (customParams?: ApplePayFlowCustomParams) => Promise<void>;
|
|
812
|
-
name: string;
|
|
813
|
-
} | {
|
|
814
|
-
processor: PaymentProcessor;
|
|
815
|
-
isAvailable: boolean;
|
|
816
|
-
isLoading: boolean;
|
|
817
|
-
startFlow: (customParams?: GooglePayFlowCustomParams) => Promise<void>;
|
|
818
|
-
name: string;
|
|
819
843
|
} | {
|
|
820
844
|
isAvailable: true;
|
|
821
845
|
widgetProps: LoopCryptoWidgetProps;
|
|
@@ -824,6 +848,12 @@ export declare class OpenPayForm {
|
|
|
824
848
|
} | {
|
|
825
849
|
isAvailable: false;
|
|
826
850
|
name: string;
|
|
851
|
+
} | {
|
|
852
|
+
processor: PaymentProcessor;
|
|
853
|
+
isAvailable: boolean;
|
|
854
|
+
isLoading: boolean;
|
|
855
|
+
startFlow: (customParams?: ApplePayFlowCustomParams) => Promise<void>;
|
|
856
|
+
name: string;
|
|
827
857
|
} | {
|
|
828
858
|
processor: "stripe";
|
|
829
859
|
isAvailable: true;
|
|
@@ -843,6 +873,12 @@ export declare class OpenPayForm {
|
|
|
843
873
|
isAvailable: boolean;
|
|
844
874
|
startFlow: () => Promise<void>;
|
|
845
875
|
name: string;
|
|
876
|
+
} | {
|
|
877
|
+
processor: PaymentProcessor;
|
|
878
|
+
isAvailable: boolean;
|
|
879
|
+
isLoading: boolean;
|
|
880
|
+
startFlow: (customParams?: GooglePayFlowCustomParams) => Promise<void>;
|
|
881
|
+
name: string;
|
|
846
882
|
})[]>;
|
|
847
883
|
generalSubmit: <T extends SubmitMethod>(method: T, settings?: SubmitSettings<T>) => Promise<void>;
|
|
848
884
|
/**
|
|
@@ -862,10 +898,13 @@ export declare class OpenPayForm {
|
|
|
862
898
|
declare interface PayInCompleteEvent extends PayinResponse {}
|
|
863
899
|
|
|
864
900
|
declare enum PayInFailed {
|
|
901
|
+
// Create payment method
|
|
902
|
+
METHOD_CREATION_FAILED = 'methodCreationFailed',
|
|
865
903
|
INSUFFICIENT_BALANCE = 'insufficientBalance',
|
|
866
904
|
INSUFFICIENT_AUTHORIZATION = 'insufficientAuthorization',
|
|
867
905
|
SIGNED_MESSAGE_REQUIRED = 'signedMessageRequired',
|
|
868
906
|
CUSTOMER_CREATION_FAILED = 'customerCreationFailed',
|
|
907
|
+
// Create pay-in
|
|
869
908
|
PAYMENT_FAILED = 'paymentFailed',
|
|
870
909
|
TRANSACTION_FAILED = 'transactionFailed',
|
|
871
910
|
}
|
|
@@ -1074,7 +1113,7 @@ declare interface PaymentMethodTokenExchangeRate {
|
|
|
1074
1113
|
timestamp: number;
|
|
1075
1114
|
}
|
|
1076
1115
|
|
|
1077
|
-
declare const PaymentProcessor = z.enum(['stripe', 'airwallex', 'authorize_net']);
|
|
1116
|
+
declare const PaymentProcessor = z.enum(['stripe', 'airwallex', 'authorize_net', 'adyen']);
|
|
1078
1117
|
|
|
1079
1118
|
declare type PaymentProcessor = z.infer<typeof PaymentProcessor>;
|
|
1080
1119
|
|
|
@@ -1141,6 +1180,8 @@ declare type ProcessorSpecificSubmitSettings<T extends SubmitMethod = SubmitMeth
|
|
|
1141
1180
|
'airwallex-apple-pay': ApplePayFlowCustomParams;
|
|
1142
1181
|
'authorizenet-google-pay': GooglePayFlowCustomParams;
|
|
1143
1182
|
'authorizenet-apple-pay': ApplePayFlowCustomParams;
|
|
1183
|
+
'adyen-google-pay': GooglePayFlowCustomParams;
|
|
1184
|
+
'adyen-apple-pay': ApplePayFlowCustomParams;
|
|
1144
1185
|
'loop-crypto': LoopCryptoFlowCustomParams;
|
|
1145
1186
|
paypal: PaypalFlowCustomParams;
|
|
1146
1187
|
}[T];
|
|
@@ -1173,6 +1214,8 @@ export declare enum SubmitMethods {
|
|
|
1173
1214
|
airwallexApplePay = 'airwallex-apple-pay',
|
|
1174
1215
|
authorizenetGooglePay = 'authorizenet-google-pay',
|
|
1175
1216
|
authorizenetApplePay = 'authorizenet-apple-pay',
|
|
1217
|
+
adyenGooglePay = 'adyen-google-pay',
|
|
1218
|
+
adyenApplePay = 'adyen-apple-pay',
|
|
1176
1219
|
loopCrypto = 'loop-crypto',
|
|
1177
1220
|
paypal = 'paypal',
|
|
1178
1221
|
}
|
package/dist/index.es.js
CHANGED