@escapenavigator/services 2.0.4 → 2.0.5

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 (40) hide show
  1. package/dist/api/admins-api/get-outreach-stats.d.ts +15 -0
  2. package/dist/api/admins-api/get-outreach-stats.js +12 -0
  3. package/dist/api/admins-api/index.d.ts +2 -0
  4. package/dist/api/admins-api/index.js +2 -0
  5. package/dist/api/aggregator-companies-api/index.d.ts +70 -0
  6. package/dist/api/aggregator-companies-api/index.js +35 -0
  7. package/dist/api/cron-parser-api/index.d.ts +2 -0
  8. package/dist/api/cron-parser-api/index.js +2 -0
  9. package/dist/api/cron-parser-api/parse-country.d.ts +10 -0
  10. package/dist/api/cron-parser-api/parse-country.js +11 -0
  11. package/dist/api/districts-api/index.d.ts +1 -1
  12. package/dist/api/emails-api/bulk-remove.d.ts +10 -0
  13. package/dist/api/emails-api/bulk-remove.js +9 -0
  14. package/dist/api/emails-api/index.d.ts +4 -0
  15. package/dist/api/emails-api/index.js +4 -0
  16. package/dist/api/emails-api/set-category.d.ts +10 -0
  17. package/dist/api/emails-api/set-category.js +12 -0
  18. package/dist/api/google-places-api/create-company.d.ts +12 -0
  19. package/dist/api/google-places-api/create-company.js +12 -0
  20. package/dist/api/google-places-api/create-location.d.ts +12 -0
  21. package/dist/api/google-places-api/create-location.js +12 -0
  22. package/dist/api/google-places-api/index.d.ts +8 -0
  23. package/dist/api/google-places-api/index.js +8 -0
  24. package/dist/api/google-places-api/relink.d.ts +10 -0
  25. package/dist/api/google-places-api/relink.js +11 -0
  26. package/dist/api/google-places-api/siblings.d.ts +8 -0
  27. package/dist/api/google-places-api/siblings.js +11 -0
  28. package/dist/api/init-client-api.d.ts +5 -1
  29. package/dist/api/init-client-api.js +5 -1
  30. package/dist/api/openapi-widget-api/orders/cancel-order-group.d.ts +2 -2
  31. package/dist/api/openapi-widget-api/orders/cancel-order.d.ts +2 -2
  32. package/dist/api/parse-results-api/index.d.ts +49 -0
  33. package/dist/api/parse-results-api/index.js +67 -0
  34. package/dist/api/profiles-api/index.d.ts +1 -1
  35. package/dist/api/profiles-api/index.js +1 -1
  36. package/dist/api/users-api/current/current-delete-account.d.ts +6 -0
  37. package/dist/api/users-api/current/current-delete-account.js +8 -0
  38. package/dist/api/users-api/index.d.ts +2 -0
  39. package/dist/api/users-api/index.js +2 -0
  40. package/package.json +4 -4
@@ -0,0 +1,15 @@
1
+ import { ApiMethodDeclaration } from '..';
2
+ type ParamsData = {
3
+ startDate: string;
4
+ endDate: string;
5
+ };
6
+ export type OutreachDayStat = {
7
+ date: string;
8
+ callsConnected: number;
9
+ callsMissed: number;
10
+ callsTotalDurationSec: number;
11
+ emailsSent: number;
12
+ };
13
+ type ResponseData = OutreachDayStat[];
14
+ export declare const getOutreachStats: ApiMethodDeclaration<ParamsData, ResponseData>;
15
+ export {};
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getOutreachStats = void 0;
4
+ var getOutreachStats = function (params) { return ({
5
+ url: '/admins/outreach-stats',
6
+ method: 'GET',
7
+ params: {
8
+ startDate: params.startDate,
9
+ endDate: params.endDate,
10
+ },
11
+ }); };
12
+ exports.getOutreachStats = getOutreachStats;
@@ -10,6 +10,7 @@ import { getAggregatorStatisticsConstants } from './get-aggregator-statistics-co
10
10
  import { getAllAdminsActivityByDate } from './get-all-admins-activity-by-date';
11
11
  import { getAllAdminsActivityRequests } from './get-all-admins-activity-requests';
12
12
  import { getAllAdminsActivityStats } from './get-all-admins-activity-stats';
13
+ import { getOutreachStats } from './get-outreach-stats';
13
14
  import { getProfileToken } from './get-profile-token';
14
15
  import { getWidgetFunnelCompany } from './get-widget-funnel-company';
15
16
  import { getWidgetFunnelCompare } from './get-widget-funnel-compare';
@@ -57,6 +58,7 @@ type ApiDeclaration = {
57
58
  getAllAdminsActivityStats: typeof getAllAdminsActivityStats;
58
59
  getAllAdminsActivityByDate: typeof getAllAdminsActivityByDate;
59
60
  getAllAdminsActivityRequests: typeof getAllAdminsActivityRequests;
61
+ getOutreachStats: typeof getOutreachStats;
60
62
  getAggregatorStatisticsConstants: typeof getAggregatorStatisticsConstants;
61
63
  queryAggregatorQuestroomStatistics: typeof queryAggregatorQuestroomStatistics;
62
64
  getAggregatorQuestroomDailyStatistics: typeof getAggregatorQuestroomDailyStatistics;
@@ -13,6 +13,7 @@ var get_aggregator_statistics_constants_1 = require("./get-aggregator-statistics
13
13
  var get_all_admins_activity_by_date_1 = require("./get-all-admins-activity-by-date");
14
14
  var get_all_admins_activity_requests_1 = require("./get-all-admins-activity-requests");
15
15
  var get_all_admins_activity_stats_1 = require("./get-all-admins-activity-stats");
16
+ var get_outreach_stats_1 = require("./get-outreach-stats");
16
17
  var get_profile_token_1 = require("./get-profile-token");
17
18
  var get_widget_funnel_company_1 = require("./get-widget-funnel-company");
18
19
  var get_widget_funnel_compare_1 = require("./get-widget-funnel-compare");
@@ -60,6 +61,7 @@ exports.adminsApiDeclaration = {
60
61
  getAllAdminsActivityStats: get_all_admins_activity_stats_1.getAllAdminsActivityStats,
61
62
  getAllAdminsActivityByDate: get_all_admins_activity_by_date_1.getAllAdminsActivityByDate,
62
63
  getAllAdminsActivityRequests: get_all_admins_activity_requests_1.getAllAdminsActivityRequests,
64
+ getOutreachStats: get_outreach_stats_1.getOutreachStats,
63
65
  getAggregatorStatisticsConstants: get_aggregator_statistics_constants_1.getAggregatorStatisticsConstants,
64
66
  queryAggregatorQuestroomStatistics: query_aggregator_questroom_statistics_1.queryAggregatorQuestroomStatistics,
65
67
  getAggregatorQuestroomDailyStatistics: get_aggregator_questroom_daily_statistics_1.getAggregatorQuestroomDailyStatistics,
@@ -0,0 +1,70 @@
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 AggregatorCompanyItem = {
5
+ id: number;
6
+ source: string;
7
+ externalId: string;
8
+ name: string;
9
+ companyName?: string;
10
+ website?: string;
11
+ address?: string;
12
+ phone?: string;
13
+ lat?: number;
14
+ lng?: number;
15
+ googlePlaceId?: string;
16
+ country?: string;
17
+ rooms: Array<{
18
+ externalId: string;
19
+ title: string;
20
+ url?: string;
21
+ playersMin?: number;
22
+ playersMax?: number;
23
+ time?: number;
24
+ photos?: string[];
25
+ closed?: boolean;
26
+ matchedQuestroomId?: number;
27
+ matchConfidence?: string;
28
+ }>;
29
+ status: string;
30
+ profileId?: number;
31
+ profile?: {
32
+ id: number;
33
+ title: string;
34
+ };
35
+ locationId?: number;
36
+ firstSeenAt?: string;
37
+ lastSeenAt?: string;
38
+ createdAt: string;
39
+ updatedAt: string;
40
+ };
41
+ declare const query: ApiMethodDeclaration<QueryDto, QueryRO<AggregatorCompanyItem>>;
42
+ declare const count: ApiMethodDeclaration<QueryDto, number>;
43
+ type SyncStats = {
44
+ processed: number;
45
+ failed: number;
46
+ created: number;
47
+ updated: number;
48
+ autoLinked: number;
49
+ questsLinked: number;
50
+ disappeared: number;
51
+ };
52
+ declare const syncMorty: ApiMethodDeclaration<{
53
+ limit?: number;
54
+ }, SyncStats>;
55
+ declare const update: ApiMethodDeclaration<{
56
+ id: number;
57
+ data: {
58
+ profileId?: number | null;
59
+ locationId?: number | null;
60
+ status?: string;
61
+ };
62
+ }, AggregatorCompanyItem>;
63
+ type ApiDeclaration = {
64
+ query: typeof query;
65
+ count: typeof count;
66
+ syncMorty: typeof syncMorty;
67
+ update: typeof update;
68
+ };
69
+ export declare const aggregatorCompaniesApiDeclaration: ApiDeclaration;
70
+ export {};
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.aggregatorCompaniesApiDeclaration = void 0;
4
+ var query = function (params) { return ({
5
+ url: '/aggregator-companies',
6
+ method: 'GET',
7
+ params: params,
8
+ }); };
9
+ var count = function (params) { return ({
10
+ url: '/aggregator-companies/count',
11
+ method: 'GET',
12
+ params: params,
13
+ }); };
14
+ var syncMorty = function (_a) {
15
+ var _b = _a === void 0 ? {} : _a, limit = _b.limit;
16
+ return ({
17
+ url: '/aggregator-companies/sync/morty',
18
+ method: 'POST',
19
+ params: limit ? { limit: limit } : undefined,
20
+ });
21
+ };
22
+ var update = function (_a) {
23
+ var id = _a.id, data = _a.data;
24
+ return ({
25
+ url: "/aggregator-companies/".concat(id),
26
+ method: 'PATCH',
27
+ data: data,
28
+ });
29
+ };
30
+ exports.aggregatorCompaniesApiDeclaration = {
31
+ query: query,
32
+ count: count,
33
+ syncMorty: syncMorty,
34
+ update: update,
35
+ };
@@ -1,6 +1,8 @@
1
1
  import { parseAllCountries } from './parse-all';
2
+ import { parseCountry } from './parse-country';
2
3
  type ApiDeclaration = {
3
4
  parseAll: typeof parseAllCountries;
5
+ parseCountry: typeof parseCountry;
4
6
  };
5
7
  export declare const cronParserApiDeclaration: ApiDeclaration;
6
8
  export {};
@@ -2,6 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.cronParserApiDeclaration = void 0;
4
4
  var parse_all_1 = require("./parse-all");
5
+ var parse_country_1 = require("./parse-country");
5
6
  exports.cronParserApiDeclaration = {
6
7
  parseAll: parse_all_1.parseAllCountries,
8
+ parseCountry: parse_country_1.parseCountry,
7
9
  };
@@ -0,0 +1,10 @@
1
+ import { CountriesEnum } from '@escapenavigator/types/dist/shared/enum/countries.enum';
2
+ import { ApiMethodDeclaration } from '..';
3
+ type ParamsData = {
4
+ country: CountriesEnum;
5
+ };
6
+ type ResponseData = {
7
+ message: string;
8
+ };
9
+ export declare const parseCountry: ApiMethodDeclaration<ParamsData, ResponseData>;
10
+ export {};
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.parseCountry = void 0;
4
+ var parseCountry = function (_a) {
5
+ var country = _a.country;
6
+ return ({
7
+ url: "/cron/parser/country/".concat(country),
8
+ method: 'POST',
9
+ });
10
+ };
11
+ exports.parseCountry = parseCountry;
@@ -1,5 +1,5 @@
1
- import { DistrictSeoRO } from '@escapenavigator/types/dist/district/district-seo.ro';
2
1
  import { DistrictRO } from '@escapenavigator/types/dist/district/district.ro';
2
+ import { DistrictSeoRO } from '@escapenavigator/types/dist/district/district-seo.ro';
3
3
  import { UpdateDistrictDto } from '@escapenavigator/types/dist/district/update-district.dto';
4
4
  import { QueryDto } from '@escapenavigator/types/dist/shared/query.dto';
5
5
  import { QueryRO } from '@escapenavigator/types/dist/shared/query.ro';
@@ -0,0 +1,10 @@
1
+ import { SuccessRO } from '@escapenavigator/types/dist/shared/success.ro';
2
+ import { ApiMethodDeclaration } from '..';
3
+ type ParamsData = {
4
+ identificators: string[];
5
+ };
6
+ type ResponseData = SuccessRO & {
7
+ affected: number;
8
+ };
9
+ export declare const bulkRemove: ApiMethodDeclaration<ParamsData, ResponseData>;
10
+ export {};
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.bulkRemove = void 0;
4
+ var bulkRemove = function (data) { return ({
5
+ url: '/emails/bulk-delete',
6
+ method: 'POST',
7
+ data: data,
8
+ }); };
9
+ exports.bulkRemove = bulkRemove;
@@ -1,3 +1,4 @@
1
+ import { bulkRemove } from './bulk-remove';
1
2
  import { create } from './create';
2
3
  import { getById } from './get-by-id';
3
4
  import { getProfileEmails } from './get-profile-emails';
@@ -6,6 +7,7 @@ import { query } from './query';
6
7
  import { remove } from './remove';
7
8
  import { resend } from './resend';
8
9
  import { resync } from './resync';
10
+ import { setCategory } from './set-category';
9
11
  type ApiDeclaration = {
10
12
  resync: typeof resync;
11
13
  linkToProfile: typeof linkToProfile;
@@ -14,6 +16,8 @@ type ApiDeclaration = {
14
16
  query: typeof query;
15
17
  create: typeof create;
16
18
  remove: typeof remove;
19
+ bulkRemove: typeof bulkRemove;
20
+ setCategory: typeof setCategory;
17
21
  resend: typeof resend;
18
22
  };
19
23
  export declare const emailsApiDeclaration: ApiDeclaration;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.emailsApiDeclaration = void 0;
4
+ var bulk_remove_1 = require("./bulk-remove");
4
5
  var create_1 = require("./create");
5
6
  var get_by_id_1 = require("./get-by-id");
6
7
  var get_profile_emails_1 = require("./get-profile-emails");
@@ -9,6 +10,7 @@ var query_1 = require("./query");
9
10
  var remove_1 = require("./remove");
10
11
  var resend_1 = require("./resend");
11
12
  var resync_1 = require("./resync");
13
+ var set_category_1 = require("./set-category");
12
14
  exports.emailsApiDeclaration = {
13
15
  resync: resync_1.resync,
14
16
  linkToProfile: link_to_profile_1.linkToProfile,
@@ -18,4 +20,6 @@ exports.emailsApiDeclaration = {
18
20
  create: create_1.create,
19
21
  resend: resend_1.resend,
20
22
  remove: remove_1.remove,
23
+ bulkRemove: bulk_remove_1.bulkRemove,
24
+ setCategory: set_category_1.setCategory,
21
25
  };
@@ -0,0 +1,10 @@
1
+ import { EmailCategoryEnum } from '@escapenavigator/types/dist/emails/enum/email.category-enum';
2
+ import { SuccessRO } from '@escapenavigator/types/dist/shared/success.ro';
3
+ import { ApiMethodDeclaration } from '..';
4
+ type ParamsData = {
5
+ identificator: string;
6
+ category: EmailCategoryEnum;
7
+ };
8
+ type ResponseData = SuccessRO;
9
+ export declare const setCategory: ApiMethodDeclaration<ParamsData, ResponseData>;
10
+ export {};
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.setCategory = void 0;
4
+ var setCategory = function (_a) {
5
+ var identificator = _a.identificator, category = _a.category;
6
+ return ({
7
+ url: "/emails/category/".concat(identificator),
8
+ method: 'POST',
9
+ data: { category: category },
10
+ });
11
+ };
12
+ exports.setCategory = setCategory;
@@ -0,0 +1,12 @@
1
+ import { CreateCompanyFromPlaceDto } from '@escapenavigator/types/dist/google-places/create-company-from-place.dto';
2
+ import { ApiMethodDeclaration } from '..';
3
+ type ParamsData = {
4
+ id: number;
5
+ data: CreateCompanyFromPlaceDto;
6
+ };
7
+ type ResponseData = {
8
+ profileId: number;
9
+ locationsCreated: number;
10
+ };
11
+ export declare const createCompanyFromPlace: ApiMethodDeclaration<ParamsData, ResponseData>;
12
+ export {};
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createCompanyFromPlace = void 0;
4
+ var createCompanyFromPlace = function (_a) {
5
+ var id = _a.id, data = _a.data;
6
+ return ({
7
+ url: "/google-places/".concat(id, "/create-company"),
8
+ method: 'POST',
9
+ data: data,
10
+ });
11
+ };
12
+ exports.createCompanyFromPlace = createCompanyFromPlace;
@@ -0,0 +1,12 @@
1
+ import { ApiMethodDeclaration } from '..';
2
+ type ParamsData = {
3
+ id: number;
4
+ data: {
5
+ profileId?: number;
6
+ };
7
+ };
8
+ type ResponseData = {
9
+ locationId: number;
10
+ };
11
+ export declare const createLocationFromPlace: ApiMethodDeclaration<ParamsData, ResponseData>;
12
+ export {};
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createLocationFromPlace = void 0;
4
+ var createLocationFromPlace = function (_a) {
5
+ var id = _a.id, data = _a.data;
6
+ return ({
7
+ url: "/google-places/".concat(id, "/create-location"),
8
+ method: 'POST',
9
+ data: data,
10
+ });
11
+ };
12
+ exports.createLocationFromPlace = createLocationFromPlace;
@@ -1,7 +1,11 @@
1
1
  import { countGooglePlaces } from './count';
2
+ import { createCompanyFromPlace } from './create-company';
3
+ import { createLocationFromPlace } from './create-location';
2
4
  import { exportGooglePlaces } from './export';
3
5
  import { getGooglePlace } from './get-one';
4
6
  import { queryGooglePlaces } from './query';
7
+ import { relinkGooglePlace } from './relink';
8
+ import { getGooglePlaceSiblings } from './siblings';
5
9
  import { updateGooglePlace } from './update';
6
10
  type ApiDeclaration = {
7
11
  query: typeof queryGooglePlaces;
@@ -9,6 +13,10 @@ type ApiDeclaration = {
9
13
  update: typeof updateGooglePlace;
10
14
  exportGooglePlaces: typeof exportGooglePlaces;
11
15
  count: typeof countGooglePlaces;
16
+ siblings: typeof getGooglePlaceSiblings;
17
+ createCompany: typeof createCompanyFromPlace;
18
+ createLocation: typeof createLocationFromPlace;
19
+ relink: typeof relinkGooglePlace;
12
20
  };
13
21
  export declare const googlePlacesApiDeclaration: ApiDeclaration;
14
22
  export {};
@@ -2,9 +2,13 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.googlePlacesApiDeclaration = void 0;
4
4
  var count_1 = require("./count");
5
+ var create_company_1 = require("./create-company");
6
+ var create_location_1 = require("./create-location");
5
7
  var export_1 = require("./export");
6
8
  var get_one_1 = require("./get-one");
7
9
  var query_1 = require("./query");
10
+ var relink_1 = require("./relink");
11
+ var siblings_1 = require("./siblings");
8
12
  var update_1 = require("./update");
9
13
  exports.googlePlacesApiDeclaration = {
10
14
  query: query_1.queryGooglePlaces,
@@ -12,4 +16,8 @@ exports.googlePlacesApiDeclaration = {
12
16
  update: update_1.updateGooglePlace,
13
17
  exportGooglePlaces: export_1.exportGooglePlaces,
14
18
  count: count_1.countGooglePlaces,
19
+ siblings: siblings_1.getGooglePlaceSiblings,
20
+ createCompany: create_company_1.createCompanyFromPlace,
21
+ createLocation: create_location_1.createLocationFromPlace,
22
+ relink: relink_1.relinkGooglePlace,
15
23
  };
@@ -0,0 +1,10 @@
1
+ import { ApiMethodDeclaration } from '..';
2
+ type ParamsData = {
3
+ id: number;
4
+ };
5
+ type ResponseData = {
6
+ linked: boolean;
7
+ profileId?: number;
8
+ };
9
+ export declare const relinkGooglePlace: ApiMethodDeclaration<ParamsData, ResponseData>;
10
+ export {};
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.relinkGooglePlace = void 0;
4
+ var relinkGooglePlace = function (_a) {
5
+ var id = _a.id;
6
+ return ({
7
+ url: "/google-places/".concat(id, "/relink"),
8
+ method: 'POST',
9
+ });
10
+ };
11
+ exports.relinkGooglePlace = relinkGooglePlace;
@@ -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 getGooglePlaceSiblings: ApiMethodDeclaration<ParamsData, ResponseData>;
8
+ export {};
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getGooglePlaceSiblings = void 0;
4
+ var getGooglePlaceSiblings = function (_a) {
5
+ var id = _a.id;
6
+ return ({
7
+ url: "/google-places/".concat(id, "/siblings"),
8
+ method: 'GET',
9
+ });
10
+ };
11
+ exports.getGooglePlaceSiblings = getGooglePlaceSiblings;
@@ -3,6 +3,7 @@ import { academyApiDeclaration } from './academy-api';
3
3
  import { adminAnnouncementsApiDeclaration } from './admin-announcements-api';
4
4
  import { adminsApiDeclaration } from './admins-api';
5
5
  import { agbApiDeclaration } from './agb-api';
6
+ import { aggregatorCompaniesApiDeclaration } from './aggregator-companies-api';
6
7
  import { agregatorApiDeclaration } from './agregator-api';
7
8
  import { analyticsChatApiDeclaration } from './analytics-chat-api';
8
9
  import { articlesApiDeclaration } from './articles-api';
@@ -16,13 +17,13 @@ import { certificatesaleDiscountsApiDeclaration } from './certificatesales-disco
16
17
  import { certificateUploadsApiDeclaration } from './certificateuploads-api';
17
18
  import { checklistApiDeclaration } from './checklist-api';
18
19
  import { citiesApiDeclaration } from './cities-api';
19
- import { districtsApiDeclaration } from './districts-api';
20
20
  import { clientsApiDeclaration } from './clients-api';
21
21
  import { coalitionApiDeclaration } from './coalition-api';
22
22
  import { cronParserApiDeclaration } from './cron-parser-api';
23
23
  import { customFieldsApiDeclaration } from './custom-fields-api';
24
24
  import { dashboardApiDeclaration } from './dashboard-api';
25
25
  import { dashboardCalendarApiDeclaration } from './dashboard-calendar-api';
26
+ import { districtsApiDeclaration } from './districts-api';
26
27
  import { dynamicResourcesApiDeclaration } from './dynamic-resources-api';
27
28
  import { emailsApiDeclaration } from './emails-api';
28
29
  import { financeItemsApiDeclaration } from './financeitems-api';
@@ -52,6 +53,7 @@ import { orderTransactionsApiDeclaration } from './order-transactions-api';
52
53
  import { orderUpsellngsApiDeclaration } from './order-upsellings-api';
53
54
  import { ordersApiDeclaration } from './orders-api';
54
55
  import { packagesApiDeclaration } from './packages-api';
56
+ import { parseResultsApiDeclaration } from './parse-results-api';
55
57
  import { partnersApiDeclaration } from './partners-api';
56
58
  import { playersApiDeclaration } from './players-api';
57
59
  import { productsApiDeclaration } from './products-api';
@@ -94,6 +96,8 @@ export type InitApiDeclaration = {
94
96
  playersApi: Api<typeof playersApiDeclaration>;
95
97
  googleCalendarsApi: Api<typeof googleCalendarsApiDeclaration>;
96
98
  googlePlacesApi: Api<typeof googlePlacesApiDeclaration>;
99
+ parseResultsApi: Api<typeof parseResultsApiDeclaration>;
100
+ aggregatorCompaniesApi: Api<typeof aggregatorCompaniesApiDeclaration>;
97
101
  cronParserApi: Api<typeof cronParserApiDeclaration>;
98
102
  slotRulesApi: Api<typeof slotRulesApi>;
99
103
  translationsApi: Api<typeof translationsApiDeclaration>;
@@ -6,6 +6,7 @@ var academy_api_1 = require("./academy-api");
6
6
  var admin_announcements_api_1 = require("./admin-announcements-api");
7
7
  var admins_api_1 = require("./admins-api");
8
8
  var agb_api_1 = require("./agb-api");
9
+ var aggregator_companies_api_1 = require("./aggregator-companies-api");
9
10
  var agregator_api_1 = require("./agregator-api");
10
11
  var analytics_chat_api_1 = require("./analytics-chat-api");
11
12
  var articles_api_1 = require("./articles-api");
@@ -19,13 +20,13 @@ var certificatesales_discounts_api_1 = require("./certificatesales-discounts-api
19
20
  var certificateuploads_api_1 = require("./certificateuploads-api");
20
21
  var checklist_api_1 = require("./checklist-api");
21
22
  var cities_api_1 = require("./cities-api");
22
- var districts_api_1 = require("./districts-api");
23
23
  var clients_api_1 = require("./clients-api");
24
24
  var coalition_api_1 = require("./coalition-api");
25
25
  var cron_parser_api_1 = require("./cron-parser-api");
26
26
  var custom_fields_api_1 = require("./custom-fields-api");
27
27
  var dashboard_api_1 = require("./dashboard-api");
28
28
  var dashboard_calendar_api_1 = require("./dashboard-calendar-api");
29
+ var districts_api_1 = require("./districts-api");
29
30
  var dynamic_resources_api_1 = require("./dynamic-resources-api");
30
31
  var emails_api_1 = require("./emails-api");
31
32
  var financeitems_api_1 = require("./financeitems-api");
@@ -55,6 +56,7 @@ var order_transactions_api_1 = require("./order-transactions-api");
55
56
  var order_upsellings_api_1 = require("./order-upsellings-api");
56
57
  var orders_api_1 = require("./orders-api");
57
58
  var packages_api_1 = require("./packages-api");
59
+ var parse_results_api_1 = require("./parse-results-api");
58
60
  var partners_api_1 = require("./partners-api");
59
61
  var players_api_1 = require("./players-api");
60
62
  var products_api_1 = require("./products-api");
@@ -100,6 +102,8 @@ var initClientApi = function (url, clientOptions) { return ({
100
102
  nowEscape: (0, _1.initApi)(now_escape_api_1.nowEscapeApiDeclaration, url, clientOptions),
101
103
  googleCalendarsApi: (0, _1.initApi)(google_calendars_api_1.googleCalendarsApiDeclaration, url, clientOptions),
102
104
  googlePlacesApi: (0, _1.initApi)(google_places_api_1.googlePlacesApiDeclaration, url, clientOptions),
105
+ parseResultsApi: (0, _1.initApi)(parse_results_api_1.parseResultsApiDeclaration, url, clientOptions),
106
+ aggregatorCompaniesApi: (0, _1.initApi)(aggregator_companies_api_1.aggregatorCompaniesApiDeclaration, url, clientOptions),
103
107
  cronParserApi: (0, _1.initApi)(cron_parser_api_1.cronParserApiDeclaration, url, clientOptions),
104
108
  slotRulesApi: (0, _1.initApi)(slot_rules_api_1.slotRulesApi, url, clientOptions),
105
109
  openapiWidget: (0, _1.initApi)(openapi_widget_api_1.openapiWidgetApiDeclaration, url, clientOptions),
@@ -1,7 +1,7 @@
1
- import { OpenapiGetOrderDTO } from '@escapenavigator/types/dist/openapi/orders/openapi-get-order.dto';
1
+ import { OpenapiCancelOrderDTO } from '@escapenavigator/types/dist/openapi/orders/openapi-cancel-order.dto';
2
2
  import { OpenapiOrderRO } from '@escapenavigator/types/dist/openapi/orders/openapi-order.ro';
3
3
  import { ApiMethodDeclaration } from '../..';
4
- type ParamsData = OpenapiGetOrderDTO;
4
+ type ParamsData = OpenapiCancelOrderDTO;
5
5
  type ResponseData = OpenapiOrderRO;
6
6
  export declare const cancelOrderGroup: ApiMethodDeclaration<ParamsData, ResponseData>;
7
7
  export {};
@@ -1,7 +1,7 @@
1
- import { OpenapiGetOrderDTO } from '@escapenavigator/types/dist/openapi/orders/openapi-get-order.dto';
1
+ import { OpenapiCancelOrderDTO } from '@escapenavigator/types/dist/openapi/orders/openapi-cancel-order.dto';
2
2
  import { OpenapiOrderRO } from '@escapenavigator/types/dist/openapi/orders/openapi-order.ro';
3
3
  import { ApiMethodDeclaration } from '../..';
4
- type ParamsData = OpenapiGetOrderDTO;
4
+ type ParamsData = OpenapiCancelOrderDTO;
5
5
  type ResponseData = OpenapiOrderRO;
6
6
  export declare const cancelOrder: ApiMethodDeclaration<ParamsData, ResponseData>;
7
7
  export {};
@@ -0,0 +1,49 @@
1
+ import { ParseResultRO } from '@escapenavigator/types/dist/parse-results/parse-result.ro';
2
+ import { UpdateParseResultDto } from '@escapenavigator/types/dist/parse-results/update-parse-result.dto';
3
+ import { QueryDto } from '@escapenavigator/types/dist/shared/query.dto';
4
+ import { QueryRO } from '@escapenavigator/types/dist/shared/query.ro';
5
+ import { ApiMethodDeclaration } from '..';
6
+ declare const query: ApiMethodDeclaration<QueryDto, QueryRO<ParseResultRO>>;
7
+ declare const count: ApiMethodDeclaration<QueryDto, number>;
8
+ declare const getOne: ApiMethodDeclaration<{
9
+ id: number;
10
+ }, ParseResultRO>;
11
+ /** Кнопка «Спарсить сайт» в карточке компании. */
12
+ declare const enqueue: ApiMethodDeclaration<{
13
+ profileId: number;
14
+ }, ParseResultRO>;
15
+ declare const update: ApiMethodDeclaration<{
16
+ id: number;
17
+ data: UpdateParseResultDto;
18
+ }, ParseResultRO>;
19
+ type ApplyResponse = {
20
+ locationsCreated: number;
21
+ questsCreated: number;
22
+ questsClosed: number;
23
+ errors: string[];
24
+ };
25
+ declare const apply: ApiMethodDeclaration<{
26
+ id: number;
27
+ }, ApplyResponse>;
28
+ declare const reject: ApiMethodDeclaration<{
29
+ id: number;
30
+ }, {
31
+ ok: boolean;
32
+ }>;
33
+ declare const retry: ApiMethodDeclaration<{
34
+ id: number;
35
+ }, {
36
+ ok: boolean;
37
+ }>;
38
+ type ApiDeclaration = {
39
+ query: typeof query;
40
+ count: typeof count;
41
+ getOne: typeof getOne;
42
+ enqueue: typeof enqueue;
43
+ update: typeof update;
44
+ apply: typeof apply;
45
+ reject: typeof reject;
46
+ retry: typeof retry;
47
+ };
48
+ export declare const parseResultsApiDeclaration: ApiDeclaration;
49
+ export {};
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.parseResultsApiDeclaration = void 0;
4
+ var query = function (params) { return ({
5
+ url: '/parse-results',
6
+ method: 'GET',
7
+ params: params,
8
+ }); };
9
+ var count = function (params) { return ({
10
+ url: '/parse-results/count',
11
+ method: 'GET',
12
+ params: params,
13
+ }); };
14
+ var getOne = function (_a) {
15
+ var id = _a.id;
16
+ return ({
17
+ url: "/parse-results/".concat(id),
18
+ method: 'GET',
19
+ });
20
+ };
21
+ /** Кнопка «Спарсить сайт» в карточке компании. */
22
+ var enqueue = function (_a) {
23
+ var profileId = _a.profileId;
24
+ return ({
25
+ url: "/parse-results/profile/".concat(profileId),
26
+ method: 'POST',
27
+ });
28
+ };
29
+ var update = function (_a) {
30
+ var id = _a.id, data = _a.data;
31
+ return ({
32
+ url: "/parse-results/".concat(id),
33
+ method: 'PATCH',
34
+ data: data,
35
+ });
36
+ };
37
+ var apply = function (_a) {
38
+ var id = _a.id;
39
+ return ({
40
+ url: "/parse-results/".concat(id, "/apply"),
41
+ method: 'POST',
42
+ });
43
+ };
44
+ var reject = function (_a) {
45
+ var id = _a.id;
46
+ return ({
47
+ url: "/parse-results/".concat(id, "/reject"),
48
+ method: 'POST',
49
+ });
50
+ };
51
+ var retry = function (_a) {
52
+ var id = _a.id;
53
+ return ({
54
+ url: "/parse-results/".concat(id, "/retry"),
55
+ method: 'POST',
56
+ });
57
+ };
58
+ exports.parseResultsApiDeclaration = {
59
+ query: query,
60
+ count: count,
61
+ getOne: getOne,
62
+ enqueue: enqueue,
63
+ update: update,
64
+ apply: apply,
65
+ reject: reject,
66
+ retry: retry,
67
+ };
@@ -53,8 +53,8 @@ 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';
57
56
  import { getOne } from './get-one';
57
+ import { getProfilesWithoutNextAction } from './get-profiles-without-next-action';
58
58
  import { cancelMarketingEmailCampaign } from './marketing-email-campaign/cancel-marketing-email-campaign';
59
59
  import { createMarketingEmailCampaign } from './marketing-email-campaign/create-marketing-email-campaign';
60
60
  import { getMarketingEmailCampaign } from './marketing-email-campaign/get-marketing-email-campaign';
@@ -56,8 +56,8 @@ 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");
60
59
  var get_one_1 = require("./get-one");
60
+ var get_profiles_without_next_action_1 = require("./get-profiles-without-next-action");
61
61
  var cancel_marketing_email_campaign_1 = require("./marketing-email-campaign/cancel-marketing-email-campaign");
62
62
  var create_marketing_email_campaign_1 = require("./marketing-email-campaign/create-marketing-email-campaign");
63
63
  var get_marketing_email_campaign_1 = require("./marketing-email-campaign/get-marketing-email-campaign");
@@ -0,0 +1,6 @@
1
+ import { SuccessRO } from '@escapenavigator/types/dist/shared/success.ro';
2
+ import { ApiMethodDeclaration } from '../..';
3
+ type ParamsData = undefined;
4
+ type ResponseData = SuccessRO;
5
+ export declare const currentDeleteAccount: ApiMethodDeclaration<ParamsData, ResponseData>;
6
+ export {};
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.currentDeleteAccount = void 0;
4
+ var currentDeleteAccount = function () { return ({
5
+ url: '/current-user/account',
6
+ method: 'DELETE',
7
+ }); };
8
+ exports.currentDeleteAccount = currentDeleteAccount;
@@ -1,6 +1,7 @@
1
1
  import { checkToken } from './check-token';
2
2
  import { compliteSetup } from './complite-setup';
3
3
  import { create } from './create';
4
+ import { currentDeleteAccount } from './current/current-delete-account';
4
5
  import { currentUpdate } from './current/current-update';
5
6
  import { currentUpdateAvatar } from './current/current-update-avatar';
6
7
  import { currentUpdateDashboard } from './current/current-update-dashboard';
@@ -89,6 +90,7 @@ type ApiDeclaration = {
89
90
  me: typeof me;
90
91
  currentUpdate: typeof currentUpdate;
91
92
  currentUpdatePassword: typeof currentUpdatePassword;
93
+ currentDeleteAccount: typeof currentDeleteAccount;
92
94
  getSessionByUserAndDate: typeof getSessionByUserAndDate;
93
95
  getCalendarSessions: typeof getCalendarSessions;
94
96
  querySessions: typeof querySessions;
@@ -4,6 +4,7 @@ exports.usersApiDeclaration = void 0;
4
4
  var check_token_1 = require("./check-token");
5
5
  var complite_setup_1 = require("./complite-setup");
6
6
  var create_1 = require("./create");
7
+ var current_delete_account_1 = require("./current/current-delete-account");
7
8
  var current_update_1 = require("./current/current-update");
8
9
  var current_update_avatar_1 = require("./current/current-update-avatar");
9
10
  var current_update_dashboard_1 = require("./current/current-update-dashboard");
@@ -103,6 +104,7 @@ exports.usersApiDeclaration = {
103
104
  compliteSetup: complite_setup_1.compliteSetup,
104
105
  currentUpdate: current_update_1.currentUpdate,
105
106
  currentUpdatePassword: current_update_password_1.currentUpdatePassword,
107
+ currentDeleteAccount: current_delete_account_1.currentDeleteAccount,
106
108
  getOne: get_one_1.getOne,
107
109
  remove: remove_1.remove,
108
110
  update: update_1.update,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@escapenavigator/services",
3
- "version": "2.0.4",
3
+ "version": "2.0.5",
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": "c5d3da52ae3e82c63f099daf59730f2e374df66a",
15
+ "gitHead": "353de6475e72710d92abfa449624c818719d7239",
16
16
  "dependencies": {
17
- "@escapenavigator/types": "^2.0.4",
18
- "@escapenavigator/utils": "^2.0.4",
17
+ "@escapenavigator/types": "^2.0.5",
18
+ "@escapenavigator/utils": "^2.0.5",
19
19
  "axios": "^0.21.4",
20
20
  "class-transformer": "^0.5.1",
21
21
  "class-validator": "^0.13.2",