@escapenavigator/services 1.1.4 → 1.1.6
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/dist/api/cities-api/get-cities-by-country.d.ts +7 -0
- package/dist/api/cities-api/get-cities-by-country.js +8 -0
- package/dist/api/cities-api/get-city-by-ip.d.ts +6 -0
- package/dist/api/cities-api/get-city-by-ip.js +8 -0
- package/dist/api/cities-api/get-city-by-slug.d.ts +6 -0
- package/dist/api/cities-api/get-city-by-slug.js +8 -0
- package/dist/api/cities-api/get-one.d.ts +6 -0
- package/dist/api/cities-api/get-one.js +8 -0
- package/dist/api/cities-api/get-popular-cities-near.d.ts +6 -0
- package/dist/api/cities-api/get-popular-cities-near.js +8 -0
- package/dist/api/cities-api/index.d.ts +18 -0
- package/dist/api/cities-api/index.js +19 -0
- package/dist/api/cities-api/query.d.ts +7 -0
- package/dist/api/cities-api/query.js +9 -0
- package/dist/api/cities-api/remove.d.ts +7 -0
- package/dist/api/cities-api/remove.js +8 -0
- package/dist/api/cities-api/update.d.ts +10 -0
- package/dist/api/cities-api/update.js +9 -0
- package/dist/api/locations-api/get-by-coordinates.d.ts +7 -0
- package/dist/api/locations-api/get-by-coordinates.js +8 -0
- package/dist/api/locations-api/index.d.ts +2 -0
- package/dist/api/locations-api/index.js +2 -0
- package/dist/api/profiles-api/get-by-slug.d.ts +7 -0
- package/dist/api/profiles-api/get-by-slug.js +8 -0
- package/dist/api/profiles-api/index.d.ts +2 -0
- package/dist/api/profiles-api/index.js +2 -0
- package/dist/api/questrooms-api/get-by-coordinates.d.ts +7 -0
- package/dist/api/questrooms-api/get-by-coordinates.js +8 -0
- package/dist/api/questrooms-api/get-by-location.d.ts +7 -0
- package/dist/api/questrooms-api/get-by-location.js +8 -0
- package/dist/api/questrooms-api/get-by-slug.d.ts +7 -0
- package/dist/api/questrooms-api/get-by-slug.js +8 -0
- package/dist/api/questrooms-api/get-by-title.d.ts +7 -0
- package/dist/api/questrooms-api/get-by-title.js +8 -0
- package/dist/api/questrooms-api/index.d.ts +6 -0
- package/dist/api/questrooms-api/index.js +6 -0
- package/dist/utils/serialize-record.d.ts +1 -2
- package/dist/utils/serialize-record.js +2 -0
- package/package.json +3 -3
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CountriesEnum } from '@escapenavigator/types/dist/shared/enum/countries.enum';
|
|
2
|
+
import { CityResponseObject } from '@escapenavigator/types/dist/city/city.ro';
|
|
3
|
+
import { ApiMethodDeclaration } from '..';
|
|
4
|
+
declare type ParamsData = CountriesEnum;
|
|
5
|
+
declare type ResponseData = CityResponseObject[];
|
|
6
|
+
export declare const getCitiesByCountry: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getCitiesByCountry = void 0;
|
|
4
|
+
const getCitiesByCountry = (country) => ({
|
|
5
|
+
url: '/cities/country/' + country,
|
|
6
|
+
method: 'GET'
|
|
7
|
+
});
|
|
8
|
+
exports.getCitiesByCountry = getCitiesByCountry;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CityResponseObject } from '@escapenavigator/types/dist/city/city.ro';
|
|
2
|
+
import { ApiMethodDeclaration } from '..';
|
|
3
|
+
declare type ParamsData = string;
|
|
4
|
+
declare type ResponseData = CityResponseObject;
|
|
5
|
+
export declare const getCityByIp: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CityResponseObject } from '@escapenavigator/types/dist/city/city.ro';
|
|
2
|
+
import { ApiMethodDeclaration } from '..';
|
|
3
|
+
declare type ParamsData = string;
|
|
4
|
+
declare type ResponseData = CityResponseObject;
|
|
5
|
+
export declare const getCityBySlug: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CityResponseObject } from '@escapenavigator/types/dist/city/city.ro';
|
|
2
|
+
import { ApiMethodDeclaration } from '..';
|
|
3
|
+
declare type ParamsData = number;
|
|
4
|
+
declare type ResponseData = CityResponseObject;
|
|
5
|
+
export declare const getOne: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CityResponseObject } from '@escapenavigator/types/dist/city/city.ro';
|
|
2
|
+
import { ApiMethodDeclaration } from '..';
|
|
3
|
+
declare type ParamsData = string;
|
|
4
|
+
declare type ResponseData = CityResponseObject[];
|
|
5
|
+
export declare const getPopularCitiesNear: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getPopularCitiesNear = void 0;
|
|
4
|
+
const getPopularCitiesNear = (slug) => ({
|
|
5
|
+
url: '/cities/near/' + slug,
|
|
6
|
+
method: 'GET'
|
|
7
|
+
});
|
|
8
|
+
exports.getPopularCitiesNear = getPopularCitiesNear;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { getCitiesByCountry } from './get-cities-by-country';
|
|
2
|
+
import { getCityBySlug } from './get-city-by-slug';
|
|
3
|
+
import { getCityByIp } from './get-city-by-ip';
|
|
4
|
+
import { getPopularCitiesNear } from './get-popular-cities-near';
|
|
5
|
+
import { getOne } from './get-one';
|
|
6
|
+
import { update } from './update';
|
|
7
|
+
import { remove } from './remove';
|
|
8
|
+
declare type ApiDeclaration = {
|
|
9
|
+
getCitiesByCountry: typeof getCitiesByCountry;
|
|
10
|
+
getCityBySlug: typeof getCityBySlug;
|
|
11
|
+
getCityByIp: typeof getCityByIp;
|
|
12
|
+
getPopularCitiesNear: typeof getPopularCitiesNear;
|
|
13
|
+
getOne: typeof getOne;
|
|
14
|
+
update: typeof update;
|
|
15
|
+
remove: typeof remove;
|
|
16
|
+
};
|
|
17
|
+
export declare const citiesApiDeclaration: ApiDeclaration;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.citiesApiDeclaration = void 0;
|
|
4
|
+
const get_cities_by_country_1 = require("./get-cities-by-country");
|
|
5
|
+
const get_city_by_slug_1 = require("./get-city-by-slug");
|
|
6
|
+
const get_city_by_ip_1 = require("./get-city-by-ip");
|
|
7
|
+
const get_popular_cities_near_1 = require("./get-popular-cities-near");
|
|
8
|
+
const get_one_1 = require("./get-one");
|
|
9
|
+
const update_1 = require("./update");
|
|
10
|
+
const remove_1 = require("./remove");
|
|
11
|
+
exports.citiesApiDeclaration = {
|
|
12
|
+
getCitiesByCountry: get_cities_by_country_1.getCitiesByCountry,
|
|
13
|
+
getCityBySlug: get_city_by_slug_1.getCityBySlug,
|
|
14
|
+
getCityByIp: get_city_by_ip_1.getCityByIp,
|
|
15
|
+
getPopularCitiesNear: get_popular_cities_near_1.getPopularCitiesNear,
|
|
16
|
+
getOne: get_one_1.getOne,
|
|
17
|
+
update: update_1.update,
|
|
18
|
+
remove: remove_1.remove,
|
|
19
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CityResponseObject } from '@escapenavigator/types/dist/city/city.ro';
|
|
2
|
+
import { QueryDto } from '@escapenavigator/types/dist/shared/query.dto';
|
|
3
|
+
import { ApiMethodDeclaration } from '..';
|
|
4
|
+
declare type ParamsData = QueryDto;
|
|
5
|
+
declare type ResponseData = CityResponseObject[];
|
|
6
|
+
export declare const query: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CityResponseObject } from '@escapenavigator/types/dist/city/city.ro';
|
|
2
|
+
import { ApiMethodDeclaration } from '..';
|
|
3
|
+
/** ID city */
|
|
4
|
+
declare type ParamsData = number;
|
|
5
|
+
declare type ResponseData = CityResponseObject;
|
|
6
|
+
export declare const remove: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { UpdateCityDto } from '@escapenavigator/types/dist/city/update-city.dto';
|
|
2
|
+
import { CityResponseObject } from '@escapenavigator/types/dist/city/city.ro';
|
|
3
|
+
import { ApiMethodDeclaration } from '..';
|
|
4
|
+
declare type ParamsData = {
|
|
5
|
+
id: number;
|
|
6
|
+
data: UpdateCityDto;
|
|
7
|
+
};
|
|
8
|
+
declare type ResponseData = CityResponseObject;
|
|
9
|
+
export declare const update: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { GetNearestLocationDto } from '@escapenavigator/types/dist/location/get-nearest-location.dto';
|
|
2
|
+
import { NearestLocationResponseObject } from '@escapenavigator/types/dist/location/nearest-location.ro';
|
|
3
|
+
import { ApiMethodDeclaration } from '..';
|
|
4
|
+
declare type ParamsData = GetNearestLocationDto;
|
|
5
|
+
declare type ResponseData = NearestLocationResponseObject[];
|
|
6
|
+
export declare const getByCoordinates: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
7
|
+
export {};
|
|
@@ -4,6 +4,7 @@ import { query } from './query';
|
|
|
4
4
|
import { recover } from './recover';
|
|
5
5
|
import { remove } from './remove';
|
|
6
6
|
import { update } from './update';
|
|
7
|
+
import { getByCoordinates } from './get-by-coordinates';
|
|
7
8
|
declare type ApiDeclaration = {
|
|
8
9
|
create: typeof create;
|
|
9
10
|
remove: typeof remove;
|
|
@@ -11,6 +12,7 @@ declare type ApiDeclaration = {
|
|
|
11
12
|
getOne: typeof getOne;
|
|
12
13
|
recover: typeof recover;
|
|
13
14
|
query: typeof query;
|
|
15
|
+
getByCoordinates: typeof getByCoordinates;
|
|
14
16
|
};
|
|
15
17
|
export declare const locationsApiDeclaration: ApiDeclaration;
|
|
16
18
|
export {};
|
|
@@ -7,6 +7,7 @@ const query_1 = require("./query");
|
|
|
7
7
|
const recover_1 = require("./recover");
|
|
8
8
|
const remove_1 = require("./remove");
|
|
9
9
|
const update_1 = require("./update");
|
|
10
|
+
const get_by_coordinates_1 = require("./get-by-coordinates");
|
|
10
11
|
exports.locationsApiDeclaration = {
|
|
11
12
|
create: create_1.create,
|
|
12
13
|
remove: remove_1.remove,
|
|
@@ -14,4 +15,5 @@ exports.locationsApiDeclaration = {
|
|
|
14
15
|
query: query_1.query,
|
|
15
16
|
recover: recover_1.recover,
|
|
16
17
|
getOne: get_one_1.getOne,
|
|
18
|
+
getByCoordinates: get_by_coordinates_1.getByCoordinates,
|
|
17
19
|
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AgregatorProfileResponseObject } from '@escapenavigator/types/dist/profile/agregator-profile.ro';
|
|
2
|
+
import { ApiMethodDeclaration } from '..';
|
|
3
|
+
/** slug */
|
|
4
|
+
declare type ParamsData = string;
|
|
5
|
+
declare type ResponseData = AgregatorProfileResponseObject;
|
|
6
|
+
export declare const getBySlug: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
7
|
+
export {};
|
|
@@ -4,6 +4,7 @@ import { getOne } from './get-one';
|
|
|
4
4
|
import { query } from './query';
|
|
5
5
|
import { remove } from './remove';
|
|
6
6
|
import { update } from './update';
|
|
7
|
+
import { getBySlug } from './get-by-slug';
|
|
7
8
|
declare type ApiDeclaration = {
|
|
8
9
|
create: typeof create;
|
|
9
10
|
remove: typeof remove;
|
|
@@ -11,6 +12,7 @@ declare type ApiDeclaration = {
|
|
|
11
12
|
query: typeof query;
|
|
12
13
|
getOne: typeof getOne;
|
|
13
14
|
current: typeof current;
|
|
15
|
+
getBySlug: typeof getBySlug;
|
|
14
16
|
};
|
|
15
17
|
export declare const profilesApiDeclaration: ApiDeclaration;
|
|
16
18
|
export {};
|
|
@@ -7,6 +7,7 @@ const get_one_1 = require("./get-one");
|
|
|
7
7
|
const query_1 = require("./query");
|
|
8
8
|
const remove_1 = require("./remove");
|
|
9
9
|
const update_1 = require("./update");
|
|
10
|
+
const get_by_slug_1 = require("./get-by-slug");
|
|
10
11
|
exports.profilesApiDeclaration = {
|
|
11
12
|
create: create_1.create,
|
|
12
13
|
remove: remove_1.remove,
|
|
@@ -14,4 +15,5 @@ exports.profilesApiDeclaration = {
|
|
|
14
15
|
query: query_1.query,
|
|
15
16
|
getOne: get_one_1.getOne,
|
|
16
17
|
current: current_1.current,
|
|
18
|
+
getBySlug: get_by_slug_1.getBySlug
|
|
17
19
|
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AgregatorQuestroomResponseObject } from '@escapenavigator/types/dist/questroom/agregator-questroom.ro';
|
|
2
|
+
import { ApiMethodDeclaration } from '..';
|
|
3
|
+
/** coordinates */
|
|
4
|
+
declare type ParamsData = string;
|
|
5
|
+
declare type ResponseData = AgregatorQuestroomResponseObject[];
|
|
6
|
+
export declare const getByCoordinates: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getByCoordinates = void 0;
|
|
4
|
+
const getByCoordinates = (coordinates) => ({
|
|
5
|
+
url: `/questrooms/near/${coordinates}`,
|
|
6
|
+
method: 'GET',
|
|
7
|
+
});
|
|
8
|
+
exports.getByCoordinates = getByCoordinates;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AgregatorQuestroomResponseObject } from '@escapenavigator/types/dist/questroom/agregator-questroom.ro';
|
|
2
|
+
import { ApiMethodDeclaration } from '..';
|
|
3
|
+
/** ID локации */
|
|
4
|
+
declare type ParamsData = number;
|
|
5
|
+
declare type ResponseData = AgregatorQuestroomResponseObject[];
|
|
6
|
+
export declare const getByLocation: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AgregatorQuestroomResponseObject } from '@escapenavigator/types/dist/questroom/agregator-questroom.ro';
|
|
2
|
+
import { ApiMethodDeclaration } from '..';
|
|
3
|
+
/** slug */
|
|
4
|
+
declare type ParamsData = string;
|
|
5
|
+
declare type ResponseData = AgregatorQuestroomResponseObject;
|
|
6
|
+
export declare const getBySlug: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AgregatorQuestroomResponseObject } from '@escapenavigator/types/dist/questroom/agregator-questroom.ro';
|
|
2
|
+
import { ApiMethodDeclaration } from '..';
|
|
3
|
+
/** Название */
|
|
4
|
+
declare type ParamsData = string;
|
|
5
|
+
declare type ResponseData = AgregatorQuestroomResponseObject[];
|
|
6
|
+
export declare const getByTitle: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
7
|
+
export {};
|
|
@@ -4,6 +4,9 @@ import { query } from './query';
|
|
|
4
4
|
import { recover } from './recover';
|
|
5
5
|
import { remove } from './remove';
|
|
6
6
|
import { update } from './update';
|
|
7
|
+
import { getByLocation } from './get-by-location';
|
|
8
|
+
import { getByCoordinates } from './get-by-coordinates';
|
|
9
|
+
import { getBySlug } from './get-by-slug';
|
|
7
10
|
declare type ApiDeclaration = {
|
|
8
11
|
create: typeof create;
|
|
9
12
|
remove: typeof remove;
|
|
@@ -11,6 +14,9 @@ declare type ApiDeclaration = {
|
|
|
11
14
|
query: typeof query;
|
|
12
15
|
getOne: typeof getOne;
|
|
13
16
|
recover: typeof recover;
|
|
17
|
+
getByLocation: typeof getByLocation;
|
|
18
|
+
getByCoordinates: typeof getByCoordinates;
|
|
19
|
+
getBySlug: typeof getBySlug;
|
|
14
20
|
};
|
|
15
21
|
export declare const questroomsApiDeclaration: ApiDeclaration;
|
|
16
22
|
export {};
|
|
@@ -7,6 +7,9 @@ const query_1 = require("./query");
|
|
|
7
7
|
const recover_1 = require("./recover");
|
|
8
8
|
const remove_1 = require("./remove");
|
|
9
9
|
const update_1 = require("./update");
|
|
10
|
+
const get_by_location_1 = require("./get-by-location");
|
|
11
|
+
const get_by_coordinates_1 = require("./get-by-coordinates");
|
|
12
|
+
const get_by_slug_1 = require("./get-by-slug");
|
|
10
13
|
exports.questroomsApiDeclaration = {
|
|
11
14
|
create: create_1.create,
|
|
12
15
|
remove: remove_1.remove,
|
|
@@ -14,4 +17,7 @@ exports.questroomsApiDeclaration = {
|
|
|
14
17
|
query: query_1.query,
|
|
15
18
|
getOne: get_one_1.getOne,
|
|
16
19
|
recover: recover_1.recover,
|
|
20
|
+
getByLocation: get_by_location_1.getByLocation,
|
|
21
|
+
getByCoordinates: get_by_coordinates_1.getByCoordinates,
|
|
22
|
+
getBySlug: get_by_slug_1.getBySlug
|
|
17
23
|
};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const serializeRecord: <T extends ClassConstructor<unknown>>(Dto: T, data: any) => T;
|
|
1
|
+
export declare const serializeRecord: <T, D>(Dto: T, data: D) => T;
|
|
@@ -2,5 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.serializeRecord = void 0;
|
|
4
4
|
const class_transformer_1 = require("class-transformer");
|
|
5
|
+
// export const serializeRecord = <T extends ClassConstructor<unknown>>(Dto: T, data): T =>
|
|
6
|
+
// plainToClass(Dto, data, { strategy: 'excludeAll' }) as unknown as T;
|
|
5
7
|
const serializeRecord = (Dto, data) => (0, class_transformer_1.plainToClass)(Dto, data, { strategy: 'excludeAll' });
|
|
6
8
|
exports.serializeRecord = serializeRecord;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@escapenavigator/services",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.6",
|
|
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.build.json"
|
|
14
14
|
},
|
|
15
|
-
"gitHead": "
|
|
15
|
+
"gitHead": "453c247b2035970fa2afc78b00b811d462062100",
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@escapenavigator/types": "^1.1.
|
|
17
|
+
"@escapenavigator/types": "^1.1.6",
|
|
18
18
|
"axios": "^0.21.4",
|
|
19
19
|
"class-transformer": "^0.5.1",
|
|
20
20
|
"class-validator": "^0.13.1",
|