@openrails/billing-ui 0.247.0 → 0.248.1

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.
@@ -186,11 +186,11 @@ function T(e, t) {
186
186
  let n = e < 0n ? -e : e, r = 10n ** BigInt(t), i = (n % r).toString().padStart(t, "0").replace(/0+$/, "");
187
187
  return `${e < 0n ? "-" : ""}${n / r}${i ? `.${i}` : ""}`;
188
188
  }
189
- function re(e, t) {
189
+ function E(e, t) {
190
190
  let n = x(e);
191
191
  return n === null || !C(t) ? null : T(n, t);
192
192
  }
193
- function E(e, t, n) {
193
+ function D(e, t, n) {
194
194
  let r = x(e);
195
195
  if (r === null || !C(t) || !C(n) || n > t) return null;
196
196
  let i = 10n ** BigInt(t - n);
@@ -198,7 +198,7 @@ function E(e, t, n) {
198
198
  let a = r / i;
199
199
  return a > BigInt(2 ** 53 - 1) || a < -BigInt(2 ** 53 - 1) ? null : Number(a);
200
200
  }
201
- function ie(e, t) {
201
+ function re(e, t) {
202
202
  if (!C(t) || e.length > 40) return null;
203
203
  let n = /^(-?)(\d+)(?:\.(\d+))?$/.exec(e);
204
204
  if (!n) return null;
@@ -207,7 +207,7 @@ function ie(e, t) {
207
207
  let i = BigInt(n[2]) * 10n ** BigInt(t) + BigInt(r.padEnd(t, "0") || "0"), a = n[1] ? -i : i;
208
208
  return a < y || a > b ? null : a.toString();
209
209
  }
210
- function ae(e, t, n, r) {
210
+ function ie(e, t, n, r) {
211
211
  let i = t.trim().toUpperCase(), a = x(e);
212
212
  if (a === null || !C(n)) return `${i} amount exceeds the exact display range`;
213
213
  if (!ne && (a >= w || a <= -w)) return `${i} amount exceeds this browser's exact display range`;
@@ -224,7 +224,7 @@ function ae(e, t, n, r) {
224
224
  }
225
225
  //#endregion
226
226
  //#region src/client/types.ts
227
- var D = e.string().refine(S, "amount must be an int64 string"), O = e.string(), k = (t) => e.object({
227
+ var O = e.string().refine(S, "amount must be an int64 string"), k = e.string(), ae = (t) => e.object({
228
228
  data: e.array(t).nullish().transform((e) => e ?? []),
229
229
  total: e.number().nullish(),
230
230
  limit: e.number().nullish(),
@@ -245,19 +245,19 @@ var D = e.string().refine(S, "amount must be an int64 string"), O = e.string(),
245
245
  version: e.number().int().nonnegative().optional(),
246
246
  product_id: e.string(),
247
247
  archived: e.boolean(),
248
- unit_amount: D,
248
+ unit_amount: O,
249
249
  customer_amount: e.object({
250
- min_amount: D,
251
- max_amount: D
250
+ min_amount: O,
251
+ max_amount: O
252
252
  }).nullish(),
253
253
  currency: e.string(),
254
254
  access_duration_hours: e.number().nullable(),
255
255
  billing_interval_hours: e.number().nullable(),
256
- trial_unit_amount: D.nullable(),
256
+ trial_unit_amount: O.nullable(),
257
257
  trial_duration_hours: e.number().nullable(),
258
258
  psps: e.record(e.string(), M).nullish(),
259
- created_at: O,
260
- updated_at: O
259
+ created_at: k,
260
+ updated_at: k
261
261
  }), P = e.object({
262
262
  id: e.string(),
263
263
  key: e.string().nullish(),
@@ -285,8 +285,8 @@ var D = e.string().refine(S, "amount must be an int64 string"), O = e.string(),
285
285
  }), se = e.object({
286
286
  attempts: e.number(),
287
287
  retries_left: e.number().nullish(),
288
- next_retry_at: O.nullish(),
289
- final_retry_at: O.nullish(),
288
+ next_retry_at: k.nullish(),
289
+ final_retry_at: k.nullish(),
290
290
  waiting_for_new_card: e.boolean(),
291
291
  last_failure_reason: e.string().nullish()
292
292
  }), L = e.object({
@@ -299,19 +299,19 @@ var D = e.string().refine(S, "amount must be an int64 string"), O = e.string(),
299
299
  psp_id: e.string().nullish(),
300
300
  collection_policy: e.string().nullish(),
301
301
  payment_method_id: e.string().nullish(),
302
- started_at: O.nullish(),
303
- ended_at: O.nullish(),
304
- current_period_starts_at: O.nullish(),
305
- current_period_ends_at: O.nullish(),
306
- canceled_at: O.nullish(),
302
+ started_at: k.nullish(),
303
+ ended_at: k.nullish(),
304
+ current_period_starts_at: k.nullish(),
305
+ current_period_ends_at: k.nullish(),
306
+ canceled_at: k.nullish(),
307
307
  cancel_type: e.string().nullish(),
308
308
  resumable: e.boolean().nullish(),
309
309
  cancel_scheduled: e.boolean().nullish(),
310
310
  cancel_mode: e.string().nullish(),
311
311
  cancel_portal_url: e.string().nullish(),
312
312
  access: e.object({
313
- starts_at: O,
314
- ends_at: O.nullish()
313
+ starts_at: k,
314
+ ends_at: k.nullish()
315
315
  }).nullish(),
316
316
  dunning: se.nullish(),
317
317
  price: N.nullish(),
@@ -319,7 +319,7 @@ var D = e.string().refine(S, "amount must be an int64 string"), O = e.string(),
319
319
  scheduled_change: e.object({
320
320
  price_id: e.string(),
321
321
  quantity: e.number().nullish(),
322
- effective_at: O,
322
+ effective_at: k,
323
323
  source: e.string(),
324
324
  price: N.nullish(),
325
325
  product: P.nullish()
@@ -327,8 +327,8 @@ var D = e.string().refine(S, "amount must be an int64 string"), O = e.string(),
327
327
  card: F.nullish(),
328
328
  recovery: oe.nullish(),
329
329
  next_action: I.nullish(),
330
- created_at: O.nullish(),
331
- updated_at: O.nullish()
330
+ created_at: k.nullish(),
331
+ updated_at: k.nullish()
332
332
  }), R = e.object({
333
333
  name: e.string().nullish(),
334
334
  email: e.string().nullish(),
@@ -356,7 +356,7 @@ var D = e.string().refine(S, "amount must be an int64 string"), O = e.string(),
356
356
  reusable: e.boolean().nullish(),
357
357
  health: e.object({
358
358
  expiry_status: e.string().nullish(),
359
- last_charged_at: O.nullish(),
359
+ last_charged_at: k.nullish(),
360
360
  last_charge_outcome: e.string().nullish(),
361
361
  active: e.boolean().nullish()
362
362
  }).nullish(),
@@ -365,7 +365,7 @@ var D = e.string().refine(S, "amount must be an int64 string"), O = e.string(),
365
365
  display_name: e.string().nullish()
366
366
  })).nullish(),
367
367
  default_currencies: e.array(e.string()).nullish(),
368
- created_at: O.nullish()
368
+ created_at: k.nullish()
369
369
  }), B = e.object({
370
370
  reason: e.string(),
371
371
  message: e.string(),
@@ -377,8 +377,8 @@ var D = e.string().refine(S, "amount must be an int64 string"), O = e.string(),
377
377
  source: e.string().nullish(),
378
378
  description: e.string(),
379
379
  quantity: e.number().nullish(),
380
- unit_amount: D,
381
- amount: D,
380
+ unit_amount: O,
381
+ amount: O,
382
382
  billing_interval_hours: e.number().nullish(),
383
383
  access_duration_hours: e.number().nullish(),
384
384
  subscription_id: e.string().nullish(),
@@ -387,10 +387,20 @@ var D = e.string().refine(S, "amount must be an int64 string"), O = e.string(),
387
387
  id: e.string(),
388
388
  customer_id: e.string(),
389
389
  origin: e.string(),
390
+ collection_owner: e.string().nullish(),
391
+ collection_psp_id: e.string().nullish(),
392
+ provider_bills: e.array(e.object({
393
+ psp_id: e.string(),
394
+ kind: e.string(),
395
+ reference: e.string(),
396
+ settlement_source: e.string().nullish(),
397
+ non_cash_amount: O,
398
+ settled_at: k.nullish()
399
+ })).nullish().transform((e) => e ?? []),
390
400
  status: e.string(),
391
401
  number: e.string().nullish(),
392
402
  currency: e.string(),
393
- total: D,
403
+ total: O,
394
404
  lines: e.array(V),
395
405
  payment: e.object({
396
406
  status: e.string(),
@@ -407,36 +417,36 @@ var D = e.string().refine(S, "amount must be an int64 string"), O = e.string(),
407
417
  checkout: e.object({
408
418
  url: e.string().nullish(),
409
419
  ui_mode: e.enum(["hosted", "embedded"]).catch("hosted"),
410
- expires_at: O,
420
+ expires_at: k,
411
421
  success_url: e.string(),
412
422
  cancel_url: e.string().nullish(),
413
423
  saved_payment_methods: e.boolean()
414
424
  }).nullish(),
415
425
  renewal: e.object({
416
426
  subscription_id: e.string(),
417
- period_starts_at: O,
418
- period_ends_at: O,
419
- due_at: O
427
+ period_starts_at: k,
428
+ period_ends_at: k,
429
+ due_at: k
420
430
  }).nullish(),
421
431
  usage: e.object({
422
- period_starts_at: O,
423
- period_ends_at: O,
424
- due_at: O,
425
- amount_paid: D,
426
- amount_due: D,
432
+ period_starts_at: k,
433
+ period_ends_at: k,
434
+ due_at: k,
435
+ amount_paid: O,
436
+ amount_due: O,
427
437
  collection_method: e.string(),
428
- next_collection_attempt_at: O.nullish(),
438
+ next_collection_attempt_at: k.nullish(),
429
439
  po_number: e.string().nullish(),
430
440
  memo: e.string().nullish(),
431
441
  delinquent: e.boolean()
432
442
  }).nullish(),
433
- expires_at: O.nullish(),
434
- completed_at: O.nullish(),
435
- canceled_at: O.nullish(),
436
- expired_at: O.nullish(),
437
- voided_at: O.nullish(),
438
- uncollectible_at: O.nullish(),
439
- created_at: O
443
+ expires_at: k.nullish(),
444
+ completed_at: k.nullish(),
445
+ canceled_at: k.nullish(),
446
+ expired_at: k.nullish(),
447
+ voided_at: k.nullish(),
448
+ uncollectible_at: k.nullish(),
449
+ created_at: k
440
450
  }), U = e.object({
441
451
  code: e.string(),
442
452
  message: e.string(),
@@ -447,19 +457,19 @@ var D = e.string().refine(S, "amount must be an int64 string"), O = e.string(),
447
457
  product_id: e.string(),
448
458
  description: e.string(),
449
459
  quantity: e.number().nullish(),
450
- unit_amount: D,
451
- amount: D,
460
+ unit_amount: O,
461
+ amount: O,
452
462
  ownership: e.string(),
453
463
  billing_interval_hours: e.number().nullish(),
454
464
  access_duration_hours: e.number().nullish(),
455
465
  refusal: U.nullish()
456
466
  }), G = e.object({
457
467
  currency: e.string(),
458
- total: D,
468
+ total: O,
459
469
  lines: e.array(W),
460
470
  payment_options: H.shape.payment_options,
461
- last_changed_at: O.nullish(),
462
- expires_at: O.nullish()
471
+ last_changed_at: k.nullish(),
472
+ expires_at: k.nullish()
463
473
  }), K = e.object({
464
474
  id: e.string(),
465
475
  key: e.string(),
@@ -469,7 +479,7 @@ var D = e.string().refine(S, "amount must be an int64 string"), O = e.string(),
469
479
  entitlements: e.array(e.string()),
470
480
  credit_grant: e.object({
471
481
  currency: e.string(),
472
- amount: D.nullish(),
482
+ amount: O.nullish(),
473
483
  from_payment: e.boolean().optional(),
474
484
  expires_after_days: e.number().int().positive().nullish()
475
485
  }).nullish(),
@@ -477,42 +487,44 @@ var D = e.string().refine(S, "amount must be an int64 string"), O = e.string(),
477
487
  tier_rank: e.number(),
478
488
  archived: e.boolean(),
479
489
  prices: e.array(N).nullish().transform((e) => e ?? []),
480
- created_at: O,
481
- updated_at: O
490
+ created_at: k,
491
+ updated_at: k
482
492
  }), ce = e.object({
483
493
  id: e.string(),
484
494
  kind: e.string(),
485
495
  status: e.string(),
486
- amount: D,
487
- amount_refunded: D.nullish(),
496
+ amount: O,
497
+ amount_refunded: O.nullish(),
488
498
  currency: e.string(),
489
499
  subscription_id: e.string().nullish(),
490
- price_id: e.string().nullish(),
500
+ order_id: e.string().nullish(),
491
501
  channel: e.string().nullish(),
492
502
  rail: e.string().nullish(),
493
- created_at: O,
494
- price: N.nullish(),
495
- product: P.nullish(),
503
+ created_at: k,
496
504
  card: F.nullish(),
497
505
  failure: e.object({
498
506
  reason: e.string(),
499
507
  message: e.string(),
500
508
  field: e.string().nullish()
501
509
  }).nullish()
510
+ }), q = e.object({
511
+ customer_id: e.string(),
512
+ entitlement: e.string(),
513
+ quantity: e.number().int().nullable()
502
514
  }), le = e.object({
503
515
  currency: e.string(),
504
516
  billing_mode: e.string(),
505
- balance_amount: D,
506
- held_amount: D,
507
- accrued_amount: D,
508
- available_amount: D,
509
- owed_amount: D,
510
- accrual_rate_per_hour: D,
517
+ balance_amount: O,
518
+ held_amount: O,
519
+ accrued_amount: O,
520
+ available_amount: O,
521
+ owed_amount: O,
522
+ accrual_rate_per_hour: O,
511
523
  as_of: e.string(),
512
524
  depletes_at: e.string().nullable()
513
- }), q = e.object({
525
+ }), J = e.object({
514
526
  currency: e.string(),
515
- amount: D,
527
+ amount: O,
516
528
  runway_hours: e.number().int(),
517
529
  source: e.enum([
518
530
  "customer",
@@ -526,19 +538,19 @@ var D = e.string().refine(S, "amount must be an int64 string"), O = e.string(),
526
538
  currency: e.string(),
527
539
  payment_method_id: e.string()
528
540
  })),
529
- low_balance_lines: e.array(q)
541
+ low_balance_lines: e.array(J)
530
542
  }), de = e.object({
531
543
  key: e.string(),
532
544
  cell: e.string().nullish(),
533
545
  event_count: e.number(),
534
- amount: D,
546
+ amount: O,
535
547
  quantity: e.number().nullish(),
536
548
  dimensions: e.record(e.string(), e.number()).nullish()
537
549
  }), fe = e.object({
538
550
  customer_id: e.string(),
539
551
  currency: e.string(),
540
- from: O,
541
- to: O,
552
+ from: k,
553
+ to: k,
542
554
  group_by: e.string(),
543
555
  rows: e.array(de),
544
556
  next_cursor: e.string().nullish().transform((e) => e ?? null)
@@ -551,24 +563,24 @@ var D = e.string().refine(S, "amount must be an int64 string"), O = e.string(),
551
563
  quantity: e.number().nullish(),
552
564
  rail: e.string().nullish(),
553
565
  currency: e.string(),
554
- amount_due_now: D,
555
- next_charge_amount: D,
556
- next_charge_date: O.nullish(),
566
+ amount_due_now: O,
567
+ next_charge_amount: O,
568
+ next_charge_date: k.nullish(),
557
569
  effective: e.string(),
558
570
  is_estimate: e.boolean().nullish(),
559
571
  message: e.string().nullish()
560
- }), J = e.object({
572
+ }), Y = e.object({
561
573
  status: e.string(),
562
574
  effective: e.string().nullish(),
563
575
  price_id: e.string().nullish(),
564
576
  quantity: e.number().nullish(),
565
577
  subscription_id: e.string().nullish(),
566
578
  next_action: I.nullish(),
567
- delayed_start: O.nullish(),
579
+ delayed_start: k.nullish(),
568
580
  currency: e.string().nullish(),
569
- amount_due_now: D.nullish(),
570
- next_charge_amount: D.nullish(),
571
- next_charge_date: O.nullish(),
581
+ amount_due_now: O.nullish(),
582
+ next_charge_amount: O.nullish(),
583
+ next_charge_date: k.nullish(),
572
584
  message: e.string().nullish()
573
585
  }), he = e.object({
574
586
  psps: e.array(u).nullish().transform((e) => e ?? []),
@@ -613,7 +625,7 @@ var D = e.string().refine(S, "amount must be an int64 string"), O = e.string(),
613
625
  }), be = e.object({
614
626
  id: e.string(),
615
627
  nonce: e.string(),
616
- expires_at: O
628
+ expires_at: k
617
629
  }), xe = e.object({
618
630
  id: e.string(),
619
631
  merchant_id: e.string(),
@@ -621,15 +633,15 @@ var D = e.string().refine(S, "amount must be an int64 string"), O = e.string(),
621
633
  account_id: e.string(),
622
634
  method: e.string(),
623
635
  status: e.string(),
624
- linked_at: O,
625
- revoked_at: O.nullish(),
636
+ linked_at: k,
637
+ revoked_at: k.nullish(),
626
638
  revoked_by: e.string().nullish()
627
- }), Y = class extends Error {
639
+ }), X = class extends Error {
628
640
  constructor(e = "The wallet request was declined.") {
629
641
  super(e), this.name = "WalletRejectedError";
630
642
  }
631
- }, Se = 4, Ce = 500, X = (e) => e?.type === "solana_sign_transactions" && !!e.transactions?.length;
632
- async function we(e, t) {
643
+ }, Se = 4, Ce = 500, we = (e) => e?.type === "solana_sign_transactions" && !!e.transactions?.length;
644
+ async function Te(e, t) {
633
645
  let n = "";
634
646
  for (let r of e.transactions ?? []) {
635
647
  try {
@@ -642,9 +654,9 @@ async function we(e, t) {
642
654
  if (!n) throw i("wallet_no_signature", "The wallet returned no signature.");
643
655
  return n;
644
656
  }
645
- var Te = 2e3, Z = 300;
646
- function Ee(e) {
647
- let t = De(e.headers.get("Retry-After"));
657
+ var Ee = 2e3, Z = 300;
658
+ function De(e) {
659
+ let t = Oe(e.headers.get("Retry-After"));
648
660
  switch (e.status) {
649
661
  case 429: return t;
650
662
  case 503: return t ?? Z;
@@ -653,7 +665,7 @@ function Ee(e) {
653
665
  default: return null;
654
666
  }
655
667
  }
656
- function De(e) {
668
+ function Oe(e) {
657
669
  if (!e) return null;
658
670
  if (/^\d+$/.test(e.trim())) return Number(e.trim()) * 1e3;
659
671
  let t = Date.parse(e);
@@ -670,8 +682,8 @@ function Q(e, t) {
670
682
  t?.addEventListener("abort", a, { once: !0 });
671
683
  });
672
684
  }
673
- function Oe(e = {}) {
674
- let t = (e.baseUrl ?? "/billing/v1").replace(/\/+$/, ""), r = e.fetch ?? ((e, t) => fetch(e, t)), o = ke({
685
+ function ke(e = {}) {
686
+ let t = (e.baseUrl ?? "/billing/v1").replace(/\/+$/, ""), r = e.fetch ?? ((e, t) => fetch(e, t)), o = Ae({
675
687
  ...s,
676
688
  ...e.currencies
677
689
  });
@@ -715,7 +727,7 @@ function Oe(e = {}) {
715
727
  e.getToken.invalidate(o), o = await e.getToken(), i.set("Authorization", `Bearer ${o}`), p = !0, s--;
716
728
  continue;
717
729
  }
718
- let m = Ee(l);
730
+ let m = De(l);
719
731
  if (s >= d || m === null || f + m > 2e3) throw await a(l);
720
732
  await l.body?.cancel().catch(() => void 0), f += await Q(m, n.signal);
721
733
  }
@@ -731,11 +743,11 @@ function Oe(e = {}) {
731
743
  if (!o.success) throw i("invalid_response", `${t}: ${o.error.issues[0]?.path.join(".")} ${o.error.issues[0]?.message}`);
732
744
  return o.data;
733
745
  }
734
- let d = (e) => encodeURIComponent(e), f = A(L), p = A(z), m = A(ce), h = A(H), g = (e, t) => ({
746
+ let d = (e) => encodeURIComponent(e), f = A(L), p = A(z), m = A(ce), h = A(H), g = A(q), _ = (e, t) => ({
735
747
  limit: e.limit ?? t,
736
748
  cursor: e.cursor ?? void 0
737
- }), _ = k(K);
738
- async function v(e, t) {
749
+ }), v = ae(K);
750
+ async function y(e, t) {
739
751
  try {
740
752
  return { order: await u(H, e, t) };
741
753
  } catch (e) {
@@ -755,7 +767,7 @@ function Oe(e = {}) {
755
767
  return u(f, "/me/subscriptions", {
756
768
  query: {
757
769
  status: e.status ?? "all",
758
- ...g(e, 100)
770
+ ..._(e, 100)
759
771
  },
760
772
  signal: e.signal
761
773
  });
@@ -795,13 +807,13 @@ function Oe(e = {}) {
795
807
  });
796
808
  },
797
809
  confirmSubscriptionChange(e) {
798
- return u(J, `/me/subscriptions/${d(e)}/confirm`, {
810
+ return u(Y, `/me/subscriptions/${d(e)}/confirm`, {
799
811
  method: "POST",
800
812
  body: {}
801
813
  });
802
814
  },
803
815
  changeSubscription(e, t) {
804
- return u(J, `/me/subscriptions/${d(e)}/change`, {
816
+ return u(Y, `/me/subscriptions/${d(e)}/change`, {
805
817
  method: "POST",
806
818
  body: {
807
819
  price_id: t.priceId,
@@ -813,7 +825,7 @@ function Oe(e = {}) {
813
825
  },
814
826
  listPaymentMethods(e = {}) {
815
827
  return u(p, "/me/payment-methods", {
816
- query: g(e, 100),
828
+ query: _(e, 100),
817
829
  signal: e.signal
818
830
  });
819
831
  },
@@ -837,7 +849,7 @@ function Oe(e = {}) {
837
849
  await l("/me/cart", { method: "DELETE" });
838
850
  },
839
851
  createOrder(e) {
840
- return v("/me/orders", {
852
+ return y("/me/orders", {
841
853
  method: "POST",
842
854
  body: {
843
855
  ...e.cart ? { cart: !0 } : { lines: e.lines ?? [] },
@@ -849,9 +861,12 @@ function Oe(e = {}) {
849
861
  });
850
862
  },
851
863
  listOrders(e = {}) {
852
- return u(h, "/me/orders", {
864
+ return e.ids?.length ? u(h, "/me/orders", {
865
+ query: { ids: e.ids.join(",") },
866
+ signal: e.signal
867
+ }) : u(h, "/me/orders", {
853
868
  query: {
854
- ...g(e, 20),
869
+ ..._(e, 20),
855
870
  origin: e.origin,
856
871
  status: e.status,
857
872
  subscription_id: e.subscriptionId,
@@ -864,7 +879,7 @@ function Oe(e = {}) {
864
879
  return u(H, `/me/orders/${d(e)}`, { signal: t });
865
880
  },
866
881
  payOrder(e, t) {
867
- return v(`/me/orders/${d(e)}/pay`, {
882
+ return y(`/me/orders/${d(e)}/pay`, {
868
883
  method: "POST",
869
884
  body: {
870
885
  payment: t.payment,
@@ -875,7 +890,7 @@ function Oe(e = {}) {
875
890
  });
876
891
  },
877
892
  confirmOrder(e, t) {
878
- return v(`/me/orders/${d(e)}/confirm`, {
893
+ return y(`/me/orders/${d(e)}/confirm`, {
879
894
  method: "POST",
880
895
  body: t?.signature ? { signature: t.signature } : {}
881
896
  });
@@ -898,17 +913,27 @@ function Oe(e = {}) {
898
913
  listPayments(e = {}) {
899
914
  return u(m, "/me/payments", {
900
915
  query: {
901
- ...g(e, 20),
916
+ ..._(e, 20),
902
917
  rail: e.rail
903
918
  },
904
919
  signal: e.signal
905
920
  });
906
921
  },
922
+ getEntitlements(e = {}) {
923
+ return u(g, "/me/entitlements", {
924
+ query: {
925
+ ..._(e, 500),
926
+ at: e.at,
927
+ prefix: e.prefix
928
+ },
929
+ signal: e.signal
930
+ });
931
+ },
907
932
  getAccount(e) {
908
933
  return u(ue, "/me", { signal: e });
909
934
  },
910
935
  setLowBalanceLine(e) {
911
- return u(q, `/me/low-balance-lines/${d(e.currency.toUpperCase())}`, {
936
+ return u(J, `/me/low-balance-lines/${d(e.currency.toUpperCase())}`, {
912
937
  method: "PUT",
913
938
  body: {
914
939
  amount: e.amount,
@@ -933,7 +958,7 @@ function Oe(e = {}) {
933
958
  return e.keys.length === 0 ? {
934
959
  data: [],
935
960
  next_cursor: null
936
- } : u(_, "/products", {
961
+ } : u(v, "/products", {
937
962
  query: {
938
963
  merchant: e.merchant,
939
964
  keys: e.keys
@@ -969,11 +994,11 @@ function Oe(e = {}) {
969
994
  currencies: o
970
995
  };
971
996
  }
972
- function ke(e) {
997
+ function Ae(e) {
973
998
  return Object.fromEntries(Object.entries(e).map(([e, t]) => [e.toUpperCase(), t]));
974
999
  }
975
- var $ = (e) => e instanceof Y || e instanceof Error && e.name === "WalletRejectedError" || e instanceof t && e.code === "wallet_rejected";
1000
+ var $ = (e) => e instanceof X || e instanceof Error && e.name === "WalletRejectedError" || e instanceof t && e.code === "wallet_rejected";
976
1001
  //#endregion
977
- export { t as C, a as D, i as E, o as O, c as S, r as T, p as _, Oe as a, u as b, we as c, E as d, ie as f, _ as g, v as h, Y as i, te as l, S as m, Se as n, X as o, ae as p, Te as r, $ as s, Ce as t, re as u, g as v, n as w, l as x, d as y };
1002
+ export { t as C, a as D, i as E, o as O, c as S, r as T, p as _, ke as a, u as b, Te as c, D as d, re as f, _ as g, v as h, X as i, te as l, S as m, Se as n, we as o, ie as p, Ee as r, $ as s, Ce as t, E as u, g as v, n as w, l as x, d as y };
978
1003
 
979
- //# sourceMappingURL=client-CfiKK7wX.js.map
1004
+ //# sourceMappingURL=client-DoRYitD3.js.map