@delopay/sdk 0.245.0 → 0.247.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-LT6DP5KX.js → chunk-FU6W6ULM.js} +77 -1
- package/dist/chunk-FU6W6ULM.js.map +1 -0
- package/dist/index.cjs +76 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +337 -1
- package/dist/index.d.ts +337 -1
- package/dist/index.js +1 -1
- package/dist/internal.cjs +105 -0
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +15 -3
- package/dist/internal.d.ts +15 -3
- package/dist/internal.js +30 -1
- package/dist/internal.js.map +1 -1
- package/package.json +17 -18
- package/dist/chunk-LT6DP5KX.js.map +0 -1
|
@@ -708,6 +708,21 @@ var Connectors = class {
|
|
|
708
708
|
{ body: params }
|
|
709
709
|
);
|
|
710
710
|
}
|
|
711
|
+
/**
|
|
712
|
+
* The shops whose card vault is switched on and whose vault account has
|
|
713
|
+
* stopped working, each with the cause. While a shop is listed, its card
|
|
714
|
+
* form cannot be shown and its card payments fail.
|
|
715
|
+
*
|
|
716
|
+
* An outage is listed once the vault has refused the account several times
|
|
717
|
+
* in a row over at least a minute, and is taken off the list when the vault
|
|
718
|
+
* serves the account again. Nothing switches a vault off by itself: see
|
|
719
|
+
* `profiles.switchVaultOff`.
|
|
720
|
+
*
|
|
721
|
+
* `GET /account/{accountId}/vault/outages`
|
|
722
|
+
*/
|
|
723
|
+
async listVaultOutages(accountId) {
|
|
724
|
+
return this.request("GET", `/account/${encodeURIComponent(accountId)}/vault/outages`);
|
|
725
|
+
}
|
|
711
726
|
/**
|
|
712
727
|
* Compute the route document the vault SHOULD have and diff it against
|
|
713
728
|
* what exists, without writing anything. The returned fingerprints must be
|
|
@@ -2351,6 +2366,48 @@ var Payments = class {
|
|
|
2351
2366
|
options
|
|
2352
2367
|
);
|
|
2353
2368
|
}
|
|
2369
|
+
/**
|
|
2370
|
+
* The traffic of a payment, oldest first: the requests DeloPay sent to the
|
|
2371
|
+
* payment provider, the webhooks the provider sent, and the webhooks DeloPay
|
|
2372
|
+
* sent to the shop with every delivery attempt. No payloads; read an entry
|
|
2373
|
+
* with {@link getLogConnectorCall}, {@link getLogIncomingWebhook} or
|
|
2374
|
+
* {@link getLogOutgoingWebhook}. Dashboard (JWT) only.
|
|
2375
|
+
*
|
|
2376
|
+
* @param paymentId - The payment intent ID.
|
|
2377
|
+
*
|
|
2378
|
+
* @example
|
|
2379
|
+
* ```typescript
|
|
2380
|
+
* const logs = await delopay.payments.listLogs('pay_abc123');
|
|
2381
|
+
* if (!logs.psp_traffic_recorded) console.log('provider traffic is not recorded');
|
|
2382
|
+
* ```
|
|
2383
|
+
*/
|
|
2384
|
+
async listLogs(paymentId, options) {
|
|
2385
|
+
return this.request("GET", `/payments/${encodeURIComponent(paymentId)}/logs`, options);
|
|
2386
|
+
}
|
|
2387
|
+
/** One provider request of a payment, with its masked request, response and error. */
|
|
2388
|
+
async getLogConnectorCall(paymentId, callId, options) {
|
|
2389
|
+
return this.request(
|
|
2390
|
+
"GET",
|
|
2391
|
+
`/payments/${encodeURIComponent(paymentId)}/logs/connector-calls/${encodeURIComponent(callId)}`,
|
|
2392
|
+
options
|
|
2393
|
+
);
|
|
2394
|
+
}
|
|
2395
|
+
/** One provider webhook of a payment, with its masked headers and body. */
|
|
2396
|
+
async getLogIncomingWebhook(paymentId, eventId, options) {
|
|
2397
|
+
return this.request(
|
|
2398
|
+
"GET",
|
|
2399
|
+
`/payments/${encodeURIComponent(paymentId)}/logs/incoming-webhooks/${encodeURIComponent(eventId)}`,
|
|
2400
|
+
options
|
|
2401
|
+
);
|
|
2402
|
+
}
|
|
2403
|
+
/** Every delivery attempt of one shop webhook of a payment, with request and response. */
|
|
2404
|
+
async getLogOutgoingWebhook(paymentId, initialAttemptId, options) {
|
|
2405
|
+
return this.request(
|
|
2406
|
+
"GET",
|
|
2407
|
+
`/payments/${encodeURIComponent(paymentId)}/logs/outgoing-webhooks/${encodeURIComponent(initialAttemptId)}`,
|
|
2408
|
+
options
|
|
2409
|
+
);
|
|
2410
|
+
}
|
|
2354
2411
|
/**
|
|
2355
2412
|
* What the payment's rail says about settling each attempt: whether the
|
|
2356
2413
|
* money is still `pending` in the rail's hands, `available` in its balance
|
|
@@ -2930,6 +2987,25 @@ var Profiles = class {
|
|
|
2930
2987
|
`/account/${encodeURIComponent(accountId)}/business-profile/${encodeURIComponent(profileId)}/toggle-connector-agnostic-mit`
|
|
2931
2988
|
);
|
|
2932
2989
|
}
|
|
2990
|
+
/**
|
|
2991
|
+
* Switch the shop's card vault off. From the next checkout on, the checkout
|
|
2992
|
+
* draws each processor's own card form and card payments no longer depend on
|
|
2993
|
+
* the vault account. Cards saved in the vault cannot be charged while it is
|
|
2994
|
+
* off.
|
|
2995
|
+
*
|
|
2996
|
+
* The vault stays configured; switch it on again with {@link Profiles.update},
|
|
2997
|
+
* which verifies the vault first. Needs the permission to edit the shop's
|
|
2998
|
+
* connectors, not the one to edit the shop. Calling it for a shop whose vault
|
|
2999
|
+
* is already off changes nothing.
|
|
3000
|
+
*
|
|
3001
|
+
* `POST /account/{accountId}/business-profile/{profileId}/vault/switch-off`
|
|
3002
|
+
*/
|
|
3003
|
+
async switchVaultOff(accountId, profileId) {
|
|
3004
|
+
return this.request(
|
|
3005
|
+
"POST",
|
|
3006
|
+
`/account/${encodeURIComponent(accountId)}/business-profile/${encodeURIComponent(profileId)}/vault/switch-off`
|
|
3007
|
+
);
|
|
3008
|
+
}
|
|
2933
3009
|
};
|
|
2934
3010
|
|
|
2935
3011
|
// src/resources/projects.ts
|
|
@@ -12913,4 +12989,4 @@ export {
|
|
|
12913
12989
|
decodeNativePanes,
|
|
12914
12990
|
encodeNativePanes
|
|
12915
12991
|
};
|
|
12916
|
-
//# sourceMappingURL=chunk-
|
|
12992
|
+
//# sourceMappingURL=chunk-FU6W6ULM.js.map
|