@escapenavigator/services 1.4.68 → 1.4.70

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.
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getMonthlyGeneralStatisctics = void 0;
4
4
  var getMonthlyGeneralStatisctics = function (month) { return ({
5
- url: "/statistics/monthly/".concat(month),
5
+ url: "/order-statistic/monthly/".concat(month),
6
6
  method: 'GET',
7
7
  }); };
8
8
  exports.getMonthlyGeneralStatisctics = getMonthlyGeneralStatisctics;
@@ -1,9 +1,9 @@
1
1
  import { CreateTransactionDto } from '@escapenavigator/types/dist/transaction/create-transaction.dto';
2
- import { TransactionResponseObject } from '@escapenavigator/types/dist/transaction/transaction.ro';
2
+ import { TransactionRO } from '@escapenavigator/types/dist/transaction/transaction.ro';
3
3
  import { ApiMethodDeclaration } from '..';
4
4
  declare type ParamsData = {
5
5
  data: CreateTransactionDto;
6
6
  };
7
- declare type ResponseData = TransactionResponseObject;
7
+ declare type ResponseData = TransactionRO;
8
8
  export declare const create: ApiMethodDeclaration<ParamsData, ResponseData>;
9
9
  export {};
@@ -1,7 +1,7 @@
1
- import { TransactionResponseObject } from '@escapenavigator/types/dist/transaction/transaction.ro';
1
+ import { TransactionRO } from '@escapenavigator/types/dist/transaction/transaction.ro';
2
2
  import { ApiMethodDeclaration } from '..';
3
3
  /** ID транзакции */
4
4
  declare type ParamsData = number;
5
- declare type ResponseData = TransactionResponseObject;
5
+ declare type ResponseData = TransactionRO;
6
6
  export declare const getOne: ApiMethodDeclaration<ParamsData, ResponseData>;
7
7
  export {};
@@ -1,7 +1,7 @@
1
1
  import { QueryDto } from '@escapenavigator/types/dist/shared/query.dto';
2
- import { TransactionResponseObject } from '@escapenavigator/types/dist/transaction/transaction.ro';
2
+ import { TransactionRO } from '@escapenavigator/types/dist/transaction/transaction.ro';
3
3
  import { ApiMethodDeclaration } from '..';
4
4
  declare type ParamsData = QueryDto;
5
- declare type ResponseData = TransactionResponseObject[];
5
+ declare type ResponseData = TransactionRO[];
6
6
  export declare const query: ApiMethodDeclaration<ParamsData, ResponseData>;
7
7
  export {};
@@ -1,7 +1,7 @@
1
- import { TransactionResponseObject } from '@escapenavigator/types/dist/transaction/transaction.ro';
1
+ import { TransactionRO } from '@escapenavigator/types/dist/transaction/transaction.ro';
2
2
  import { ApiMethodDeclaration } from '..';
3
3
  /** ID транзакции */
4
4
  declare type ParamsData = number;
5
- declare type ResponseData = TransactionResponseObject;
5
+ declare type ResponseData = TransactionRO;
6
6
  export declare const remove: ApiMethodDeclaration<ParamsData, ResponseData>;
7
7
  export {};
@@ -4,11 +4,15 @@ import { createTranslationFromJson } from './create-translation-from-json';
4
4
  import { editAllTranslationLocales } from './edit-all-translation-locales';
5
5
  import { getAllNamespaces } from './get-all-namespaces';
6
6
  import { query } from './query';
7
+ import { queryMissing } from './query-missing';
8
+ import { removeAllMissing } from './remove-all-missing';
7
9
  import { removeNamespace } from './remove-namespace';
8
10
  import { removeTranslation } from './remove-translation';
9
11
  import { updateAllTranslationsInNamespace } from './update-all-translations-in-namespace';
10
12
  import { updateLocale } from './update-locale';
11
13
  declare type ApiDeclaration = {
14
+ removeAllMissing: typeof removeAllMissing;
15
+ queryMissing: typeof queryMissing;
12
16
  editAllTranslationLocales: typeof editAllTranslationLocales;
13
17
  updateAllTranslationsInNamespace: typeof updateAllTranslationsInNamespace;
14
18
  createNamespace: typeof createNamespace;
@@ -7,11 +7,15 @@ var create_translation_from_json_1 = require("./create-translation-from-json");
7
7
  var edit_all_translation_locales_1 = require("./edit-all-translation-locales");
8
8
  var get_all_namespaces_1 = require("./get-all-namespaces");
9
9
  var query_1 = require("./query");
10
+ var query_missing_1 = require("./query-missing");
11
+ var remove_all_missing_1 = require("./remove-all-missing");
10
12
  var remove_namespace_1 = require("./remove-namespace");
11
13
  var remove_translation_1 = require("./remove-translation");
12
14
  var update_all_translations_in_namespace_1 = require("./update-all-translations-in-namespace");
13
15
  var update_locale_1 = require("./update-locale");
14
16
  exports.translationsApiDeclaration = {
17
+ removeAllMissing: remove_all_missing_1.removeAllMissing,
18
+ queryMissing: query_missing_1.queryMissing,
15
19
  editAllTranslationLocales: edit_all_translation_locales_1.editAllTranslationLocales,
16
20
  updateAllTranslationsInNamespace: update_all_translations_in_namespace_1.updateAllTranslationsInNamespace,
17
21
  query: query_1.query,
@@ -0,0 +1,8 @@
1
+ import { QueryDto } from '@escapenavigator/types/dist/shared/query.dto';
2
+ import { QueryRO } from '@escapenavigator/types/dist/shared/query.ro';
3
+ import { MissingTranslationRO } from '@escapenavigator/types/dist/translation/missing-transaction.ro';
4
+ import { ApiMethodDeclaration } from '..';
5
+ declare type ParamsData = QueryDto;
6
+ declare type ResponseData = QueryRO<MissingTranslationRO>;
7
+ export declare const queryMissing: ApiMethodDeclaration<ParamsData, ResponseData>;
8
+ export {};
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.queryMissing = void 0;
4
+ var queryMissing = function (params) { return ({
5
+ url: '/missing-translations',
6
+ method: 'GET',
7
+ params: params,
8
+ }); };
9
+ exports.queryMissing = queryMissing;
@@ -0,0 +1,5 @@
1
+ import { ApiMethodDeclaration } from '..';
2
+ declare type ParamsData = undefined;
3
+ declare type ResponseData = any;
4
+ export declare const removeAllMissing: ApiMethodDeclaration<ParamsData, ResponseData>;
5
+ export {};
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.removeAllMissing = void 0;
4
+ var removeAllMissing = function () { return ({
5
+ url: '/missing-translations/remove',
6
+ method: 'DELETE',
7
+ }); };
8
+ exports.removeAllMissing = removeAllMissing;
@@ -1,7 +1,7 @@
1
- import { SuccessRO } from '@escapenavigator/types/dist/shared/success.ro';
2
1
  import { CheckUserTokendDto } from '@escapenavigator/types/dist/user/check-user-token.dto';
2
+ import { UserRO } from '@escapenavigator/types/dist/user/user.ro';
3
3
  import { ApiMethodDeclaration } from '..';
4
4
  declare type ParamsData = CheckUserTokendDto;
5
- declare type ResponseData = SuccessRO;
5
+ declare type ResponseData = UserRO;
6
6
  export declare const checkToken: ApiMethodDeclaration<ParamsData, ResponseData>;
7
7
  export {};
@@ -2,14 +2,15 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.serializeSlot = exports.serializeSlotOrderData = void 0;
4
4
  var serializeSlotOrderData = function (order) {
5
- var _a, _b, _c, _d;
5
+ var _a, _b, _c, _d, _e;
6
6
  return order && {
7
7
  id: order.id,
8
8
  players: order.players,
9
9
  hasDiscounts: !!((_a = order.discounts) === null || _a === void 0 ? void 0 : _a.length),
10
- hasCertificateApplies: !!((_b = order.certificates) === null || _b === void 0 ? void 0 : _b.length),
11
- hasPenalties: !!((_c = order.penalties) === null || _c === void 0 ? void 0 : _c.length),
12
- hasUpsellings: !!((_d = order.upsellings) === null || _d === void 0 ? void 0 : _d.length),
10
+ hasComments: !!((_b = order.messages) === null || _b === void 0 ? void 0 : _b.length),
11
+ hasCertificateApplies: !!((_c = order.certificates) === null || _c === void 0 ? void 0 : _c.length),
12
+ hasPenalties: !!((_d = order.penalties) === null || _d === void 0 ? void 0 : _d.length),
13
+ hasUpsellings: !!((_e = order.upsellings) === null || _e === void 0 ? void 0 : _e.length),
13
14
  utcDate: order.utcDate,
14
15
  moderatorId: order.moderatorId,
15
16
  total: order.total,
@@ -19,7 +19,9 @@ var convertDateAndTimeToUTCString = function (_a) {
19
19
  return (0, date_fns_1.addHours)((0, date_fns_tz_1.zonedTimeToUtc)(new Date("".concat(date, "T").concat(time)), timezone), offset).toISOString();
20
20
  };
21
21
  exports.convertDateAndTimeToUTCString = convertDateAndTimeToUTCString;
22
- var convertDateAndTimeToOrderDate = function (props) { return (0, exports.convertDateAndTimeToUTCString)(props).split('.')[0]; };
22
+ var convertDateAndTimeToOrderDate = function (props) {
23
+ return (0, exports.convertDateAndTimeToUTCString)(props).split('.')[0];
24
+ };
23
25
  exports.convertDateAndTimeToOrderDate = convertDateAndTimeToOrderDate;
24
26
  var convertUTCDateToZonedDate = function (_a) {
25
27
  var date = _a.date, timezone = _a.timezone, _b = _a.offset, offset = _b === void 0 ? 0 : _b, _c = _a.format, format = _c === void 0 ? 'dd.MM.yyyy, HH:mm' : _c, _d = _a.showTZ, showTZ = _d === void 0 ? false : _d;
@@ -29,5 +31,7 @@ var convertUTCDateToZonedDate = function (_a) {
29
31
  return showTZ ? "".concat(res, " (").concat(timezone, ")") : res;
30
32
  };
31
33
  exports.convertUTCDateToZonedDate = convertUTCDateToZonedDate;
32
- var convertOrderDateToZonedDate = function (props) { return (0, exports.convertUTCDateToZonedDate)(__assign(__assign({}, props), { date: "".concat(props.date, ".000Z") })); };
34
+ var convertOrderDateToZonedDate = function (props) {
35
+ return (0, exports.convertUTCDateToZonedDate)(__assign(__assign({}, props), { date: "".concat(props.date, ".000Z") }));
36
+ };
33
37
  exports.convertOrderDateToZonedDate = convertOrderDateToZonedDate;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@escapenavigator/services",
3
- "version": "1.4.68",
3
+ "version": "1.4.70",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -12,9 +12,9 @@
12
12
  "scripts": {
13
13
  "build": "rm -rf dist && tsc --project tsconfig.json"
14
14
  },
15
- "gitHead": "5ad305e49eaa034fd21d6c4529d3424fa48aa895",
15
+ "gitHead": "5ad75cfccfd51f358901f5b8f25dd2fff0d5d781",
16
16
  "dependencies": {
17
- "@escapenavigator/types": "^1.4.68",
17
+ "@escapenavigator/types": "^1.4.70",
18
18
  "@paypal/react-paypal-js": "^7.8.3",
19
19
  "axios": "^0.21.4",
20
20
  "class-transformer": "^0.5.1",