@delopay/sdk 0.212.0 → 0.213.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.
@@ -5026,6 +5026,94 @@ var SellToRestrictions = class {
5026
5026
  }
5027
5027
  };
5028
5028
 
5029
+ // src/resources/checkoutRecovery.ts
5030
+ var CheckoutRecovery = class {
5031
+ constructor(request) {
5032
+ this.request = request;
5033
+ }
5034
+ /**
5035
+ * A checkout's recovery: whether and when the rule reminds it, every reason
5036
+ * it does not, every message about it, and where its link goes. Any payment
5037
+ * of the checkout may be named.
5038
+ * `GET /checkout-recovery/payments/{payment_id}`
5039
+ */
5040
+ async retrieve(paymentId) {
5041
+ return this.request("GET", `/checkout-recovery/payments/${encodeURIComponent(paymentId)}`);
5042
+ }
5043
+ /**
5044
+ * No automatic reminder about this checkout from now on.
5045
+ * `POST /checkout-recovery/payments/{payment_id}/stop`
5046
+ */
5047
+ async stop(paymentId) {
5048
+ return this.request(
5049
+ "POST",
5050
+ `/checkout-recovery/payments/${encodeURIComponent(paymentId)}/stop`
5051
+ );
5052
+ }
5053
+ /**
5054
+ * Undo `stop`.
5055
+ * `POST /checkout-recovery/payments/{payment_id}/resume`
5056
+ */
5057
+ async resume(paymentId) {
5058
+ return this.request(
5059
+ "POST",
5060
+ `/checkout-recovery/payments/${encodeURIComponent(paymentId)}/resume`
5061
+ );
5062
+ }
5063
+ /**
5064
+ * A message by hand as it would be sent now: recipient, sender, text, link
5065
+ * and destination, and why it would be refused. Nothing is sent.
5066
+ * `POST /checkout-recovery/payments/{payment_id}/email/preview`
5067
+ */
5068
+ async previewEmail(paymentId, params) {
5069
+ return this.request(
5070
+ "POST",
5071
+ `/checkout-recovery/payments/${encodeURIComponent(paymentId)}/email/preview`,
5072
+ { body: params }
5073
+ );
5074
+ }
5075
+ /**
5076
+ * Send a message by hand, once per `idempotency_key`, composed again from
5077
+ * the checkout as it is now. Refused when the checkout was paid or is being
5078
+ * paid, was cancelled, the buyer unsubscribed, or no payment method could
5079
+ * pay it.
5080
+ * `POST /checkout-recovery/payments/{payment_id}/email`
5081
+ */
5082
+ async sendEmail(paymentId, params) {
5083
+ return this.request(
5084
+ "POST",
5085
+ `/checkout-recovery/payments/${encodeURIComponent(paymentId)}/email`,
5086
+ { body: params, bodyIdempotencyKey: params.idempotency_key ?? null }
5087
+ );
5088
+ }
5089
+ /**
5090
+ * Messages to buyers, newest first.
5091
+ * `GET /checkout-recovery/reminders`
5092
+ */
5093
+ async listReminders(params) {
5094
+ if (params) {
5095
+ return this.request("GET", "/checkout-recovery/reminders", { query: { ...params } });
5096
+ }
5097
+ return this.request("GET", "/checkout-recovery/reminders");
5098
+ }
5099
+ /**
5100
+ * The shop's recent checkouts judged under a rule (the stored one, or the
5101
+ * one given) as if switched on, with every reason. Nothing is sent.
5102
+ * `POST /checkout-recovery/candidates`
5103
+ */
5104
+ async previewCandidates(params = {}) {
5105
+ return this.request("POST", "/checkout-recovery/candidates", { body: params });
5106
+ }
5107
+ /**
5108
+ * A reminder with sample values, to the signed-in user's own address.
5109
+ * Dashboard sessions only.
5110
+ * `POST /checkout-recovery/test-email`
5111
+ */
5112
+ async sendTestEmail(params) {
5113
+ return this.request("POST", "/checkout-recovery/test-email", { body: params });
5114
+ }
5115
+ };
5116
+
5029
5117
  // src/resources/costRules.ts
5030
5118
  var CostRules = class {
5031
5119
  constructor(request) {
@@ -7488,6 +7576,7 @@ var Delopay = class {
7488
7576
  this.regions = new Regions(request);
7489
7577
  this.availabilityOverrides = new AvailabilityOverrides(request);
7490
7578
  this.sellToRestrictions = new SellToRestrictions(request);
7579
+ this.checkoutRecovery = new CheckoutRecovery(request);
7491
7580
  this.costRules = new CostRules(request);
7492
7581
  this.externalRecords = new ExternalRecords(request);
7493
7582
  this.products = new Products(request);
@@ -11489,6 +11578,7 @@ export {
11489
11578
  Regions,
11490
11579
  AvailabilityOverrides,
11491
11580
  SellToRestrictions,
11581
+ CheckoutRecovery,
11492
11582
  CostRules,
11493
11583
  ExternalRecords,
11494
11584
  Products,
@@ -11692,4 +11782,4 @@ export {
11692
11782
  decodeNativePanes,
11693
11783
  encodeNativePanes
11694
11784
  };
11695
- //# sourceMappingURL=chunk-UKKUBVQJ.js.map
11785
+ //# sourceMappingURL=chunk-BL5Y5CSM.js.map