@delopay/sdk 0.297.0 → 0.300.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-DEP2VVHN.js → chunk-32VR22VH.js} +73 -9
- package/dist/chunk-32VR22VH.js.map +1 -0
- package/dist/{index-DhpcHxy5.d.cts → index-DijmseLS.d.cts} +269 -10
- package/dist/{index-DhpcHxy5.d.ts → index-DijmseLS.d.ts} +269 -10
- package/dist/index.cjs +71 -8
- 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 +116 -8
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +31 -32
- package/dist/internal.d.ts +31 -32
- package/dist/internal.js +47 -1
- package/dist/internal.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-DEP2VVHN.js.map +0 -1
|
@@ -8280,29 +8280,35 @@ var BuyerAccount = class {
|
|
|
8280
8280
|
/**
|
|
8281
8281
|
* The buyer's subscriptions across shops, newest first. A record the buyer
|
|
8282
8282
|
* has not confirmed shows what a receipt carries, without its period or
|
|
8283
|
-
* cancellation.
|
|
8283
|
+
* cancellation. Follow `next_cursor` with the same shop and mode; an
|
|
8284
|
+
* omitted mode includes both modes.
|
|
8284
8285
|
*/
|
|
8285
8286
|
async listSubscriptions(query, options) {
|
|
8286
8287
|
return this.request("GET", "/buyer-account/subscriptions", {
|
|
8287
|
-
query,
|
|
8288
|
+
query: query ? { ...query } : void 0,
|
|
8288
8289
|
...options
|
|
8289
8290
|
});
|
|
8290
8291
|
}
|
|
8291
8292
|
/**
|
|
8292
8293
|
* The issued invoices of the records the buyer has confirmed through a
|
|
8293
8294
|
* shop's own link, newest first. `unconfirmed_records` says when records
|
|
8294
|
-
* were left out.
|
|
8295
|
+
* were left out. Follow `next_cursor` with the same shop and mode; an
|
|
8296
|
+
* omitted mode includes both modes.
|
|
8295
8297
|
*/
|
|
8296
8298
|
async listInvoices(query, options) {
|
|
8297
8299
|
return this.request("GET", "/buyer-account/invoices", {
|
|
8298
|
-
query,
|
|
8300
|
+
query: query ? { ...query } : void 0,
|
|
8299
8301
|
...options
|
|
8300
8302
|
});
|
|
8301
8303
|
}
|
|
8302
|
-
/**
|
|
8304
|
+
/**
|
|
8305
|
+
* The confirmed records' refund requests, newest first, with the shop's
|
|
8306
|
+
* decision. Follow `next_cursor` with the same shop and mode; an omitted
|
|
8307
|
+
* mode includes both modes.
|
|
8308
|
+
*/
|
|
8303
8309
|
async listRefundRequests(query, options) {
|
|
8304
8310
|
return this.request("GET", "/buyer-account/refund-requests", {
|
|
8305
|
-
query,
|
|
8311
|
+
query: query ? { ...query } : void 0,
|
|
8306
8312
|
...options
|
|
8307
8313
|
});
|
|
8308
8314
|
}
|
|
@@ -8412,11 +8418,13 @@ var BuyerAccount = class {
|
|
|
8412
8418
|
/**
|
|
8413
8419
|
* What the buyer spent in a period: paid purchases summed per currency,
|
|
8414
8420
|
* never converted, for the whole period, per day, week or month, per shop
|
|
8415
|
-
* and per kind of purchase.
|
|
8421
|
+
* and per kind of purchase. `subscriptions`, when present, summarizes all
|
|
8422
|
+
* current subscriptions in the same shop and mode, independently of the
|
|
8423
|
+
* spending period and subscription list pagination.
|
|
8416
8424
|
*/
|
|
8417
8425
|
async analytics(query, options) {
|
|
8418
8426
|
return this.request("GET", "/buyer-account/analytics", {
|
|
8419
|
-
query,
|
|
8427
|
+
query: { ...query },
|
|
8420
8428
|
...options
|
|
8421
8429
|
});
|
|
8422
8430
|
}
|
|
@@ -9539,7 +9547,62 @@ var Risk = class {
|
|
|
9539
9547
|
async retrieveShop(profileId, options) {
|
|
9540
9548
|
return this.request("GET", `/risk/shops/${encodeURIComponent(profileId)}`, options);
|
|
9541
9549
|
}
|
|
9550
|
+
/**
|
|
9551
|
+
* One scope's tuning of the merchant's own, adjusted risk assessment: what
|
|
9552
|
+
* it sets, what applies there and where each part comes from, and DeloPay's
|
|
9553
|
+
* reference beside it. Needs the `RiskTuning` area's `Read` at that scope.
|
|
9554
|
+
*
|
|
9555
|
+
* `GET /risk/tuning`, `GET /risk/tuning/{projects|shops}/{id}`
|
|
9556
|
+
*/
|
|
9557
|
+
async retrieveTuning(target = { scope: "merchant" }, options) {
|
|
9558
|
+
return this.request("GET", riskTuningPath(target), options);
|
|
9559
|
+
}
|
|
9560
|
+
/**
|
|
9561
|
+
* Replace one scope's tuning. A shop or project needs the area's `Edit`, the
|
|
9562
|
+
* merchant-wide tuning its `Write`. A save on top of a newer revision is
|
|
9563
|
+
* refused with `IR_16`; a tuning that would leave a reached shop with
|
|
9564
|
+
* nothing to score with is refused with `IR_06`.
|
|
9565
|
+
*
|
|
9566
|
+
* `PUT /risk/tuning`, `PUT /risk/tuning/{projects|shops}/{id}`
|
|
9567
|
+
*/
|
|
9568
|
+
async updateTuning(target, params, options) {
|
|
9569
|
+
return this.request("PUT", riskTuningPath(target), { ...options, body: params });
|
|
9570
|
+
}
|
|
9571
|
+
/**
|
|
9572
|
+
* Hand every part of one scope's tuning back to what it inherits.
|
|
9573
|
+
*
|
|
9574
|
+
* `DELETE /risk/tuning?expected_revision=…`
|
|
9575
|
+
*/
|
|
9576
|
+
async resetTuning(target, expectedRevision, options) {
|
|
9577
|
+
return this.request("DELETE", riskTuningPath(target), {
|
|
9578
|
+
...options,
|
|
9579
|
+
query: { expected_revision: expectedRevision }
|
|
9580
|
+
});
|
|
9581
|
+
}
|
|
9582
|
+
/**
|
|
9583
|
+
* Estimate what a change would do to every shop it reaches, from the
|
|
9584
|
+
* evidence stored up to today. Stores, scores and sends nothing; a pair
|
|
9585
|
+
* with no usable evidence says why rather than showing a band.
|
|
9586
|
+
*
|
|
9587
|
+
* `POST /risk/tuning/preview`, `POST /risk/tuning/{projects|shops}/{id}/preview`
|
|
9588
|
+
*/
|
|
9589
|
+
async previewTuning(target, adjustments, options) {
|
|
9590
|
+
return this.request("POST", `${riskTuningPath(target)}/preview`, {
|
|
9591
|
+
...options,
|
|
9592
|
+
body: { adjustments }
|
|
9593
|
+
});
|
|
9594
|
+
}
|
|
9542
9595
|
};
|
|
9596
|
+
function riskTuningPath(target, prefix = "") {
|
|
9597
|
+
switch (target.scope) {
|
|
9598
|
+
case "merchant":
|
|
9599
|
+
return `${prefix}/risk/tuning`;
|
|
9600
|
+
case "project":
|
|
9601
|
+
return `${prefix}/risk/tuning/projects/${encodeURIComponent(target.id)}`;
|
|
9602
|
+
case "shop":
|
|
9603
|
+
return `${prefix}/risk/tuning/shops/${encodeURIComponent(target.id)}`;
|
|
9604
|
+
}
|
|
9605
|
+
}
|
|
9543
9606
|
|
|
9544
9607
|
// src/resources/live.ts
|
|
9545
9608
|
function readField(data, key) {
|
|
@@ -15347,6 +15410,7 @@ export {
|
|
|
15347
15410
|
Settings,
|
|
15348
15411
|
MessageTemplates,
|
|
15349
15412
|
Risk,
|
|
15413
|
+
riskTuningPath,
|
|
15350
15414
|
LiveEventStream,
|
|
15351
15415
|
openLiveStream,
|
|
15352
15416
|
Live,
|
|
@@ -15573,4 +15637,4 @@ export {
|
|
|
15573
15637
|
decodeNativePanes,
|
|
15574
15638
|
encodeNativePanes
|
|
15575
15639
|
};
|
|
15576
|
-
//# sourceMappingURL=chunk-
|
|
15640
|
+
//# sourceMappingURL=chunk-32VR22VH.js.map
|