@delopay/sdk 0.379.0 → 0.383.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
@@ -6579,6 +6579,21 @@ var Analytics = class {
6579
6579
  query: params
6580
6580
  });
6581
6581
  }
6582
+ /**
6583
+ * PSP analytics: routed payments, outcomes, volume and payment sizes per
6584
+ * connector and per connector account over one window, with the breakdown
6585
+ * by project and shop. Pinned server-side to your own merchant
6586
+ * (`merchant_id` is ignored) and to your shop for a shop-scoped user. Live
6587
+ * payments unless `test_mode` is `true`. Amounts are in USD unless
6588
+ * `currency` names one. Pass `sections` to compute only some blocks.
6589
+ * A role that may see no processor gets a 403.
6590
+ * `GET /analytics/connectors`
6591
+ */
6592
+ async connectors(params) {
6593
+ return this.request("GET", "/analytics/connectors", {
6594
+ query: params
6595
+ });
6596
+ }
6582
6597
  /**
6583
6598
  * Device analytics over the canonical client-context observation per
6584
6599
  * payment (browser/platform families, device classes and models, checkout
@@ -16471,6 +16486,68 @@ var CheckoutSession = class {
16471
16486
  headers: this.bearerHeaders(options?.headers)
16472
16487
  });
16473
16488
  }
16489
+ /**
16490
+ * Mail the buyer a code that confirms their email, so the payment can reuse
16491
+ * a verification the merchant already has for them. Offer it only while the
16492
+ * checkout data says `identity_verification_reuse_allowed`. The answer is
16493
+ * the same whether or not the merchant verified anyone with the address.
16494
+ *
16495
+ * Refusals throw a `DelopayError`: `400` with code `DE_26` and the reason as
16496
+ * its message (`IV_REUSE_OFF` when the payment's requirement does not allow
16497
+ * reuse, `IV_REUSE_STEP` when the payment has no verification step a reuse
16498
+ * can stand for, `IV_EMAIL_INVALID`), `429` after too many codes for the
16499
+ * caller or the address.
16500
+ *
16501
+ * `POST /payment-link/{merchantId}/{paymentId}/identity-verification/email-code`
16502
+ */
16503
+ async sendIdentityEmailCode(params, options) {
16504
+ return this.client.request("POST", `${this.linkBase}/identity-verification/email-code`, {
16505
+ body: params,
16506
+ ...options,
16507
+ headers: this.bearerHeaders(options?.headers)
16508
+ });
16509
+ }
16510
+ /**
16511
+ * Check the code the buyer entered. `reusable` says only whether the
16512
+ * merchant has a verification the payment can reuse; then call
16513
+ * {@link CheckoutSession.reuseIdentityVerification}. Otherwise pass the
16514
+ * `challenge_id` as `email_challenge_id` to
16515
+ * {@link CheckoutSession.startIdentityVerification}, so a later payment can
16516
+ * reuse the verification it starts.
16517
+ *
16518
+ * Refusals throw a `DelopayError`: `400` with code `DE_26` and the reason as
16519
+ * its message. `IV_CODE_INCORRECT` is a wrong code, with the tries left in
16520
+ * `data.attempts_left`; `IV_CODE_EXPIRED` is an expired code or one out of
16521
+ * tries; `IV_CHALLENGE_UNKNOWN` names no code of this payment.
16522
+ *
16523
+ * `POST /payment-link/{merchantId}/{paymentId}/identity-verification/email-code/verify`
16524
+ */
16525
+ async verifyIdentityEmailCode(params, options) {
16526
+ return this.client.request("POST", `${this.linkBase}/identity-verification/email-code/verify`, {
16527
+ body: params,
16528
+ ...options,
16529
+ headers: this.bearerHeaders(options?.headers)
16530
+ });
16531
+ }
16532
+ /**
16533
+ * Reuse the merchant's verification for the buyer's confirmed email as the
16534
+ * payment's verification. Needs the challenge confirmed on this payment in
16535
+ * the last 30 minutes, and uses it up. No provider session, provider cost or
16536
+ * DeloPay fee is made. Answers the payment's verification step, verified.
16537
+ *
16538
+ * Refusals throw a `DelopayError`: `400` with code `DE_26` and the reason as
16539
+ * its message (`IV_CHALLENGE_NOT_CONFIRMED`, `IV_REUSE_NOT_ELIGIBLE`,
16540
+ * `IV_REUSE_OFF`, `IV_REUSE_STEP`).
16541
+ *
16542
+ * `POST /payment-link/{merchantId}/{paymentId}/identity-verification/reuse`
16543
+ */
16544
+ async reuseIdentityVerification(params, options) {
16545
+ return this.client.request("POST", `${this.linkBase}/identity-verification/reuse`, {
16546
+ body: params,
16547
+ ...options,
16548
+ headers: this.bearerHeaders(options?.headers)
16549
+ });
16550
+ }
16474
16551
  /**
16475
16552
  * Start the device assessment of the payment's checkout. `required` is
16476
16553
  * `false` when the shop assesses no devices, the payment's device is already