@delopay/sdk 0.380.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
@@ -16486,6 +16486,68 @@ var CheckoutSession = class {
16486
16486
  headers: this.bearerHeaders(options?.headers)
16487
16487
  });
16488
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
+ }
16489
16551
  /**
16490
16552
  * Start the device assessment of the payment's checkout. `required` is
16491
16553
  * `false` when the shop assesses no devices, the payment's device is already