@delopay/sdk 0.380.0 → 0.384.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.
@@ -9991,7 +9991,8 @@ var Settlement = class {
9991
9991
  );
9992
9992
  }
9993
9993
  /**
9994
- * Generate (or regenerate) the statement for one shop and calendar month.
9994
+ * Generate (or regenerate) the statement for one shop and period: a
9995
+ * calendar month by `year` and `month`, or any period by its `period_start`.
9995
9996
  *
9996
9997
  * `POST /settlement/statements/generate`
9997
9998
  */
@@ -10040,7 +10041,7 @@ var Settlement = class {
10040
10041
  options
10041
10042
  );
10042
10043
  }
10043
- /** Record a transfer against a shop's month before its statement exists. */
10044
+ /** Record a transfer against a shop's period before its statement exists. */
10044
10045
  async recordAdvance(params, options) {
10045
10046
  return this.request("POST", "/settlement/advances", {
10046
10047
  body: params,
@@ -10054,11 +10055,25 @@ var Settlement = class {
10054
10055
  profile_id: params.profile_id,
10055
10056
  year: params.year,
10056
10057
  month: params.month,
10058
+ period_start: params.period_start,
10057
10059
  test_mode: params.test_mode
10058
10060
  },
10059
10061
  ...options
10060
10062
  });
10061
10063
  }
10064
+ /**
10065
+ * A shop's statement periods, newest first: the running one and those that
10066
+ * closed in the last twelve months. Each `period_start` names its period to
10067
+ * {@link generateStatement}, {@link recordAdvance} and {@link listAdvances}.
10068
+ *
10069
+ * `GET /settlement/periods`
10070
+ */
10071
+ async listPeriods(params, options) {
10072
+ return this.request("GET", "/settlement/periods", {
10073
+ query: { profile_id: params.profile_id },
10074
+ ...options
10075
+ });
10076
+ }
10062
10077
  /**
10063
10078
  * Export a statement as PDF, or with `format` as CSV, JSON
10064
10079
  * (`StatementDocument`) or XLSX. Returns the raw bytes as a `Blob`, with
@@ -16164,6 +16179,68 @@ var CheckoutSession = class {
16164
16179
  headers: this.bearerHeaders(options?.headers)
16165
16180
  });
16166
16181
  }
16182
+ /**
16183
+ * Mail the buyer a code that confirms their email, so the payment can reuse
16184
+ * a verification the merchant already has for them. Offer it only while the
16185
+ * checkout data says `identity_verification_reuse_allowed`. The answer is
16186
+ * the same whether or not the merchant verified anyone with the address.
16187
+ *
16188
+ * Refusals throw a `DelopayError`: `400` with code `DE_26` and the reason as
16189
+ * its message (`IV_REUSE_OFF` when the payment's requirement does not allow
16190
+ * reuse, `IV_REUSE_STEP` when the payment has no verification step a reuse
16191
+ * can stand for, `IV_EMAIL_INVALID`), `429` after too many codes for the
16192
+ * caller or the address.
16193
+ *
16194
+ * `POST /payment-link/{merchantId}/{paymentId}/identity-verification/email-code`
16195
+ */
16196
+ async sendIdentityEmailCode(params, options) {
16197
+ return this.client.request("POST", `${this.linkBase}/identity-verification/email-code`, {
16198
+ body: params,
16199
+ ...options,
16200
+ headers: this.bearerHeaders(options?.headers)
16201
+ });
16202
+ }
16203
+ /**
16204
+ * Check the code the buyer entered. `reusable` says only whether the
16205
+ * merchant has a verification the payment can reuse; then call
16206
+ * {@link CheckoutSession.reuseIdentityVerification}. Otherwise pass the
16207
+ * `challenge_id` as `email_challenge_id` to
16208
+ * {@link CheckoutSession.startIdentityVerification}, so a later payment can
16209
+ * reuse the verification it starts.
16210
+ *
16211
+ * Refusals throw a `DelopayError`: `400` with code `DE_26` and the reason as
16212
+ * its message. `IV_CODE_INCORRECT` is a wrong code, with the tries left in
16213
+ * `data.attempts_left`; `IV_CODE_EXPIRED` is an expired code or one out of
16214
+ * tries; `IV_CHALLENGE_UNKNOWN` names no code of this payment.
16215
+ *
16216
+ * `POST /payment-link/{merchantId}/{paymentId}/identity-verification/email-code/verify`
16217
+ */
16218
+ async verifyIdentityEmailCode(params, options) {
16219
+ return this.client.request("POST", `${this.linkBase}/identity-verification/email-code/verify`, {
16220
+ body: params,
16221
+ ...options,
16222
+ headers: this.bearerHeaders(options?.headers)
16223
+ });
16224
+ }
16225
+ /**
16226
+ * Reuse the merchant's verification for the buyer's confirmed email as the
16227
+ * payment's verification. Needs the challenge confirmed on this payment in
16228
+ * the last 30 minutes, and uses it up. No provider session, provider cost or
16229
+ * DeloPay fee is made. Answers the payment's verification step, verified.
16230
+ *
16231
+ * Refusals throw a `DelopayError`: `400` with code `DE_26` and the reason as
16232
+ * its message (`IV_CHALLENGE_NOT_CONFIRMED`, `IV_REUSE_NOT_ELIGIBLE`,
16233
+ * `IV_REUSE_OFF`, `IV_REUSE_STEP`).
16234
+ *
16235
+ * `POST /payment-link/{merchantId}/{paymentId}/identity-verification/reuse`
16236
+ */
16237
+ async reuseIdentityVerification(params, options) {
16238
+ return this.client.request("POST", `${this.linkBase}/identity-verification/reuse`, {
16239
+ body: params,
16240
+ ...options,
16241
+ headers: this.bearerHeaders(options?.headers)
16242
+ });
16243
+ }
16167
16244
  /**
16168
16245
  * Start the device assessment of the payment's checkout. `required` is
16169
16246
  * `false` when the shop assesses no devices, the payment's device is already
@@ -17259,4 +17336,4 @@ export {
17259
17336
  decodeNativePanes,
17260
17337
  encodeNativePanes
17261
17338
  };
17262
- //# sourceMappingURL=chunk-BSVLB2QZ.js.map
17339
+ //# sourceMappingURL=chunk-J75SXXXD.js.map