@delopay/sdk 0.270.0 → 0.272.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.
package/dist/index.cjs CHANGED
@@ -923,8 +923,10 @@ var Connectors = class {
923
923
  );
924
924
  }
925
925
  /**
926
- * Stop a connector serving one shop it is shared with. The home shop is
927
- * refused: it holds the connector's name, limits and webhook.
926
+ * Stop a connector serving one shop (todos#407). Any shop may leave, the
927
+ * one the connector was created in included, while another one stays: the
928
+ * last shop is refused, and the connector is deleted instead. The account,
929
+ * its limits and every other shop on it are unaffected.
928
930
  * `DELETE /account/{accountId}/connectors/{connectorId}/shops/{profileId}`
929
931
  */
930
932
  async removeShop(accountId, connectorId, profileId) {
@@ -13018,22 +13020,18 @@ var CheckoutSession = class {
13018
13020
  });
13019
13021
  }
13020
13022
  /**
13021
- * Report a PayPal order's progress from `onApprove` on an experimental PayPal
13022
- * SDK pane: the approval, before asking PayPal to capture — and capture only
13023
- * once the router has it — then the capture PayPal answered, or a decline.
13024
- * When the approval's answer is lost, do not capture: report `NOT_CAPTURED`
13025
- * instead, which releases an approval the router may have recorded.
13023
+ * Report PayPal's refusal of the card or the payer on the PayPal Express or
13024
+ * Pay with card pane (for example `INSTRUMENT_DECLINED`, `PAYER_CANNOT_PAY`,
13025
+ * or `AUTHENTICATION_FAILED` for a failed 3-D Secure). The attempt is
13026
+ * recorded declined and the payment stays payable with another card or
13027
+ * method. An issue that is not a refusal, or a payment that no longer awaits
13028
+ * PayPal, is left as it is (`declined: false`). Nothing here captures: the
13029
+ * payment settles from e-Payouts' notification.
13026
13030
  *
13027
- * The router records each on the payment and relays a capture that took money
13028
- * to e-Payouts the way e-Payouts' own PayPal page does. It does not mark the
13029
- * payment paid: that happens only on e-Payouts' notification, so poll the
13030
- * payment's status afterwards. A repeated report is answered, not recorded
13031
- * twice.
13032
- *
13033
- * `POST /payment-link/{merchantId}/{paymentId}/epayouts/paypal-capture`
13031
+ * `POST /payment-link/{merchantId}/{paymentId}/epayouts/paypal-decline`
13034
13032
  */
13035
- async epayoutsPaypalCapture(params, options) {
13036
- return this.client.request("POST", `${this.linkBase}/epayouts/paypal-capture`, {
13033
+ async epayoutsPaypalDecline(params, options) {
13034
+ return this.client.request("POST", `${this.linkBase}/epayouts/paypal-decline`, {
13037
13035
  body: params,
13038
13036
  ...options,
13039
13037
  headers: this.bearerHeaders(options?.headers)
@@ -13395,6 +13393,29 @@ var CheckoutSession = class {
13395
13393
  }
13396
13394
  );
13397
13395
  }
13396
+ /**
13397
+ * Reopen a provider session the buyer switched away from, when they pick the
13398
+ * same method again, instead of opening a second session at the provider
13399
+ * (delopay-todos#401). Pass an `attempt_id` from the checkout's
13400
+ * `reopenable_attempts`; the attempt becomes the payment's active one again
13401
+ * and `redirect_url` sends the buyer back to it. Refused (`IR_16`) when the
13402
+ * payment no longer awaits a method, a payment is under way on the checkout,
13403
+ * or the session can no longer be reopened (settled, lapsed at the provider,
13404
+ * ended by the switch); open a new session as usual then.
13405
+ *
13406
+ * `POST /payments/{paymentId}/reopen-attempt` (publishable key + client secret)
13407
+ */
13408
+ async reopenAttempt(attemptId, options) {
13409
+ return this.client.request(
13410
+ "POST",
13411
+ `/payments/${encodeURIComponent(this.paymentId)}/reopen-attempt`,
13412
+ {
13413
+ body: { client_secret: this.requireClientSecret(), attempt_id: attemptId },
13414
+ ...options,
13415
+ headers: this.pkHeaders(options?.headers)
13416
+ }
13417
+ );
13418
+ }
13398
13419
  /**
13399
13420
  * Payment methods available for this payment.
13400
13421
  *