@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
|
@@ -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
|
|
@@ -2972,6 +2987,25 @@ var Profiles = class {
|
|
|
2972
2987
|
`/account/${encodeURIComponent(accountId)}/business-profile/${encodeURIComponent(profileId)}/toggle-connector-agnostic-mit`
|
|
2973
2988
|
);
|
|
2974
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
|
+
}
|
|
2975
3009
|
};
|
|
2976
3010
|
|
|
2977
3011
|
// src/resources/projects.ts
|
|
@@ -12077,6 +12111,37 @@ var CheckoutSession = class {
|
|
|
12077
12111
|
headers: this.bearerHeaders(options?.headers)
|
|
12078
12112
|
});
|
|
12079
12113
|
}
|
|
12114
|
+
/**
|
|
12115
|
+
* Remove one of the buyer's saved cards, named by its `payment_token` from
|
|
12116
|
+
* {@link vaultSavedCards}: from the customer's saved cards and from the
|
|
12117
|
+
* shop's vault, with every saved copy of the same card. Only a card of the
|
|
12118
|
+
* payment's own customer that the shop's vault holds can be removed, and
|
|
12119
|
+
* only within the payment's session.
|
|
12120
|
+
*
|
|
12121
|
+
* Refusals throw a `DelopayError`:
|
|
12122
|
+
*
|
|
12123
|
+
* - `400` with code `IR_16` and `data.reason` set to a
|
|
12124
|
+
* {@link VaultSavedCardRemovalRefusal}: the card stays listed.
|
|
12125
|
+
* `saved_card_in_use` means a subscription or agreement still charges it,
|
|
12126
|
+
* `saved_card_payment_in_progress` a payment with it is in flight, and
|
|
12127
|
+
* `saved_card_removal_unavailable` that the shop cannot remove cards here.
|
|
12128
|
+
* - `404`: the card is not one this buyer can remove, for example because it
|
|
12129
|
+
* is already gone.
|
|
12130
|
+
* - `422` with code `IR_29`: the token is no longer held. Read
|
|
12131
|
+
* {@link vaultSavedCards} again and remove the card by its new token.
|
|
12132
|
+
*
|
|
12133
|
+
* `DELETE /payment-link/{merchantId}/{paymentId}/vault/saved-cards/{paymentToken}`
|
|
12134
|
+
*/
|
|
12135
|
+
async vaultRemoveSavedCard(paymentToken, options) {
|
|
12136
|
+
await this.client.request(
|
|
12137
|
+
"DELETE",
|
|
12138
|
+
`${this.linkBase}/vault/saved-cards/${encodeURIComponent(paymentToken)}`,
|
|
12139
|
+
{
|
|
12140
|
+
...options,
|
|
12141
|
+
headers: this.bearerHeaders(options?.headers)
|
|
12142
|
+
}
|
|
12143
|
+
);
|
|
12144
|
+
}
|
|
12080
12145
|
/**
|
|
12081
12146
|
* Mint the security-code form for a saved card, on a shop whose vault keeps
|
|
12082
12147
|
* the code itself (Enigma Vault). The buyer re-enters the code into the
|
|
@@ -12955,4 +13020,4 @@ export {
|
|
|
12955
13020
|
decodeNativePanes,
|
|
12956
13021
|
encodeNativePanes
|
|
12957
13022
|
};
|
|
12958
|
-
//# sourceMappingURL=chunk-
|
|
13023
|
+
//# sourceMappingURL=chunk-RPPCA42D.js.map
|