@takeal/cusfront-sdk 0.8.1 → 0.8.4

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.
Files changed (39) hide show
  1. package/CHANGELOG.md +68 -1
  2. package/README.md +49 -7
  3. package/dist/{cards-BPu8Ill7.d.cts → cards-DwxkVJUB.d.cts} +36 -3
  4. package/dist/{cards-DP1fJc_c.d.ts → cards-VkS_2lPe.d.ts} +36 -3
  5. package/dist/index.cjs +59 -4
  6. package/dist/index.cjs.map +1 -1
  7. package/dist/index.d.cts +4 -4
  8. package/dist/index.d.ts +4 -4
  9. package/dist/index.js +59 -4
  10. package/dist/index.js.map +1 -1
  11. package/dist/react/index.d.cts +1 -1
  12. package/dist/react/index.d.ts +1 -1
  13. package/dist/resources/auth.cjs +58 -3
  14. package/dist/resources/auth.cjs.map +1 -1
  15. package/dist/resources/auth.d.cts +102 -7
  16. package/dist/resources/auth.d.ts +102 -7
  17. package/dist/resources/auth.js +58 -3
  18. package/dist/resources/auth.js.map +1 -1
  19. package/dist/resources/cards.d.cts +1 -1
  20. package/dist/resources/cards.d.ts +1 -1
  21. package/dist/resources/deposits.cjs.map +1 -1
  22. package/dist/resources/deposits.d.cts +1 -1
  23. package/dist/resources/deposits.d.ts +1 -1
  24. package/dist/resources/deposits.js.map +1 -1
  25. package/dist/resources/funding-options.d.cts +1 -1
  26. package/dist/resources/funding-options.d.ts +1 -1
  27. package/dist/resources/me.d.cts +1 -1
  28. package/dist/resources/me.d.ts +1 -1
  29. package/dist/resources/subscription.cjs.map +1 -1
  30. package/dist/resources/subscription.d.cts +4 -0
  31. package/dist/resources/subscription.d.ts +4 -0
  32. package/dist/resources/subscription.js.map +1 -1
  33. package/dist/telegram.cjs +59 -4
  34. package/dist/telegram.cjs.map +1 -1
  35. package/dist/telegram.d.cts +1 -1
  36. package/dist/telegram.d.ts +1 -1
  37. package/dist/telegram.js +59 -4
  38. package/dist/telegram.js.map +1 -1
  39. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -4,7 +4,74 @@ 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
- ## [Unreleased]
7
+ ## [0.8.4] — 2026-11-25
8
+
9
+ ### Added
10
+
11
+ - `UserSubscription.tier_icon_url`: the picture the operator gave the plan,
12
+ WebP or SVG, or `null` when it has none. Needs platform 0.8.4; older
13
+ platforms leave it out.
14
+ - `deposits.quote()` takes `promo_code`. Where a method's fee is in the rate
15
+ (SBP, for one), the user's plan and a promo code with a percentage off the
16
+ top-up fee lower that fee, and the quote is priced with it. The quote says
17
+ so: `fee_bps` is the user's fee, `list_fee_bps` the method's before the
18
+ discounts, `fee_discount` what they add to `credited_amount`, and
19
+ `promo_code` the code the rate was priced with. The top-up made from the
20
+ quote uses that code by itself. Needs platform 0.8.4.
21
+ - `FundingQuote.effective_rate`: the rate the user gets, fee and discounts
22
+ included. Show it instead of working a rate out from the method's terms.
23
+ - `auth.confirmTotpSetupEmail({ challenge_token, code })` and
24
+ `auth.resendTotpSetupEmail({ challenge_token })`, and the login stage
25
+ `totp_setup_email_required`. From platform 0.8.4 a staff account can't
26
+ connect an authenticator with its password alone: the first sign-in, and
27
+ the one after a backup code, first sends a six-digit code to the account's
28
+ e-mail. The right code answers `totp_setup_required` with the QR, as
29
+ before. `TotpSetupEmailErrorCode` lists the errors of this step.
30
+
31
+ ### Changed
32
+
33
+ - `auth.verifyTotp` resolves to `JwtIssued | TotpSetupEmailRequired`. A
34
+ backup code never signed in: since platform 0.8.2 the server answers it
35
+ with the start of connecting a new authenticator, and the SDK stored that
36
+ answer as if it were a session. Now it stores nothing and hands the answer
37
+ back; check `stage` before using `access_token`.
38
+
39
+ ## [0.8.3] — 2026-11-24
40
+
41
+ ### Fixed
42
+
43
+ - The SDK reports its own version again. 0.8.2 was tagged with the version
44
+ constant still saying 0.8.1, so it was never published; 0.8.3 is the first
45
+ published build with everything listed under 0.8.2.
46
+
47
+ ## [0.8.2] — 2026-11-24
48
+
49
+ ### Added
50
+
51
+ - `auth.requestPasswordSetup()` and `auth.confirmPasswordSetup({ challengeId,
52
+ code, newPassword })`: an account that signs in with an e-mail code sets its
53
+ first password. The first call sends a six-digit code to the account's
54
+ address, the second sets the password with it. `User.has_password` says
55
+ which form to show: "set a password" or "change the password". Needs
56
+ platform 0.8.2.
57
+
58
+ ### Changed
59
+
60
+ - On platform 0.8.2 a few calls can answer in ways they did not before:
61
+ - `POST /me/cards/{id}/topup` and a card order paid from the wallet answer
62
+ 409 `payments_on_hold` while the account's payments are on hold, like new
63
+ top-ups already do;
64
+ - a transfer from an organization's card, and closing such a card with money
65
+ on it, answer 409 `organization_card`;
66
+ - a transfer between cards can return `transfer.status: "pending"` with
67
+ HTTP 200: it finishes by itself, the money on the first card is set aside
68
+ meanwhile;
69
+ - a top-up quote made without `connector_slug` and `method` is refused when
70
+ the chosen method has a price of its own. Ask for the quote with both.
71
+ `metadata.expires_at` sent with a top-up is ignored.
72
+ - The generated types follow the platform 0.8.2 contract. `Readiness` now has
73
+ the checks the platform has published since 0.8.1: `database`, `cache`,
74
+ `ledger`, `queue`.
8
75
 
9
76
  ## [0.8.1] — 2026-11-23
10
77
 
package/README.md CHANGED
@@ -42,10 +42,16 @@ if (result.stage === "jwt") {
42
42
  } else if (result.stage === "totp_required") {
43
43
  // Step-up required. Prompt the user for their TOTP code,
44
44
  // then call client.auth.verifyTotp({ challenge_token, code }).
45
+ } else if (result.stage === "totp_setup_email_required") {
46
+ // A staff account has to connect an authenticator first, and the password
47
+ // alone is not enough: a code went to result.destination_hint. Ask for it
48
+ // and call client.auth.confirmTotpSetupEmail({ challenge_token, code });
49
+ // client.auth.resendTotpSetupEmail({ challenge_token }) sends a new one.
50
+ // The answer is the totp_setup_required stage below.
45
51
  } else if (result.stage === "totp_setup_required") {
46
- // The account has to enrol an authenticator first. Show result.otpauth_url
47
- // as a QR code, then call client.auth.completeTotpSetup({ challenge_token, code })
48
- // and show the backup_codes it returns. They are never sent again.
52
+ // Show result.otpauth_url as a QR code, then call
53
+ // client.auth.completeTotpSetup({ challenge_token, code }) and show the
54
+ // backup_codes it returns. They are never sent again.
49
55
  }
50
56
  ```
51
57
 
@@ -401,25 +407,33 @@ const sbp = funder.method_terms.find((m) => m.method === "sbp")!;
401
407
  // sbp.source_currency → "RUB"; sbp.fee_kind → "markup"; sbp.fee_bps → 2000;
402
408
  // sbp.quote_ttl_seconds → 300; sbp.min_amount, sbp.max_amount, sbp.daily_limit_per_user
403
409
 
404
- // 2. The user types roubles. The quote locks the rate for quote_ttl_seconds.
410
+ // 2. The user types roubles (and a promo code, if they have one). The quote
411
+ // locks the rate for quote_ttl_seconds.
405
412
  const quote = await client.deposits.quote({
406
413
  amount: "1000",
407
414
  currency: "RUB",
408
415
  connectorSlug: funder.slug,
409
416
  method: "sbp",
417
+ promo_code: promoCode, // optional
410
418
  });
411
419
  // quote.credited_amount → "10.41" USD at a bank rate of 80 ₽ and a 20 % markup.
420
+ // The user's plan and a promo code with a percentage off the top-up fee lower
421
+ // the markup: with 5 % off it is 19 %, quote.fee_bps → 1900,
422
+ // quote.list_fee_bps → 2000, quote.credited_amount → "10.50", and
423
+ // quote.promo_code names the code the rate was priced with. Don't take the fee
424
+ // from `sbp.fee_bps`: the quote has the user's own.
412
425
 
413
426
  // 3. What to show. With `fee_kind === "markup"` the fee sits in the rate: show
414
427
  // the rate and the amount credited, no fee line. The rate in the form
415
428
  // people know, roubles per unit of the wallet currency:
416
- const perUnit = Number(quote.source_amount) / Number(quote.credited_amount); // 96.06 ₽ per $
429
+ const perUnit = 1 / Number(quote.effective_rate); // 96.00 ₽ per $
417
430
  show(`${quote.credited_amount} ${quote.credited_currency} at ${perUnit.toFixed(2)} ₽/$, until ${quote.expires_at}`);
418
431
  // If the user types the wallet amount instead, work the roubles out on the
419
432
  // client from the same rate and quote that: roubles = wanted × perUnit,
420
433
  // rounded up to the kopeck, then `quote()` again with that amount.
421
- // With `fee_kind === "commission"` show the fee as its own line:
422
- // commission = credited × fee_bps / 10000.
434
+ // With `fee_kind === "commission"` the rate is the bank's and the fee is a
435
+ // line of its own, taken off what is credited when the top-up settles; a
436
+ // plan's or a promo code's discount comes off that line.
423
437
 
424
438
  // 4. Pay. The deposit is a redirect: send the user to the bank's page.
425
439
  const deposit = await client.deposits.initiate({
@@ -851,6 +865,9 @@ const ref = await client.referral.get();
851
865
  with a sign-up link without the user typing it again.
852
866
  - `client.subscription.get()` shows a gift subscription as `kind: "gift"`;
853
867
  `gift_until: null` means it doesn't end.
868
+ - `tier_icon_url` is the plan's own picture (WebP or SVG) that the operator
869
+ uploaded. When it is `null`, show your own generic one. Draw it with
870
+ `<img>`, not inline, so an SVG stays a picture.
854
871
  - Rewards and code bonuses are bonuses: a discount on our services, not
855
872
  money. Show friends without names; the API sends none.
856
873
 
@@ -916,6 +933,31 @@ const user = await client.auth.confirmEmailChange({ challengeId: challenge_id, c
916
933
 
917
934
  `linkEmail` is only for the first address of an account made in the Mini App.
918
935
 
936
+ ### Setting or changing the password
937
+
938
+ An account made by signing in with a code from an e-mail has no password.
939
+ `user.has_password` (from `auth.me()`) says which form to show. With a
940
+ password, the user changes it with the current one. Without one, a code goes
941
+ to the account's address first, so a session left open on someone else's
942
+ device is not enough to set a password.
943
+
944
+ ```ts
945
+ const user = await client.auth.me();
946
+ if (user.has_password) {
947
+ await client.auth.changePassword({ current_password, new_password });
948
+ } else {
949
+ const { challenge_id, destination_hint } = await client.auth.requestPasswordSetup();
950
+ // "We sent a code to al***@example.com"
951
+ await client.auth.confirmPasswordSetup({ challengeId: challenge_id, code, newPassword });
952
+ }
953
+ ```
954
+
955
+ Signing in with a code keeps working after a password is set. Errors to
956
+ handle: `weak_password` (400, fix the password, the code still works),
957
+ `invalid_code` (401), `too_many_requests` (429), `email_required` (409, a
958
+ Telegram account adds an address first), `email_not_proven` (409, sign in
959
+ with a code first).
960
+
919
961
  ### Receipts
920
962
 
921
963
  Every payment gets a numbered receipt within a minute: a wallet top-up, a
@@ -159,6 +159,16 @@ interface CreateQuoteInput {
159
159
  connectorSlug?: string;
160
160
  /** The way the user pays. Pass the same method to `initiate()`. */
161
161
  method?: DepositMethod;
162
+ /**
163
+ * A promo code for the top-up. Where the method's fee is in the rate
164
+ * (`fee_kind: "markup"`), the code's percentage discount lowers that fee,
165
+ * so the rate is priced with it and `promo_code` comes back on the quote.
166
+ * The top-up made from the quote uses the same code: pass it again to
167
+ * `initiate()` or leave it out. Without one, the code the user signed up
168
+ * with is used when it works here. A code that can't be used fails with
169
+ * 400 `promo_code_*` and the reason. Needs platform 0.8.4.
170
+ */
171
+ promo_code?: string;
162
172
  }
163
173
  /**
164
174
  * How a method's fee reads. `spread`: taken off the credited amount at the
@@ -197,11 +207,18 @@ interface FundingQuote {
197
207
  credited_amount: string;
198
208
  credited_currency: string;
199
209
  /**
200
- * Provider rate before the fee, credited units per 1 source unit. The
201
- * rate to show the user is `credited_amount / source_amount`, which has
202
- * the fee in it; see the README for the rouble-per-dollar form.
210
+ * Provider rate before the fee, credited units per 1 source unit. Don't
211
+ * show it: the user's rate is `effective_rate`.
203
212
  */
204
213
  rate: string;
214
+ /**
215
+ * The rate the user gets, credited units per 1 source unit, with the fee
216
+ * and any discount of the user's plan or promo code in it. Show this one
217
+ * (or its inverse, see the README) rather than working a rate out from
218
+ * the method's `fee_bps`. Older platforms leave it out; there it is
219
+ * `credited_amount / source_amount`.
220
+ */
221
+ effective_rate?: string;
205
222
  /** The fee in basis points; the same figure as `fee_bps`, under its old name. */
206
223
  spread_bps: number;
207
224
  /** The fee in basis points (2000 = 20 %). */
@@ -213,6 +230,16 @@ interface FundingQuote {
213
230
  method?: DepositMethod;
214
231
  /** The rate is locked until then; the deposit made with it waits for its payment as long. */
215
232
  expires_at: string;
233
+ /**
234
+ * Set when the user's plan or a promo code lowered the fee in the rate:
235
+ * the method's fee before that, in basis points. `fee_bps` is what the
236
+ * user pays.
237
+ */
238
+ list_fee_bps?: number;
239
+ /** What the lower fee adds to `credited_amount`, decimal string in `credited_currency`. */
240
+ fee_discount?: string;
241
+ /** The promo code the rate was priced with; the top-up made from this quote uses it. */
242
+ promo_code?: string;
216
243
  /**
217
244
  * What the user owes in card fees, in `credited_currency`, that this
218
245
  * top-up pays first: it comes off `credited_amount` and the rest is
@@ -369,6 +396,12 @@ interface InitiateDepositInput {
369
396
  * arrive once the top-up is confirmed. A code that can't be used fails the
370
397
  * request with 400 `promo_code_*` and the reason. `client.codes.validate`
371
398
  * checks it first.
399
+ *
400
+ * Where the method's fee is in the rate, the discount lowers the rate, and
401
+ * only the quote prices the rate: send the code to `quote()`. A top-up
402
+ * from that quote uses the quote's `promo_code` without being told; another
403
+ * code here is refused (400 `validation`), and a code the quote was made
404
+ * without is refused with 400 `promo_code_not_applicable`.
372
405
  */
373
406
  promo_code?: string;
374
407
  /** The visitor's analytics ids for the payment's server-side conversions.
@@ -159,6 +159,16 @@ interface CreateQuoteInput {
159
159
  connectorSlug?: string;
160
160
  /** The way the user pays. Pass the same method to `initiate()`. */
161
161
  method?: DepositMethod;
162
+ /**
163
+ * A promo code for the top-up. Where the method's fee is in the rate
164
+ * (`fee_kind: "markup"`), the code's percentage discount lowers that fee,
165
+ * so the rate is priced with it and `promo_code` comes back on the quote.
166
+ * The top-up made from the quote uses the same code: pass it again to
167
+ * `initiate()` or leave it out. Without one, the code the user signed up
168
+ * with is used when it works here. A code that can't be used fails with
169
+ * 400 `promo_code_*` and the reason. Needs platform 0.8.4.
170
+ */
171
+ promo_code?: string;
162
172
  }
163
173
  /**
164
174
  * How a method's fee reads. `spread`: taken off the credited amount at the
@@ -197,11 +207,18 @@ interface FundingQuote {
197
207
  credited_amount: string;
198
208
  credited_currency: string;
199
209
  /**
200
- * Provider rate before the fee, credited units per 1 source unit. The
201
- * rate to show the user is `credited_amount / source_amount`, which has
202
- * the fee in it; see the README for the rouble-per-dollar form.
210
+ * Provider rate before the fee, credited units per 1 source unit. Don't
211
+ * show it: the user's rate is `effective_rate`.
203
212
  */
204
213
  rate: string;
214
+ /**
215
+ * The rate the user gets, credited units per 1 source unit, with the fee
216
+ * and any discount of the user's plan or promo code in it. Show this one
217
+ * (or its inverse, see the README) rather than working a rate out from
218
+ * the method's `fee_bps`. Older platforms leave it out; there it is
219
+ * `credited_amount / source_amount`.
220
+ */
221
+ effective_rate?: string;
205
222
  /** The fee in basis points; the same figure as `fee_bps`, under its old name. */
206
223
  spread_bps: number;
207
224
  /** The fee in basis points (2000 = 20 %). */
@@ -213,6 +230,16 @@ interface FundingQuote {
213
230
  method?: DepositMethod;
214
231
  /** The rate is locked until then; the deposit made with it waits for its payment as long. */
215
232
  expires_at: string;
233
+ /**
234
+ * Set when the user's plan or a promo code lowered the fee in the rate:
235
+ * the method's fee before that, in basis points. `fee_bps` is what the
236
+ * user pays.
237
+ */
238
+ list_fee_bps?: number;
239
+ /** What the lower fee adds to `credited_amount`, decimal string in `credited_currency`. */
240
+ fee_discount?: string;
241
+ /** The promo code the rate was priced with; the top-up made from this quote uses it. */
242
+ promo_code?: string;
216
243
  /**
217
244
  * What the user owes in card fees, in `credited_currency`, that this
218
245
  * top-up pays first: it comes off `credited_amount` and the rest is
@@ -369,6 +396,12 @@ interface InitiateDepositInput {
369
396
  * arrive once the top-up is confirmed. A code that can't be used fails the
370
397
  * request with 400 `promo_code_*` and the reason. `client.codes.validate`
371
398
  * checks it first.
399
+ *
400
+ * Where the method's fee is in the rate, the discount lowers the rate, and
401
+ * only the quote prices the rate: send the code to `quote()`. A top-up
402
+ * from that quote uses the quote's `promo_code` without being told; another
403
+ * code here is refused (400 `validation`), and a code the quote was made
404
+ * without is refused with 400 `promo_code_not_applicable`.
372
405
  */
373
406
  promo_code?: string;
374
407
  /** The visitor's analytics ids for the payment's server-side conversions.
package/dist/index.cjs CHANGED
@@ -716,12 +716,17 @@ var AuthResource = class {
716
716
  return resp;
717
717
  }
718
718
  /** Verify a TOTP code (or XXXX-XXXX backup code) against a
719
- * `totp_required` challenge. On success the JWT is stored. */
719
+ * `totp_required` challenge. On success the JWT is stored. A backup code
720
+ * signs nobody in: it is used up and the answer is
721
+ * `totp_setup_email_required`, the start of connecting a new
722
+ * authenticator ({@link confirmTotpSetupEmail}). Nothing is stored then.
723
+ * Errors after a backup code: see {@link TotpSetupEmailErrorCode}. */
720
724
  async verifyTotp(input) {
721
725
  const resp = await this.http.post("/auth/login/totp", {
722
726
  body: withRemember(input),
723
727
  skipAuth: true
724
728
  });
729
+ if (resp.stage === "totp_setup_email_required") return resp;
725
730
  await this.keep(resp);
726
731
  return resp;
727
732
  }
@@ -794,6 +799,28 @@ var AuthResource = class {
794
799
  await this.keep(resp);
795
800
  return resp;
796
801
  }
802
+ /** Send the code from the e-mail of a `totp_setup_email_required`
803
+ * answer. A right code answers `totp_setup_required`: show its
804
+ * `otpauth_url` as a QR, then finish with {@link completeTotpSetup}.
805
+ * Each code works for 5 minutes and takes five tries; only the newest
806
+ * one works. Nothing is stored. Errors: {@link TotpSetupEmailErrorCode}. */
807
+ async confirmTotpSetupEmail(input) {
808
+ return this.http.post("/auth/login/totp-setup/email", {
809
+ body: { challenge_token: input.challenge_token, code: input.code },
810
+ skipAuth: true
811
+ });
812
+ }
813
+ /** A new e-mail code for the same `totp_setup_email_required` sign-in;
814
+ * the one before it stops working. Use the `challenge_token` of the
815
+ * answer from now on. Five codes an hour at most.
816
+ * Errors: {@link TotpSetupEmailErrorCode}; 401 means the sign-in is over,
817
+ * so start again with {@link login}. */
818
+ async resendTotpSetupEmail(input) {
819
+ return this.http.post("/auth/login/totp-setup/email/resend", {
820
+ body: { challenge_token: input.challenge_token },
821
+ skipAuth: true
822
+ });
823
+ }
797
824
  /** Finish a `totp_setup_required` login: send the first code from the
798
825
  * authenticator app. The JWT is stored. The response carries ten
799
826
  * one-time `backup_codes` that are never returned again, so show them to
@@ -808,13 +835,41 @@ var AuthResource = class {
808
835
  }
809
836
  /** Change the signed-in user's password. Every other session of the
810
837
  * account is signed out; this one stays valid.
811
- * Errors: 400 when the new password fails the policy, 401 when the
812
- * current one is wrong. */
838
+ * Errors: 400 `weak_password` when the new password fails the policy,
839
+ * 400 `no_password` when the account has none yet (use
840
+ * {@link requestPasswordSetup}), 401 when the current one is wrong. */
813
841
  async changePassword(input) {
814
842
  return this.http.post("/auth/password", {
815
843
  body: input
816
844
  });
817
845
  }
846
+ /** Step one of setting the first password of an account that has none
847
+ * (`user.has_password === false`, e.g. made by signing in with an e-mail
848
+ * code): a six-digit code goes to the account's address and works for 5
849
+ * minutes. Nothing changes yet.
850
+ * Errors: 409 `password_exists` (use {@link changePassword}),
851
+ * `email_required` (a Telegram account with no address yet: attach one
852
+ * with {@link requestEmailChange} first), `email_not_proven` (sign in
853
+ * with an e-mail code first); 429 `too_many_requests` (five codes an
854
+ * hour); 503 `delivery_failed`. Platform 0.8.2 and newer. */
855
+ async requestPasswordSetup() {
856
+ return this.http.post("/auth/password/setup", {});
857
+ }
858
+ /** Step two: the code from the e-mail and the new password set the
859
+ * account's first password. Every other session of the account is signed
860
+ * out; this one stays valid, and signing in with a code keeps working.
861
+ * Errors: 400 `weak_password` (the code is not used up, fix the password
862
+ * and send again), 401 `invalid_code` (after five wrong codes ask for a
863
+ * new one), 409 `password_exists`. */
864
+ async confirmPasswordSetup(input) {
865
+ return this.http.post("/auth/password/setup/confirm", {
866
+ body: {
867
+ challenge_id: input.challengeId,
868
+ code: input.code,
869
+ new_password: input.newPassword
870
+ }
871
+ });
872
+ }
818
873
  /** Swap the 2FA method mid-flow. Resolves to `otp_sent` for
819
874
  * telegram/email; for TOTP it short-circuits back to the challenge. */
820
875
  async switchMethod(input) {
@@ -1753,7 +1808,7 @@ var FundingOptionsResource = class {
1753
1808
  };
1754
1809
 
1755
1810
  // src/version.ts
1756
- var SDK_VERSION = "0.8.1";
1811
+ var SDK_VERSION = "0.8.4";
1757
1812
 
1758
1813
  // src/client-platform.ts
1759
1814
  var CLIENT_HEADER = "X-Takeal-Client";