@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.
- package/dist/{chunk-BSVLB2QZ.js → chunk-J75SXXXD.js} +80 -3
- package/dist/chunk-J75SXXXD.js.map +1 -0
- package/dist/{index-D3HJNRXG.d.cts → index-B3pOn9vI.d.cts} +305 -17
- package/dist/{index-D3HJNRXG.d.ts → index-B3pOn9vI.d.ts} +305 -17
- package/dist/index.cjs +79 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/internal.cjs +92 -2
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +12 -5
- package/dist/internal.d.ts +12 -5
- package/dist/internal.js +14 -1
- package/dist/internal.js.map +1 -1
- package/package.json +19 -17
- package/dist/chunk-BSVLB2QZ.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -10313,7 +10313,8 @@ var Settlement = class {
|
|
|
10313
10313
|
);
|
|
10314
10314
|
}
|
|
10315
10315
|
/**
|
|
10316
|
-
* Generate (or regenerate) the statement for one shop and
|
|
10316
|
+
* Generate (or regenerate) the statement for one shop and period: a
|
|
10317
|
+
* calendar month by `year` and `month`, or any period by its `period_start`.
|
|
10317
10318
|
*
|
|
10318
10319
|
* `POST /settlement/statements/generate`
|
|
10319
10320
|
*/
|
|
@@ -10362,7 +10363,7 @@ var Settlement = class {
|
|
|
10362
10363
|
options
|
|
10363
10364
|
);
|
|
10364
10365
|
}
|
|
10365
|
-
/** Record a transfer against a shop's
|
|
10366
|
+
/** Record a transfer against a shop's period before its statement exists. */
|
|
10366
10367
|
async recordAdvance(params, options) {
|
|
10367
10368
|
return this.request("POST", "/settlement/advances", {
|
|
10368
10369
|
body: params,
|
|
@@ -10376,11 +10377,25 @@ var Settlement = class {
|
|
|
10376
10377
|
profile_id: params.profile_id,
|
|
10377
10378
|
year: params.year,
|
|
10378
10379
|
month: params.month,
|
|
10380
|
+
period_start: params.period_start,
|
|
10379
10381
|
test_mode: params.test_mode
|
|
10380
10382
|
},
|
|
10381
10383
|
...options
|
|
10382
10384
|
});
|
|
10383
10385
|
}
|
|
10386
|
+
/**
|
|
10387
|
+
* A shop's statement periods, newest first: the running one and those that
|
|
10388
|
+
* closed in the last twelve months. Each `period_start` names its period to
|
|
10389
|
+
* {@link generateStatement}, {@link recordAdvance} and {@link listAdvances}.
|
|
10390
|
+
*
|
|
10391
|
+
* `GET /settlement/periods`
|
|
10392
|
+
*/
|
|
10393
|
+
async listPeriods(params, options) {
|
|
10394
|
+
return this.request("GET", "/settlement/periods", {
|
|
10395
|
+
query: { profile_id: params.profile_id },
|
|
10396
|
+
...options
|
|
10397
|
+
});
|
|
10398
|
+
}
|
|
10384
10399
|
/**
|
|
10385
10400
|
* Export a statement as PDF, or with `format` as CSV, JSON
|
|
10386
10401
|
* (`StatementDocument`) or XLSX. Returns the raw bytes as a `Blob`, with
|
|
@@ -16486,6 +16501,68 @@ var CheckoutSession = class {
|
|
|
16486
16501
|
headers: this.bearerHeaders(options?.headers)
|
|
16487
16502
|
});
|
|
16488
16503
|
}
|
|
16504
|
+
/**
|
|
16505
|
+
* Mail the buyer a code that confirms their email, so the payment can reuse
|
|
16506
|
+
* a verification the merchant already has for them. Offer it only while the
|
|
16507
|
+
* checkout data says `identity_verification_reuse_allowed`. The answer is
|
|
16508
|
+
* the same whether or not the merchant verified anyone with the address.
|
|
16509
|
+
*
|
|
16510
|
+
* Refusals throw a `DelopayError`: `400` with code `DE_26` and the reason as
|
|
16511
|
+
* its message (`IV_REUSE_OFF` when the payment's requirement does not allow
|
|
16512
|
+
* reuse, `IV_REUSE_STEP` when the payment has no verification step a reuse
|
|
16513
|
+
* can stand for, `IV_EMAIL_INVALID`), `429` after too many codes for the
|
|
16514
|
+
* caller or the address.
|
|
16515
|
+
*
|
|
16516
|
+
* `POST /payment-link/{merchantId}/{paymentId}/identity-verification/email-code`
|
|
16517
|
+
*/
|
|
16518
|
+
async sendIdentityEmailCode(params, options) {
|
|
16519
|
+
return this.client.request("POST", `${this.linkBase}/identity-verification/email-code`, {
|
|
16520
|
+
body: params,
|
|
16521
|
+
...options,
|
|
16522
|
+
headers: this.bearerHeaders(options?.headers)
|
|
16523
|
+
});
|
|
16524
|
+
}
|
|
16525
|
+
/**
|
|
16526
|
+
* Check the code the buyer entered. `reusable` says only whether the
|
|
16527
|
+
* merchant has a verification the payment can reuse; then call
|
|
16528
|
+
* {@link CheckoutSession.reuseIdentityVerification}. Otherwise pass the
|
|
16529
|
+
* `challenge_id` as `email_challenge_id` to
|
|
16530
|
+
* {@link CheckoutSession.startIdentityVerification}, so a later payment can
|
|
16531
|
+
* reuse the verification it starts.
|
|
16532
|
+
*
|
|
16533
|
+
* Refusals throw a `DelopayError`: `400` with code `DE_26` and the reason as
|
|
16534
|
+
* its message. `IV_CODE_INCORRECT` is a wrong code, with the tries left in
|
|
16535
|
+
* `data.attempts_left`; `IV_CODE_EXPIRED` is an expired code or one out of
|
|
16536
|
+
* tries; `IV_CHALLENGE_UNKNOWN` names no code of this payment.
|
|
16537
|
+
*
|
|
16538
|
+
* `POST /payment-link/{merchantId}/{paymentId}/identity-verification/email-code/verify`
|
|
16539
|
+
*/
|
|
16540
|
+
async verifyIdentityEmailCode(params, options) {
|
|
16541
|
+
return this.client.request("POST", `${this.linkBase}/identity-verification/email-code/verify`, {
|
|
16542
|
+
body: params,
|
|
16543
|
+
...options,
|
|
16544
|
+
headers: this.bearerHeaders(options?.headers)
|
|
16545
|
+
});
|
|
16546
|
+
}
|
|
16547
|
+
/**
|
|
16548
|
+
* Reuse the merchant's verification for the buyer's confirmed email as the
|
|
16549
|
+
* payment's verification. Needs the challenge confirmed on this payment in
|
|
16550
|
+
* the last 30 minutes, and uses it up. No provider session, provider cost or
|
|
16551
|
+
* DeloPay fee is made. Answers the payment's verification step, verified.
|
|
16552
|
+
*
|
|
16553
|
+
* Refusals throw a `DelopayError`: `400` with code `DE_26` and the reason as
|
|
16554
|
+
* its message (`IV_CHALLENGE_NOT_CONFIRMED`, `IV_REUSE_NOT_ELIGIBLE`,
|
|
16555
|
+
* `IV_REUSE_OFF`, `IV_REUSE_STEP`).
|
|
16556
|
+
*
|
|
16557
|
+
* `POST /payment-link/{merchantId}/{paymentId}/identity-verification/reuse`
|
|
16558
|
+
*/
|
|
16559
|
+
async reuseIdentityVerification(params, options) {
|
|
16560
|
+
return this.client.request("POST", `${this.linkBase}/identity-verification/reuse`, {
|
|
16561
|
+
body: params,
|
|
16562
|
+
...options,
|
|
16563
|
+
headers: this.bearerHeaders(options?.headers)
|
|
16564
|
+
});
|
|
16565
|
+
}
|
|
16489
16566
|
/**
|
|
16490
16567
|
* Start the device assessment of the payment's checkout. `required` is
|
|
16491
16568
|
* `false` when the shop assesses no devices, the payment's device is already
|