@delopay/sdk 0.271.0 → 0.274.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.
@@ -7568,8 +7568,9 @@ var BuyerAccount = class {
7568
7568
  });
7569
7569
  }
7570
7570
  /**
7571
- * A message from a confirmed record to one of its shops. Sending again with
7572
- * the same `client_message_id` returns the message the first send stored.
7571
+ * A message from a confirmed record to one of its shops. A message to a
7572
+ * closed conversation reopens it. Sending again with the same
7573
+ * `client_message_id` returns the message the first send stored.
7573
7574
  */
7574
7575
  async sendRecordMessage(record, message, options) {
7575
7576
  return this.request("POST", `/buyer-account/records/${encodeURIComponent(record)}/messages`, {
@@ -7796,8 +7797,9 @@ var BuyerPortal = class {
7796
7797
  });
7797
7798
  }
7798
7799
  /**
7799
- * A message to the shop. Sending again with the same `client_message_id`
7800
- * returns the message the first send stored; a closed conversation refuses it.
7800
+ * A message to the shop. A message to a closed conversation reopens it.
7801
+ * Sending again with the same `client_message_id` returns the message the
7802
+ * first send stored.
7801
7803
  */
7802
7804
  async sendMessage(message, options) {
7803
7805
  return this.request("POST", "/buyer-portal/messages", { body: message, ...options });
@@ -12515,6 +12517,12 @@ var CheckoutSession = class {
12515
12517
  * channel the backend's locale resolution reads; a `?locale=` query is
12516
12518
  * silently ignored by this route.
12517
12519
  *
12520
+ * `cardOnly` is a direct link to the card form (`payment_method=card`):
12521
+ * when the Stripe card form being prepared is the one the link names, its
12522
+ * PaymentIntent is created for `card` alone. `cardProvider` and
12523
+ * `cardAccount` name that form's connector and account; absent or blank
12524
+ * matches any.
12525
+ *
12518
12526
  * `GET /payment-link/data/{merchantId}/{paymentId}`
12519
12527
  */
12520
12528
  async fetchCheckoutData(params, options) {
@@ -12523,7 +12531,13 @@ var CheckoutSession = class {
12523
12531
  "GET",
12524
12532
  `/payment-link/data/${encodeURIComponent(this.merchantId)}/${encodeURIComponent(this.paymentId)}`,
12525
12533
  {
12526
- query: { theme: params?.theme, country: country || void 0 },
12534
+ query: {
12535
+ theme: params?.theme,
12536
+ country: country || void 0,
12537
+ card_only: params?.cardOnly || void 0,
12538
+ card_provider: params?.cardOnly ? params.cardProvider?.trim() || void 0 : void 0,
12539
+ card_account: params?.cardOnly ? params.cardAccount?.trim() || void 0 : void 0
12540
+ },
12527
12541
  ...options,
12528
12542
  headers: {
12529
12543
  ...params?.locale ? {
@@ -12742,22 +12756,18 @@ var CheckoutSession = class {
12742
12756
  });
12743
12757
  }
12744
12758
  /**
12745
- * Report a PayPal order's progress from `onApprove` on an experimental PayPal
12746
- * SDK pane: the approval, before asking PayPal to capture — and capture only
12747
- * once the router has it — then the capture PayPal answered, or a decline.
12748
- * When the approval's answer is lost, do not capture: report `NOT_CAPTURED`
12749
- * instead, which releases an approval the router may have recorded.
12750
- *
12751
- * The router records each on the payment and relays a capture that took money
12752
- * to e-Payouts the way e-Payouts' own PayPal page does. It does not mark the
12753
- * payment paid: that happens only on e-Payouts' notification, so poll the
12754
- * payment's status afterwards. A repeated report is answered, not recorded
12755
- * twice.
12759
+ * Report PayPal's refusal of the card or the payer on the PayPal Express or
12760
+ * Pay with card pane (for example `INSTRUMENT_DECLINED`, `PAYER_CANNOT_PAY`,
12761
+ * or `AUTHENTICATION_FAILED` for a failed 3-D Secure). The attempt is
12762
+ * recorded declined and the payment stays payable with another card or
12763
+ * method. An issue that is not a refusal, or a payment that no longer awaits
12764
+ * PayPal, is left as it is (`declined: false`). Nothing here captures: the
12765
+ * payment settles from e-Payouts' notification.
12756
12766
  *
12757
- * `POST /payment-link/{merchantId}/{paymentId}/epayouts/paypal-capture`
12767
+ * `POST /payment-link/{merchantId}/{paymentId}/epayouts/paypal-decline`
12758
12768
  */
12759
- async epayoutsPaypalCapture(params, options) {
12760
- return this.client.request("POST", `${this.linkBase}/epayouts/paypal-capture`, {
12769
+ async epayoutsPaypalDecline(params, options) {
12770
+ return this.client.request("POST", `${this.linkBase}/epayouts/paypal-decline`, {
12761
12771
  body: params,
12762
12772
  ...options,
12763
12773
  headers: this.bearerHeaders(options?.headers)
@@ -13119,6 +13129,29 @@ var CheckoutSession = class {
13119
13129
  }
13120
13130
  );
13121
13131
  }
13132
+ /**
13133
+ * Reopen a provider session the buyer switched away from, when they pick the
13134
+ * same method again, instead of opening a second session at the provider
13135
+ * (delopay-todos#401). Pass an `attempt_id` from the checkout's
13136
+ * `reopenable_attempts`; the attempt becomes the payment's active one again
13137
+ * and `redirect_url` sends the buyer back to it. Refused (`IR_16`) when the
13138
+ * payment no longer awaits a method, a payment is under way on the checkout,
13139
+ * or the session can no longer be reopened (settled, lapsed at the provider,
13140
+ * ended by the switch); open a new session as usual then.
13141
+ *
13142
+ * `POST /payments/{paymentId}/reopen-attempt` (publishable key + client secret)
13143
+ */
13144
+ async reopenAttempt(attemptId, options) {
13145
+ return this.client.request(
13146
+ "POST",
13147
+ `/payments/${encodeURIComponent(this.paymentId)}/reopen-attempt`,
13148
+ {
13149
+ body: { client_secret: this.requireClientSecret(), attempt_id: attemptId },
13150
+ ...options,
13151
+ headers: this.pkHeaders(options?.headers)
13152
+ }
13153
+ );
13154
+ }
13122
13155
  /**
13123
13156
  * Payment methods available for this payment.
13124
13157
  *
@@ -13989,4 +14022,4 @@ export {
13989
14022
  decodeNativePanes,
13990
14023
  encodeNativePanes
13991
14024
  };
13992
- //# sourceMappingURL=chunk-PTELZZG3.js.map
14025
+ //# sourceMappingURL=chunk-R6E57AD4.js.map