@snabcentr/common-lib 3.9.0 → 3.10.0

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.
@@ -23,6 +23,7 @@ export * from './price-history';
23
23
  export * from './recommendations';
24
24
  export * from './references';
25
25
  export * from './seo';
26
+ export * from './statistics';
26
27
  export * from './suggestion';
27
28
  export * from './system';
28
29
  export * from './user';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,OAAO,CAAC;AACtB,cAAc,OAAO,CAAC;AACtB,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,OAAO,CAAC;AACtB,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,OAAO,CAAC;AACtB,cAAc,OAAO,CAAC;AACtB,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,OAAO,CAAC;AACtB,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './search-product-statistic';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/statistics/classes/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC"}
@@ -0,0 +1,26 @@
1
+ import { ISearchProductStatistic } from '../interfaces/i-search-product-statistic';
2
+ import { Identity } from '../../system/classes/identity';
3
+ /**
4
+ * Данные о поисковом запросе товаров клиентами.
5
+ */
6
+ export declare class SearchProductStatistic extends Identity implements ISearchProductStatistic {
7
+ /**
8
+ * @inheritDoc
9
+ */
10
+ text: string;
11
+ /**
12
+ * @inheritDoc
13
+ */
14
+ searchCount: number;
15
+ /**
16
+ * @inheritDoc
17
+ */
18
+ lastSearchedAt?: Date;
19
+ /**
20
+ * Инициализирует экземпляр класса {@link SearchProductStatistic}.
21
+ *
22
+ * @param data Данные для первоначальной инициализации.
23
+ */
24
+ constructor(data?: Partial<ISearchProductStatistic>);
25
+ }
26
+ //# sourceMappingURL=search-product-statistic.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search-product-statistic.d.ts","sourceRoot":"","sources":["../../../../src/statistics/classes/search-product-statistic.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,sDAAsD,CAAC;AAC/F,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAEvD;;GAEG;AACH,qBAAa,sBAAuB,SAAQ,QAAS,YAAW,uBAAuB;IACnF;;OAEG;IACI,IAAI,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACI,WAAW,EAAE,MAAM,CAAC;IAE3B;;OAEG;IACI,cAAc,CAAC,EAAE,IAAI,CAAC;IAE7B;;;;OAIG;gBACgB,IAAI,CAAC,EAAE,OAAO,CAAC,uBAAuB,CAAC;CAO7D"}
@@ -0,0 +1,4 @@
1
+ export * from './classes';
2
+ export * from './interfaces';
3
+ export * from './providers';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/statistics/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC"}
@@ -0,0 +1,19 @@
1
+ import { IIdentity } from '../../system/interfaces/i-identity';
2
+ /**
3
+ * Данные о поисковом запросе товаров клиентами.
4
+ */
5
+ export interface ISearchProductStatistic extends IIdentity {
6
+ /**
7
+ * Текст поискового запроса.
8
+ */
9
+ text: string;
10
+ /**
11
+ * Количество поисков по этому тексту за всё время.
12
+ */
13
+ searchCount: number;
14
+ /**
15
+ * Дата и время последнего поиска по этому тексту.
16
+ */
17
+ lastSearchedAt?: Date;
18
+ }
19
+ //# sourceMappingURL=i-search-product-statistic.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"i-search-product-statistic.d.ts","sourceRoot":"","sources":["../../../../src/statistics/interfaces/i-search-product-statistic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAE7D;;GAEG;AACH,MAAM,WAAW,uBAAwB,SAAQ,SAAS;IACtD;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,cAAc,CAAC,EAAE,IAAI,CAAC;CACzB"}
@@ -0,0 +1,2 @@
1
+ export * from './i-search-product-statistic';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/statistics/interfaces/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './statistics-provider';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/statistics/providers/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC"}
@@ -0,0 +1,26 @@
1
+ import { HttpRequester } from '../../http/classes/http-requester';
2
+ import { ISearchProductStatistic } from '../interfaces/i-search-product-statistic';
3
+ import { IDatePeriod } from '../../system/interfaces/i-date-period';
4
+ /**
5
+ * Предоставляет механизмы получения/управления статистикой.
6
+ */
7
+ export declare class StatisticsProvider extends HttpRequester {
8
+ /**
9
+ * Возвращает список поисковых запросов товаров, последний поиск по которым был в указанном периоде.
10
+ *
11
+ * @param period Период даты последнего поиска.
12
+ * @param signal Сигнал отмены запроса.
13
+ *
14
+ * @see /doc/api/internal#/operations/api_internal_statistics_search_products_get_list
15
+ */
16
+ getSearchProductsStatistics(period: IDatePeriod, signal?: AbortSignal): Promise<ISearchProductStatistic[]>;
17
+ /**
18
+ * Удаляет поисковый запрос товаров из статистики.
19
+ *
20
+ * @param id Идентификатор поискового запроса.
21
+ *
22
+ * @see /doc/api/internal#/operations/api_internal_statistics_search_products_delete
23
+ */
24
+ removeSearchProductStatistic(id: number): Promise<void>;
25
+ }
26
+ //# sourceMappingURL=statistics-provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"statistics-provider.d.ts","sourceRoot":"","sources":["../../../../src/statistics/providers/statistics-provider.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAEhE,OAAO,EAAE,uBAAuB,EAAE,MAAM,sDAAsD,CAAC;AAC/F,OAAO,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAElE;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,aAAa;IACjD;;;;;;;OAOG;IACI,2BAA2B,CAAC,MAAM,EAAE,WAAW,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,uBAAuB,EAAE,CAAC;IAIjH;;;;;;OAMG;IACI,4BAA4B,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAGjE"}
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "keywords": [],
5
5
  "author": "Sergey S. Smirnov <dev@snabcentr.com>",
6
6
  "type": "module",
7
- "version": "3.9.0",
7
+ "version": "3.10.0",
8
8
  "license": "ISC",
9
9
  "scripts": {
10
10
  "dev": "vite",