@takeal/cusfront-sdk 0.3.7 → 0.3.18
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 +32 -0
- package/README.md +6 -4
- package/dist/index.cjs +15 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +15 -8
- package/dist/index.js.map +1 -1
- package/dist/resources/cards.cjs +14 -7
- package/dist/resources/cards.cjs.map +1 -1
- package/dist/resources/cards.d.cts +20 -12
- package/dist/resources/cards.d.ts +20 -12
- package/dist/resources/cards.js +14 -7
- package/dist/resources/cards.js.map +1 -1
- package/dist/resources/deposits.cjs.map +1 -1
- package/dist/resources/deposits.d.cts +9 -1
- package/dist/resources/deposits.d.ts +9 -1
- package/dist/resources/deposits.js.map +1 -1
- package/dist/telegram.cjs +15 -8
- package/dist/telegram.cjs.map +1 -1
- package/dist/telegram.js +15 -8
- package/dist/telegram.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -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.18";
|
|
123
123
|
|
|
124
124
|
/**
|
|
125
125
|
* `@takeal/cusfront-sdk` — typed client for the Takeal end-user API.
|
package/dist/index.js
CHANGED
|
@@ -339,6 +339,16 @@ var CardsResource = class {
|
|
|
339
339
|
`/me/card-products/${encodeURIComponent(id)}`
|
|
340
340
|
);
|
|
341
341
|
}
|
|
342
|
+
/**
|
|
343
|
+
* The public catalog: the same products, order and default as
|
|
344
|
+
* {@link listProducts}, but readable before sign-in, for a landing page or
|
|
345
|
+
* the cabinet's first screen. Prices are list prices (`discount_bps` is
|
|
346
|
+
* always 0); once the user is signed in, {@link listProducts} shows what
|
|
347
|
+
* they pay. The API lets caches keep this response for a minute.
|
|
348
|
+
*/
|
|
349
|
+
async catalog() {
|
|
350
|
+
return this.http.get("/card-products");
|
|
351
|
+
}
|
|
342
352
|
/**
|
|
343
353
|
* Rename the caller's own card or change its design. Resolves to the
|
|
344
354
|
* updated card. 404 if the card isn't the caller's; 400 `invalid_name` /
|
|
@@ -382,8 +392,8 @@ var CardsResource = class {
|
|
|
382
392
|
);
|
|
383
393
|
}
|
|
384
394
|
/**
|
|
385
|
-
* Reveal the FULL PAN + CVV for the caller's own card.
|
|
386
|
-
*
|
|
395
|
+
* Reveal the FULL PAN + CVV for the caller's own card. The signed-in
|
|
396
|
+
* session is all the API asks for; the call is rate-limited and audited
|
|
387
397
|
* server-side. The Takeal API never persists this data and marks the
|
|
388
398
|
* response no-store; the SDK returns it verbatim and holds nothing.
|
|
389
399
|
*
|
|
@@ -394,11 +404,8 @@ var CardsResource = class {
|
|
|
394
404
|
* 401 bad re-auth · 403 not your card · 429 rate-limited · 501 connector
|
|
395
405
|
* has no sensitive-data endpoint · 503 provider error.
|
|
396
406
|
*/
|
|
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
|
-
);
|
|
407
|
+
async reveal(id, _input) {
|
|
408
|
+
return this.http.post(`/me/cards/${encodeURIComponent(id)}/reveal`);
|
|
402
409
|
}
|
|
403
410
|
/** Unfreeze a previously-frozen card. Idempotent on an already-active card. */
|
|
404
411
|
async unfreeze(id) {
|
|
@@ -755,7 +762,7 @@ var DevicesResource = class {
|
|
|
755
762
|
};
|
|
756
763
|
|
|
757
764
|
// src/version.ts
|
|
758
|
-
var SDK_VERSION = "0.3.
|
|
765
|
+
var SDK_VERSION = "0.3.18";
|
|
759
766
|
|
|
760
767
|
// src/client-platform.ts
|
|
761
768
|
var CLIENT_HEADER = "X-Takeal-Client";
|