@astropay/payments-lib 2.0.8 → 2.0.10
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/astropay-payments-lib.es.js +1 -1
- package/dist/astropay-payments-lib.umd.js +47 -39
- package/dist/{main-QOFSdpoZ.js → main-DWAhnd_k.js} +644 -581
- package/dist/{profiler-Cq4Jvt9c.js → profiler-BsILZZgq.js} +1 -1
- package/dist/{startRecording-CKBjDVQr.js → startRecording-BuP9dA-s.js} +1 -1
- package/dist/types/index.d.ts +57 -122
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { s as A, C, b as ft, i as Y, g as V, N as h, P as X, S as pt, a as B, c as ht, d as mt, e as St, f as q, r as gt, h as Et, j as yt, k as Tt, l as j, m as J, t as _, n as x, o as M, p as K, q as N, u as Q, v as Z, w as Nt, x as vt, y as b, z as D, A as R, B as wt, D as Mt, E as It, F as Rt, G as Ct, H as bt, I as _t, J as Lt, K as Dt, L as xt, M as Ot, O as At, Q as Vt, R as Pt, T as kt, U as zt } from "./main-
|
|
1
|
+
import { s as A, C, b as ft, i as Y, g as V, N as h, P as X, S as pt, a as B, c as ht, d as mt, e as St, f as q, r as gt, h as Et, j as yt, k as Tt, l as j, m as J, t as _, n as x, o as M, p as K, q as N, u as Q, v as Z, w as Nt, x as vt, y as b, z as D, A as R, B as wt, D as Mt, E as It, F as Rt, G as Ct, H as bt, I as _t, J as Lt, K as Dt, L as xt, M as Ot, O as At, Q as Vt, R as Pt, T as kt, U as zt } from "./main-DWAhnd_k.js";
|
|
2
2
|
const P = /* @__PURE__ */ new WeakMap();
|
|
3
3
|
function T(t) {
|
|
4
4
|
return P.has(t);
|
package/dist/types/index.d.ts
CHANGED
|
@@ -197,146 +197,81 @@ type APCore = {
|
|
|
197
197
|
styles?: TDeepPartial<APComponentStyles>;
|
|
198
198
|
tracking?: boolean;
|
|
199
199
|
};
|
|
200
|
-
type
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
order?: {
|
|
219
|
-
id?: string;
|
|
220
|
-
items?: Array<{
|
|
221
|
-
name: string;
|
|
222
|
-
description?: string;
|
|
223
|
-
units: number;
|
|
200
|
+
type TOrderProps = {
|
|
201
|
+
id?: string;
|
|
202
|
+
items?: Array<{
|
|
203
|
+
name: string;
|
|
204
|
+
description?: string;
|
|
205
|
+
units: number;
|
|
206
|
+
amount: {
|
|
207
|
+
currency: string;
|
|
208
|
+
value: number;
|
|
209
|
+
};
|
|
210
|
+
}>;
|
|
211
|
+
summary?: {
|
|
212
|
+
totalAmount: {
|
|
213
|
+
currency: string;
|
|
214
|
+
value: number;
|
|
215
|
+
};
|
|
216
|
+
shipping?: {
|
|
217
|
+
label: string;
|
|
224
218
|
amount: {
|
|
225
219
|
currency: string;
|
|
226
220
|
value: number;
|
|
227
221
|
};
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
|
|
222
|
+
};
|
|
223
|
+
fees?: {
|
|
224
|
+
label: string;
|
|
225
|
+
amount: {
|
|
231
226
|
currency: string;
|
|
232
227
|
value: number;
|
|
233
228
|
};
|
|
234
|
-
shipping?: {
|
|
235
|
-
label: string;
|
|
236
|
-
amount: {
|
|
237
|
-
currency: string;
|
|
238
|
-
value: number;
|
|
239
|
-
};
|
|
240
|
-
};
|
|
241
|
-
fees?: {
|
|
242
|
-
label: string;
|
|
243
|
-
amount: {
|
|
244
|
-
currency: string;
|
|
245
|
-
value: number;
|
|
246
|
-
};
|
|
247
|
-
};
|
|
248
229
|
};
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
|
|
230
|
+
};
|
|
231
|
+
};
|
|
232
|
+
type TUserProps = {
|
|
233
|
+
phoneNumber?: string;
|
|
234
|
+
email?: string;
|
|
235
|
+
firstName?: string;
|
|
236
|
+
lastName?: string;
|
|
237
|
+
documentNumber?: string;
|
|
252
238
|
};
|
|
253
|
-
type
|
|
239
|
+
type TNewPayment = {
|
|
254
240
|
amount: number;
|
|
255
241
|
currency: string;
|
|
256
242
|
country: string;
|
|
257
|
-
paymentExternalId?:
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
currency: string;
|
|
273
|
-
value: number;
|
|
274
|
-
};
|
|
275
|
-
}>;
|
|
276
|
-
summary?: {
|
|
277
|
-
totalAmount: {
|
|
278
|
-
currency: string;
|
|
279
|
-
value: number;
|
|
280
|
-
};
|
|
281
|
-
shipping?: {
|
|
282
|
-
label: string;
|
|
283
|
-
amount: {
|
|
284
|
-
currency: string;
|
|
285
|
-
value: number;
|
|
286
|
-
};
|
|
287
|
-
};
|
|
288
|
-
fees?: {
|
|
289
|
-
label: string;
|
|
290
|
-
amount: {
|
|
291
|
-
currency: string;
|
|
292
|
-
value: number;
|
|
293
|
-
};
|
|
294
|
-
};
|
|
295
|
-
};
|
|
243
|
+
paymentExternalId?: never;
|
|
244
|
+
};
|
|
245
|
+
type TExistingPayment = {
|
|
246
|
+
paymentExternalId: string;
|
|
247
|
+
amount?: never;
|
|
248
|
+
currency?: never;
|
|
249
|
+
country?: never;
|
|
250
|
+
};
|
|
251
|
+
type TPaymentIdentity = TNewPayment | TExistingPayment;
|
|
252
|
+
type APFullCheckout = TPaymentIdentity & {
|
|
253
|
+
showTitle?: boolean;
|
|
254
|
+
showDescription?: boolean;
|
|
255
|
+
cardConfig?: {
|
|
256
|
+
showPaymentSummary?: boolean | undefined;
|
|
257
|
+
expirationDateFormat?: 'MM/YYYY' | 'MM/YY' | undefined;
|
|
296
258
|
} | undefined;
|
|
259
|
+
user?: TUserProps | undefined;
|
|
260
|
+
order?: TOrderProps | undefined;
|
|
297
261
|
onSuccess?: () => void;
|
|
298
262
|
onError?: () => void;
|
|
299
263
|
};
|
|
300
|
-
type
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
264
|
+
type APPayment = TPaymentIdentity & {
|
|
265
|
+
user?: TUserProps | undefined;
|
|
266
|
+
order?: TOrderProps | undefined;
|
|
267
|
+
onSuccess?: () => void;
|
|
268
|
+
onError?: () => void;
|
|
269
|
+
};
|
|
270
|
+
type APCardPayment = TPaymentIdentity & {
|
|
305
271
|
showPaymentSummary?: boolean | undefined;
|
|
306
272
|
expirationDateFormat?: 'MM/YYYY' | 'MM/YY' | undefined;
|
|
307
|
-
order?:
|
|
308
|
-
id?: string;
|
|
309
|
-
items?: Array<{
|
|
310
|
-
name: string;
|
|
311
|
-
description?: string;
|
|
312
|
-
units: number;
|
|
313
|
-
amount: {
|
|
314
|
-
currency: string;
|
|
315
|
-
value: number;
|
|
316
|
-
};
|
|
317
|
-
}>;
|
|
318
|
-
summary?: {
|
|
319
|
-
totalAmount: {
|
|
320
|
-
currency: string;
|
|
321
|
-
value: number;
|
|
322
|
-
};
|
|
323
|
-
shipping?: {
|
|
324
|
-
label: string;
|
|
325
|
-
amount: {
|
|
326
|
-
currency: string;
|
|
327
|
-
value: number;
|
|
328
|
-
};
|
|
329
|
-
};
|
|
330
|
-
fees?: {
|
|
331
|
-
label: string;
|
|
332
|
-
amount: {
|
|
333
|
-
currency: string;
|
|
334
|
-
value: number;
|
|
335
|
-
};
|
|
336
|
-
};
|
|
337
|
-
};
|
|
338
|
-
} | undefined;
|
|
273
|
+
order?: TOrderProps | undefined;
|
|
339
274
|
onSuccess?: () => void;
|
|
340
275
|
onError?: () => void;
|
|
341
276
|
};
|
|
342
|
-
export type { APEnvironment, APAvailableTheme, APAvailableLanguages, APAvailableCurrencyMode, APAvailableFontScale, APComponentStyles, APCore, APFullCheckout, APPayment, APCardPayment, };
|
|
277
|
+
export type { APEnvironment, APAvailableTheme, APAvailableLanguages, APAvailableCurrencyMode, APAvailableFontScale, APComponentStyles, APCore, APFullCheckout, APPayment, APCardPayment, TNewPayment, };
|
package/package.json
CHANGED