@takeal/cusfront-sdk 0.6.8 → 0.6.11
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 +39 -2
- package/README.md +23 -7
- package/dist/{cards-BgY00UpU.d.ts → cards-CuUdrQ0H.d.ts} +48 -7
- package/dist/{cards-DGz4Rqu1.d.cts → cards-nXmDP0ei.d.cts} +48 -7
- package/dist/index.cjs +19 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +19 -7
- package/dist/index.js.map +1 -1
- package/dist/react/index.d.cts +1 -1
- package/dist/react/index.d.ts +1 -1
- package/dist/resources/auth.cjs.map +1 -1
- package/dist/resources/auth.d.cts +1 -1
- package/dist/resources/auth.d.ts +1 -1
- package/dist/resources/auth.js.map +1 -1
- package/dist/resources/cards.cjs +17 -4
- package/dist/resources/cards.cjs.map +1 -1
- package/dist/resources/cards.d.cts +1 -1
- package/dist/resources/cards.d.ts +1 -1
- package/dist/resources/cards.js +17 -5
- package/dist/resources/cards.js.map +1 -1
- package/dist/resources/deposits.cjs.map +1 -1
- package/dist/resources/deposits.d.cts +1 -1
- package/dist/resources/deposits.d.ts +1 -1
- package/dist/resources/deposits.js.map +1 -1
- package/dist/resources/funding-options.d.cts +1 -1
- package/dist/resources/funding-options.d.ts +1 -1
- package/dist/resources/me.d.cts +1 -1
- package/dist/resources/me.d.ts +1 -1
- package/dist/telegram.cjs +18 -6
- package/dist/telegram.cjs.map +1 -1
- package/dist/telegram.d.cts +1 -1
- package/dist/telegram.d.ts +1 -1
- package/dist/telegram.js +18 -6
- package/dist/telegram.js.map +1 -1
- package/package.json +4 -4
package/dist/index.d.cts
CHANGED
|
@@ -2,8 +2,8 @@ import { T as TokenStore, F as FetchLike } from './http-CL97TjMO.cjs';
|
|
|
2
2
|
export { d as defaultBrowserStore, i as inMemoryStore } from './http-CL97TjMO.cjs';
|
|
3
3
|
import { AuthResource } from './resources/auth.cjs';
|
|
4
4
|
export { ChangePasswordInput, EmailChangeRequested, EmailCodeSent, EmailCodeSession, ExchangeTelegramInput, JwtIssued, LinkTelegramInput, LoginInput, LoginResponse, OtpSentResponse, RegisterInput, RequestEmailCodeInput, Session, TelegramLink, TelegramUnknown, TotpRequired, TotpSetupComplete, TotpSetupRequired, User, VerifyEmailCodeInput } from './resources/auth.cjs';
|
|
5
|
-
import { b as DepositsResource, F as FundingOptionsResource, c as CardsResource } from './cards-
|
|
6
|
-
export { A as Address, B as BillingAddress, a as Card, d as CardBalance, e as CardDesignRef, f as CardForm, g as CardInTransit, h as CardLoadStatus, i as CardOrder, j as CardOrderError, k as CardOrderInput, C as CardProduct, l as CardProductPrice, m as CardStatus, n as CardStatusSource, o as CardTariff, p as CardTopUp, q as CardTopUpStatus, r as CardTransfer, s as CardType, t as Cardholder, u as CloseBlockedReason, v as CreateCardInput, w as CreateDepositRefundInput, x as CreateQuoteInput, y as CustomerInfo, D as Deposit, z as DepositMethod, E as DepositStatus, G as DepositTarget, H as FeeKind, I as FunderMode, J as FundingOption, K as FundingQuote, L as InitiateDepositInput, M as IssuanceBonus, N as IssueCardInput, O as MethodTerms, R as Refund, P as RevealCardInput, Q as
|
|
5
|
+
import { b as DepositsResource, F as FundingOptionsResource, c as CardsResource } from './cards-nXmDP0ei.cjs';
|
|
6
|
+
export { A as Address, B as BillingAddress, a as Card, d as CardBalance, e as CardDesignRef, f as CardForm, g as CardInTransit, h as CardLoadStatus, i as CardOrder, j as CardOrderError, k as CardOrderInput, C as CardProduct, l as CardProductPrice, m as CardStatus, n as CardStatusSource, o as CardTariff, p as CardTopUp, q as CardTopUpStatus, r as CardTransfer, s as CardType, t as Cardholder, u as CloseBlockedReason, v as CreateCardInput, w as CreateDepositRefundInput, x as CreateQuoteInput, y as CustomerInfo, D as Deposit, z as DepositMethod, E as DepositStatus, G as DepositTarget, H as FeeKind, I as FunderMode, J as FundingOption, K as FundingQuote, L as InitiateDepositInput, M as IssuanceBonus, N as IssueCardInput, O as MethodTerms, R as Refund, P as RevealCardInput, Q as RevealState, S as RevealedCard, T as SetPinInput, U as TopUpInput, V as TopUpResult, W as TopUpTerms, X as TransferInput, Y as TransferResult, Z as UpdateCardInput, _ as revealState } from './cards-nXmDP0ei.cjs';
|
|
7
7
|
import { BalanceResource } from './resources/balance.cjs';
|
|
8
8
|
export { Balance } from './resources/balance.cjs';
|
|
9
9
|
import { BonusResource } from './resources/bonus.cjs';
|
|
@@ -81,7 +81,7 @@ interface BrandConfig {
|
|
|
81
81
|
* Which platform versions this SDK works with, as a semver range:
|
|
82
82
|
* comparators separated by ", ". Keep this the only definition.
|
|
83
83
|
*/
|
|
84
|
-
declare const SUPPORTED_MEISTER = ">=0.6
|
|
84
|
+
declare const SUPPORTED_MEISTER = ">=0.7.6, <1.0.0";
|
|
85
85
|
/** What `client.ready()` returns. */
|
|
86
86
|
interface ReadyInfo {
|
|
87
87
|
/** `true` when the platform reported a version inside `supportedMeister`. */
|
|
@@ -187,7 +187,7 @@ declare function isNetworkError(e: unknown): e is NetworkError;
|
|
|
187
187
|
* `define`. `src/version.test.ts` checks it matches `package.json`, so a
|
|
188
188
|
* release bump that forgets this file fails the test run.
|
|
189
189
|
*/
|
|
190
|
-
declare const SDK_VERSION = "0.6.
|
|
190
|
+
declare const SDK_VERSION = "0.6.11";
|
|
191
191
|
|
|
192
192
|
/**
|
|
193
193
|
* `@takeal/cusfront-sdk` — typed client for the Takeal end-user API.
|
package/dist/index.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import { T as TokenStore, F as FetchLike } from './http-CL97TjMO.js';
|
|
|
2
2
|
export { d as defaultBrowserStore, i as inMemoryStore } from './http-CL97TjMO.js';
|
|
3
3
|
import { AuthResource } from './resources/auth.js';
|
|
4
4
|
export { ChangePasswordInput, EmailChangeRequested, EmailCodeSent, EmailCodeSession, ExchangeTelegramInput, JwtIssued, LinkTelegramInput, LoginInput, LoginResponse, OtpSentResponse, RegisterInput, RequestEmailCodeInput, Session, TelegramLink, TelegramUnknown, TotpRequired, TotpSetupComplete, TotpSetupRequired, User, VerifyEmailCodeInput } from './resources/auth.js';
|
|
5
|
-
import { b as DepositsResource, F as FundingOptionsResource, c as CardsResource } from './cards-
|
|
6
|
-
export { A as Address, B as BillingAddress, a as Card, d as CardBalance, e as CardDesignRef, f as CardForm, g as CardInTransit, h as CardLoadStatus, i as CardOrder, j as CardOrderError, k as CardOrderInput, C as CardProduct, l as CardProductPrice, m as CardStatus, n as CardStatusSource, o as CardTariff, p as CardTopUp, q as CardTopUpStatus, r as CardTransfer, s as CardType, t as Cardholder, u as CloseBlockedReason, v as CreateCardInput, w as CreateDepositRefundInput, x as CreateQuoteInput, y as CustomerInfo, D as Deposit, z as DepositMethod, E as DepositStatus, G as DepositTarget, H as FeeKind, I as FunderMode, J as FundingOption, K as FundingQuote, L as InitiateDepositInput, M as IssuanceBonus, N as IssueCardInput, O as MethodTerms, R as Refund, P as RevealCardInput, Q as
|
|
5
|
+
import { b as DepositsResource, F as FundingOptionsResource, c as CardsResource } from './cards-CuUdrQ0H.js';
|
|
6
|
+
export { A as Address, B as BillingAddress, a as Card, d as CardBalance, e as CardDesignRef, f as CardForm, g as CardInTransit, h as CardLoadStatus, i as CardOrder, j as CardOrderError, k as CardOrderInput, C as CardProduct, l as CardProductPrice, m as CardStatus, n as CardStatusSource, o as CardTariff, p as CardTopUp, q as CardTopUpStatus, r as CardTransfer, s as CardType, t as Cardholder, u as CloseBlockedReason, v as CreateCardInput, w as CreateDepositRefundInput, x as CreateQuoteInput, y as CustomerInfo, D as Deposit, z as DepositMethod, E as DepositStatus, G as DepositTarget, H as FeeKind, I as FunderMode, J as FundingOption, K as FundingQuote, L as InitiateDepositInput, M as IssuanceBonus, N as IssueCardInput, O as MethodTerms, R as Refund, P as RevealCardInput, Q as RevealState, S as RevealedCard, T as SetPinInput, U as TopUpInput, V as TopUpResult, W as TopUpTerms, X as TransferInput, Y as TransferResult, Z as UpdateCardInput, _ as revealState } from './cards-CuUdrQ0H.js';
|
|
7
7
|
import { BalanceResource } from './resources/balance.js';
|
|
8
8
|
export { Balance } from './resources/balance.js';
|
|
9
9
|
import { BonusResource } from './resources/bonus.js';
|
|
@@ -81,7 +81,7 @@ interface BrandConfig {
|
|
|
81
81
|
* Which platform versions this SDK works with, as a semver range:
|
|
82
82
|
* comparators separated by ", ". Keep this the only definition.
|
|
83
83
|
*/
|
|
84
|
-
declare const SUPPORTED_MEISTER = ">=0.6
|
|
84
|
+
declare const SUPPORTED_MEISTER = ">=0.7.6, <1.0.0";
|
|
85
85
|
/** What `client.ready()` returns. */
|
|
86
86
|
interface ReadyInfo {
|
|
87
87
|
/** `true` when the platform reported a version inside `supportedMeister`. */
|
|
@@ -187,7 +187,7 @@ declare function isNetworkError(e: unknown): e is NetworkError;
|
|
|
187
187
|
* `define`. `src/version.test.ts` checks it matches `package.json`, so a
|
|
188
188
|
* release bump that forgets this file fails the test run.
|
|
189
189
|
*/
|
|
190
|
-
declare const SDK_VERSION = "0.6.
|
|
190
|
+
declare const SDK_VERSION = "0.6.11";
|
|
191
191
|
|
|
192
192
|
/**
|
|
193
193
|
* `@takeal/cusfront-sdk` — typed client for the Takeal end-user API.
|
package/dist/index.js
CHANGED
|
@@ -185,6 +185,11 @@ function cardOrderBody(input) {
|
|
|
185
185
|
if (input.metadata !== void 0) body["metadata"] = input.metadata;
|
|
186
186
|
return body;
|
|
187
187
|
}
|
|
188
|
+
function revealState(r) {
|
|
189
|
+
if (r.details_pending) return "pending";
|
|
190
|
+
if (r.reveal_url) return "page";
|
|
191
|
+
return "numbers";
|
|
192
|
+
}
|
|
188
193
|
var CardsResource = class {
|
|
189
194
|
constructor(http) {
|
|
190
195
|
this.http = http;
|
|
@@ -340,15 +345,22 @@ var CardsResource = class {
|
|
|
340
345
|
* keep the result in volatile memory only, never write it to
|
|
341
346
|
* localStorage / logs, and clear it within `expires_in_seconds`.
|
|
342
347
|
*
|
|
343
|
-
*
|
|
344
|
-
* when the issuer shows them on a
|
|
345
|
-
* frame right away, it is
|
|
348
|
+
* `state` tells the three answers apart: `numbers`; `page`, with
|
|
349
|
+
* `reveal_url` and empty `pan` and `cvv` when the issuer shows them on a
|
|
350
|
+
* page of its own (open that page in a frame right away, it is
|
|
351
|
+
* short-lived); or `pending` while the card's details are still being
|
|
352
|
+
* prepared, which doesn't count against the limit. A card says the same
|
|
353
|
+
* in {@link Card.details_pending}, so there is no need to call this just
|
|
354
|
+
* to find out.
|
|
346
355
|
*
|
|
347
356
|
* 403 not your card · 409 `card_locked` · 429 rate-limited · 501 connector
|
|
348
357
|
* has no sensitive-data endpoint · 503 `provider_unavailable`.
|
|
349
358
|
*/
|
|
350
359
|
async reveal(id, _input) {
|
|
351
|
-
|
|
360
|
+
const r = await this.http.post(
|
|
361
|
+
`/me/cards/${encodeURIComponent(id)}/reveal`
|
|
362
|
+
);
|
|
363
|
+
return { ...r, state: revealState(r) };
|
|
352
364
|
}
|
|
353
365
|
/**
|
|
354
366
|
* Unfreeze a previously-frozen card. Idempotent on an already-active card.
|
|
@@ -1573,7 +1585,7 @@ var FundingOptionsResource = class {
|
|
|
1573
1585
|
};
|
|
1574
1586
|
|
|
1575
1587
|
// src/version.ts
|
|
1576
|
-
var SDK_VERSION = "0.6.
|
|
1588
|
+
var SDK_VERSION = "0.6.11";
|
|
1577
1589
|
|
|
1578
1590
|
// src/client-platform.ts
|
|
1579
1591
|
var CLIENT_HEADER = "X-Takeal-Client";
|
|
@@ -1648,7 +1660,7 @@ function isAbsolute(url) {
|
|
|
1648
1660
|
}
|
|
1649
1661
|
|
|
1650
1662
|
// src/compat.ts
|
|
1651
|
-
var SUPPORTED_MEISTER = ">=0.6
|
|
1663
|
+
var SUPPORTED_MEISTER = ">=0.7.6, <1.0.0";
|
|
1652
1664
|
var SEMVER = /^v?(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-([0-9A-Za-z.-]+))?(?:\+[0-9A-Za-z.-]+)?$/;
|
|
1653
1665
|
function parse(v) {
|
|
1654
1666
|
const m = SEMVER.exec(v.trim());
|
|
@@ -2199,6 +2211,6 @@ function defaultFetch() {
|
|
|
2199
2211
|
);
|
|
2200
2212
|
}
|
|
2201
2213
|
|
|
2202
|
-
export { ANALYTICS_EVENTS, ApiError, CLIENT_HEADER, DISPUTE_DOCUMENTS_CONSENT, HOLDER_DATA_CONSENT, METRIKA_GOALS, NO_CAPTURE_CLASS, NetworkError, SDK_VERSION, SUPPORTED_MEISTER, anonymousKey, createClient, currentTouch, defaultBrowserStore, detectClientPlatform, identify, inMemoryStore, initAnalytics, isApiError, isCardOtp, isNetworkError, page, posthogDistinctId, resetAnalytics, resolveAssetUrl, sanitizeProperties, sanitizeUrl, satisfies, setAnalyticsZone, track };
|
|
2214
|
+
export { ANALYTICS_EVENTS, ApiError, CLIENT_HEADER, DISPUTE_DOCUMENTS_CONSENT, HOLDER_DATA_CONSENT, METRIKA_GOALS, NO_CAPTURE_CLASS, NetworkError, SDK_VERSION, SUPPORTED_MEISTER, anonymousKey, createClient, currentTouch, defaultBrowserStore, detectClientPlatform, identify, inMemoryStore, initAnalytics, isApiError, isCardOtp, isNetworkError, page, posthogDistinctId, resetAnalytics, resolveAssetUrl, revealState, sanitizeProperties, sanitizeUrl, satisfies, setAnalyticsZone, track };
|
|
2203
2215
|
//# sourceMappingURL=index.js.map
|
|
2204
2216
|
//# sourceMappingURL=index.js.map
|