@emailmaker/filemanager 0.10.51 → 0.10.53
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/components/ImageIcons/useStreamlineApi.d.ts +2 -14
- package/file-manager.esm.js +9 -9
- package/file-manager.esm.js.map +1 -1
- package/file-manager.js +1 -1
- package/package.json +1 -1
- package/types.d.ts +4 -17
- package/utils/urlValidation.d.ts +11 -0
package/package.json
CHANGED
package/types.d.ts
CHANGED
|
@@ -394,28 +394,15 @@ export interface Config {
|
|
|
394
394
|
customTheme?: CustomTheme;
|
|
395
395
|
UNSPLASH_KEY?: string;
|
|
396
396
|
APP_NAME_UNSPLASH?: string;
|
|
397
|
-
/** Ключ Streamline API.
|
|
397
|
+
/** Ключ Streamline API. Передаётся в заголовке x-api-key при запросах. */
|
|
398
398
|
STREAMLINE_API_KEY?: string;
|
|
399
|
-
/**
|
|
399
|
+
/** Базовый URL Streamline API при отсутствии handleProxyUrl (по умолчанию /streamline). */
|
|
400
400
|
STREAMLINE_BASE_URL?: string;
|
|
401
|
-
/**
|
|
402
|
-
* Транзитный прокси для выхода на Streamline API без настройки nginx на каждом сервере.
|
|
403
|
-
* Примеры: https://px0.useblocks.io (Германия), https://px0.racs.rest, https://px0.emailmaker.ru (РФ).
|
|
404
|
-
* Запросы строятся как {STREAMLINE_TRANSIT_PROXY_URL}/{path}?params&proxy_url={STREAMLINE_API_BASE_URL}.
|
|
405
|
-
*/
|
|
406
|
-
STREAMLINE_TRANSIT_PROXY_URL?: string;
|
|
407
|
-
/** Базовый URL реального Streamline API при использовании транзитного прокси (по умолчанию https://public-api.streamlinehq.com/v1). */
|
|
408
|
-
STREAMLINE_API_BASE_URL?: string;
|
|
409
401
|
handleTranslate?: (input: string, opts: {
|
|
410
402
|
locale?: string;
|
|
411
403
|
}) => Promise<string>;
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
stockImagesProxyUrl?: string;
|
|
415
|
-
/** Service proxy URL for Giphy (stock GIFs). Direct proxy, no proxy_url param. */
|
|
416
|
-
stockGifsProxyUrl?: string;
|
|
417
|
-
/** Service proxy URL for Streamline (stock icons). Direct proxy, no proxy_url param. */
|
|
418
|
-
stockIconsProxyUrl?: string;
|
|
404
|
+
/** Единый хендлер: принимает оригинальный URL, возвращает проксированный (sync или async). Используется для Unsplash, Giphy, Streamline. */
|
|
405
|
+
handleProxyUrl?: (url: string) => string | Promise<string>;
|
|
419
406
|
pushToGTM?: boolean;
|
|
420
407
|
projectId?: string;
|
|
421
408
|
elementId?: string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
type TFunction = (key: string) => string;
|
|
2
|
+
/**
|
|
3
|
+
* Валидация URL на фронте без дополнительных запросов.
|
|
4
|
+
* Проверяет: формат, протокол (только http/https), SSRF (localhost, приватные IP).
|
|
5
|
+
*
|
|
6
|
+
* @param url - строка URL для проверки
|
|
7
|
+
* @param t - функция перевода для сообщений об ошибках
|
|
8
|
+
* @throws FileManagerApiError при невалидном URL
|
|
9
|
+
*/
|
|
10
|
+
export declare function validateUrlNoRequest(url: string, t: TFunction): void;
|
|
11
|
+
export {};
|