@takeal/cusfront-sdk 0.3.0 → 0.3.7

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 CHANGED
@@ -4,6 +4,30 @@ 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.7] — 2026-09-16
8
+
9
+ Checked against platform `v0.3.7` (API `0.3.6`, nothing in the end-user
10
+ surface changed between the two).
11
+
12
+ ### Added
13
+
14
+ - `CardDesignRef.image_url_back`: the back of the card, when the design has
15
+ one (`null` or absent for a one-sided design — show the front on both
16
+ sides). The default design's back is `/card-designs/default.svg?side=back`.
17
+ Pass it through `client.assetUrl()` like `image_url`.
18
+ - `CardOtpData` and `isCardOtp(item)` for the `card_otp` inbox item: the
19
+ confirmation code the issuer sent for a 3-D Secure payment (`purpose:
20
+ "payment"`) or for adding the card to Apple Pay / Google Pay (`purpose:
21
+ "wallet"`), with the merchant, amount, card last four and
22
+ `expires_in_minutes`.
23
+
24
+ ### Changed
25
+
26
+ - Types regenerated from the `v0.3.6` API: card designs are two-sided and
27
+ WebP only; `PATCH /me/cards/{id}` also accepts the designs a deployment
28
+ offers on every product. `client.cards.update(id, { designId })` is the
29
+ helper for that; there is no reissue.
30
+
7
31
  ## [0.3.0] — 2026-09-15
8
32
 
9
33
  ### Added
package/dist/index.cjs CHANGED
@@ -630,6 +630,9 @@ var MeResource = class {
630
630
  };
631
631
 
632
632
  // src/resources/notifications.ts
633
+ function isCardOtp(item) {
634
+ return item.event_type === "card_otp" && typeof item.data?.otp === "string";
635
+ }
633
636
  var NotificationsResource = class {
634
637
  constructor(http) {
635
638
  this.http = http;
@@ -754,7 +757,7 @@ var DevicesResource = class {
754
757
  };
755
758
 
756
759
  // src/version.ts
757
- var SDK_VERSION = "0.3.0";
760
+ var SDK_VERSION = "0.3.7";
758
761
 
759
762
  // src/client-platform.ts
760
763
  var CLIENT_HEADER = "X-Takeal-Client";
@@ -880,6 +883,7 @@ exports.defaultBrowserStore = defaultBrowserStore;
880
883
  exports.detectClientPlatform = detectClientPlatform;
881
884
  exports.inMemoryStore = inMemoryStore;
882
885
  exports.isApiError = isApiError;
886
+ exports.isCardOtp = isCardOtp;
883
887
  exports.isNetworkError = isNetworkError;
884
888
  exports.resolveAssetUrl = resolveAssetUrl;
885
889
  //# sourceMappingURL=index.cjs.map