@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
package/dist/index.cjs
CHANGED
|
@@ -972,6 +972,21 @@ var Connectors = class {
|
|
|
972
972
|
{ body: params }
|
|
973
973
|
);
|
|
974
974
|
}
|
|
975
|
+
/**
|
|
976
|
+
* The shops whose card vault is switched on and whose vault account has
|
|
977
|
+
* stopped working, each with the cause. While a shop is listed, its card
|
|
978
|
+
* form cannot be shown and its card payments fail.
|
|
979
|
+
*
|
|
980
|
+
* An outage is listed once the vault has refused the account several times
|
|
981
|
+
* in a row over at least a minute, and is taken off the list when the vault
|
|
982
|
+
* serves the account again. Nothing switches a vault off by itself: see
|
|
983
|
+
* `profiles.switchVaultOff`.
|
|
984
|
+
*
|
|
985
|
+
* `GET /account/{accountId}/vault/outages`
|
|
986
|
+
*/
|
|
987
|
+
async listVaultOutages(accountId) {
|
|
988
|
+
return this.request("GET", `/account/${encodeURIComponent(accountId)}/vault/outages`);
|
|
989
|
+
}
|
|
975
990
|
/**
|
|
976
991
|
* Compute the route document the vault SHOULD have and diff it against
|
|
977
992
|
* what exists, without writing anything. The returned fingerprints must be
|
|
@@ -2615,6 +2630,48 @@ var Payments = class {
|
|
|
2615
2630
|
options
|
|
2616
2631
|
);
|
|
2617
2632
|
}
|
|
2633
|
+
/**
|
|
2634
|
+
* The traffic of a payment, oldest first: the requests DeloPay sent to the
|
|
2635
|
+
* payment provider, the webhooks the provider sent, and the webhooks DeloPay
|
|
2636
|
+
* sent to the shop with every delivery attempt. No payloads; read an entry
|
|
2637
|
+
* with {@link getLogConnectorCall}, {@link getLogIncomingWebhook} or
|
|
2638
|
+
* {@link getLogOutgoingWebhook}. Dashboard (JWT) only.
|
|
2639
|
+
*
|
|
2640
|
+
* @param paymentId - The payment intent ID.
|
|
2641
|
+
*
|
|
2642
|
+
* @example
|
|
2643
|
+
* ```typescript
|
|
2644
|
+
* const logs = await delopay.payments.listLogs('pay_abc123');
|
|
2645
|
+
* if (!logs.psp_traffic_recorded) console.log('provider traffic is not recorded');
|
|
2646
|
+
* ```
|
|
2647
|
+
*/
|
|
2648
|
+
async listLogs(paymentId, options) {
|
|
2649
|
+
return this.request("GET", `/payments/${encodeURIComponent(paymentId)}/logs`, options);
|
|
2650
|
+
}
|
|
2651
|
+
/** One provider request of a payment, with its masked request, response and error. */
|
|
2652
|
+
async getLogConnectorCall(paymentId, callId, options) {
|
|
2653
|
+
return this.request(
|
|
2654
|
+
"GET",
|
|
2655
|
+
`/payments/${encodeURIComponent(paymentId)}/logs/connector-calls/${encodeURIComponent(callId)}`,
|
|
2656
|
+
options
|
|
2657
|
+
);
|
|
2658
|
+
}
|
|
2659
|
+
/** One provider webhook of a payment, with its masked headers and body. */
|
|
2660
|
+
async getLogIncomingWebhook(paymentId, eventId, options) {
|
|
2661
|
+
return this.request(
|
|
2662
|
+
"GET",
|
|
2663
|
+
`/payments/${encodeURIComponent(paymentId)}/logs/incoming-webhooks/${encodeURIComponent(eventId)}`,
|
|
2664
|
+
options
|
|
2665
|
+
);
|
|
2666
|
+
}
|
|
2667
|
+
/** Every delivery attempt of one shop webhook of a payment, with request and response. */
|
|
2668
|
+
async getLogOutgoingWebhook(paymentId, initialAttemptId, options) {
|
|
2669
|
+
return this.request(
|
|
2670
|
+
"GET",
|
|
2671
|
+
`/payments/${encodeURIComponent(paymentId)}/logs/outgoing-webhooks/${encodeURIComponent(initialAttemptId)}`,
|
|
2672
|
+
options
|
|
2673
|
+
);
|
|
2674
|
+
}
|
|
2618
2675
|
/**
|
|
2619
2676
|
* What the payment's rail says about settling each attempt: whether the
|
|
2620
2677
|
* money is still `pending` in the rail's hands, `available` in its balance
|
|
@@ -3194,6 +3251,25 @@ var Profiles = class {
|
|
|
3194
3251
|
`/account/${encodeURIComponent(accountId)}/business-profile/${encodeURIComponent(profileId)}/toggle-connector-agnostic-mit`
|
|
3195
3252
|
);
|
|
3196
3253
|
}
|
|
3254
|
+
/**
|
|
3255
|
+
* Switch the shop's card vault off. From the next checkout on, the checkout
|
|
3256
|
+
* draws each processor's own card form and card payments no longer depend on
|
|
3257
|
+
* the vault account. Cards saved in the vault cannot be charged while it is
|
|
3258
|
+
* off.
|
|
3259
|
+
*
|
|
3260
|
+
* The vault stays configured; switch it on again with {@link Profiles.update},
|
|
3261
|
+
* which verifies the vault first. Needs the permission to edit the shop's
|
|
3262
|
+
* connectors, not the one to edit the shop. Calling it for a shop whose vault
|
|
3263
|
+
* is already off changes nothing.
|
|
3264
|
+
*
|
|
3265
|
+
* `POST /account/{accountId}/business-profile/{profileId}/vault/switch-off`
|
|
3266
|
+
*/
|
|
3267
|
+
async switchVaultOff(accountId, profileId) {
|
|
3268
|
+
return this.request(
|
|
3269
|
+
"POST",
|
|
3270
|
+
`/account/${encodeURIComponent(accountId)}/business-profile/${encodeURIComponent(profileId)}/vault/switch-off`
|
|
3271
|
+
);
|
|
3272
|
+
}
|
|
3197
3273
|
};
|
|
3198
3274
|
|
|
3199
3275
|
// src/resources/projects.ts
|