@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/telegram.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CusfrontClient, CreateClientOptions } from './index.cjs';
|
|
2
2
|
import { JwtIssued, TelegramUnknown } from './resources/auth.cjs';
|
|
3
3
|
import './http-CL97TjMO.cjs';
|
|
4
|
-
import './cards-
|
|
4
|
+
import './cards-nXmDP0ei.cjs';
|
|
5
5
|
import './resources/claims.cjs';
|
|
6
6
|
import './resources/consents.cjs';
|
|
7
7
|
import './resources/balance.cjs';
|
package/dist/telegram.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CusfrontClient, CreateClientOptions } from './index.js';
|
|
2
2
|
import { JwtIssued, TelegramUnknown } from './resources/auth.js';
|
|
3
3
|
import './http-CL97TjMO.js';
|
|
4
|
-
import './cards-
|
|
4
|
+
import './cards-CuUdrQ0H.js';
|
|
5
5
|
import './resources/claims.js';
|
|
6
6
|
import './resources/consents.js';
|
|
7
7
|
import './resources/balance.js';
|
package/dist/telegram.js
CHANGED
|
@@ -182,6 +182,11 @@ function cardOrderBody(input) {
|
|
|
182
182
|
if (input.metadata !== void 0) body["metadata"] = input.metadata;
|
|
183
183
|
return body;
|
|
184
184
|
}
|
|
185
|
+
function revealState(r) {
|
|
186
|
+
if (r.details_pending) return "pending";
|
|
187
|
+
if (r.reveal_url) return "page";
|
|
188
|
+
return "numbers";
|
|
189
|
+
}
|
|
185
190
|
var CardsResource = class {
|
|
186
191
|
constructor(http) {
|
|
187
192
|
this.http = http;
|
|
@@ -337,15 +342,22 @@ var CardsResource = class {
|
|
|
337
342
|
* keep the result in volatile memory only, never write it to
|
|
338
343
|
* localStorage / logs, and clear it within `expires_in_seconds`.
|
|
339
344
|
*
|
|
340
|
-
*
|
|
341
|
-
* when the issuer shows them on a
|
|
342
|
-
* frame right away, it is
|
|
345
|
+
* `state` tells the three answers apart: `numbers`; `page`, with
|
|
346
|
+
* `reveal_url` and empty `pan` and `cvv` when the issuer shows them on a
|
|
347
|
+
* page of its own (open that page in a frame right away, it is
|
|
348
|
+
* short-lived); or `pending` while the card's details are still being
|
|
349
|
+
* prepared, which doesn't count against the limit. A card says the same
|
|
350
|
+
* in {@link Card.details_pending}, so there is no need to call this just
|
|
351
|
+
* to find out.
|
|
343
352
|
*
|
|
344
353
|
* 403 not your card · 409 `card_locked` · 429 rate-limited · 501 connector
|
|
345
354
|
* has no sensitive-data endpoint · 503 `provider_unavailable`.
|
|
346
355
|
*/
|
|
347
356
|
async reveal(id, _input) {
|
|
348
|
-
|
|
357
|
+
const r = await this.http.post(
|
|
358
|
+
`/me/cards/${encodeURIComponent(id)}/reveal`
|
|
359
|
+
);
|
|
360
|
+
return { ...r, state: revealState(r) };
|
|
349
361
|
}
|
|
350
362
|
/**
|
|
351
363
|
* Unfreeze a previously-frozen card. Idempotent on an already-active card.
|
|
@@ -1553,7 +1565,7 @@ var FundingOptionsResource = class {
|
|
|
1553
1565
|
};
|
|
1554
1566
|
|
|
1555
1567
|
// src/version.ts
|
|
1556
|
-
var SDK_VERSION = "0.6.
|
|
1568
|
+
var SDK_VERSION = "0.6.11";
|
|
1557
1569
|
|
|
1558
1570
|
// src/client-platform.ts
|
|
1559
1571
|
var CLIENT_HEADER = "X-Takeal-Client";
|
|
@@ -1628,7 +1640,7 @@ function isAbsolute(url) {
|
|
|
1628
1640
|
}
|
|
1629
1641
|
|
|
1630
1642
|
// src/compat.ts
|
|
1631
|
-
var SUPPORTED_MEISTER = ">=0.6
|
|
1643
|
+
var SUPPORTED_MEISTER = ">=0.7.6, <1.0.0";
|
|
1632
1644
|
var SEMVER = /^v?(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-([0-9A-Za-z.-]+))?(?:\+[0-9A-Za-z.-]+)?$/;
|
|
1633
1645
|
function parse(v) {
|
|
1634
1646
|
const m = SEMVER.exec(v.trim());
|