@escapenavigator/services 2.0.26 → 2.0.28

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.
Files changed (41) hide show
  1. package/dist/api/init-client-api.d.ts +2 -14
  2. package/dist/api/init-client-api.js +2 -14
  3. package/dist/api/openapi-widget-api/external/index.d.ts +1 -0
  4. package/dist/api/openapi-widget-api/external/index.js +3 -1
  5. package/dist/api/openapi-widget-api/external/partner-order.d.ts +8 -0
  6. package/dist/api/openapi-widget-api/external/partner-order.js +10 -0
  7. package/dist/api/openapi-widget-api/index.d.ts +2 -1
  8. package/dist/api/openapi-widget-api/index.js +1 -0
  9. package/dist/api/orders-api/imports/commit-import.d.ts +6 -0
  10. package/dist/api/orders-api/imports/commit-import.js +8 -0
  11. package/dist/api/orders-api/imports/create-import.d.ts +9 -0
  12. package/dist/api/orders-api/imports/create-import.js +16 -0
  13. package/dist/api/orders-api/imports/get-import.d.ts +6 -0
  14. package/dist/api/orders-api/imports/get-import.js +8 -0
  15. package/dist/api/orders-api/imports/update-import.d.ts +8 -0
  16. package/dist/api/orders-api/imports/update-import.js +23 -0
  17. package/dist/api/orders-api/index.d.ts +8 -0
  18. package/dist/api/orders-api/index.js +8 -0
  19. package/dist/api/partner-systems-api/index.d.ts +132 -0
  20. package/dist/api/partner-systems-api/index.js +87 -0
  21. package/dist/api/profiles-api/index.d.ts +4 -0
  22. package/dist/api/profiles-api/index.js +4 -0
  23. package/dist/api/profiles-api/profile-sms/send-client-email.d.ts +10 -0
  24. package/dist/api/profiles-api/profile-sms/send-client-email.js +13 -0
  25. package/dist/api/profiles-api/profile-sms/send-client-sms.d.ts +13 -0
  26. package/dist/api/profiles-api/profile-sms/send-client-sms.js +16 -0
  27. package/package.json +4 -4
  28. package/dist/api/city-attractions-api/index.d.ts +0 -95
  29. package/dist/api/city-attractions-api/index.js +0 -189
  30. package/dist/api/city-people-api/index.d.ts +0 -67
  31. package/dist/api/city-people-api/index.js +0 -129
  32. package/dist/api/city-player-api/index.d.ts +0 -85
  33. package/dist/api/city-player-api/index.js +0 -151
  34. package/dist/api/city-quest-api/index.d.ts +0 -97
  35. package/dist/api/city-quest-api/index.js +0 -131
  36. package/dist/api/city-quest-play-api/index.d.ts +0 -46
  37. package/dist/api/city-quest-play-api/index.js +0 -107
  38. package/dist/api/city-ready-routes-api/index.d.ts +0 -28
  39. package/dist/api/city-ready-routes-api/index.js +0 -57
  40. package/dist/api/partners-portal-admin-api/index.d.ts +0 -28
  41. package/dist/api/partners-portal-admin-api/index.js +0 -41
@@ -17,12 +17,6 @@ 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 { cityAttractionsApiDeclaration } from './city-attractions-api';
21
- import { cityPeopleApiDeclaration } from './city-people-api';
22
- import { cityPlayerApiDeclaration } from './city-player-api';
23
- import { cityQuestsApiDeclaration } from './city-quest-api';
24
- import { cityQuestPlayApiDeclaration } from './city-quest-play-api';
25
- import { cityReadyRoutesApiDeclaration } from './city-ready-routes-api';
26
20
  import { clientsApiDeclaration } from './clients-api';
27
21
  import { coalitionApiDeclaration } from './coalition-api';
28
22
  import { cronParserApiDeclaration } from './cron-parser-api';
@@ -60,8 +54,8 @@ import { orderUpsellngsApiDeclaration } from './order-upsellings-api';
60
54
  import { ordersApiDeclaration } from './orders-api';
61
55
  import { packagesApiDeclaration } from './packages-api';
62
56
  import { parseResultsApiDeclaration } from './parse-results-api';
57
+ import { partnerSystemsApiDeclaration } from './partner-systems-api';
63
58
  import { partnersApiDeclaration } from './partners-api';
64
- import { partnersPortalAdminApiDeclaration } from './partners-portal-admin-api';
65
59
  import { playersApiDeclaration } from './players-api';
66
60
  import { productsApiDeclaration } from './products-api';
67
61
  import { profilesApiDeclaration } from './profiles-api';
@@ -98,12 +92,6 @@ export type InitApiDeclaration = {
98
92
  questroomRiddleApi: Api<typeof questroomRiddleApiDeclaration>;
99
93
  questroomDeviceApi: Api<typeof questroomDeviceApiDeclaration>;
100
94
  gameSessionApi: Api<typeof gameSessionApiDeclaration>;
101
- cityQuestsApi: Api<typeof cityQuestsApiDeclaration>;
102
- cityAttractionsApi: Api<typeof cityAttractionsApiDeclaration>;
103
- cityPeopleApi: Api<typeof cityPeopleApiDeclaration>;
104
- cityReadyRoutesApi: Api<typeof cityReadyRoutesApiDeclaration>;
105
- cityQuestPlayApi: Api<typeof cityQuestPlayApiDeclaration>;
106
- cityPlayerApi: Api<typeof cityPlayerApiDeclaration>;
107
95
  checklistApi: Api<typeof checklistApiDeclaration>;
108
96
  mailchimpApi: Api<typeof mailchimpApiDeclaration>;
109
97
  playersApi: Api<typeof playersApiDeclaration>;
@@ -111,6 +99,7 @@ export type InitApiDeclaration = {
111
99
  googlePlacesApi: Api<typeof googlePlacesApiDeclaration>;
112
100
  parseResultsApi: Api<typeof parseResultsApiDeclaration>;
113
101
  aggregatorCompaniesApi: Api<typeof aggregatorCompaniesApiDeclaration>;
102
+ partnerSystemsApi: Api<typeof partnerSystemsApiDeclaration>;
114
103
  cronParserApi: Api<typeof cronParserApiDeclaration>;
115
104
  slotRulesApi: Api<typeof slotRulesApi>;
116
105
  translationsApi: Api<typeof translationsApiDeclaration>;
@@ -161,7 +150,6 @@ export type InitApiDeclaration = {
161
150
  locations: Api<typeof locationsApiDeclaration>;
162
151
  upsellings: Api<typeof upsellingsApiDeclaration>;
163
152
  partners: Api<typeof partnersApiDeclaration>;
164
- partnersPortalAdminApi: Api<typeof partnersPortalAdminApiDeclaration>;
165
153
  questrooms: Api<typeof questroomsApiDeclaration>;
166
154
  dynamicResources: Api<typeof dynamicResourcesApiDeclaration>;
167
155
  widgets: Api<typeof widgetsApiDeclaration>;
@@ -20,12 +20,6 @@ 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_attractions_api_1 = require("./city-attractions-api");
24
- var city_people_api_1 = require("./city-people-api");
25
- var city_player_api_1 = require("./city-player-api");
26
- var city_quest_api_1 = require("./city-quest-api");
27
- var city_quest_play_api_1 = require("./city-quest-play-api");
28
- var city_ready_routes_api_1 = require("./city-ready-routes-api");
29
23
  var clients_api_1 = require("./clients-api");
30
24
  var coalition_api_1 = require("./coalition-api");
31
25
  var cron_parser_api_1 = require("./cron-parser-api");
@@ -63,8 +57,8 @@ var order_upsellings_api_1 = require("./order-upsellings-api");
63
57
  var orders_api_1 = require("./orders-api");
64
58
  var packages_api_1 = require("./packages-api");
65
59
  var parse_results_api_1 = require("./parse-results-api");
60
+ var partner_systems_api_1 = require("./partner-systems-api");
66
61
  var partners_api_1 = require("./partners-api");
67
- var partners_portal_admin_api_1 = require("./partners-portal-admin-api");
68
62
  var players_api_1 = require("./players-api");
69
63
  var products_api_1 = require("./products-api");
70
64
  var profiles_api_1 = require("./profiles-api");
@@ -103,12 +97,6 @@ var initClientApi = function (url, clientOptions) { return ({
103
97
  questroomRiddleApi: (0, _1.initApi)(questroom_riddle_api_1.questroomRiddleApiDeclaration, url, clientOptions),
104
98
  questroomDeviceApi: (0, _1.initApi)(questroom_device_api_1.questroomDeviceApiDeclaration, url, clientOptions),
105
99
  gameSessionApi: (0, _1.initApi)(game_session_api_1.gameSessionApiDeclaration, url, clientOptions),
106
- cityQuestsApi: (0, _1.initApi)(city_quest_api_1.cityQuestsApiDeclaration, url, clientOptions),
107
- cityAttractionsApi: (0, _1.initApi)(city_attractions_api_1.cityAttractionsApiDeclaration, url, clientOptions),
108
- cityPeopleApi: (0, _1.initApi)(city_people_api_1.cityPeopleApiDeclaration, url, clientOptions),
109
- cityReadyRoutesApi: (0, _1.initApi)(city_ready_routes_api_1.cityReadyRoutesApiDeclaration, url, clientOptions),
110
- cityQuestPlayApi: (0, _1.initApi)(city_quest_play_api_1.cityQuestPlayApiDeclaration, url, clientOptions),
111
- cityPlayerApi: (0, _1.initApi)(city_player_api_1.cityPlayerApiDeclaration, url, clientOptions),
112
100
  checklistApi: (0, _1.initApi)(checklist_api_1.checklistApiDeclaration, url, clientOptions),
113
101
  playersApi: (0, _1.initApi)(players_api_1.playersApiDeclaration, url, clientOptions),
114
102
  mailchimpApi: (0, _1.initApi)(mailchimp_api_1.mailchimpApiDeclaration, url, clientOptions),
@@ -117,6 +105,7 @@ var initClientApi = function (url, clientOptions) { return ({
117
105
  googlePlacesApi: (0, _1.initApi)(google_places_api_1.googlePlacesApiDeclaration, url, clientOptions),
118
106
  parseResultsApi: (0, _1.initApi)(parse_results_api_1.parseResultsApiDeclaration, url, clientOptions),
119
107
  aggregatorCompaniesApi: (0, _1.initApi)(aggregator_companies_api_1.aggregatorCompaniesApiDeclaration, url, clientOptions),
108
+ partnerSystemsApi: (0, _1.initApi)(partner_systems_api_1.partnerSystemsApiDeclaration, url, clientOptions),
120
109
  cronParserApi: (0, _1.initApi)(cron_parser_api_1.cronParserApiDeclaration, url, clientOptions),
121
110
  slotRulesApi: (0, _1.initApi)(slot_rules_api_1.slotRulesApi, url, clientOptions),
122
111
  openapiWidget: (0, _1.initApi)(openapi_widget_api_1.openapiWidgetApiDeclaration, url, clientOptions),
@@ -165,7 +154,6 @@ var initClientApi = function (url, clientOptions) { return ({
165
154
  locations: (0, _1.initApi)(locations_api_1.locationsApiDeclaration, url, clientOptions),
166
155
  upsellings: (0, _1.initApi)(upsellings_api_1.upsellingsApiDeclaration, url, clientOptions),
167
156
  partners: (0, _1.initApi)(partners_api_1.partnersApiDeclaration, url, clientOptions),
168
- partnersPortalAdminApi: (0, _1.initApi)(partners_portal_admin_api_1.partnersPortalAdminApiDeclaration, url, clientOptions),
169
157
  questrooms: (0, _1.initApi)(questrooms_api_1.questroomsApiDeclaration, url, clientOptions),
170
158
  dynamicResources: (0, _1.initApi)(dynamic_resources_api_1.dynamicResourcesApiDeclaration, url, clientOptions),
171
159
  widgets: (0, _1.initApi)(widgets_api_1.widgetsApiDeclaration, url, clientOptions),
@@ -2,3 +2,4 @@ export { createBookeoOrder } from './bookeo-order';
2
2
  export { getBookeoPrice } from './bookeo-price';
3
3
  export { createMyerpOrder } from './myerp-order';
4
4
  export { getMyerpPrice } from './myerp-price';
5
+ export { createPartnerOrder } from './partner-order';
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getMyerpPrice = exports.createMyerpOrder = exports.getBookeoPrice = exports.createBookeoOrder = void 0;
3
+ exports.createPartnerOrder = exports.getMyerpPrice = exports.createMyerpOrder = exports.getBookeoPrice = exports.createBookeoOrder = void 0;
4
4
  var bookeo_order_1 = require("./bookeo-order");
5
5
  Object.defineProperty(exports, "createBookeoOrder", { enumerable: true, get: function () { return bookeo_order_1.createBookeoOrder; } });
6
6
  var bookeo_price_1 = require("./bookeo-price");
@@ -9,3 +9,5 @@ var myerp_order_1 = require("./myerp-order");
9
9
  Object.defineProperty(exports, "createMyerpOrder", { enumerable: true, get: function () { return myerp_order_1.createMyerpOrder; } });
10
10
  var myerp_price_1 = require("./myerp-price");
11
11
  Object.defineProperty(exports, "getMyerpPrice", { enumerable: true, get: function () { return myerp_price_1.getMyerpPrice; } });
12
+ var partner_order_1 = require("./partner-order");
13
+ Object.defineProperty(exports, "createPartnerOrder", { enumerable: true, get: function () { return partner_order_1.createPartnerOrder; } });
@@ -0,0 +1,8 @@
1
+ import { AggregatorOrderRO } from '@escapenavigator/types/dist/admin/aggregator-order/aggregator-order.ro';
2
+ import { CreateAggregatorOrderDto } from '@escapenavigator/types/dist/admin/aggregator-order/create-aggregator-order.dto';
3
+ import { ApiMethodDeclaration } from '../..';
4
+ type ParamsData = CreateAggregatorOrderDto;
5
+ type ResponseData = AggregatorOrderRO;
6
+ /** Бронь квеста, слинкованного с Partner Booking API (Morty-стандарт). */
7
+ export declare const createPartnerOrder: ApiMethodDeclaration<ParamsData, ResponseData>;
8
+ export {};
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createPartnerOrder = void 0;
4
+ /** Бронь квеста, слинкованного с Partner Booking API (Morty-стандарт). */
5
+ var createPartnerOrder = function (data) { return ({
6
+ url: '/openapi/external/partner/order',
7
+ method: 'POST',
8
+ data: data,
9
+ }); };
10
+ exports.createPartnerOrder = createPartnerOrder;
@@ -17,7 +17,7 @@ import { findCertificate } from './certificates/find-certificate';
17
17
  import { getCertificatePaymentMethods } from './certificates/get-certificate-payment-methods';
18
18
  import { removePromocodeFromCertificate } from './certificates/remove-certificate-from-order';
19
19
  import { setCertificateMarketingConsent } from './certificates/set-certificate-marketing-consent';
20
- import { createBookeoOrder, createMyerpOrder, getBookeoPrice, getMyerpPrice } from './external';
20
+ import { createBookeoOrder, createMyerpOrder, createPartnerOrder, getBookeoPrice, getMyerpPrice } from './external';
21
21
  import { batchCreateOrderGroup } from './order-groups/batch-create-order-group';
22
22
  import { capturePaypalOrderGroup } from './order-groups/capture-paypal-order-group';
23
23
  import { findOrderGroup } from './order-groups/find-order-group';
@@ -113,6 +113,7 @@ type ApiDeclaration = {
113
113
  getBookeoPrice: typeof getBookeoPrice;
114
114
  createMyerpOrder: typeof createMyerpOrder;
115
115
  getMyerpPrice: typeof getMyerpPrice;
116
+ createPartnerOrder: typeof createPartnerOrder;
116
117
  getAgregatorWidgetData: typeof getAgregatorWidgetData;
117
118
  getWidgetData: typeof getWidgetData;
118
119
  resolvePromocode: typeof resolvePromocode;
@@ -120,6 +120,7 @@ exports.openapiWidgetApiDeclaration = {
120
120
  getBookeoPrice: external_1.getBookeoPrice,
121
121
  createMyerpOrder: external_1.createMyerpOrder,
122
122
  getMyerpPrice: external_1.getMyerpPrice,
123
+ createPartnerOrder: external_1.createPartnerOrder,
123
124
  getAgregatorWidgetData: get_agreagator_widget_data_1.getAgregatorWidgetData,
124
125
  getWidgetData: get_widget_data_1.getWidgetData,
125
126
  resolvePromocode: resolve_promocode_1.resolvePromocode,
@@ -0,0 +1,6 @@
1
+ import { CommitOrderImportRO } from '@escapenavigator/types/dist/order/import/order-import.types';
2
+ import { ApiMethodDeclaration } from '../..';
3
+ type ParamsData = number;
4
+ type ResponseData = CommitOrderImportRO;
5
+ export declare const commitImport: ApiMethodDeclaration<ParamsData, ResponseData>;
6
+ export {};
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.commitImport = void 0;
4
+ var commitImport = function (id) { return ({
5
+ url: "/order-imports/".concat(id, "/commit"),
6
+ method: 'POST',
7
+ }); };
8
+ exports.commitImport = commitImport;
@@ -0,0 +1,9 @@
1
+ import { OrderImportSessionRO } from '@escapenavigator/types/dist/order/import/order-import.types';
2
+ import { ApiMethodDeclaration } from '../..';
3
+ type ParamsData = {
4
+ data: FormData;
5
+ onUploadProgress?: (progressEvent: ProgressEvent) => void;
6
+ };
7
+ type ResponseData = OrderImportSessionRO;
8
+ export declare const createImport: ApiMethodDeclaration<ParamsData, ResponseData>;
9
+ export {};
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createImport = void 0;
4
+ var createImport = function (_a) {
5
+ var data = _a.data, onUploadProgress = _a.onUploadProgress;
6
+ return ({
7
+ url: '/order-imports',
8
+ headers: {
9
+ 'Content-Type': 'multipart/form-data',
10
+ },
11
+ onUploadProgress: onUploadProgress,
12
+ method: 'POST',
13
+ data: data,
14
+ });
15
+ };
16
+ exports.createImport = createImport;
@@ -0,0 +1,6 @@
1
+ import { OrderImportSessionRO } from '@escapenavigator/types/dist/order/import/order-import.types';
2
+ import { ApiMethodDeclaration } from '../..';
3
+ type ParamsData = number;
4
+ type ResponseData = OrderImportSessionRO;
5
+ export declare const getImport: ApiMethodDeclaration<ParamsData, ResponseData>;
6
+ export {};
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getImport = void 0;
4
+ var getImport = function (id) { return ({
5
+ url: "/order-imports/".concat(id),
6
+ method: 'GET',
7
+ }); };
8
+ exports.getImport = getImport;
@@ -0,0 +1,8 @@
1
+ import { OrderImportSessionRO, UpdateOrderImportDto } from '@escapenavigator/types/dist/order/import/order-import.types';
2
+ import { ApiMethodDeclaration } from '../..';
3
+ type ParamsData = {
4
+ id: number;
5
+ } & UpdateOrderImportDto;
6
+ type ResponseData = OrderImportSessionRO;
7
+ export declare const updateImport: ApiMethodDeclaration<ParamsData, ResponseData>;
8
+ export {};
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ var __rest = (this && this.__rest) || function (s, e) {
3
+ var t = {};
4
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
+ t[p] = s[p];
6
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
+ t[p[i]] = s[p[i]];
10
+ }
11
+ return t;
12
+ };
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.updateImport = void 0;
15
+ var updateImport = function (_a) {
16
+ var id = _a.id, data = __rest(_a, ["id"]);
17
+ return ({
18
+ url: "/order-imports/".concat(id),
19
+ method: 'PATCH',
20
+ data: data,
21
+ });
22
+ };
23
+ exports.updateImport = updateImport;
@@ -10,6 +10,10 @@ import { exportOrders } from './export';
10
10
  import { fastStat } from './fast-stat';
11
11
  import { getCancelPreview } from './get-cancel-preview';
12
12
  import { getOne } from './get-one';
13
+ import { commitImport } from './imports/commit-import';
14
+ import { createImport } from './imports/create-import';
15
+ import { getImport } from './imports/get-import';
16
+ import { updateImport } from './imports/update-import';
13
17
  import { getMetadata } from './metadata/get-metadata';
14
18
  import { query } from './query';
15
19
  import { queryAggregatorOrders } from './query-aggregator-orders';
@@ -58,6 +62,10 @@ type ApiDeclaration = {
58
62
  getWorkers: typeof getWorkers;
59
63
  removeWorker: typeof removeWorker;
60
64
  uploadOrders: typeof uploadOrders;
65
+ createImport: typeof createImport;
66
+ getImport: typeof getImport;
67
+ updateImport: typeof updateImport;
68
+ commitImport: typeof commitImport;
61
69
  remove: typeof remove;
62
70
  bookImmediately: typeof bookImmediately;
63
71
  count: typeof count;
@@ -13,6 +13,10 @@ var export_1 = require("./export");
13
13
  var fast_stat_1 = require("./fast-stat");
14
14
  var get_cancel_preview_1 = require("./get-cancel-preview");
15
15
  var get_one_1 = require("./get-one");
16
+ var commit_import_1 = require("./imports/commit-import");
17
+ var create_import_1 = require("./imports/create-import");
18
+ var get_import_1 = require("./imports/get-import");
19
+ var update_import_1 = require("./imports/update-import");
16
20
  var get_metadata_1 = require("./metadata/get-metadata");
17
21
  var query_1 = require("./query");
18
22
  var query_aggregator_orders_1 = require("./query-aggregator-orders");
@@ -61,6 +65,10 @@ exports.ordersApiDeclaration = {
61
65
  getWorkers: get_workers_1.getWorkers,
62
66
  addWorkers: add_worker_1.addWorkers,
63
67
  uploadOrders: upload_orders_1.uploadOrders,
68
+ createImport: create_import_1.createImport,
69
+ getImport: get_import_1.getImport,
70
+ updateImport: update_import_1.updateImport,
71
+ commitImport: commit_import_1.commitImport,
64
72
  remove: remove_1.remove,
65
73
  bookImmediately: book_immediately_1.bookImmediately,
66
74
  addParticipant: add_participant_1.addParticipant,
@@ -0,0 +1,132 @@
1
+ import { QueryDto } from '@escapenavigator/types/dist/shared/query.dto';
2
+ import { QueryRO } from '@escapenavigator/types/dist/shared/query.ro';
3
+ import { ApiMethodDeclaration } from '..';
4
+ export type PartnerSystemItem = {
5
+ id: number;
6
+ name: string;
7
+ baseUrl: string;
8
+ token: string;
9
+ active: boolean;
10
+ lastSyncAt?: string;
11
+ lastSyncStats?: Record<string, number>;
12
+ errorStats: Record<string, number>;
13
+ attractionsCount?: number;
14
+ createdAt: string;
15
+ updatedAt: string;
16
+ };
17
+ export type PartnerAttractionItem = {
18
+ id: number;
19
+ partnerSystemId: number;
20
+ externalId: string;
21
+ externalProfileId?: string;
22
+ questroomId?: number;
23
+ questroom?: {
24
+ id: number;
25
+ title: string;
26
+ profileId: number;
27
+ };
28
+ matchConfidence?: string;
29
+ matchEvidence?: {
30
+ rule: string;
31
+ score?: number;
32
+ runnerUp?: string;
33
+ note?: string;
34
+ decidedAt: string;
35
+ decidedBy: string;
36
+ };
37
+ status: string;
38
+ title: string;
39
+ slug?: string;
40
+ photo?: string;
41
+ type?: string;
42
+ description?: string;
43
+ playersMin?: number;
44
+ playersMax?: number;
45
+ address?: string;
46
+ lat?: number;
47
+ lng?: number;
48
+ phone?: string;
49
+ timeZone?: string;
50
+ firstSeenAt?: string;
51
+ lastSeenAt?: string;
52
+ createdAt: string;
53
+ updatedAt: string;
54
+ };
55
+ export type PartnerSyncStats = {
56
+ processed: number;
57
+ created: number;
58
+ updated: number;
59
+ disappeared: number;
60
+ autoLinked: number;
61
+ };
62
+ export type PartnerAutolinkResult = {
63
+ summary: Record<string, number>;
64
+ results: Array<{
65
+ attractionId: number;
66
+ title: string;
67
+ action: string;
68
+ rule?: string;
69
+ score?: number;
70
+ questroomId?: number;
71
+ questroomTitle?: string;
72
+ note?: string;
73
+ }>;
74
+ };
75
+ declare const query: ApiMethodDeclaration<undefined, PartnerSystemItem[]>;
76
+ declare const create: ApiMethodDeclaration<{
77
+ name: string;
78
+ baseUrl: string;
79
+ token: string;
80
+ active?: boolean;
81
+ }, PartnerSystemItem>;
82
+ declare const update: ApiMethodDeclaration<{
83
+ id: number;
84
+ data: {
85
+ name?: string;
86
+ baseUrl?: string;
87
+ token?: string;
88
+ active?: boolean;
89
+ };
90
+ }, PartnerSystemItem>;
91
+ declare const remove: ApiMethodDeclaration<{
92
+ id: number;
93
+ }, {
94
+ success: boolean;
95
+ }>;
96
+ declare const test: ApiMethodDeclaration<{
97
+ id: number;
98
+ }, {
99
+ success: boolean;
100
+ attractions: number;
101
+ message?: string;
102
+ }>;
103
+ declare const sync: ApiMethodDeclaration<{
104
+ id: number;
105
+ }, PartnerSyncStats>;
106
+ declare const autolink: ApiMethodDeclaration<{
107
+ id: number;
108
+ dryRun?: boolean;
109
+ }, PartnerAutolinkResult>;
110
+ declare const attractions: ApiMethodDeclaration<QueryDto & {
111
+ id: number;
112
+ }, QueryRO<PartnerAttractionItem>>;
113
+ declare const updateAttraction: ApiMethodDeclaration<{
114
+ id: number;
115
+ data: {
116
+ questroomId?: number | null;
117
+ status?: string;
118
+ };
119
+ }, PartnerAttractionItem>;
120
+ type ApiDeclaration = {
121
+ query: typeof query;
122
+ create: typeof create;
123
+ update: typeof update;
124
+ remove: typeof remove;
125
+ test: typeof test;
126
+ sync: typeof sync;
127
+ autolink: typeof autolink;
128
+ attractions: typeof attractions;
129
+ updateAttraction: typeof updateAttraction;
130
+ };
131
+ export declare const partnerSystemsApiDeclaration: ApiDeclaration;
132
+ export {};
@@ -0,0 +1,87 @@
1
+ "use strict";
2
+ var __rest = (this && this.__rest) || function (s, e) {
3
+ var t = {};
4
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
+ t[p] = s[p];
6
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
+ t[p[i]] = s[p[i]];
10
+ }
11
+ return t;
12
+ };
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.partnerSystemsApiDeclaration = void 0;
15
+ var query = function () { return ({
16
+ url: '/partner-systems',
17
+ method: 'GET',
18
+ }); };
19
+ var create = function (data) { return ({
20
+ url: '/partner-systems',
21
+ method: 'POST',
22
+ data: data,
23
+ }); };
24
+ var update = function (_a) {
25
+ var id = _a.id, data = _a.data;
26
+ return ({
27
+ url: "/partner-systems/".concat(id),
28
+ method: 'PATCH',
29
+ data: data,
30
+ });
31
+ };
32
+ var remove = function (_a) {
33
+ var id = _a.id;
34
+ return ({
35
+ url: "/partner-systems/".concat(id),
36
+ method: 'DELETE',
37
+ });
38
+ };
39
+ var test = function (_a) {
40
+ var id = _a.id;
41
+ return ({
42
+ url: "/partner-systems/".concat(id, "/test"),
43
+ method: 'POST',
44
+ });
45
+ };
46
+ var sync = function (_a) {
47
+ var id = _a.id;
48
+ return ({
49
+ url: "/partner-systems/".concat(id, "/sync"),
50
+ method: 'POST',
51
+ });
52
+ };
53
+ var autolink = function (_a) {
54
+ var id = _a.id, dryRun = _a.dryRun;
55
+ return ({
56
+ url: "/partner-systems/".concat(id, "/autolink"),
57
+ method: 'POST',
58
+ params: dryRun ? { dryRun: 'true' } : undefined,
59
+ });
60
+ };
61
+ var attractions = function (_a) {
62
+ var id = _a.id, params = __rest(_a, ["id"]);
63
+ return ({
64
+ url: "/partner-systems/".concat(id, "/attractions"),
65
+ method: 'GET',
66
+ params: params,
67
+ });
68
+ };
69
+ var updateAttraction = function (_a) {
70
+ var id = _a.id, data = _a.data;
71
+ return ({
72
+ url: "/partner-systems/attractions/".concat(id),
73
+ method: 'PATCH',
74
+ data: data,
75
+ });
76
+ };
77
+ exports.partnerSystemsApiDeclaration = {
78
+ query: query,
79
+ create: create,
80
+ update: update,
81
+ remove: remove,
82
+ test: test,
83
+ sync: sync,
84
+ autolink: autolink,
85
+ attractions: attractions,
86
+ updateAttraction: updateAttraction,
87
+ };
@@ -92,6 +92,8 @@ import { updateProfileCrm } from './other-crm/update-profile-crm';
92
92
  import { getSmsSettings } from './profile-sms/get-sms-settings';
93
93
  import { queryOrderSmsLogs } from './profile-sms/query-order-sms-logs';
94
94
  import { querySmsLogsByClient } from './profile-sms/query-sms-logs-by-client';
95
+ import { sendClientEmail } from './profile-sms/send-client-email';
96
+ import { sendClientSms } from './profile-sms/send-client-sms';
95
97
  import { sendOrderClientEmail } from './profile-sms/send-order-client-email';
96
98
  import { sendOrderClientSms } from './profile-sms/send-order-client-sms';
97
99
  import { sendTestSms } from './profile-sms/send-test-sms';
@@ -247,6 +249,8 @@ type ApiDeclaration = {
247
249
  sendOrderClientSms: typeof sendOrderClientSms;
248
250
  sendTestSms: typeof sendTestSms;
249
251
  sendOrderClientEmail: typeof sendOrderClientEmail;
252
+ sendClientSms: typeof sendClientSms;
253
+ sendClientEmail: typeof sendClientEmail;
250
254
  queryOrderSmsLogs: typeof queryOrderSmsLogs;
251
255
  querySmsLogsByClient: typeof querySmsLogsByClient;
252
256
  getSmsSettings: typeof getSmsSettings;
@@ -95,6 +95,8 @@ var update_profile_crm_1 = require("./other-crm/update-profile-crm");
95
95
  var get_sms_settings_1 = require("./profile-sms/get-sms-settings");
96
96
  var query_order_sms_logs_1 = require("./profile-sms/query-order-sms-logs");
97
97
  var query_sms_logs_by_client_1 = require("./profile-sms/query-sms-logs-by-client");
98
+ var send_client_email_1 = require("./profile-sms/send-client-email");
99
+ var send_client_sms_1 = require("./profile-sms/send-client-sms");
98
100
  var send_order_client_email_1 = require("./profile-sms/send-order-client-email");
99
101
  var send_order_client_sms_1 = require("./profile-sms/send-order-client-sms");
100
102
  var send_test_sms_1 = require("./profile-sms/send-test-sms");
@@ -143,6 +145,8 @@ exports.profilesApiDeclaration = {
143
145
  sendOrderClientSms: send_order_client_sms_1.sendOrderClientSms,
144
146
  sendTestSms: send_test_sms_1.sendTestSms,
145
147
  sendOrderClientEmail: send_order_client_email_1.sendOrderClientEmail,
148
+ sendClientSms: send_client_sms_1.sendClientSms,
149
+ sendClientEmail: send_client_email_1.sendClientEmail,
146
150
  queryOrderSmsLogs: query_order_sms_logs_1.queryOrderSmsLogs,
147
151
  querySmsLogsByClient: query_sms_logs_by_client_1.querySmsLogsByClient,
148
152
  getSmsSettings: get_sms_settings_1.getSmsSettings,
@@ -0,0 +1,10 @@
1
+ import { SendClientEmailDto } from '@escapenavigator/types/dist/profile/profile-sms/dto/send-client-email.dto';
2
+ import { SendOrderClientEmailRO } from '@escapenavigator/types/dist/profile/profile-sms/ro/send-order-client-email.ro';
3
+ import { ApiMethodDeclaration } from '../..';
4
+ type ParamsData = {
5
+ clientId: number;
6
+ data: SendClientEmailDto;
7
+ };
8
+ /** См. `sendClientSms` — то же для письма. */
9
+ export declare const sendClientEmail: ApiMethodDeclaration<ParamsData, SendOrderClientEmailRO>;
10
+ export {};
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.sendClientEmail = void 0;
4
+ /** См. `sendClientSms` — то же для письма. */
5
+ var sendClientEmail = function (_a) {
6
+ var clientId = _a.clientId, data = _a.data;
7
+ return ({
8
+ url: "/profile-sms/send-client-email/".concat(clientId),
9
+ method: 'POST',
10
+ data: data,
11
+ });
12
+ };
13
+ exports.sendClientEmail = sendClientEmail;
@@ -0,0 +1,13 @@
1
+ import { SendClientSmsDto } from '@escapenavigator/types/dist/profile/profile-sms/dto/send-client-sms.dto';
2
+ import { ProfileSmsLogRO } from '@escapenavigator/types/dist/profile/profile-sms/ro/profile-sms-log.ro';
3
+ import { ApiMethodDeclaration } from '../..';
4
+ type ParamsData = {
5
+ clientId: number;
6
+ data: SendClientSmsDto;
7
+ };
8
+ /**
9
+ * Ручная отправка SMS клиенту. Получатель всегда клиент; `data.orderId` —
10
+ * опциональный контекст брони (отправка из карточки игры).
11
+ */
12
+ export declare const sendClientSms: ApiMethodDeclaration<ParamsData, ProfileSmsLogRO>;
13
+ export {};
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.sendClientSms = void 0;
4
+ /**
5
+ * Ручная отправка SMS клиенту. Получатель всегда клиент; `data.orderId` —
6
+ * опциональный контекст брони (отправка из карточки игры).
7
+ */
8
+ var sendClientSms = function (_a) {
9
+ var clientId = _a.clientId, data = _a.data;
10
+ return ({
11
+ url: "/profile-sms/send-client-sms/".concat(clientId),
12
+ method: 'POST',
13
+ data: data,
14
+ });
15
+ };
16
+ exports.sendClientSms = sendClientSms;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@escapenavigator/services",
3
- "version": "2.0.26",
3
+ "version": "2.0.28",
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": "5d2c9331c4cbd050b84f22bdc1e01e25dc3549fa",
15
+ "gitHead": "23b0474dd6e66b434efbee235ed30a51ac3f0b12",
16
16
  "dependencies": {
17
- "@escapenavigator/types": "^2.0.25",
18
- "@escapenavigator/utils": "^2.0.26",
17
+ "@escapenavigator/types": "^2.0.27",
18
+ "@escapenavigator/utils": "^2.0.28",
19
19
  "axios": "^0.21.4",
20
20
  "class-transformer": "^0.5.1",
21
21
  "class-validator": "^0.13.2",