@escapenavigator/services 2.0.13 → 2.0.15

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.
@@ -0,0 +1,27 @@
1
+ import { CityPlayerCatalogRO, CityPlayerGameRO, CityPlayerLoginRO, CityPlayerRequestCodeRO, CityPlayerRO, CityPlayerVerifyCodeRO } from '@escapenavigator/types/dist/openapi/city-player/city-player.ro';
2
+ import { CityPlayerAppleLoginDto } from '@escapenavigator/types/dist/openapi/city-player/city-player-apple-login.dto';
3
+ import { CityPlayerLoginDto } from '@escapenavigator/types/dist/openapi/city-player/city-player-login.dto';
4
+ import { CityPlayerRequestCodeDto } from '@escapenavigator/types/dist/openapi/city-player/city-player-request-code.dto';
5
+ import { CityPlayerVerifyCodeDto } from '@escapenavigator/types/dist/openapi/city-player/city-player-verify-code.dto';
6
+ import { ApiMethodDeclaration } from '..';
7
+ export declare const cityPlayerApiDeclaration: {
8
+ ping: ApiMethodDeclaration<void, {
9
+ ok: boolean;
10
+ time: string;
11
+ }>;
12
+ login: ApiMethodDeclaration<{
13
+ data: CityPlayerLoginDto;
14
+ }, CityPlayerLoginRO>;
15
+ requestCode: ApiMethodDeclaration<{
16
+ data: CityPlayerRequestCodeDto;
17
+ }, CityPlayerRequestCodeRO>;
18
+ verifyCode: ApiMethodDeclaration<{
19
+ data: CityPlayerVerifyCodeDto;
20
+ }, CityPlayerVerifyCodeRO>;
21
+ appleLogin: ApiMethodDeclaration<{
22
+ data: CityPlayerAppleLoginDto;
23
+ }, CityPlayerVerifyCodeRO>;
24
+ me: ApiMethodDeclaration<void, CityPlayerRO>;
25
+ games: ApiMethodDeclaration<void, CityPlayerGameRO[]>;
26
+ catalog: ApiMethodDeclaration<void, CityPlayerCatalogRO>;
27
+ };
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.cityPlayerApiDeclaration = void 0;
4
+ /**
5
+ * API потребительского игрока (Routale). Один app — два бека: запросы
6
+ * идут через failover-обёртку в приложении, которая при 404/401 ретраит
7
+ * второй домен и закрепляет рабочий.
8
+ */
9
+ var ping = function () { return ({
10
+ url: '/openapi/city-player/ping',
11
+ method: 'GET',
12
+ }); };
13
+ var login = function (_a) {
14
+ var data = _a.data;
15
+ return ({
16
+ url: '/openapi/city-player/login',
17
+ method: 'POST',
18
+ data: data,
19
+ });
20
+ };
21
+ var requestCode = function (_a) {
22
+ var data = _a.data;
23
+ return ({
24
+ url: '/openapi/city-player/request-code',
25
+ method: 'POST',
26
+ data: data,
27
+ });
28
+ };
29
+ var verifyCode = function (_a) {
30
+ var data = _a.data;
31
+ return ({
32
+ url: '/openapi/city-player/verify-code',
33
+ method: 'POST',
34
+ data: data,
35
+ });
36
+ };
37
+ var appleLogin = function (_a) {
38
+ var data = _a.data;
39
+ return ({
40
+ url: '/openapi/city-player/apple',
41
+ method: 'POST',
42
+ data: data,
43
+ });
44
+ };
45
+ var me = function () { return ({
46
+ url: '/openapi/city-player/me',
47
+ method: 'GET',
48
+ }); };
49
+ var games = function () { return ({
50
+ url: '/openapi/city-player/games',
51
+ method: 'GET',
52
+ }); };
53
+ var catalog = function () { return ({
54
+ url: '/openapi/city-player/catalog',
55
+ method: 'GET',
56
+ }); };
57
+ exports.cityPlayerApiDeclaration = {
58
+ ping: ping,
59
+ login: login,
60
+ requestCode: requestCode,
61
+ verifyCode: verifyCode,
62
+ appleLogin: appleLogin,
63
+ me: me,
64
+ games: games,
65
+ catalog: catalog,
66
+ };
@@ -0,0 +1,10 @@
1
+ import { ApplyGooglePlacesMatchDto } from '@escapenavigator/types/dist/google-places/apply-google-places-match.dto';
2
+ import { GooglePlacesRO } from '@escapenavigator/types/dist/google-places/google-places.ro';
3
+ import { ApiMethodDeclaration } from '..';
4
+ type ParamsData = {
5
+ id: number;
6
+ data: ApplyGooglePlacesMatchDto;
7
+ };
8
+ type ResponseData = GooglePlacesRO;
9
+ export declare const applyMatchGooglePlace: ApiMethodDeclaration<ParamsData, ResponseData>;
10
+ export {};
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.applyMatchGooglePlace = void 0;
4
+ var applyMatchGooglePlace = function (_a) {
5
+ var id = _a.id, data = _a.data;
6
+ return ({
7
+ url: "/google-places/".concat(id, "/apply-match"),
8
+ method: 'POST',
9
+ data: data,
10
+ });
11
+ };
12
+ exports.applyMatchGooglePlace = applyMatchGooglePlace;
@@ -1,15 +1,23 @@
1
+ import { applyMatchGooglePlace } from './apply-match';
1
2
  import { countGooglePlaces } from './count';
2
3
  import { createCompanyFromPlace } from './create-company';
3
4
  import { createLocationFromPlace } from './create-location';
4
5
  import { exportGooglePlaces } from './export';
5
6
  import { getGooglePlace } from './get-one';
7
+ import { matchPreviewGooglePlace } from './match-preview';
6
8
  import { queryGooglePlaces } from './query';
7
9
  import { relinkGooglePlace } from './relink';
8
10
  import { getGooglePlaceSiblings } from './siblings';
11
+ import { statsByCountryGooglePlaces } from './stats-by-country';
12
+ import { unlinkGooglePlace } from './unlink';
13
+ import { unlinkGooglePlaceLocation } from './unlink-location';
9
14
  import { updateGooglePlace } from './update';
10
15
  type ApiDeclaration = {
11
16
  query: typeof queryGooglePlaces;
12
17
  getOne: typeof getGooglePlace;
18
+ matchPreview: typeof matchPreviewGooglePlace;
19
+ applyMatch: typeof applyMatchGooglePlace;
20
+ statsByCountry: typeof statsByCountryGooglePlaces;
13
21
  update: typeof updateGooglePlace;
14
22
  exportGooglePlaces: typeof exportGooglePlaces;
15
23
  count: typeof countGooglePlaces;
@@ -17,6 +25,8 @@ type ApiDeclaration = {
17
25
  createCompany: typeof createCompanyFromPlace;
18
26
  createLocation: typeof createLocationFromPlace;
19
27
  relink: typeof relinkGooglePlace;
28
+ unlink: typeof unlinkGooglePlace;
29
+ unlinkLocation: typeof unlinkGooglePlaceLocation;
20
30
  };
21
31
  export declare const googlePlacesApiDeclaration: ApiDeclaration;
22
32
  export {};
@@ -1,18 +1,26 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.googlePlacesApiDeclaration = void 0;
4
+ var apply_match_1 = require("./apply-match");
4
5
  var count_1 = require("./count");
5
6
  var create_company_1 = require("./create-company");
6
7
  var create_location_1 = require("./create-location");
7
8
  var export_1 = require("./export");
8
9
  var get_one_1 = require("./get-one");
10
+ var match_preview_1 = require("./match-preview");
9
11
  var query_1 = require("./query");
10
12
  var relink_1 = require("./relink");
11
13
  var siblings_1 = require("./siblings");
14
+ var stats_by_country_1 = require("./stats-by-country");
15
+ var unlink_1 = require("./unlink");
16
+ var unlink_location_1 = require("./unlink-location");
12
17
  var update_1 = require("./update");
13
18
  exports.googlePlacesApiDeclaration = {
14
19
  query: query_1.queryGooglePlaces,
15
20
  getOne: get_one_1.getGooglePlace,
21
+ matchPreview: match_preview_1.matchPreviewGooglePlace,
22
+ applyMatch: apply_match_1.applyMatchGooglePlace,
23
+ statsByCountry: stats_by_country_1.statsByCountryGooglePlaces,
16
24
  update: update_1.updateGooglePlace,
17
25
  exportGooglePlaces: export_1.exportGooglePlaces,
18
26
  count: count_1.countGooglePlaces,
@@ -20,4 +28,6 @@ exports.googlePlacesApiDeclaration = {
20
28
  createCompany: create_company_1.createCompanyFromPlace,
21
29
  createLocation: create_location_1.createLocationFromPlace,
22
30
  relink: relink_1.relinkGooglePlace,
31
+ unlink: unlink_1.unlinkGooglePlace,
32
+ unlinkLocation: unlink_location_1.unlinkGooglePlaceLocation,
23
33
  };
@@ -0,0 +1,8 @@
1
+ import { GooglePlacesMatchPreviewRO } from '@escapenavigator/types/dist/google-places/google-places-match-preview.ro';
2
+ import { ApiMethodDeclaration } from '..';
3
+ type ParamsData = {
4
+ id: number;
5
+ };
6
+ type ResponseData = GooglePlacesMatchPreviewRO;
7
+ export declare const matchPreviewGooglePlace: ApiMethodDeclaration<ParamsData, ResponseData>;
8
+ export {};
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.matchPreviewGooglePlace = void 0;
4
+ var matchPreviewGooglePlace = function (_a) {
5
+ var id = _a.id;
6
+ return ({
7
+ url: "/google-places/".concat(id, "/match-preview"),
8
+ method: 'GET',
9
+ });
10
+ };
11
+ exports.matchPreviewGooglePlace = matchPreviewGooglePlace;
@@ -0,0 +1,5 @@
1
+ import { GooglePlacesCountryStatsRO } from '@escapenavigator/types/dist/google-places/google-places-country-stats.ro';
2
+ import { ApiMethodDeclaration } from '..';
3
+ type ResponseData = GooglePlacesCountryStatsRO[];
4
+ export declare const statsByCountryGooglePlaces: ApiMethodDeclaration<void, ResponseData>;
5
+ export {};
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.statsByCountryGooglePlaces = void 0;
4
+ var statsByCountryGooglePlaces = function () { return ({
5
+ url: '/google-places/stats-by-country',
6
+ method: 'GET',
7
+ }); };
8
+ exports.statsByCountryGooglePlaces = statsByCountryGooglePlaces;
@@ -0,0 +1,8 @@
1
+ import { GooglePlacesRO } from '@escapenavigator/types/dist/google-places/google-places.ro';
2
+ import { ApiMethodDeclaration } from '..';
3
+ type ParamsData = {
4
+ id: number;
5
+ };
6
+ type ResponseData = GooglePlacesRO;
7
+ export declare const unlinkGooglePlaceLocation: ApiMethodDeclaration<ParamsData, ResponseData>;
8
+ export {};
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.unlinkGooglePlaceLocation = void 0;
4
+ var unlinkGooglePlaceLocation = function (_a) {
5
+ var id = _a.id;
6
+ return ({
7
+ url: "/google-places/".concat(id, "/unlink-location"),
8
+ method: 'POST',
9
+ });
10
+ };
11
+ exports.unlinkGooglePlaceLocation = unlinkGooglePlaceLocation;
@@ -0,0 +1,8 @@
1
+ import { GooglePlacesRO } from '@escapenavigator/types/dist/google-places/google-places.ro';
2
+ import { ApiMethodDeclaration } from '..';
3
+ type ParamsData = {
4
+ id: number;
5
+ };
6
+ type ResponseData = GooglePlacesRO;
7
+ export declare const unlinkGooglePlace: ApiMethodDeclaration<ParamsData, ResponseData>;
8
+ export {};
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.unlinkGooglePlace = void 0;
4
+ var unlinkGooglePlace = function (_a) {
5
+ var id = _a.id;
6
+ return ({
7
+ url: "/google-places/".concat(id, "/unlink"),
8
+ method: 'POST',
9
+ });
10
+ };
11
+ exports.unlinkGooglePlace = unlinkGooglePlace;
@@ -17,6 +17,7 @@ import { certificatesaleDiscountsApiDeclaration } from './certificatesales-disco
17
17
  import { certificateUploadsApiDeclaration } from './certificateuploads-api';
18
18
  import { checklistApiDeclaration } from './checklist-api';
19
19
  import { citiesApiDeclaration } from './cities-api';
20
+ import { cityPlayerApiDeclaration } from './city-player-api';
20
21
  import { cityQuestsApiDeclaration } from './city-quest-api';
21
22
  import { cityQuestPlayApiDeclaration } from './city-quest-play-api';
22
23
  import { clientsApiDeclaration } from './clients-api';
@@ -96,6 +97,7 @@ export type InitApiDeclaration = {
96
97
  gameSessionApi: Api<typeof gameSessionApiDeclaration>;
97
98
  cityQuestsApi: Api<typeof cityQuestsApiDeclaration>;
98
99
  cityQuestPlayApi: Api<typeof cityQuestPlayApiDeclaration>;
100
+ cityPlayerApi: Api<typeof cityPlayerApiDeclaration>;
99
101
  checklistApi: Api<typeof checklistApiDeclaration>;
100
102
  mailchimpApi: Api<typeof mailchimpApiDeclaration>;
101
103
  playersApi: Api<typeof playersApiDeclaration>;
@@ -20,6 +20,7 @@ var certificatesales_discounts_api_1 = require("./certificatesales-discounts-api
20
20
  var certificateuploads_api_1 = require("./certificateuploads-api");
21
21
  var checklist_api_1 = require("./checklist-api");
22
22
  var cities_api_1 = require("./cities-api");
23
+ var city_player_api_1 = require("./city-player-api");
23
24
  var city_quest_api_1 = require("./city-quest-api");
24
25
  var city_quest_play_api_1 = require("./city-quest-play-api");
25
26
  var clients_api_1 = require("./clients-api");
@@ -101,6 +102,7 @@ var initClientApi = function (url, clientOptions) { return ({
101
102
  gameSessionApi: (0, _1.initApi)(game_session_api_1.gameSessionApiDeclaration, url, clientOptions),
102
103
  cityQuestsApi: (0, _1.initApi)(city_quest_api_1.cityQuestsApiDeclaration, url, clientOptions),
103
104
  cityQuestPlayApi: (0, _1.initApi)(city_quest_play_api_1.cityQuestPlayApiDeclaration, url, clientOptions),
105
+ cityPlayerApi: (0, _1.initApi)(city_player_api_1.cityPlayerApiDeclaration, url, clientOptions),
104
106
  checklistApi: (0, _1.initApi)(checklist_api_1.checklistApiDeclaration, url, clientOptions),
105
107
  playersApi: (0, _1.initApi)(players_api_1.playersApiDeclaration, url, clientOptions),
106
108
  mailchimpApi: (0, _1.initApi)(mailchimp_api_1.mailchimpApiDeclaration, url, clientOptions),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@escapenavigator/services",
3
- "version": "2.0.13",
3
+ "version": "2.0.15",
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": "a9cccec706631315eb7768d227dfbb2eb437fd56",
15
+ "gitHead": "d88028b791bdfcd2cc529f66db490a4bf7761fdd",
16
16
  "dependencies": {
17
- "@escapenavigator/types": "^2.0.12",
18
- "@escapenavigator/utils": "^2.0.13",
17
+ "@escapenavigator/types": "^2.0.14",
18
+ "@escapenavigator/utils": "^2.0.15",
19
19
  "axios": "^0.21.4",
20
20
  "class-transformer": "^0.5.1",
21
21
  "class-validator": "^0.13.2",