@escapenavigator/services 2.0.3 → 2.0.4
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/districts-api/index.d.ts +23 -0
- package/dist/api/districts-api/index.js +50 -0
- package/dist/api/emails-api/index.d.ts +2 -0
- package/dist/api/emails-api/index.js +2 -0
- package/dist/api/emails-api/link-to-profile.d.ts +8 -0
- package/dist/api/emails-api/link-to-profile.js +12 -0
- package/dist/api/init-client-api.d.ts +2 -0
- package/dist/api/init-client-api.js +2 -0
- package/dist/api/openapi-widget-api/index.d.ts +4 -4
- package/dist/api/openapi-widget-api/index.js +4 -4
- package/dist/api/profiles-api/get-profiles-without-next-action.d.ts +6 -0
- package/dist/api/profiles-api/get-profiles-without-next-action.js +8 -0
- package/dist/api/profiles-api/index.d.ts +2 -0
- package/dist/api/profiles-api/index.js +2 -0
- package/package.json +4 -4
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { DistrictSeoRO } from '@escapenavigator/types/dist/district/district-seo.ro';
|
|
2
|
+
import { DistrictRO } from '@escapenavigator/types/dist/district/district.ro';
|
|
3
|
+
import { UpdateDistrictDto } from '@escapenavigator/types/dist/district/update-district.dto';
|
|
4
|
+
import { QueryDto } from '@escapenavigator/types/dist/shared/query.dto';
|
|
5
|
+
import { QueryRO } from '@escapenavigator/types/dist/shared/query.ro';
|
|
6
|
+
import { ApiMethodDeclaration } from '..';
|
|
7
|
+
export declare const districtsApiDeclaration: {
|
|
8
|
+
query: ApiMethodDeclaration<QueryDto, QueryRO<DistrictRO>>;
|
|
9
|
+
getOne: ApiMethodDeclaration<number, DistrictRO>;
|
|
10
|
+
update: ApiMethodDeclaration<{
|
|
11
|
+
id: number;
|
|
12
|
+
data: UpdateDistrictDto;
|
|
13
|
+
}, DistrictRO>;
|
|
14
|
+
getSeo: ApiMethodDeclaration<number, DistrictSeoRO>;
|
|
15
|
+
updateSeo: ApiMethodDeclaration<{
|
|
16
|
+
id: number;
|
|
17
|
+
data: DistrictSeoRO;
|
|
18
|
+
}, DistrictSeoRO>;
|
|
19
|
+
recount: ApiMethodDeclaration<undefined, {
|
|
20
|
+
assignedLocations: number;
|
|
21
|
+
districts: number;
|
|
22
|
+
}>;
|
|
23
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.districtsApiDeclaration = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Админское управление районами городов (Aggregators → Districts).
|
|
6
|
+
* Создание/удаление районов — через OSM-импорт, поэтому CRUD без
|
|
7
|
+
* create/remove: список, правка (title/slug/hidden), SEO-тексты,
|
|
8
|
+
* глобальный пересчёт привязки локаций.
|
|
9
|
+
*/
|
|
10
|
+
var query = function (params) { return ({
|
|
11
|
+
url: '/districts',
|
|
12
|
+
method: 'GET',
|
|
13
|
+
params: params,
|
|
14
|
+
}); };
|
|
15
|
+
var getOne = function (id) { return ({
|
|
16
|
+
url: "/districts/".concat(id),
|
|
17
|
+
method: 'GET',
|
|
18
|
+
}); };
|
|
19
|
+
var update = function (_a) {
|
|
20
|
+
var id = _a.id, data = _a.data;
|
|
21
|
+
return ({
|
|
22
|
+
url: "/districts/".concat(id),
|
|
23
|
+
method: 'PATCH',
|
|
24
|
+
data: data,
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
var getSeo = function (id) { return ({
|
|
28
|
+
url: "/districts/seo/".concat(id),
|
|
29
|
+
method: 'GET',
|
|
30
|
+
}); };
|
|
31
|
+
var updateSeo = function (_a) {
|
|
32
|
+
var id = _a.id, data = _a.data;
|
|
33
|
+
return ({
|
|
34
|
+
url: "/districts/seo/".concat(id),
|
|
35
|
+
method: 'PATCH',
|
|
36
|
+
data: data,
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
var recount = function () { return ({
|
|
40
|
+
url: '/districts/recount',
|
|
41
|
+
method: 'PATCH',
|
|
42
|
+
}); };
|
|
43
|
+
exports.districtsApiDeclaration = {
|
|
44
|
+
query: query,
|
|
45
|
+
getOne: getOne,
|
|
46
|
+
update: update,
|
|
47
|
+
getSeo: getSeo,
|
|
48
|
+
updateSeo: updateSeo,
|
|
49
|
+
recount: recount,
|
|
50
|
+
};
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { create } from './create';
|
|
2
2
|
import { getById } from './get-by-id';
|
|
3
3
|
import { getProfileEmails } from './get-profile-emails';
|
|
4
|
+
import { linkToProfile } from './link-to-profile';
|
|
4
5
|
import { query } from './query';
|
|
5
6
|
import { remove } from './remove';
|
|
6
7
|
import { resend } from './resend';
|
|
7
8
|
import { resync } from './resync';
|
|
8
9
|
type ApiDeclaration = {
|
|
9
10
|
resync: typeof resync;
|
|
11
|
+
linkToProfile: typeof linkToProfile;
|
|
10
12
|
getProfileEmails: typeof getProfileEmails;
|
|
11
13
|
getById: typeof getById;
|
|
12
14
|
query: typeof query;
|
|
@@ -4,12 +4,14 @@ exports.emailsApiDeclaration = void 0;
|
|
|
4
4
|
var create_1 = require("./create");
|
|
5
5
|
var get_by_id_1 = require("./get-by-id");
|
|
6
6
|
var get_profile_emails_1 = require("./get-profile-emails");
|
|
7
|
+
var link_to_profile_1 = require("./link-to-profile");
|
|
7
8
|
var query_1 = require("./query");
|
|
8
9
|
var remove_1 = require("./remove");
|
|
9
10
|
var resend_1 = require("./resend");
|
|
10
11
|
var resync_1 = require("./resync");
|
|
11
12
|
exports.emailsApiDeclaration = {
|
|
12
13
|
resync: resync_1.resync,
|
|
14
|
+
linkToProfile: link_to_profile_1.linkToProfile,
|
|
13
15
|
getProfileEmails: get_profile_emails_1.getProfileEmails,
|
|
14
16
|
getById: get_by_id_1.getById,
|
|
15
17
|
query: query_1.query,
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.linkToProfile = void 0;
|
|
4
|
+
var linkToProfile = function (_a) {
|
|
5
|
+
var identificator = _a.identificator, profileId = _a.profileId;
|
|
6
|
+
return ({
|
|
7
|
+
url: "/emails/link/".concat(identificator),
|
|
8
|
+
method: 'POST',
|
|
9
|
+
data: { profileId: profileId },
|
|
10
|
+
});
|
|
11
|
+
};
|
|
12
|
+
exports.linkToProfile = linkToProfile;
|
|
@@ -16,6 +16,7 @@ import { certificatesaleDiscountsApiDeclaration } from './certificatesales-disco
|
|
|
16
16
|
import { certificateUploadsApiDeclaration } from './certificateuploads-api';
|
|
17
17
|
import { checklistApiDeclaration } from './checklist-api';
|
|
18
18
|
import { citiesApiDeclaration } from './cities-api';
|
|
19
|
+
import { districtsApiDeclaration } from './districts-api';
|
|
19
20
|
import { clientsApiDeclaration } from './clients-api';
|
|
20
21
|
import { coalitionApiDeclaration } from './coalition-api';
|
|
21
22
|
import { cronParserApiDeclaration } from './cron-parser-api';
|
|
@@ -119,6 +120,7 @@ export type InitApiDeclaration = {
|
|
|
119
120
|
orderCertificates: Api<typeof orderCertificatesApiDeclaration>;
|
|
120
121
|
orderGroups: Api<typeof orderGroupsApiDeclaration>;
|
|
121
122
|
cities: Api<typeof citiesApiDeclaration>;
|
|
123
|
+
districts: Api<typeof districtsApiDeclaration>;
|
|
122
124
|
subwayStations: Api<typeof subwayStationsApiDeclaration>;
|
|
123
125
|
nowEscape: Api<typeof nowEscapeApiDeclaration>;
|
|
124
126
|
logs: Api<typeof logsApiDeclaration>;
|
|
@@ -19,6 +19,7 @@ var certificatesales_discounts_api_1 = require("./certificatesales-discounts-api
|
|
|
19
19
|
var certificateuploads_api_1 = require("./certificateuploads-api");
|
|
20
20
|
var checklist_api_1 = require("./checklist-api");
|
|
21
21
|
var cities_api_1 = require("./cities-api");
|
|
22
|
+
var districts_api_1 = require("./districts-api");
|
|
22
23
|
var clients_api_1 = require("./clients-api");
|
|
23
24
|
var coalition_api_1 = require("./coalition-api");
|
|
24
25
|
var cron_parser_api_1 = require("./cron-parser-api");
|
|
@@ -117,6 +118,7 @@ var initClientApi = function (url, clientOptions) { return ({
|
|
|
117
118
|
products: (0, _1.initApi)(products_api_1.productsApiDeclaration, url, clientOptions),
|
|
118
119
|
stockArrivals: (0, _1.initApi)(stock_arrivals_api_1.stockArrivalsApiDeclaration, url, clientOptions),
|
|
119
120
|
cities: (0, _1.initApi)(cities_api_1.citiesApiDeclaration, url, clientOptions),
|
|
121
|
+
districts: (0, _1.initApi)(districts_api_1.districtsApiDeclaration, url, clientOptions),
|
|
120
122
|
subwayStations: (0, _1.initApi)(subway_stations_api_1.subwayStationsApiDeclaration, url, clientOptions),
|
|
121
123
|
orderCertificates: (0, _1.initApi)(order_certificates_api_1.orderCertificatesApiDeclaration, url, clientOptions),
|
|
122
124
|
orderGroups: (0, _1.initApi)(order_groups_api_1.orderGroupsApiDeclaration, url, clientOptions),
|
|
@@ -27,10 +27,6 @@ import { orderGroupPaypalPayment } from './order-groups/order-group-payment-payp
|
|
|
27
27
|
import { orderGroupSquarePayment } from './order-groups/order-group-payment-square';
|
|
28
28
|
import { orderGroupStripePayment } from './order-groups/order-group-payment-stripe';
|
|
29
29
|
import { removeOrderGroupPreorders } from './order-groups/remove-order-group-preorders';
|
|
30
|
-
import { bookPackage } from './packages/book-package';
|
|
31
|
-
import { listPackages } from './packages/list-packages';
|
|
32
|
-
import { packageAvailability } from './packages/package-availability';
|
|
33
|
-
import { packagesByQuestroom } from './packages/packages-by-questroom';
|
|
34
30
|
import { addPromocodeToOrder } from './orders/add-promocode-to-order';
|
|
35
31
|
import { addUpsellingToOrder } from './orders/add-upselling-to-order';
|
|
36
32
|
import { cancelOrder } from './orders/cancel-order';
|
|
@@ -55,6 +51,10 @@ import { updateOrder } from './orders/update-order';
|
|
|
55
51
|
import { updateOrderLanguageAndMode } from './orders/update-order-language-and-mode';
|
|
56
52
|
import { updateOrderPlayers } from './orders/update-order-players';
|
|
57
53
|
import { updateOrderSlot } from './orders/update-order-slot';
|
|
54
|
+
import { bookPackage } from './packages/book-package';
|
|
55
|
+
import { listPackages } from './packages/list-packages';
|
|
56
|
+
import { packageAvailability } from './packages/package-availability';
|
|
57
|
+
import { packagesByQuestroom } from './packages/packages-by-questroom';
|
|
58
58
|
import { createHold } from './slots/create-hold';
|
|
59
59
|
import { removeHold } from './slots/remove-hold';
|
|
60
60
|
import { slotDetails } from './slots/slot-details';
|
|
@@ -30,10 +30,6 @@ var order_group_payment_paypal_1 = require("./order-groups/order-group-payment-p
|
|
|
30
30
|
var order_group_payment_square_1 = require("./order-groups/order-group-payment-square");
|
|
31
31
|
var order_group_payment_stripe_1 = require("./order-groups/order-group-payment-stripe");
|
|
32
32
|
var remove_order_group_preorders_1 = require("./order-groups/remove-order-group-preorders");
|
|
33
|
-
var book_package_1 = require("./packages/book-package");
|
|
34
|
-
var list_packages_1 = require("./packages/list-packages");
|
|
35
|
-
var package_availability_1 = require("./packages/package-availability");
|
|
36
|
-
var packages_by_questroom_1 = require("./packages/packages-by-questroom");
|
|
37
33
|
var add_promocode_to_order_1 = require("./orders/add-promocode-to-order");
|
|
38
34
|
var add_upselling_to_order_1 = require("./orders/add-upselling-to-order");
|
|
39
35
|
var cancel_order_1 = require("./orders/cancel-order");
|
|
@@ -58,6 +54,10 @@ var update_order_1 = require("./orders/update-order");
|
|
|
58
54
|
var update_order_language_and_mode_1 = require("./orders/update-order-language-and-mode");
|
|
59
55
|
var update_order_players_1 = require("./orders/update-order-players");
|
|
60
56
|
var update_order_slot_1 = require("./orders/update-order-slot");
|
|
57
|
+
var book_package_1 = require("./packages/book-package");
|
|
58
|
+
var list_packages_1 = require("./packages/list-packages");
|
|
59
|
+
var package_availability_1 = require("./packages/package-availability");
|
|
60
|
+
var packages_by_questroom_1 = require("./packages/packages-by-questroom");
|
|
61
61
|
var create_hold_1 = require("./slots/create-hold");
|
|
62
62
|
var remove_hold_1 = require("./slots/remove-hold");
|
|
63
63
|
var slot_details_1 = require("./slots/slot-details");
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { AdminProfileRO } from '@escapenavigator/types/dist/profile/admin-profile.ro';
|
|
2
|
+
import { ApiMethodDeclaration } from '..';
|
|
3
|
+
type ParamsData = undefined;
|
|
4
|
+
type ResponseData = Partial<AdminProfileRO>[];
|
|
5
|
+
export declare const getProfilesWithoutNextAction: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getProfilesWithoutNextAction = void 0;
|
|
4
|
+
var getProfilesWithoutNextAction = function () { return ({
|
|
5
|
+
url: '/profiles/sales/no-next-action',
|
|
6
|
+
method: 'GET',
|
|
7
|
+
}); };
|
|
8
|
+
exports.getProfilesWithoutNextAction = getProfilesWithoutNextAction;
|
|
@@ -53,6 +53,7 @@ import { updateEmailSender } from './email-senders/update-email-sender';
|
|
|
53
53
|
import { getBySlugForVerify } from './get-by-slug-for-verify';
|
|
54
54
|
import { getInactiveCompaniesShort } from './get-inactive-companies-short';
|
|
55
55
|
import { getOnboardingSteps } from './get-onboarding-steps';
|
|
56
|
+
import { getProfilesWithoutNextAction } from './get-profiles-without-next-action';
|
|
56
57
|
import { getOne } from './get-one';
|
|
57
58
|
import { cancelMarketingEmailCampaign } from './marketing-email-campaign/cancel-marketing-email-campaign';
|
|
58
59
|
import { createMarketingEmailCampaign } from './marketing-email-campaign/create-marketing-email-campaign';
|
|
@@ -205,6 +206,7 @@ type ApiDeclaration = {
|
|
|
205
206
|
updateStep: typeof updateStep;
|
|
206
207
|
updatePartnerProgram: typeof updatePartnerProgram;
|
|
207
208
|
getInactiveCompaniesShort: typeof getInactiveCompaniesShort;
|
|
209
|
+
getProfilesWithoutNextAction: typeof getProfilesWithoutNextAction;
|
|
208
210
|
finalizeCurrent: typeof finalizeCurrent;
|
|
209
211
|
updateCurrent: typeof updateCurrent;
|
|
210
212
|
updateBookingFields: typeof updateBookingFields;
|
|
@@ -56,6 +56,7 @@ var update_email_sender_1 = require("./email-senders/update-email-sender");
|
|
|
56
56
|
var get_by_slug_for_verify_1 = require("./get-by-slug-for-verify");
|
|
57
57
|
var get_inactive_companies_short_1 = require("./get-inactive-companies-short");
|
|
58
58
|
var get_onboarding_steps_1 = require("./get-onboarding-steps");
|
|
59
|
+
var get_profiles_without_next_action_1 = require("./get-profiles-without-next-action");
|
|
59
60
|
var get_one_1 = require("./get-one");
|
|
60
61
|
var cancel_marketing_email_campaign_1 = require("./marketing-email-campaign/cancel-marketing-email-campaign");
|
|
61
62
|
var create_marketing_email_campaign_1 = require("./marketing-email-campaign/create-marketing-email-campaign");
|
|
@@ -126,6 +127,7 @@ var get_1 = require("./widget-customization/get");
|
|
|
126
127
|
var update_3 = require("./widget-customization/update");
|
|
127
128
|
exports.profilesApiDeclaration = {
|
|
128
129
|
getInactiveCompaniesShort: get_inactive_companies_short_1.getInactiveCompaniesShort,
|
|
130
|
+
getProfilesWithoutNextAction: get_profiles_without_next_action_1.getProfilesWithoutNextAction,
|
|
129
131
|
updateNotificationChanel: update_1.updateNotificationChanel,
|
|
130
132
|
deleteAction: delete_action_1.deleteAction,
|
|
131
133
|
queryCalls: query_1.queryCalls,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@escapenavigator/services",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.4",
|
|
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": "c5d3da52ae3e82c63f099daf59730f2e374df66a",
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@escapenavigator/types": "^2.0.
|
|
18
|
-
"@escapenavigator/utils": "^2.0.
|
|
17
|
+
"@escapenavigator/types": "^2.0.4",
|
|
18
|
+
"@escapenavigator/utils": "^2.0.4",
|
|
19
19
|
"axios": "^0.21.4",
|
|
20
20
|
"class-transformer": "^0.5.1",
|
|
21
21
|
"class-validator": "^0.13.2",
|