@escapenavigator/services 1.10.131 → 1.10.132

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.
@@ -47,7 +47,7 @@ export type MakeServiceFromServiceDeclaration<T, DisplayName> = {
47
47
  (params: ExtractApiMethodParamsType<T>): AxiosPromise<ExtractApiMethodResponseDataType<T>>;
48
48
  displayName: DisplayName;
49
49
  };
50
- type ExtractApiMethodResponseDataType<T> = T extends ApiMethodDeclaration<infer P, infer D> ? D : any;
51
- type ExtractApiMethodParamsType<T> = T extends ApiMethodDeclaration<infer P, infer D> ? P : any;
50
+ type ExtractApiMethodResponseDataType<T> = T extends ApiMethodDeclaration<infer _P, infer D> ? D : any;
51
+ type ExtractApiMethodParamsType<T> = T extends ApiMethodDeclaration<infer P, infer _D> ? P : any;
52
52
  export type ExtendServiceParams<T> = ApiMethodDeclaration<ExtractApiMethodParamsType<T>, ExtractApiMethodResponseDataType<T>>;
53
53
  export {};
@@ -0,0 +1,18 @@
1
+ import { QuestroomExtrasRO } from '@escapenavigator/types/dist/questroom/questroom-extras.ro';
2
+ import { ApiMethodDeclaration } from '..';
3
+ type ParamsData = {
4
+ etag?: string | null;
5
+ };
6
+ type ResponseData = QuestroomExtrasRO[];
7
+ /**
8
+ * Bulk-payload `modes` + `locales` для горячих read-only модалок
9
+ * (`order`, `order-new`, `email-example`). Кэшируется на фронте в
10
+ * `questroom-extras-slice` через `useLazyQuestroomExtras`.
11
+ *
12
+ * Шлёт `etag` как query-param. Backend сравнивает с актуальным
13
+ * `getCollectionEtag(profileId)`; при совпадении отвечает 304 с
14
+ * пустым телом (slice не апдейтит `byId`, только продлевает
15
+ * `lastCheckedAt`). См. `15-questroom-eager-removal.md`.
16
+ */
17
+ export declare const getExtras: ApiMethodDeclaration<ParamsData, ResponseData>;
18
+ export {};
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getExtras = void 0;
4
+ /**
5
+ * Bulk-payload `modes` + `locales` для горячих read-only модалок
6
+ * (`order`, `order-new`, `email-example`). Кэшируется на фронте в
7
+ * `questroom-extras-slice` через `useLazyQuestroomExtras`.
8
+ *
9
+ * Шлёт `etag` как query-param. Backend сравнивает с актуальным
10
+ * `getCollectionEtag(profileId)`; при совпадении отвечает 304 с
11
+ * пустым телом (slice не апдейтит `byId`, только продлевает
12
+ * `lastCheckedAt`). См. `15-questroom-eager-removal.md`.
13
+ */
14
+ var getExtras = function (params) { return ({
15
+ url: '/questrooms/extras',
16
+ method: 'GET',
17
+ params: params,
18
+ }); };
19
+ exports.getExtras = getExtras;
@@ -9,6 +9,7 @@ import { getByCoordinates } from './get-by-coordinates';
9
9
  import { getByLocation } from './get-by-location';
10
10
  import { getBySlug } from './get-by-slug';
11
11
  import { getByTitle } from './get-by-title';
12
+ import { getExtras } from './get-extras';
12
13
  import { getMeta } from './get-meta';
13
14
  import { getOne } from './get-one';
14
15
  import { getOneForAdmin } from './get-one-for-admin';
@@ -49,6 +50,7 @@ type ApiDeclaration = {
49
50
  update: typeof update;
50
51
  query: typeof query;
51
52
  getOne: typeof getOne;
53
+ getExtras: typeof getExtras;
52
54
  recover: typeof recover;
53
55
  getByLocation: typeof getByLocation;
54
56
  getByCoordinates: typeof getByCoordinates;
@@ -12,6 +12,7 @@ var get_by_coordinates_1 = require("./get-by-coordinates");
12
12
  var get_by_location_1 = require("./get-by-location");
13
13
  var get_by_slug_1 = require("./get-by-slug");
14
14
  var get_by_title_1 = require("./get-by-title");
15
+ var get_extras_1 = require("./get-extras");
15
16
  var get_meta_1 = require("./get-meta");
16
17
  var get_one_1 = require("./get-one");
17
18
  var get_one_for_admin_1 = require("./get-one-for-admin");
@@ -55,6 +56,7 @@ exports.questroomsApiDeclaration = {
55
56
  update: update_1.update,
56
57
  query: query_1.query,
57
58
  getOne: get_one_1.getOne,
59
+ getExtras: get_extras_1.getExtras,
58
60
  recover: recover_1.recover,
59
61
  getByLocation: get_by_location_1.getByLocation,
60
62
  getByCoordinates: get_by_coordinates_1.getByCoordinates,
@@ -1,11 +1,9 @@
1
1
  import { certificatesReport } from './certificates-report';
2
- import { getMonthlyGeneralStatisctics } from './get-monthly-general-statisctics';
3
2
  import { ordersReport } from './orders-report';
4
3
  import { promocodesReport } from './promocodes-report';
5
4
  import { revenue } from './revenue';
6
5
  type ApiDeclaration = {
7
6
  ordersReport: typeof ordersReport;
8
- getMonthlyGeneralStatisctics: typeof getMonthlyGeneralStatisctics;
9
7
  revenue: typeof revenue;
10
8
  certificatesReport: typeof certificatesReport;
11
9
  promocodesReport: typeof promocodesReport;
@@ -2,12 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.statisticsApiDeclaration = void 0;
4
4
  var certificates_report_1 = require("./certificates-report");
5
- var get_monthly_general_statisctics_1 = require("./get-monthly-general-statisctics");
6
5
  var orders_report_1 = require("./orders-report");
7
6
  var promocodes_report_1 = require("./promocodes-report");
8
7
  var revenue_1 = require("./revenue");
9
8
  exports.statisticsApiDeclaration = {
10
- getMonthlyGeneralStatisctics: get_monthly_general_statisctics_1.getMonthlyGeneralStatisctics,
11
9
  revenue: revenue_1.revenue,
12
10
  ordersReport: orders_report_1.ordersReport,
13
11
  certificatesReport: certificates_report_1.certificatesReport,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@escapenavigator/services",
3
- "version": "1.10.131",
3
+ "version": "1.10.132",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -12,10 +12,10 @@
12
12
  "scripts": {
13
13
  "build": "rm -rf dist && tsc --project tsconfig.json"
14
14
  },
15
- "gitHead": "07165b9ee1fc3108a9dd2f47d3f2782f40310012",
15
+ "gitHead": "3a138ac9ae22dc8e7c80be4b2bf427a90d703b6c",
16
16
  "dependencies": {
17
- "@escapenavigator/types": "^1.10.122",
18
- "@escapenavigator/utils": "^1.10.126",
17
+ "@escapenavigator/types": "^1.10.123",
18
+ "@escapenavigator/utils": "^1.10.127",
19
19
  "axios": "^0.21.4",
20
20
  "class-transformer": "^0.5.1",
21
21
  "class-validator": "^0.13.2",
@@ -1,9 +0,0 @@
1
- import { MonthlyGeneralStatiscticsRO } from '@escapenavigator/types/dist/statistics/monthly-general-statisctics.ro';
2
- import { ApiMethodDeclaration } from '..';
3
- type ParamsData = {
4
- questroomsIds: number[];
5
- month: string;
6
- };
7
- type ResponseData = MonthlyGeneralStatiscticsRO;
8
- export declare const getMonthlyGeneralStatisctics: ApiMethodDeclaration<ParamsData, ResponseData>;
9
- export {};
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getMonthlyGeneralStatisctics = void 0;
4
- var getMonthlyGeneralStatisctics = function (params) { return ({
5
- url: '/statistics/monthly',
6
- method: 'GET',
7
- params: params,
8
- }); };
9
- exports.getMonthlyGeneralStatisctics = getMonthlyGeneralStatisctics;