@astropay/payments-lib 2.0.7 → 2.0.9
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 +505 -497
- package/dist/{main-CBfut1j-.js → main-OhXOviRS.js} +28251 -28182
- package/dist/{profiler-CgvEZtJD.js → profiler-D3cW_-YH.js} +1 -1
- package/dist/{startRecording-DhpIoc4r.js → startRecording-D2fB2eZp.js} +1 -1
- package/dist/types/index.d.ts +57 -120
- 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-OhXOviRS.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,144 +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
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
value: number;
|
|
273
|
-
};
|
|
274
|
-
}>;
|
|
275
|
-
summary?: {
|
|
276
|
-
totalAmount: {
|
|
277
|
-
currency: string;
|
|
278
|
-
value: number;
|
|
279
|
-
};
|
|
280
|
-
shipping?: {
|
|
281
|
-
label: string;
|
|
282
|
-
amount: {
|
|
283
|
-
currency: string;
|
|
284
|
-
value: number;
|
|
285
|
-
};
|
|
286
|
-
};
|
|
287
|
-
fees?: {
|
|
288
|
-
label: string;
|
|
289
|
-
amount: {
|
|
290
|
-
currency: string;
|
|
291
|
-
value: number;
|
|
292
|
-
};
|
|
293
|
-
};
|
|
294
|
-
};
|
|
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;
|
|
295
258
|
} | undefined;
|
|
259
|
+
user?: TUserProps | undefined;
|
|
260
|
+
order?: TOrderProps | undefined;
|
|
296
261
|
onSuccess?: () => void;
|
|
297
262
|
onError?: () => void;
|
|
298
263
|
};
|
|
299
|
-
type
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
264
|
+
type APPayment = TPaymentIdentity & {
|
|
265
|
+
user?: TUserProps | undefined;
|
|
266
|
+
order?: TOrderProps | undefined;
|
|
267
|
+
onSuccess?: () => void;
|
|
268
|
+
onError?: () => void;
|
|
269
|
+
};
|
|
270
|
+
type APCardPayment = TPaymentIdentity & {
|
|
303
271
|
showPaymentSummary?: boolean | undefined;
|
|
304
272
|
expirationDateFormat?: 'MM/YYYY' | 'MM/YY' | undefined;
|
|
305
|
-
order?:
|
|
306
|
-
id?: string;
|
|
307
|
-
items?: Array<{
|
|
308
|
-
name: string;
|
|
309
|
-
description?: string;
|
|
310
|
-
units: number;
|
|
311
|
-
amount: {
|
|
312
|
-
currency: string;
|
|
313
|
-
value: number;
|
|
314
|
-
};
|
|
315
|
-
}>;
|
|
316
|
-
summary?: {
|
|
317
|
-
totalAmount: {
|
|
318
|
-
currency: string;
|
|
319
|
-
value: number;
|
|
320
|
-
};
|
|
321
|
-
shipping?: {
|
|
322
|
-
label: string;
|
|
323
|
-
amount: {
|
|
324
|
-
currency: string;
|
|
325
|
-
value: number;
|
|
326
|
-
};
|
|
327
|
-
};
|
|
328
|
-
fees?: {
|
|
329
|
-
label: string;
|
|
330
|
-
amount: {
|
|
331
|
-
currency: string;
|
|
332
|
-
value: number;
|
|
333
|
-
};
|
|
334
|
-
};
|
|
335
|
-
};
|
|
336
|
-
} | undefined;
|
|
273
|
+
order?: TOrderProps | undefined;
|
|
337
274
|
onSuccess?: () => void;
|
|
338
275
|
onError?: () => void;
|
|
339
276
|
};
|
|
340
|
-
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