@emailmaker/filemanager 0.10.52 → 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emailmaker/filemanager",
3
- "version": "0.10.52",
3
+ "version": "0.10.53",
4
4
  "main": "./file-manager.js",
5
5
  "module": "./file-manager.esm.js",
6
6
  "types": "./index.d.ts",
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. При транзитном и сервисном прокси передаётся в заголовке x-api-key с клиента. */
397
+ /** Ключ Streamline API. Передаётся в заголовке x-api-key при запросах. */
398
398
  STREAMLINE_API_KEY?: string;
399
- /** Переопределение URL прокси Streamline (по умолчанию /streamline). Ключ добавляется на прокси. */
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
- UNSLASH_PROXY_URL?: string;
413
- /** Service proxy URL for Unsplash (stock images). Direct proxy, no proxy_url param. */
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 {};