@delopay/sdk 0.246.0 → 0.248.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-LFNDWJ5X.js → chunk-RPPCA42D.js} +66 -1
- package/dist/chunk-RPPCA42D.js.map +1 -0
- package/dist/index.cjs +65 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +154 -1
- package/dist/index.d.ts +154 -1
- package/dist/index.js +1 -1
- package/dist/internal.cjs +65 -0
- 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-LFNDWJ5X.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
|
|
@@ -3236,6 +3251,25 @@ var Profiles = class {
|
|
|
3236
3251
|
`/account/${encodeURIComponent(accountId)}/business-profile/${encodeURIComponent(profileId)}/toggle-connector-agnostic-mit`
|
|
3237
3252
|
);
|
|
3238
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
|
+
}
|
|
3239
3273
|
};
|
|
3240
3274
|
|
|
3241
3275
|
// src/resources/projects.ts
|
|
@@ -12341,6 +12375,37 @@ var CheckoutSession = class {
|
|
|
12341
12375
|
headers: this.bearerHeaders(options?.headers)
|
|
12342
12376
|
});
|
|
12343
12377
|
}
|
|
12378
|
+
/**
|
|
12379
|
+
* Remove one of the buyer's saved cards, named by its `payment_token` from
|
|
12380
|
+
* {@link vaultSavedCards}: from the customer's saved cards and from the
|
|
12381
|
+
* shop's vault, with every saved copy of the same card. Only a card of the
|
|
12382
|
+
* payment's own customer that the shop's vault holds can be removed, and
|
|
12383
|
+
* only within the payment's session.
|
|
12384
|
+
*
|
|
12385
|
+
* Refusals throw a `DelopayError`:
|
|
12386
|
+
*
|
|
12387
|
+
* - `400` with code `IR_16` and `data.reason` set to a
|
|
12388
|
+
* {@link VaultSavedCardRemovalRefusal}: the card stays listed.
|
|
12389
|
+
* `saved_card_in_use` means a subscription or agreement still charges it,
|
|
12390
|
+
* `saved_card_payment_in_progress` a payment with it is in flight, and
|
|
12391
|
+
* `saved_card_removal_unavailable` that the shop cannot remove cards here.
|
|
12392
|
+
* - `404`: the card is not one this buyer can remove, for example because it
|
|
12393
|
+
* is already gone.
|
|
12394
|
+
* - `422` with code `IR_29`: the token is no longer held. Read
|
|
12395
|
+
* {@link vaultSavedCards} again and remove the card by its new token.
|
|
12396
|
+
*
|
|
12397
|
+
* `DELETE /payment-link/{merchantId}/{paymentId}/vault/saved-cards/{paymentToken}`
|
|
12398
|
+
*/
|
|
12399
|
+
async vaultRemoveSavedCard(paymentToken, options) {
|
|
12400
|
+
await this.client.request(
|
|
12401
|
+
"DELETE",
|
|
12402
|
+
`${this.linkBase}/vault/saved-cards/${encodeURIComponent(paymentToken)}`,
|
|
12403
|
+
{
|
|
12404
|
+
...options,
|
|
12405
|
+
headers: this.bearerHeaders(options?.headers)
|
|
12406
|
+
}
|
|
12407
|
+
);
|
|
12408
|
+
}
|
|
12344
12409
|
/**
|
|
12345
12410
|
* Mint the security-code form for a saved card, on a shop whose vault keeps
|
|
12346
12411
|
* the code itself (Enigma Vault). The buyer re-enters the code into the
|