@snabcentr/client-core 4.14.2 → 4.14.3
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.
|
@@ -1931,7 +1931,12 @@ class ScCachedItem {
|
|
|
1931
1931
|
this.lifeTime = lifeTime;
|
|
1932
1932
|
const requestData$ = this.update$.pipe(switchMap(() => item$.pipe(tap(() => {
|
|
1933
1933
|
this.updateCacheTime();
|
|
1934
|
-
}), startWith$1((initialValue ?? null)))), materialize(),
|
|
1934
|
+
}), startWith$1((initialValue ?? null)))), materialize(), tap((notification) => {
|
|
1935
|
+
// Ошибка не кэшируется - следующее обращение инициирует повторный запрос.
|
|
1936
|
+
if (notification.kind === 'E') {
|
|
1937
|
+
this.cachedUntil = Date.now() - 1;
|
|
1938
|
+
}
|
|
1939
|
+
}), shareReplay(1), dematerialize());
|
|
1935
1940
|
this.item$ = merge(this.currentValue$, requestData$).pipe(shareReplay(1));
|
|
1936
1941
|
}
|
|
1937
1942
|
/**
|
|
@@ -3462,6 +3467,8 @@ class ScCatalogService {
|
|
|
3462
3467
|
/**
|
|
3463
3468
|
* Создает запрос получения списка товаров, созданных за указанный период (с пагинацией).
|
|
3464
3469
|
*
|
|
3470
|
+
* @deprecated Используйте {@link getProducts$} с фильтром `created`. Удалить после перевода всех веток.
|
|
3471
|
+
*
|
|
3465
3472
|
* @param params Параметры запроса товаров за период.
|
|
3466
3473
|
*/
|
|
3467
3474
|
getNewProducts$(params) {
|