@takeal/cusfront-sdk 0.3.0 → 0.3.12
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/CHANGELOG.md +37 -0
- package/README.md +2 -2
- package/dist/index.cjs +9 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +9 -9
- package/dist/index.js.map +1 -1
- package/dist/resources/cards.cjs +4 -7
- package/dist/resources/cards.cjs.map +1 -1
- package/dist/resources/cards.d.cts +21 -16
- package/dist/resources/cards.d.ts +21 -16
- package/dist/resources/cards.js +4 -7
- package/dist/resources/cards.js.map +1 -1
- package/dist/resources/notifications.cjs +4 -0
- package/dist/resources/notifications.cjs.map +1 -1
- package/dist/resources/notifications.d.cts +26 -2
- package/dist/resources/notifications.d.ts +26 -2
- package/dist/resources/notifications.js +4 -1
- package/dist/resources/notifications.js.map +1 -1
- package/dist/telegram.cjs +5 -8
- package/dist/telegram.cjs.map +1 -1
- package/dist/telegram.js +5 -8
- package/dist/telegram.js.map +1 -1
- package/package.json +7 -3
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,43 @@ All notable changes to `@takeal/cusfront-sdk` are documented here. The format
|
|
|
4
4
|
follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and the project
|
|
5
5
|
adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
+
## [0.3.12] — 2026-09-16
|
|
8
|
+
|
|
9
|
+
Checked against platform `v0.3.12`.
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
|
|
13
|
+
- `client.cards.reveal(id)` takes no re-auth: the signed-in session is enough
|
|
14
|
+
(the API stopped asking for the password and the TOTP code). The old
|
|
15
|
+
`RevealCardInput` argument is still accepted and ignored; it is deprecated
|
|
16
|
+
and goes away in the next major.
|
|
17
|
+
- `Card` no longer carries `connector_slug` and `provider_reference`: the API
|
|
18
|
+
keeps those for operators. `product` and `design` say what a holder needs.
|
|
19
|
+
|
|
20
|
+
## [0.3.7] — 2026-09-16
|
|
21
|
+
|
|
22
|
+
Checked against platform `v0.3.7` (API `0.3.6`, nothing in the end-user
|
|
23
|
+
surface changed between the two).
|
|
24
|
+
|
|
25
|
+
### Added
|
|
26
|
+
|
|
27
|
+
- `CardDesignRef.image_url_back`: the back of the card, when the design has
|
|
28
|
+
one (`null` or absent for a one-sided design — show the front on both
|
|
29
|
+
sides). The default design's back is `/card-designs/default.svg?side=back`.
|
|
30
|
+
Pass it through `client.assetUrl()` like `image_url`.
|
|
31
|
+
- `CardOtpData` and `isCardOtp(item)` for the `card_otp` inbox item: the
|
|
32
|
+
confirmation code the issuer sent for a 3-D Secure payment (`purpose:
|
|
33
|
+
"payment"`) or for adding the card to Apple Pay / Google Pay (`purpose:
|
|
34
|
+
"wallet"`), with the merchant, amount, card last four and
|
|
35
|
+
`expires_in_minutes`.
|
|
36
|
+
|
|
37
|
+
### Changed
|
|
38
|
+
|
|
39
|
+
- Types regenerated from the `v0.3.6` API: card designs are two-sided and
|
|
40
|
+
WebP only; `PATCH /me/cards/{id}` also accepts the designs a deployment
|
|
41
|
+
offers on every product. `client.cards.update(id, { designId })` is the
|
|
42
|
+
helper for that; there is no reissue.
|
|
43
|
+
|
|
7
44
|
## [0.3.0] — 2026-09-15
|
|
8
45
|
|
|
9
46
|
### Added
|
package/README.md
CHANGED
|
@@ -502,8 +502,8 @@ Algorithm: HMAC-SHA256, header `X-Takeal-Signature: sha256=<hex>`, signed over
|
|
|
502
502
|
the raw body bytes (no timestamp). Comparison is constant-time.
|
|
503
503
|
|
|
504
504
|
> **Card details:** `client.cards.reveal()` returns the full card number and
|
|
505
|
-
> CVV
|
|
506
|
-
>
|
|
505
|
+
> CVV to the signed-in user; no password or code is asked again, and the API
|
|
506
|
+
> rate-limits and logs every call. The rest of
|
|
507
507
|
> `client.cards` is listProducts, getProduct, create, get, list, update,
|
|
508
508
|
> balance, freeze, unfreeze and terminate.
|
|
509
509
|
|
package/dist/index.cjs
CHANGED
|
@@ -384,8 +384,8 @@ var CardsResource = class {
|
|
|
384
384
|
);
|
|
385
385
|
}
|
|
386
386
|
/**
|
|
387
|
-
* Reveal the FULL PAN + CVV for the caller's own card.
|
|
388
|
-
*
|
|
387
|
+
* Reveal the FULL PAN + CVV for the caller's own card. The signed-in
|
|
388
|
+
* session is all the API asks for; the call is rate-limited and audited
|
|
389
389
|
* server-side. The Takeal API never persists this data and marks the
|
|
390
390
|
* response no-store; the SDK returns it verbatim and holds nothing.
|
|
391
391
|
*
|
|
@@ -396,11 +396,8 @@ var CardsResource = class {
|
|
|
396
396
|
* 401 bad re-auth · 403 not your card · 429 rate-limited · 501 connector
|
|
397
397
|
* has no sensitive-data endpoint · 503 provider error.
|
|
398
398
|
*/
|
|
399
|
-
async reveal(id,
|
|
400
|
-
return this.http.post(
|
|
401
|
-
`/me/cards/${encodeURIComponent(id)}/reveal`,
|
|
402
|
-
{ body: { password: input.password, totp_code: input.totpCode } }
|
|
403
|
-
);
|
|
399
|
+
async reveal(id, _input) {
|
|
400
|
+
return this.http.post(`/me/cards/${encodeURIComponent(id)}/reveal`);
|
|
404
401
|
}
|
|
405
402
|
/** Unfreeze a previously-frozen card. Idempotent on an already-active card. */
|
|
406
403
|
async unfreeze(id) {
|
|
@@ -630,6 +627,9 @@ var MeResource = class {
|
|
|
630
627
|
};
|
|
631
628
|
|
|
632
629
|
// src/resources/notifications.ts
|
|
630
|
+
function isCardOtp(item) {
|
|
631
|
+
return item.event_type === "card_otp" && typeof item.data?.otp === "string";
|
|
632
|
+
}
|
|
633
633
|
var NotificationsResource = class {
|
|
634
634
|
constructor(http) {
|
|
635
635
|
this.http = http;
|
|
@@ -754,7 +754,7 @@ var DevicesResource = class {
|
|
|
754
754
|
};
|
|
755
755
|
|
|
756
756
|
// src/version.ts
|
|
757
|
-
var SDK_VERSION = "0.3.
|
|
757
|
+
var SDK_VERSION = "0.3.12";
|
|
758
758
|
|
|
759
759
|
// src/client-platform.ts
|
|
760
760
|
var CLIENT_HEADER = "X-Takeal-Client";
|
|
@@ -880,6 +880,7 @@ exports.defaultBrowserStore = defaultBrowserStore;
|
|
|
880
880
|
exports.detectClientPlatform = detectClientPlatform;
|
|
881
881
|
exports.inMemoryStore = inMemoryStore;
|
|
882
882
|
exports.isApiError = isApiError;
|
|
883
|
+
exports.isCardOtp = isCardOtp;
|
|
883
884
|
exports.isNetworkError = isNetworkError;
|
|
884
885
|
exports.resolveAssetUrl = resolveAssetUrl;
|
|
885
886
|
//# sourceMappingURL=index.cjs.map
|