@escapenavigator/services 2.0.11 → 2.0.13
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/init-client-api.d.ts +2 -0
- package/dist/api/init-client-api.js +2 -0
- package/dist/api/locations-api/index.d.ts +2 -0
- package/dist/api/locations-api/index.js +2 -0
- package/dist/api/locations-api/transfer-for-admin.d.ts +14 -0
- package/dist/api/locations-api/transfer-for-admin.js +12 -0
- package/dist/api/partners-portal-admin-api/index.d.ts +40 -0
- package/dist/api/partners-portal-admin-api/index.js +56 -0
- package/package.json +4 -4
|
@@ -57,6 +57,7 @@ import { ordersApiDeclaration } from './orders-api';
|
|
|
57
57
|
import { packagesApiDeclaration } from './packages-api';
|
|
58
58
|
import { parseResultsApiDeclaration } from './parse-results-api';
|
|
59
59
|
import { partnersApiDeclaration } from './partners-api';
|
|
60
|
+
import { partnersPortalAdminApiDeclaration } from './partners-portal-admin-api';
|
|
60
61
|
import { playersApiDeclaration } from './players-api';
|
|
61
62
|
import { productsApiDeclaration } from './products-api';
|
|
62
63
|
import { profilesApiDeclaration } from './profiles-api';
|
|
@@ -152,6 +153,7 @@ export type InitApiDeclaration = {
|
|
|
152
153
|
locations: Api<typeof locationsApiDeclaration>;
|
|
153
154
|
upsellings: Api<typeof upsellingsApiDeclaration>;
|
|
154
155
|
partners: Api<typeof partnersApiDeclaration>;
|
|
156
|
+
partnersPortalAdminApi: Api<typeof partnersPortalAdminApiDeclaration>;
|
|
155
157
|
questrooms: Api<typeof questroomsApiDeclaration>;
|
|
156
158
|
dynamicResources: Api<typeof dynamicResourcesApiDeclaration>;
|
|
157
159
|
widgets: Api<typeof widgetsApiDeclaration>;
|
|
@@ -60,6 +60,7 @@ var orders_api_1 = require("./orders-api");
|
|
|
60
60
|
var packages_api_1 = require("./packages-api");
|
|
61
61
|
var parse_results_api_1 = require("./parse-results-api");
|
|
62
62
|
var partners_api_1 = require("./partners-api");
|
|
63
|
+
var partners_portal_admin_api_1 = require("./partners-portal-admin-api");
|
|
63
64
|
var players_api_1 = require("./players-api");
|
|
64
65
|
var products_api_1 = require("./products-api");
|
|
65
66
|
var profiles_api_1 = require("./profiles-api");
|
|
@@ -156,6 +157,7 @@ var initClientApi = function (url, clientOptions) { return ({
|
|
|
156
157
|
locations: (0, _1.initApi)(locations_api_1.locationsApiDeclaration, url, clientOptions),
|
|
157
158
|
upsellings: (0, _1.initApi)(upsellings_api_1.upsellingsApiDeclaration, url, clientOptions),
|
|
158
159
|
partners: (0, _1.initApi)(partners_api_1.partnersApiDeclaration, url, clientOptions),
|
|
160
|
+
partnersPortalAdminApi: (0, _1.initApi)(partners_portal_admin_api_1.partnersPortalAdminApiDeclaration, url, clientOptions),
|
|
159
161
|
questrooms: (0, _1.initApi)(questrooms_api_1.questroomsApiDeclaration, url, clientOptions),
|
|
160
162
|
dynamicResources: (0, _1.initApi)(dynamic_resources_api_1.dynamicResourcesApiDeclaration, url, clientOptions),
|
|
161
163
|
widgets: (0, _1.initApi)(widgets_api_1.widgetsApiDeclaration, url, clientOptions),
|
|
@@ -6,6 +6,7 @@ import { query } from './query';
|
|
|
6
6
|
import { queryForAdmin } from './query-for-admin';
|
|
7
7
|
import { recover } from './recover';
|
|
8
8
|
import { remove } from './remove';
|
|
9
|
+
import { transferForAdmin } from './transfer-for-admin';
|
|
9
10
|
import { update } from './update';
|
|
10
11
|
import { updateForAdmin } from './update-for-admin';
|
|
11
12
|
import { updateSortPosition } from './update-sort-position';
|
|
@@ -13,6 +14,7 @@ type ApiDeclaration = {
|
|
|
13
14
|
create: typeof create;
|
|
14
15
|
createForAdmin: typeof createForAdmin;
|
|
15
16
|
remove: typeof remove;
|
|
17
|
+
transferForAdmin: typeof transferForAdmin;
|
|
16
18
|
update: typeof update;
|
|
17
19
|
updateForAdmin: typeof updateForAdmin;
|
|
18
20
|
getOne: typeof getOne;
|
|
@@ -9,6 +9,7 @@ var query_1 = require("./query");
|
|
|
9
9
|
var query_for_admin_1 = require("./query-for-admin");
|
|
10
10
|
var recover_1 = require("./recover");
|
|
11
11
|
var remove_1 = require("./remove");
|
|
12
|
+
var transfer_for_admin_1 = require("./transfer-for-admin");
|
|
12
13
|
var update_1 = require("./update");
|
|
13
14
|
var update_for_admin_1 = require("./update-for-admin");
|
|
14
15
|
var update_sort_position_1 = require("./update-sort-position");
|
|
@@ -16,6 +17,7 @@ exports.locationsApiDeclaration = {
|
|
|
16
17
|
create: create_1.create,
|
|
17
18
|
createForAdmin: create_for_admin_1.createForAdmin,
|
|
18
19
|
remove: remove_1.remove,
|
|
20
|
+
transferForAdmin: transfer_for_admin_1.transferForAdmin,
|
|
19
21
|
update: update_1.update,
|
|
20
22
|
updateForAdmin: update_for_admin_1.updateForAdmin,
|
|
21
23
|
updateSortPosition: update_sort_position_1.updateSortPosition,
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { TransferLocationForAdminDto } from '@escapenavigator/types/dist/location/transfer-location-for-admin.dto';
|
|
2
|
+
import { ApiMethodDeclaration } from '..';
|
|
3
|
+
type ParamsData = {
|
|
4
|
+
id: number;
|
|
5
|
+
data: TransferLocationForAdminDto;
|
|
6
|
+
};
|
|
7
|
+
type ResponseData = {
|
|
8
|
+
locationId: number;
|
|
9
|
+
fromProfileId: number;
|
|
10
|
+
toProfileId: number;
|
|
11
|
+
movedQuestrooms: number;
|
|
12
|
+
};
|
|
13
|
+
export declare const transferForAdmin: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.transferForAdmin = void 0;
|
|
4
|
+
var transferForAdmin = function (_a) {
|
|
5
|
+
var id = _a.id, data = _a.data;
|
|
6
|
+
return ({
|
|
7
|
+
url: "/locations/admin/".concat(id, "/transfer"),
|
|
8
|
+
method: 'POST',
|
|
9
|
+
data: data,
|
|
10
|
+
});
|
|
11
|
+
};
|
|
12
|
+
exports.transferForAdmin = transferForAdmin;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { AdminModeratePortalStoryDto } from '@escapenavigator/types/dist/partners-portal/admin/admin-moderate-portal-story.dto';
|
|
2
|
+
import { AdminPortalPartnerRO } from '@escapenavigator/types/dist/partners-portal/admin/admin-portal-partner.ro';
|
|
3
|
+
import { AdminUpdatePortalMaterialOrderDto } from '@escapenavigator/types/dist/partners-portal/admin/admin-update-portal-material-order.dto';
|
|
4
|
+
import { AdminUpdatePortalPartnerDto } from '@escapenavigator/types/dist/partners-portal/admin/admin-update-portal-partner.dto';
|
|
5
|
+
import { PortalMaterialOrderStatusEnum } from '@escapenavigator/types/dist/partners-portal/enum/portal-material-order-status.enum';
|
|
6
|
+
import { PortalPartnerTypeEnum } from '@escapenavigator/types/dist/partners-portal/enum/portal-partner-type.enum';
|
|
7
|
+
import { PortalStoryStatusEnum } from '@escapenavigator/types/dist/partners-portal/enum/portal-story-status.enum';
|
|
8
|
+
import { PortalMaterialOrderRO } from '@escapenavigator/types/dist/partners-portal/portal-material-order.ro';
|
|
9
|
+
import { PortalPartnerRO } from '@escapenavigator/types/dist/partners-portal/portal-partner.ro';
|
|
10
|
+
import { PortalPartnerStatsRO } from '@escapenavigator/types/dist/partners-portal/portal-stats.ro';
|
|
11
|
+
import { PortalStoryRO } from '@escapenavigator/types/dist/partners-portal/portal-story.ro';
|
|
12
|
+
import { ApiMethodDeclaration } from '..';
|
|
13
|
+
export declare const partnersPortalAdminApiDeclaration: {
|
|
14
|
+
partners: ApiMethodDeclaration<{
|
|
15
|
+
type?: PortalPartnerTypeEnum;
|
|
16
|
+
}, AdminPortalPartnerRO[]>;
|
|
17
|
+
updatePartner: ApiMethodDeclaration<{
|
|
18
|
+
id: number;
|
|
19
|
+
data: AdminUpdatePortalPartnerDto;
|
|
20
|
+
}, AdminPortalPartnerRO>;
|
|
21
|
+
partnerStats: ApiMethodDeclaration<number, PortalPartnerStatsRO>;
|
|
22
|
+
stories: ApiMethodDeclaration<{
|
|
23
|
+
status?: PortalStoryStatusEnum;
|
|
24
|
+
}, (PortalStoryRO & {
|
|
25
|
+
partner?: PortalPartnerRO;
|
|
26
|
+
})[]>;
|
|
27
|
+
moderateStory: ApiMethodDeclaration<{
|
|
28
|
+
id: number;
|
|
29
|
+
data: AdminModeratePortalStoryDto;
|
|
30
|
+
}, PortalStoryRO>;
|
|
31
|
+
materialOrders: ApiMethodDeclaration<{
|
|
32
|
+
status?: PortalMaterialOrderStatusEnum;
|
|
33
|
+
}, (PortalMaterialOrderRO & {
|
|
34
|
+
partner?: PortalPartnerRO;
|
|
35
|
+
})[]>;
|
|
36
|
+
updateMaterialOrder: ApiMethodDeclaration<{
|
|
37
|
+
id: number;
|
|
38
|
+
data: AdminUpdatePortalMaterialOrderDto;
|
|
39
|
+
}, PortalMaterialOrderRO>;
|
|
40
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.partnersPortalAdminApiDeclaration = void 0;
|
|
4
|
+
/** Админский API партнёрского портала (авторы сюжетов и площадки). */
|
|
5
|
+
var partners = function (params) { return ({
|
|
6
|
+
url: '/partners-portal/admin/partners',
|
|
7
|
+
method: 'GET',
|
|
8
|
+
params: params,
|
|
9
|
+
}); };
|
|
10
|
+
var updatePartner = function (_a) {
|
|
11
|
+
var id = _a.id, data = _a.data;
|
|
12
|
+
return ({
|
|
13
|
+
url: "/partners-portal/admin/partners/".concat(id),
|
|
14
|
+
method: 'PATCH',
|
|
15
|
+
data: data,
|
|
16
|
+
});
|
|
17
|
+
};
|
|
18
|
+
var partnerStats = function (id) { return ({
|
|
19
|
+
url: "/partners-portal/admin/partners/".concat(id, "/stats"),
|
|
20
|
+
method: 'GET',
|
|
21
|
+
}); };
|
|
22
|
+
var stories = function (params) { return ({
|
|
23
|
+
url: '/partners-portal/admin/stories',
|
|
24
|
+
method: 'GET',
|
|
25
|
+
params: params,
|
|
26
|
+
}); };
|
|
27
|
+
var moderateStory = function (_a) {
|
|
28
|
+
var id = _a.id, data = _a.data;
|
|
29
|
+
return ({
|
|
30
|
+
url: "/partners-portal/admin/stories/".concat(id, "/moderate"),
|
|
31
|
+
method: 'PATCH',
|
|
32
|
+
data: data,
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
var materialOrders = function (params) { return ({
|
|
36
|
+
url: '/partners-portal/admin/material-orders',
|
|
37
|
+
method: 'GET',
|
|
38
|
+
params: params,
|
|
39
|
+
}); };
|
|
40
|
+
var updateMaterialOrder = function (_a) {
|
|
41
|
+
var id = _a.id, data = _a.data;
|
|
42
|
+
return ({
|
|
43
|
+
url: "/partners-portal/admin/material-orders/".concat(id),
|
|
44
|
+
method: 'PATCH',
|
|
45
|
+
data: data,
|
|
46
|
+
});
|
|
47
|
+
};
|
|
48
|
+
exports.partnersPortalAdminApiDeclaration = {
|
|
49
|
+
partners: partners,
|
|
50
|
+
updatePartner: updatePartner,
|
|
51
|
+
partnerStats: partnerStats,
|
|
52
|
+
stories: stories,
|
|
53
|
+
moderateStory: moderateStory,
|
|
54
|
+
materialOrders: materialOrders,
|
|
55
|
+
updateMaterialOrder: updateMaterialOrder,
|
|
56
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@escapenavigator/services",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.13",
|
|
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": "
|
|
15
|
+
"gitHead": "a9cccec706631315eb7768d227dfbb2eb437fd56",
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@escapenavigator/types": "^2.0.
|
|
18
|
-
"@escapenavigator/utils": "^2.0.
|
|
17
|
+
"@escapenavigator/types": "^2.0.12",
|
|
18
|
+
"@escapenavigator/utils": "^2.0.13",
|
|
19
19
|
"axios": "^0.21.4",
|
|
20
20
|
"class-transformer": "^0.5.1",
|
|
21
21
|
"class-validator": "^0.13.2",
|