@delopay/sdk 0.187.0 → 0.188.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-UI54GG2H.js → chunk-7M6HDH2Q.js} +28 -4
- package/dist/chunk-7M6HDH2Q.js.map +1 -0
- package/dist/index.cjs +27 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +166 -12
- package/dist/index.d.ts +166 -12
- package/dist/index.js +1 -1
- package/dist/internal.cjs +27 -3
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +1 -1
- package/dist/internal.d.ts +1 -1
- package/dist/internal.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-UI54GG2H.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -6578,6 +6578,23 @@ var OperationLimits = class {
|
|
|
6578
6578
|
async retrieveSettings(options) {
|
|
6579
6579
|
return this.request("GET", "/operation-limits/settings", options);
|
|
6580
6580
|
}
|
|
6581
|
+
/**
|
|
6582
|
+
* The caller's own usage against the limit on one operation: the rule that
|
|
6583
|
+
* applies to them, what they have used in the current window and what
|
|
6584
|
+
* remains.
|
|
6585
|
+
*
|
|
6586
|
+
* Refund usage needs merchant-wide refund read and is refused to a role
|
|
6587
|
+
* restricted to some connectors: the totals span every shop and connector,
|
|
6588
|
+
* as the budget does. Settlement usage needs merchant settlement read.
|
|
6589
|
+
*
|
|
6590
|
+
* `GET /operation-limits/usage`
|
|
6591
|
+
*/
|
|
6592
|
+
async retrieveUsage(params, options) {
|
|
6593
|
+
return this.request("GET", "/operation-limits/usage", {
|
|
6594
|
+
query: { operation: params.operation },
|
|
6595
|
+
...options
|
|
6596
|
+
});
|
|
6597
|
+
}
|
|
6581
6598
|
/**
|
|
6582
6599
|
* Update the enforcement settings. Only provided fields change.
|
|
6583
6600
|
*
|
|
@@ -10168,19 +10185,26 @@ var CheckoutSession = class {
|
|
|
10168
10185
|
* is what a recorder should do: every ordinary slice compresses, and the last
|
|
10169
10186
|
* one is sent the way that actually arrives.
|
|
10170
10187
|
*
|
|
10188
|
+
* For a precompressed event array, pass `compressed_events` and `gzipBody`.
|
|
10189
|
+
* The latter receives the complete JSON request (including the session's
|
|
10190
|
+
* client secret) and must return gzip bytes synchronously. Fetch then starts
|
|
10191
|
+
* before this method yields, including on a page-navigation slice. A
|
|
10192
|
+
* keepalive request is used only when that prepared body is at most 60 KiB.
|
|
10193
|
+
*
|
|
10171
10194
|
* `POST /payments/{paymentId}/replay/slice` (publishable key)
|
|
10172
10195
|
*/
|
|
10173
10196
|
async storeReplaySlice(params, options) {
|
|
10174
|
-
const { keepalive, compress, ...extras } = options ?? {};
|
|
10197
|
+
const { keepalive, compress, gzipBody, ...extras } = options ?? {};
|
|
10175
10198
|
const body = { ...params, client_secret: this.requireClientSecret() };
|
|
10176
10199
|
const headers = this.pkHeaders(extras.headers);
|
|
10177
|
-
const
|
|
10200
|
+
const encoded = gzipBody?.(new TextEncoder().encode(JSON.stringify(body)));
|
|
10201
|
+
const gzipped = encoded ? Uint8Array.from(encoded).buffer : compress === true && keepalive !== true ? await gzipJson(body) : null;
|
|
10178
10202
|
return this.client.request(
|
|
10179
10203
|
"POST",
|
|
10180
10204
|
`/payments/${encodeURIComponent(this.paymentId)}/replay/slice`,
|
|
10181
10205
|
{
|
|
10182
10206
|
body: gzipped ?? body,
|
|
10183
|
-
...keepalive !== void 0 ? { keepalive } : {},
|
|
10207
|
+
...keepalive !== void 0 ? { keepalive: encoded ? keepalive && encoded.byteLength <= 60 * 1024 : keepalive } : {},
|
|
10184
10208
|
...extras,
|
|
10185
10209
|
// `Content-Type` has to be stated for the compressed body: the client
|
|
10186
10210
|
// only sets it for a body it serialises itself, and the bytes are
|