@takeal/cusfront-sdk 0.6.14 → 0.8.1
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 +57 -0
- package/README.md +53 -1
- package/dist/analytics.cjs +88 -7
- package/dist/analytics.cjs.map +1 -1
- package/dist/analytics.d.cts +30 -2
- package/dist/analytics.d.ts +30 -2
- package/dist/analytics.js +86 -8
- package/dist/analytics.js.map +1 -1
- package/dist/{cards-D_krTWzr.d.cts → cards-BPu8Ill7.d.cts} +122 -2
- package/dist/{cards-DPlgx76p.d.ts → cards-DP1fJc_c.d.ts} +122 -2
- package/dist/index.cjs +147 -14
- 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 +147 -15
- 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 +8 -4
- package/dist/resources/auth.cjs.map +1 -1
- package/dist/resources/auth.d.cts +17 -6
- package/dist/resources/auth.d.ts +17 -6
- package/dist/resources/auth.js +8 -4
- package/dist/resources/auth.js.map +1 -1
- package/dist/resources/cards.cjs +60 -1
- package/dist/resources/cards.cjs.map +1 -1
- package/dist/resources/cards.d.cts +2 -1
- package/dist/resources/cards.d.ts +2 -1
- package/dist/resources/cards.js +59 -2
- package/dist/resources/cards.js.map +1 -1
- package/dist/resources/deposits.cjs.map +1 -1
- package/dist/resources/deposits.d.cts +2 -1
- package/dist/resources/deposits.d.ts +2 -1
- package/dist/resources/deposits.js.map +1 -1
- package/dist/resources/funding-options.d.cts +2 -1
- package/dist/resources/funding-options.d.ts +2 -1
- package/dist/resources/me.d.cts +1 -1
- package/dist/resources/me.d.ts +1 -1
- package/dist/telegram.cjs +54 -7
- package/dist/telegram.cjs.map +1 -1
- package/dist/telegram.d.cts +2 -2
- package/dist/telegram.d.ts +2 -2
- package/dist/telegram.js +54 -7
- package/dist/telegram.js.map +1 -1
- package/package.json +1 -1
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,
|
|
5
|
+
import { b as DepositsResource, F as FundingOptionsResource, c as CardsResource } from './cards-BPu8Ill7.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, l as CardOrderQuote, m as CardOrderQuoteInput, C as CardProduct, n as CardProductPrice, o as CardStatus, p as CardStatusSource, q as CardTariff, r as CardTopUp, s as CardTopUpStatus, t as CardTransfer, u as CardType, v as Cardholder, w as CloseBlockedReason, x as CreateCardInput, y as CreateDepositRefundInput, z as CreateQuoteInput, E as CustomerInfo, D as Deposit, G as DepositMethod, H as DepositStatus, I as DepositTarget, J as FeeKind, K as FunderMode, L as FundingOption, M as FundingQuote, N as InitiateDepositInput, O as IssuanceBonus, P as IssueCardInput, Q as MethodTerms, R as PromoCodeQuote, S as PromoCodeStatus, T as Refund, U as RevealCardInput, V as RevealState, W as RevealedCard, X as SetPinInput, Y as TopUpInput, Z as TopUpResult, _ as TopUpTerms, $ as TransferInput, a0 as TransferResult, a1 as UpdateCardInput, a2 as priceChangedQuote, a3 as revealState } from './cards-BPu8Ill7.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.
|
|
84
|
+
declare const SUPPORTED_MEISTER = ">=0.8.0, <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.
|
|
190
|
+
declare const SDK_VERSION = "0.8.1";
|
|
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,
|
|
5
|
+
import { b as DepositsResource, F as FundingOptionsResource, c as CardsResource } from './cards-DP1fJc_c.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, l as CardOrderQuote, m as CardOrderQuoteInput, C as CardProduct, n as CardProductPrice, o as CardStatus, p as CardStatusSource, q as CardTariff, r as CardTopUp, s as CardTopUpStatus, t as CardTransfer, u as CardType, v as Cardholder, w as CloseBlockedReason, x as CreateCardInput, y as CreateDepositRefundInput, z as CreateQuoteInput, E as CustomerInfo, D as Deposit, G as DepositMethod, H as DepositStatus, I as DepositTarget, J as FeeKind, K as FunderMode, L as FundingOption, M as FundingQuote, N as InitiateDepositInput, O as IssuanceBonus, P as IssueCardInput, Q as MethodTerms, R as PromoCodeQuote, S as PromoCodeStatus, T as Refund, U as RevealCardInput, V as RevealState, W as RevealedCard, X as SetPinInput, Y as TopUpInput, Z as TopUpResult, _ as TopUpTerms, $ as TransferInput, a0 as TransferResult, a1 as UpdateCardInput, a2 as priceChangedQuote, a3 as revealState } from './cards-DP1fJc_c.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.
|
|
84
|
+
declare const SUPPORTED_MEISTER = ">=0.8.0, <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.
|
|
190
|
+
declare const SDK_VERSION = "0.8.1";
|
|
191
191
|
|
|
192
192
|
/**
|
|
193
193
|
* `@takeal/cusfront-sdk` — typed client for the Takeal end-user API.
|
package/dist/index.js
CHANGED
|
@@ -334,6 +334,26 @@ function cardRequestBody(input) {
|
|
|
334
334
|
if (consentChannel !== void 0) body["consent_channel"] = consentChannel;
|
|
335
335
|
return body;
|
|
336
336
|
}
|
|
337
|
+
function priceChangedQuote(error) {
|
|
338
|
+
const body = isApiError(error) ? error.body : error;
|
|
339
|
+
if (typeof body !== "object" || body === null) return void 0;
|
|
340
|
+
const { code, quote } = body;
|
|
341
|
+
if (code !== "price_changed" || typeof quote !== "object" || quote === null) return void 0;
|
|
342
|
+
return quote;
|
|
343
|
+
}
|
|
344
|
+
function cardOrderQuoteBody(input) {
|
|
345
|
+
const body = {
|
|
346
|
+
product_id: input.productId,
|
|
347
|
+
method: input.method
|
|
348
|
+
};
|
|
349
|
+
if (input.designId !== void 0) body["design_id"] = input.designId;
|
|
350
|
+
if (input.funderSlug !== void 0) body["funder_slug"] = input.funderSlug;
|
|
351
|
+
if (input.currency !== void 0) body["currency"] = input.currency;
|
|
352
|
+
if (input.extraLoad !== void 0) body["extra_load"] = input.extraLoad;
|
|
353
|
+
if (input.promoCode !== void 0) body["promo_code"] = input.promoCode;
|
|
354
|
+
if (input.useBonus !== void 0) body["use_bonus"] = input.useBonus;
|
|
355
|
+
return body;
|
|
356
|
+
}
|
|
337
357
|
function cardOrderBody(input) {
|
|
338
358
|
const body = {
|
|
339
359
|
product_id: input.productId,
|
|
@@ -351,6 +371,8 @@ function cardOrderBody(input) {
|
|
|
351
371
|
if (input.metadata !== void 0) body["metadata"] = input.metadata;
|
|
352
372
|
const ids = input.analyticsIds ?? analyticsIds();
|
|
353
373
|
if (ids !== void 0) body["analytics_ids"] = ids;
|
|
374
|
+
if (input.expectedAmount !== void 0) body["expected_amount"] = input.expectedAmount;
|
|
375
|
+
if (input.expectedCurrency !== void 0) body["expected_currency"] = input.expectedCurrency;
|
|
354
376
|
return body;
|
|
355
377
|
}
|
|
356
378
|
function revealState(r) {
|
|
@@ -388,7 +410,10 @@ var CardsResource = class {
|
|
|
388
410
|
* `holder_data_required` and the user has not agreed to it), 409
|
|
389
411
|
* `payments_on_hold` (a payment on this account was not accepted and new
|
|
390
412
|
* ones wait until support sorts it out: show the message and point the
|
|
391
|
-
* user to support),
|
|
413
|
+
* user to support), 409 `price_changed` (the order came to another amount
|
|
414
|
+
* than `expectedAmount`; no payment was opened, and
|
|
415
|
+
* {@link priceChangedQuote} gives the new quote), 503 no funding connector
|
|
416
|
+
* or no exchange rate.
|
|
392
417
|
*/
|
|
393
418
|
async order(input) {
|
|
394
419
|
const { idempotencyKey, ...order } = input;
|
|
@@ -397,6 +422,33 @@ var CardsResource = class {
|
|
|
397
422
|
idempotencyKey
|
|
398
423
|
});
|
|
399
424
|
}
|
|
425
|
+
/**
|
|
426
|
+
* What an order of this card would cost the signed-in user now, with the
|
|
427
|
+
* promo code: the same calculation {@link order} makes, with every
|
|
428
|
+
* condition of the code checked. Nothing is reserved or used up. Pass
|
|
429
|
+
* `amount` and `currency` to the order as `expectedAmount` and
|
|
430
|
+
* `expectedCurrency`.
|
|
431
|
+
*/
|
|
432
|
+
async quote(input) {
|
|
433
|
+
return this.http.post("/me/card-orders/quote", {
|
|
434
|
+
body: cardOrderQuoteBody(input)
|
|
435
|
+
});
|
|
436
|
+
}
|
|
437
|
+
/**
|
|
438
|
+
* The same quote before sign-in, for a landing page or the purchase form
|
|
439
|
+
* before the e-mail code. Prices are list prices, and a code whose
|
|
440
|
+
* conditions depend on the person (first card only, say) comes back
|
|
441
|
+
* `conditional`, with `preliminary` set. Send `expectedAmount` with the
|
|
442
|
+
* order placed at sign-in: if the price turns out different, no payment
|
|
443
|
+
* is opened and `card_order_error` carries the new quote. The API limits
|
|
444
|
+
* how often one address can ask (429 `too_many_requests`).
|
|
445
|
+
*/
|
|
446
|
+
async quotePublic(input) {
|
|
447
|
+
return this.http.post("/card-orders/quote", {
|
|
448
|
+
body: cardOrderQuoteBody(input),
|
|
449
|
+
skipAuth: true
|
|
450
|
+
});
|
|
451
|
+
}
|
|
400
452
|
/**
|
|
401
453
|
* The cards the caller can order, in the order the storefront shows them
|
|
402
454
|
* (`is_default` marks the one issued when none is chosen). Each item
|
|
@@ -813,10 +865,12 @@ var AuthResource = class {
|
|
|
813
865
|
await Promise.resolve(this.tokens.set(resp.access_token));
|
|
814
866
|
return resp;
|
|
815
867
|
}
|
|
816
|
-
/**
|
|
817
|
-
*
|
|
818
|
-
*
|
|
819
|
-
* {@link requestEmailChange} and {@link confirmEmailChange}
|
|
868
|
+
/** Always answers 409 `email_change_needs_code` on platform 0.8.1 and
|
|
869
|
+
* newer: an address is attached only after a code sent to it comes back.
|
|
870
|
+
* For the first real email of a Telegram-made account use
|
|
871
|
+
* {@link requestEmailChange} and {@link confirmEmailChange}; they clear
|
|
872
|
+
* `email_pending` too.
|
|
873
|
+
* @deprecated Use {@link requestEmailChange} and {@link confirmEmailChange}. */
|
|
820
874
|
async linkEmail(input) {
|
|
821
875
|
return this.http.post("/me/email", { body: { email: input.email } });
|
|
822
876
|
}
|
|
@@ -1697,7 +1751,7 @@ var FundingOptionsResource = class {
|
|
|
1697
1751
|
};
|
|
1698
1752
|
|
|
1699
1753
|
// src/version.ts
|
|
1700
|
-
var SDK_VERSION = "0.
|
|
1754
|
+
var SDK_VERSION = "0.8.1";
|
|
1701
1755
|
|
|
1702
1756
|
// src/client-platform.ts
|
|
1703
1757
|
var CLIENT_HEADER = "X-Takeal-Client";
|
|
@@ -1772,7 +1826,7 @@ function isAbsolute(url) {
|
|
|
1772
1826
|
}
|
|
1773
1827
|
|
|
1774
1828
|
// src/compat.ts
|
|
1775
|
-
var SUPPORTED_MEISTER = ">=0.
|
|
1829
|
+
var SUPPORTED_MEISTER = ">=0.8.0, <1.0.0";
|
|
1776
1830
|
var SEMVER = /^v?(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-([0-9A-Za-z.-]+))?(?:\+[0-9A-Za-z.-]+)?$/;
|
|
1777
1831
|
function parse(v) {
|
|
1778
1832
|
const m = SEMVER.exec(v.trim());
|
|
@@ -1969,6 +2023,67 @@ function digitCount(s) {
|
|
|
1969
2023
|
function redactText(v) {
|
|
1970
2024
|
return v.replace(EMAIL, "[email]").replace(DIGIT_RUN, (m) => digitCount(m) >= 9 && digitCount(m) <= 19 ? "[number]" : m);
|
|
1971
2025
|
}
|
|
2026
|
+
var UTM_PARAMS = [
|
|
2027
|
+
"utm_source",
|
|
2028
|
+
"utm_medium",
|
|
2029
|
+
"utm_campaign",
|
|
2030
|
+
"utm_content",
|
|
2031
|
+
"utm_term"
|
|
2032
|
+
];
|
|
2033
|
+
var CLICK_ID_PARAMS = [
|
|
2034
|
+
"yclid",
|
|
2035
|
+
"ysclid",
|
|
2036
|
+
"gclid",
|
|
2037
|
+
"gbraid",
|
|
2038
|
+
"wbraid",
|
|
2039
|
+
"fbclid",
|
|
2040
|
+
"ttclid",
|
|
2041
|
+
"msclkid",
|
|
2042
|
+
"rb_clickid"
|
|
2043
|
+
];
|
|
2044
|
+
var UTM_SET = new Set(UTM_PARAMS);
|
|
2045
|
+
var CLICK_ID_SET = new Set(CLICK_ID_PARAMS);
|
|
2046
|
+
var CLICK_ID_VALUE = /^[A-Za-z0-9._~-]{1,256}$/;
|
|
2047
|
+
function adField(key) {
|
|
2048
|
+
const k = key.replace(/^\$+/, "").toLowerCase().replace(/^initial_/, "");
|
|
2049
|
+
if (UTM_SET.has(k)) return "utm";
|
|
2050
|
+
if (CLICK_ID_SET.has(k)) return "click";
|
|
2051
|
+
return void 0;
|
|
2052
|
+
}
|
|
2053
|
+
function luhn(digits) {
|
|
2054
|
+
let sum = 0;
|
|
2055
|
+
for (let i = 0; i < digits.length; i++) {
|
|
2056
|
+
let d = digits.charCodeAt(digits.length - 1 - i) - 48;
|
|
2057
|
+
if (i % 2 === 1) {
|
|
2058
|
+
d *= 2;
|
|
2059
|
+
if (d > 9) d -= 9;
|
|
2060
|
+
}
|
|
2061
|
+
sum += d;
|
|
2062
|
+
}
|
|
2063
|
+
return sum % 10 === 0;
|
|
2064
|
+
}
|
|
2065
|
+
var NUMBER_RUN = /(?:\+\s*)?\d(?:[\d\s().-]*\d)?/g;
|
|
2066
|
+
function adValuePersonal(v) {
|
|
2067
|
+
if (v.includes("@")) return true;
|
|
2068
|
+
for (const m of v.match(NUMBER_RUN) ?? []) {
|
|
2069
|
+
const groups = m.split(/\D+/).filter(Boolean);
|
|
2070
|
+
const n = groups.join("").length;
|
|
2071
|
+
if (m.startsWith("+")) {
|
|
2072
|
+
if (n >= 9 && n <= 15) return true;
|
|
2073
|
+
continue;
|
|
2074
|
+
}
|
|
2075
|
+
if (groups.length === 1) {
|
|
2076
|
+
if (n >= 16 && n <= 19 && luhn(groups[0])) return true;
|
|
2077
|
+
continue;
|
|
2078
|
+
}
|
|
2079
|
+
if (n >= 9 && n <= 19 && (/[()]/.test(m) || groups.every((g) => g.length <= 4))) return true;
|
|
2080
|
+
}
|
|
2081
|
+
return v.split(/[\s_.~+-]+/).some((seg) => seg.length >= 20 && /\d.*\d/.test(seg) && /[A-Za-z].*[A-Za-z]/.test(seg));
|
|
2082
|
+
}
|
|
2083
|
+
function adValue(kind, v) {
|
|
2084
|
+
if (kind === "click") return CLICK_ID_VALUE.test(v) ? v : void 0;
|
|
2085
|
+
return adValuePersonal(v) ? void 0 : v;
|
|
2086
|
+
}
|
|
1972
2087
|
function idSegment(seg) {
|
|
1973
2088
|
let s = seg;
|
|
1974
2089
|
try {
|
|
@@ -1980,6 +2095,13 @@ function idSegment(seg) {
|
|
|
1980
2095
|
if (replaced !== s) return replaced;
|
|
1981
2096
|
return redactText(s) === s ? seg : PLACEHOLDER;
|
|
1982
2097
|
}
|
|
2098
|
+
function decodeQueryPart(s) {
|
|
2099
|
+
try {
|
|
2100
|
+
return decodeURIComponent(s.replace(/\+/g, " "));
|
|
2101
|
+
} catch {
|
|
2102
|
+
return s;
|
|
2103
|
+
}
|
|
2104
|
+
}
|
|
1983
2105
|
function sanitizeUrl(raw) {
|
|
1984
2106
|
const absolute = /^[a-z][a-z0-9+.-]*:\/\//i.test(raw);
|
|
1985
2107
|
let u;
|
|
@@ -1990,14 +2112,22 @@ function sanitizeUrl(raw) {
|
|
|
1990
2112
|
}
|
|
1991
2113
|
const path = u.pathname.split("/").map((seg) => seg ? idSegment(seg) : seg).join("/");
|
|
1992
2114
|
const query = [];
|
|
1993
|
-
u.
|
|
2115
|
+
for (const pair of u.search.replace(/^\?/, "").split("&")) {
|
|
2116
|
+
if (!pair) continue;
|
|
2117
|
+
const eq = pair.indexOf("=");
|
|
2118
|
+
const rawKey = eq < 0 ? pair : pair.slice(0, eq);
|
|
2119
|
+
const key = decodeQueryPart(rawKey);
|
|
2120
|
+
const value = eq < 0 ? "" : decodeQueryPart(pair.slice(eq + 1));
|
|
2121
|
+
const ad = adField(key);
|
|
2122
|
+
if (ad) {
|
|
2123
|
+
if (adValue(ad, value) !== void 0) query.push(pair);
|
|
2124
|
+
continue;
|
|
2125
|
+
}
|
|
1994
2126
|
const k = words(key);
|
|
1995
|
-
if (k.some((w) => SECRET_QUERY_WORDS.has(w)) || personalKey(key))
|
|
1996
|
-
if (redactText(value) !== value)
|
|
1997
|
-
query.push(
|
|
1998
|
-
|
|
1999
|
-
);
|
|
2000
|
-
});
|
|
2127
|
+
if (k.some((w) => SECRET_QUERY_WORDS.has(w)) || personalKey(key)) continue;
|
|
2128
|
+
if (redactText(value) !== value) continue;
|
|
2129
|
+
query.push(isId(value) ? `${rawKey}=${PLACEHOLDER}` : pair);
|
|
2130
|
+
}
|
|
2001
2131
|
const search = query.length ? `?${query.join("&")}` : "";
|
|
2002
2132
|
return (absolute ? `${u.protocol}//${u.host}` : "") + path + search;
|
|
2003
2133
|
}
|
|
@@ -2005,6 +2135,8 @@ function cleanValue(key, v, depth) {
|
|
|
2005
2135
|
if (v === null || v === void 0 || typeof v === "number" || typeof v === "boolean") return v;
|
|
2006
2136
|
if (typeof v === "string") {
|
|
2007
2137
|
if (MONEY_KEYS.has(key.toLowerCase()) || UUID_ONLY.test(v)) return v;
|
|
2138
|
+
const ad = adField(key);
|
|
2139
|
+
if (ad) return adValue(ad, v);
|
|
2008
2140
|
if (urlKey(key) || /^https?:\/\//i.test(v)) return sanitizeUrl(v);
|
|
2009
2141
|
if (key === "$elements_chain") {
|
|
2010
2142
|
return redactText(v).replace(
|
|
@@ -2326,6 +2458,6 @@ function defaultFetch() {
|
|
|
2326
2458
|
);
|
|
2327
2459
|
}
|
|
2328
2460
|
|
|
2329
|
-
export { ANALYTICS_EVENTS, ApiError, CLIENT_HEADER, DISPUTE_DOCUMENTS_CONSENT, HOLDER_DATA_CONSENT, METRIKA_GOALS, NO_CAPTURE_CLASS, NetworkError, SDK_VERSION, SUPPORTED_MEISTER, analyticsIds, anonymousKey, createClient, currentTouch, defaultBrowserStore, detectClientPlatform, forgetAnalyticsIds, identify, inMemoryStore, initAnalytics, isApiError, isCardOtp, isNetworkError, page, posthogDistinctId, rememberAnalyticsIds, resetAnalytics, resolveAssetUrl, revealState, sanitizeProperties, sanitizeUrl, satisfies, setAnalyticsZone, track, withAnalyticsIds };
|
|
2461
|
+
export { ANALYTICS_EVENTS, ApiError, CLIENT_HEADER, DISPUTE_DOCUMENTS_CONSENT, HOLDER_DATA_CONSENT, METRIKA_GOALS, NO_CAPTURE_CLASS, NetworkError, SDK_VERSION, SUPPORTED_MEISTER, analyticsIds, anonymousKey, createClient, currentTouch, defaultBrowserStore, detectClientPlatform, forgetAnalyticsIds, identify, inMemoryStore, initAnalytics, isApiError, isCardOtp, isNetworkError, page, posthogDistinctId, priceChangedQuote, rememberAnalyticsIds, resetAnalytics, resolveAssetUrl, revealState, sanitizeProperties, sanitizeUrl, satisfies, setAnalyticsZone, track, withAnalyticsIds };
|
|
2330
2462
|
//# sourceMappingURL=index.js.map
|
|
2331
2463
|
//# sourceMappingURL=index.js.map
|