@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/internal.cjs
CHANGED
|
@@ -988,6 +988,21 @@ var Connectors = class {
|
|
|
988
988
|
{ body: params }
|
|
989
989
|
);
|
|
990
990
|
}
|
|
991
|
+
/**
|
|
992
|
+
* The shops whose card vault is switched on and whose vault account has
|
|
993
|
+
* stopped working, each with the cause. While a shop is listed, its card
|
|
994
|
+
* form cannot be shown and its card payments fail.
|
|
995
|
+
*
|
|
996
|
+
* An outage is listed once the vault has refused the account several times
|
|
997
|
+
* in a row over at least a minute, and is taken off the list when the vault
|
|
998
|
+
* serves the account again. Nothing switches a vault off by itself: see
|
|
999
|
+
* `profiles.switchVaultOff`.
|
|
1000
|
+
*
|
|
1001
|
+
* `GET /account/{accountId}/vault/outages`
|
|
1002
|
+
*/
|
|
1003
|
+
async listVaultOutages(accountId) {
|
|
1004
|
+
return this.request("GET", `/account/${encodeURIComponent(accountId)}/vault/outages`);
|
|
1005
|
+
}
|
|
991
1006
|
/**
|
|
992
1007
|
* Compute the route document the vault SHOULD have and diff it against
|
|
993
1008
|
* what exists, without writing anything. The returned fingerprints must be
|
|
@@ -2631,6 +2646,48 @@ var Payments = class {
|
|
|
2631
2646
|
options
|
|
2632
2647
|
);
|
|
2633
2648
|
}
|
|
2649
|
+
/**
|
|
2650
|
+
* The traffic of a payment, oldest first: the requests DeloPay sent to the
|
|
2651
|
+
* payment provider, the webhooks the provider sent, and the webhooks DeloPay
|
|
2652
|
+
* sent to the shop with every delivery attempt. No payloads; read an entry
|
|
2653
|
+
* with {@link getLogConnectorCall}, {@link getLogIncomingWebhook} or
|
|
2654
|
+
* {@link getLogOutgoingWebhook}. Dashboard (JWT) only.
|
|
2655
|
+
*
|
|
2656
|
+
* @param paymentId - The payment intent ID.
|
|
2657
|
+
*
|
|
2658
|
+
* @example
|
|
2659
|
+
* ```typescript
|
|
2660
|
+
* const logs = await delopay.payments.listLogs('pay_abc123');
|
|
2661
|
+
* if (!logs.psp_traffic_recorded) console.log('provider traffic is not recorded');
|
|
2662
|
+
* ```
|
|
2663
|
+
*/
|
|
2664
|
+
async listLogs(paymentId, options) {
|
|
2665
|
+
return this.request("GET", `/payments/${encodeURIComponent(paymentId)}/logs`, options);
|
|
2666
|
+
}
|
|
2667
|
+
/** One provider request of a payment, with its masked request, response and error. */
|
|
2668
|
+
async getLogConnectorCall(paymentId, callId, options) {
|
|
2669
|
+
return this.request(
|
|
2670
|
+
"GET",
|
|
2671
|
+
`/payments/${encodeURIComponent(paymentId)}/logs/connector-calls/${encodeURIComponent(callId)}`,
|
|
2672
|
+
options
|
|
2673
|
+
);
|
|
2674
|
+
}
|
|
2675
|
+
/** One provider webhook of a payment, with its masked headers and body. */
|
|
2676
|
+
async getLogIncomingWebhook(paymentId, eventId, options) {
|
|
2677
|
+
return this.request(
|
|
2678
|
+
"GET",
|
|
2679
|
+
`/payments/${encodeURIComponent(paymentId)}/logs/incoming-webhooks/${encodeURIComponent(eventId)}`,
|
|
2680
|
+
options
|
|
2681
|
+
);
|
|
2682
|
+
}
|
|
2683
|
+
/** Every delivery attempt of one shop webhook of a payment, with request and response. */
|
|
2684
|
+
async getLogOutgoingWebhook(paymentId, initialAttemptId, options) {
|
|
2685
|
+
return this.request(
|
|
2686
|
+
"GET",
|
|
2687
|
+
`/payments/${encodeURIComponent(paymentId)}/logs/outgoing-webhooks/${encodeURIComponent(initialAttemptId)}`,
|
|
2688
|
+
options
|
|
2689
|
+
);
|
|
2690
|
+
}
|
|
2634
2691
|
/**
|
|
2635
2692
|
* What the payment's rail says about settling each attempt: whether the
|
|
2636
2693
|
* money is still `pending` in the rail's hands, `available` in its balance
|
|
@@ -3210,6 +3267,25 @@ var Profiles = class {
|
|
|
3210
3267
|
`/account/${encodeURIComponent(accountId)}/business-profile/${encodeURIComponent(profileId)}/toggle-connector-agnostic-mit`
|
|
3211
3268
|
);
|
|
3212
3269
|
}
|
|
3270
|
+
/**
|
|
3271
|
+
* Switch the shop's card vault off. From the next checkout on, the checkout
|
|
3272
|
+
* draws each processor's own card form and card payments no longer depend on
|
|
3273
|
+
* the vault account. Cards saved in the vault cannot be charged while it is
|
|
3274
|
+
* off.
|
|
3275
|
+
*
|
|
3276
|
+
* The vault stays configured; switch it on again with {@link Profiles.update},
|
|
3277
|
+
* which verifies the vault first. Needs the permission to edit the shop's
|
|
3278
|
+
* connectors, not the one to edit the shop. Calling it for a shop whose vault
|
|
3279
|
+
* is already off changes nothing.
|
|
3280
|
+
*
|
|
3281
|
+
* `POST /account/{accountId}/business-profile/{profileId}/vault/switch-off`
|
|
3282
|
+
*/
|
|
3283
|
+
async switchVaultOff(accountId, profileId) {
|
|
3284
|
+
return this.request(
|
|
3285
|
+
"POST",
|
|
3286
|
+
`/account/${encodeURIComponent(accountId)}/business-profile/${encodeURIComponent(profileId)}/vault/switch-off`
|
|
3287
|
+
);
|
|
3288
|
+
}
|
|
3213
3289
|
};
|
|
3214
3290
|
|
|
3215
3291
|
// src/resources/projects.ts
|
|
@@ -13164,6 +13240,35 @@ var AdminPortal = class {
|
|
|
13164
13240
|
`/admin-portal/transactions/${encodeURIComponent(paymentId)}/status-history`
|
|
13165
13241
|
);
|
|
13166
13242
|
}
|
|
13243
|
+
/**
|
|
13244
|
+
* The traffic of a transaction of ANY merchant: provider requests, provider
|
|
13245
|
+
* webhooks and shop webhooks, oldest first, without payloads. Same shape as
|
|
13246
|
+
* `payments.listLogs`.
|
|
13247
|
+
*/
|
|
13248
|
+
async getTransactionLogs(paymentId) {
|
|
13249
|
+
return this.request("GET", `/admin-portal/transactions/${encodeURIComponent(paymentId)}/logs`);
|
|
13250
|
+
}
|
|
13251
|
+
/** One provider request of a transaction of ANY merchant, with its masked payloads. */
|
|
13252
|
+
async getTransactionLogConnectorCall(paymentId, callId) {
|
|
13253
|
+
return this.request(
|
|
13254
|
+
"GET",
|
|
13255
|
+
`/admin-portal/transactions/${encodeURIComponent(paymentId)}/logs/connector-calls/${encodeURIComponent(callId)}`
|
|
13256
|
+
);
|
|
13257
|
+
}
|
|
13258
|
+
/** One provider webhook of a transaction of ANY merchant, with its masked headers and body. */
|
|
13259
|
+
async getTransactionLogIncomingWebhook(paymentId, eventId) {
|
|
13260
|
+
return this.request(
|
|
13261
|
+
"GET",
|
|
13262
|
+
`/admin-portal/transactions/${encodeURIComponent(paymentId)}/logs/incoming-webhooks/${encodeURIComponent(eventId)}`
|
|
13263
|
+
);
|
|
13264
|
+
}
|
|
13265
|
+
/** Every delivery attempt of one shop webhook of a transaction of ANY merchant. */
|
|
13266
|
+
async getTransactionLogOutgoingWebhook(paymentId, initialAttemptId) {
|
|
13267
|
+
return this.request(
|
|
13268
|
+
"GET",
|
|
13269
|
+
`/admin-portal/transactions/${encodeURIComponent(paymentId)}/logs/outgoing-webhooks/${encodeURIComponent(initialAttemptId)}`
|
|
13270
|
+
);
|
|
13271
|
+
}
|
|
13167
13272
|
/**
|
|
13168
13273
|
* The invoices and credit notes issued for a transaction of ANY merchant,
|
|
13169
13274
|
* each its own row, newest first. At most 100 per page.
|