@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/dist/index.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ import { PushResource } from './resources/push.js';
|
|
|
22
22
|
export { PushCapableRegistration, PushStatus, PushSubscriptionInput } from './resources/push.js';
|
|
23
23
|
import { MeResource } from './resources/me.js';
|
|
24
24
|
import { NotificationsResource } from './resources/notifications.js';
|
|
25
|
-
export { InboxItem, ListNotificationsParams, NotificationCategory, NotificationCategoryPreferences, NotificationChannel, NotificationLocale, NotificationPage, NotificationPreferences, NotificationPreferencesInput } from './resources/notifications.js';
|
|
25
|
+
export { CardOtpData, InboxItem, ListNotificationsParams, NotificationCategory, NotificationCategoryPreferences, NotificationChannel, NotificationLocale, NotificationPage, NotificationPreferences, NotificationPreferencesInput, isCardOtp } from './resources/notifications.js';
|
|
26
26
|
import { C as ClientDescriptor, R as ResolvedClientDescriptor, D as DevicesResource } from './devices-DP_hxwmW.js';
|
|
27
27
|
export { a as CLIENT_HEADER, b as ClientPlatform, c as Device, d as DeviceKind, e as DevicePlatform, M as MobilePushCredential, f as RegisterDeviceInput, g as RegisterWebPushOptions, h as RegisteredDevice, U as UnregisterWebPushOptions, W as WebPushCredential, i as detectClientPlatform } from './devices-DP_hxwmW.js';
|
|
28
28
|
export { A as Address, C as CustomerInfo } from './customer-CoxPwe5o.js';
|
|
@@ -119,7 +119,7 @@ declare function isNetworkError(e: unknown): e is NetworkError;
|
|
|
119
119
|
* `define`. `src/version.test.ts` checks it matches `package.json`, so a
|
|
120
120
|
* release bump that forgets this file fails the test run.
|
|
121
121
|
*/
|
|
122
|
-
declare const SDK_VERSION = "0.3.
|
|
122
|
+
declare const SDK_VERSION = "0.3.12";
|
|
123
123
|
|
|
124
124
|
/**
|
|
125
125
|
* `@takeal/cusfront-sdk` — typed client for the Takeal end-user API.
|
package/dist/index.js
CHANGED
|
@@ -382,8 +382,8 @@ var CardsResource = class {
|
|
|
382
382
|
);
|
|
383
383
|
}
|
|
384
384
|
/**
|
|
385
|
-
* Reveal the FULL PAN + CVV for the caller's own card.
|
|
386
|
-
*
|
|
385
|
+
* Reveal the FULL PAN + CVV for the caller's own card. The signed-in
|
|
386
|
+
* session is all the API asks for; the call is rate-limited and audited
|
|
387
387
|
* server-side. The Takeal API never persists this data and marks the
|
|
388
388
|
* response no-store; the SDK returns it verbatim and holds nothing.
|
|
389
389
|
*
|
|
@@ -394,11 +394,8 @@ var CardsResource = class {
|
|
|
394
394
|
* 401 bad re-auth · 403 not your card · 429 rate-limited · 501 connector
|
|
395
395
|
* has no sensitive-data endpoint · 503 provider error.
|
|
396
396
|
*/
|
|
397
|
-
async reveal(id,
|
|
398
|
-
return this.http.post(
|
|
399
|
-
`/me/cards/${encodeURIComponent(id)}/reveal`,
|
|
400
|
-
{ body: { password: input.password, totp_code: input.totpCode } }
|
|
401
|
-
);
|
|
397
|
+
async reveal(id, _input) {
|
|
398
|
+
return this.http.post(`/me/cards/${encodeURIComponent(id)}/reveal`);
|
|
402
399
|
}
|
|
403
400
|
/** Unfreeze a previously-frozen card. Idempotent on an already-active card. */
|
|
404
401
|
async unfreeze(id) {
|
|
@@ -628,6 +625,9 @@ var MeResource = class {
|
|
|
628
625
|
};
|
|
629
626
|
|
|
630
627
|
// src/resources/notifications.ts
|
|
628
|
+
function isCardOtp(item) {
|
|
629
|
+
return item.event_type === "card_otp" && typeof item.data?.otp === "string";
|
|
630
|
+
}
|
|
631
631
|
var NotificationsResource = class {
|
|
632
632
|
constructor(http) {
|
|
633
633
|
this.http = http;
|
|
@@ -752,7 +752,7 @@ var DevicesResource = class {
|
|
|
752
752
|
};
|
|
753
753
|
|
|
754
754
|
// src/version.ts
|
|
755
|
-
var SDK_VERSION = "0.3.
|
|
755
|
+
var SDK_VERSION = "0.3.12";
|
|
756
756
|
|
|
757
757
|
// src/client-platform.ts
|
|
758
758
|
var CLIENT_HEADER = "X-Takeal-Client";
|
|
@@ -869,6 +869,6 @@ function defaultFetch() {
|
|
|
869
869
|
);
|
|
870
870
|
}
|
|
871
871
|
|
|
872
|
-
export { ApiError, CLIENT_HEADER, NetworkError, SDK_VERSION, createClient, defaultBrowserStore, detectClientPlatform, inMemoryStore, isApiError, isNetworkError, resolveAssetUrl };
|
|
872
|
+
export { ApiError, CLIENT_HEADER, NetworkError, SDK_VERSION, createClient, defaultBrowserStore, detectClientPlatform, inMemoryStore, isApiError, isCardOtp, isNetworkError, resolveAssetUrl };
|
|
873
873
|
//# sourceMappingURL=index.js.map
|
|
874
874
|
//# sourceMappingURL=index.js.map
|