@escapenavigator/services 2.0.2 → 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/academy-api/create.d.ts +9 -0
- package/dist/api/academy-api/create.js +12 -0
- package/dist/api/academy-api/get-by-slug.d.ts +10 -0
- package/dist/api/academy-api/get-by-slug.js +12 -0
- package/dist/api/academy-api/get-one.d.ts +6 -0
- package/dist/api/academy-api/get-one.js +8 -0
- package/dist/api/academy-api/index.d.ts +20 -0
- package/dist/api/academy-api/index.js +21 -0
- package/dist/api/academy-api/list.d.ts +7 -0
- package/dist/api/academy-api/list.js +9 -0
- package/dist/api/academy-api/query.d.ts +8 -0
- package/dist/api/academy-api/query.js +9 -0
- package/dist/api/academy-api/remove.d.ts +7 -0
- package/dist/api/academy-api/remove.js +8 -0
- package/dist/api/academy-api/translate.d.ts +14 -0
- package/dist/api/academy-api/translate.js +12 -0
- package/dist/api/academy-api/update.d.ts +10 -0
- package/dist/api/academy-api/update.js +12 -0
- package/dist/api/agb-api/index.d.ts +2 -0
- package/dist/api/agb-api/index.js +2 -0
- package/dist/api/agb-api/reset-acceptances.d.ts +11 -0
- package/dist/api/agb-api/reset-acceptances.js +12 -0
- package/dist/api/clients-api/gdpr-export.d.ts +20 -0
- package/dist/api/clients-api/gdpr-export.js +11 -0
- package/dist/api/clients-api/index.d.ts +4 -0
- package/dist/api/clients-api/index.js +4 -0
- package/dist/api/clients-api/reveal-contacts.d.ts +16 -0
- package/dist/api/clients-api/reveal-contacts.js +16 -0
- package/dist/api/coalition-api/accept.d.ts +7 -0
- package/dist/api/coalition-api/accept.js +8 -0
- package/dist/api/coalition-api/create.d.ts +9 -0
- package/dist/api/coalition-api/create.js +12 -0
- package/dist/api/coalition-api/decline.d.ts +7 -0
- package/dist/api/coalition-api/decline.js +8 -0
- package/dist/api/coalition-api/index.d.ts +16 -0
- package/dist/api/coalition-api/index.js +17 -0
- package/dist/api/coalition-api/list.d.ts +6 -0
- package/dist/api/coalition-api/list.js +8 -0
- package/dist/api/coalition-api/stats.d.ts +9 -0
- package/dist/api/coalition-api/stats.js +9 -0
- package/dist/api/coalition-api/terminate.d.ts +7 -0
- package/dist/api/coalition-api/terminate.js +8 -0
- 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 +6 -0
- package/dist/api/init-client-api.js +6 -0
- package/dist/api/openapi-widget-api/index.d.ts +8 -0
- package/dist/api/openapi-widget-api/index.js +8 -0
- package/dist/api/openapi-widget-api/packages/book-package.d.ts +13 -0
- package/dist/api/openapi-widget-api/packages/book-package.js +12 -0
- package/dist/api/openapi-widget-api/packages/list-packages.d.ts +8 -0
- package/dist/api/openapi-widget-api/packages/list-packages.js +9 -0
- package/dist/api/openapi-widget-api/packages/package-availability.d.ts +9 -0
- package/dist/api/openapi-widget-api/packages/package-availability.js +23 -0
- package/dist/api/openapi-widget-api/packages/packages-by-questroom.d.ts +8 -0
- package/dist/api/openapi-widget-api/packages/packages-by-questroom.js +9 -0
- package/dist/api/packages-api/availability.d.ts +9 -0
- package/dist/api/packages-api/availability.js +23 -0
- package/dist/api/packages-api/book.d.ts +13 -0
- package/dist/api/packages-api/book.js +12 -0
- package/dist/api/packages-api/index.d.ts +4 -0
- package/dist/api/packages-api/index.js +4 -0
- package/dist/api/packages-api/remove.d.ts +2 -3
- package/dist/api/packages-api/remove.js +4 -7
- package/dist/api/profiles-api/current/accept-terms.d.ts +10 -0
- package/dist/api/profiles-api/current/accept-terms.js +12 -0
- 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 +4 -0
- package/dist/api/profiles-api/index.js +4 -0
- package/dist/api/slots-api/bulk-update.d.ts +9 -0
- package/dist/api/slots-api/bulk-update.js +12 -0
- package/dist/api/slots-api/index.d.ts +2 -0
- package/dist/api/slots-api/index.js +2 -0
- package/package.json +4 -4
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { AcademyAdminArticleRO } from '@escapenavigator/types/dist/academy/academy-admin-article.ro';
|
|
2
|
+
import { CreateAcademyArticleDto } from '@escapenavigator/types/dist/academy/create-academy-article.dto';
|
|
3
|
+
import { ApiMethodDeclaration } from '..';
|
|
4
|
+
type ParamsData = {
|
|
5
|
+
data: CreateAcademyArticleDto;
|
|
6
|
+
};
|
|
7
|
+
type ResponseData = AcademyAdminArticleRO;
|
|
8
|
+
export declare const create: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.create = void 0;
|
|
4
|
+
var create = function (_a) {
|
|
5
|
+
var data = _a.data;
|
|
6
|
+
return ({
|
|
7
|
+
url: '/academy/admin',
|
|
8
|
+
method: 'POST',
|
|
9
|
+
data: data,
|
|
10
|
+
});
|
|
11
|
+
};
|
|
12
|
+
exports.create = create;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AcademyArticleRO } from '@escapenavigator/types/dist/academy/academy-article.ro';
|
|
2
|
+
import { Languages } from '@escapenavigator/types/dist/shared/enum/languages.enum';
|
|
3
|
+
import { ApiMethodDeclaration } from '..';
|
|
4
|
+
type ParamsData = {
|
|
5
|
+
slug: string;
|
|
6
|
+
language?: Languages;
|
|
7
|
+
};
|
|
8
|
+
type ResponseData = AcademyArticleRO;
|
|
9
|
+
export declare const getBySlug: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getBySlug = void 0;
|
|
4
|
+
var getBySlug = function (_a) {
|
|
5
|
+
var slug = _a.slug, language = _a.language;
|
|
6
|
+
return ({
|
|
7
|
+
url: "/academy/articles/".concat(slug),
|
|
8
|
+
method: 'GET',
|
|
9
|
+
params: language ? { language: language } : undefined,
|
|
10
|
+
});
|
|
11
|
+
};
|
|
12
|
+
exports.getBySlug = getBySlug;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { AcademyAdminArticleRO } from '@escapenavigator/types/dist/academy/academy-admin-article.ro';
|
|
2
|
+
import { ApiMethodDeclaration } from '..';
|
|
3
|
+
type ParamsData = number;
|
|
4
|
+
type ResponseData = AcademyAdminArticleRO;
|
|
5
|
+
export declare const getOne: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { create } from './create';
|
|
2
|
+
import { getBySlug } from './get-by-slug';
|
|
3
|
+
import { getOne } from './get-one';
|
|
4
|
+
import { list } from './list';
|
|
5
|
+
import { query } from './query';
|
|
6
|
+
import { remove } from './remove';
|
|
7
|
+
import { translate } from './translate';
|
|
8
|
+
import { update } from './update';
|
|
9
|
+
type ApiDeclaration = {
|
|
10
|
+
list: typeof list;
|
|
11
|
+
getBySlug: typeof getBySlug;
|
|
12
|
+
query: typeof query;
|
|
13
|
+
getOne: typeof getOne;
|
|
14
|
+
create: typeof create;
|
|
15
|
+
update: typeof update;
|
|
16
|
+
remove: typeof remove;
|
|
17
|
+
translate: typeof translate;
|
|
18
|
+
};
|
|
19
|
+
export declare const academyApiDeclaration: ApiDeclaration;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.academyApiDeclaration = void 0;
|
|
4
|
+
var create_1 = require("./create");
|
|
5
|
+
var get_by_slug_1 = require("./get-by-slug");
|
|
6
|
+
var get_one_1 = require("./get-one");
|
|
7
|
+
var list_1 = require("./list");
|
|
8
|
+
var query_1 = require("./query");
|
|
9
|
+
var remove_1 = require("./remove");
|
|
10
|
+
var translate_1 = require("./translate");
|
|
11
|
+
var update_1 = require("./update");
|
|
12
|
+
exports.academyApiDeclaration = {
|
|
13
|
+
list: list_1.list,
|
|
14
|
+
getBySlug: get_by_slug_1.getBySlug,
|
|
15
|
+
query: query_1.query,
|
|
16
|
+
getOne: get_one_1.getOne,
|
|
17
|
+
create: create_1.create,
|
|
18
|
+
update: update_1.update,
|
|
19
|
+
remove: remove_1.remove,
|
|
20
|
+
translate: translate_1.translate,
|
|
21
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AcademyArticleCardRO } from '@escapenavigator/types/dist/academy/academy-article-card.ro';
|
|
2
|
+
import { AcademyArticlesQueryDto } from '@escapenavigator/types/dist/academy/academy-articles.query.dto';
|
|
3
|
+
import { ApiMethodDeclaration } from '..';
|
|
4
|
+
type ParamsData = AcademyArticlesQueryDto;
|
|
5
|
+
type ResponseData = AcademyArticleCardRO[];
|
|
6
|
+
export declare const list: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { AcademyAdminArticleRO } from '@escapenavigator/types/dist/academy/academy-admin-article.ro';
|
|
2
|
+
import { QueryDto } from '@escapenavigator/types/dist/shared/query.dto';
|
|
3
|
+
import { QueryRO } from '@escapenavigator/types/dist/shared/query.ro';
|
|
4
|
+
import { ApiMethodDeclaration } from '..';
|
|
5
|
+
type ParamsData = QueryDto;
|
|
6
|
+
type ResponseData = QueryRO<AcademyAdminArticleRO>;
|
|
7
|
+
export declare const query: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Languages } from '@escapenavigator/types/dist/shared/enum/languages.enum';
|
|
2
|
+
import { ApiMethodDeclaration } from '..';
|
|
3
|
+
type ParamsData = {
|
|
4
|
+
id: number;
|
|
5
|
+
language: Languages;
|
|
6
|
+
};
|
|
7
|
+
type ResponseData = {
|
|
8
|
+
language: Languages;
|
|
9
|
+
title: string;
|
|
10
|
+
description: string;
|
|
11
|
+
content: string;
|
|
12
|
+
};
|
|
13
|
+
export declare const translate: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.translate = void 0;
|
|
4
|
+
var translate = function (_a) {
|
|
5
|
+
var id = _a.id, language = _a.language;
|
|
6
|
+
return ({
|
|
7
|
+
url: "/academy/admin/".concat(id, "/translate"),
|
|
8
|
+
method: 'POST',
|
|
9
|
+
data: { language: language },
|
|
10
|
+
});
|
|
11
|
+
};
|
|
12
|
+
exports.translate = translate;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AcademyAdminArticleRO } from '@escapenavigator/types/dist/academy/academy-admin-article.ro';
|
|
2
|
+
import { UpdateAcademyArticleDto } from '@escapenavigator/types/dist/academy/update-academy-article.dto';
|
|
3
|
+
import { ApiMethodDeclaration } from '..';
|
|
4
|
+
type ParamsData = {
|
|
5
|
+
id: number;
|
|
6
|
+
data: UpdateAcademyArticleDto;
|
|
7
|
+
};
|
|
8
|
+
type ResponseData = AcademyAdminArticleRO;
|
|
9
|
+
export declare const update: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.update = void 0;
|
|
4
|
+
var update = function (_a) {
|
|
5
|
+
var id = _a.id, data = _a.data;
|
|
6
|
+
return ({
|
|
7
|
+
url: "/academy/admin/".concat(id),
|
|
8
|
+
method: 'PATCH',
|
|
9
|
+
data: data,
|
|
10
|
+
});
|
|
11
|
+
};
|
|
12
|
+
exports.update = update;
|
|
@@ -4,6 +4,7 @@ import { getForOrderService } from './get-for-order-service';
|
|
|
4
4
|
import { getOne } from './get-one';
|
|
5
5
|
import { getTemplate } from './get-template';
|
|
6
6
|
import { remove } from './remove';
|
|
7
|
+
import { resetAcceptances } from './reset-acceptances';
|
|
7
8
|
import { update } from './update';
|
|
8
9
|
type ApiDeclaration = {
|
|
9
10
|
remove: typeof remove;
|
|
@@ -13,6 +14,7 @@ type ApiDeclaration = {
|
|
|
13
14
|
getForOrderService: typeof getForOrderService;
|
|
14
15
|
getTemplate: typeof getTemplate;
|
|
15
16
|
update: typeof update;
|
|
17
|
+
resetAcceptances: typeof resetAcceptances;
|
|
16
18
|
};
|
|
17
19
|
export declare const agbApiDeclaration: ApiDeclaration;
|
|
18
20
|
export {};
|
|
@@ -7,6 +7,7 @@ var get_for_order_service_1 = require("./get-for-order-service");
|
|
|
7
7
|
var get_one_1 = require("./get-one");
|
|
8
8
|
var get_template_1 = require("./get-template");
|
|
9
9
|
var remove_1 = require("./remove");
|
|
10
|
+
var reset_acceptances_1 = require("./reset-acceptances");
|
|
10
11
|
var update_1 = require("./update");
|
|
11
12
|
exports.agbApiDeclaration = {
|
|
12
13
|
remove: remove_1.remove,
|
|
@@ -16,4 +17,5 @@ exports.agbApiDeclaration = {
|
|
|
16
17
|
getForOrderService: get_for_order_service_1.getForOrderService,
|
|
17
18
|
getTemplate: get_template_1.getTemplate,
|
|
18
19
|
update: update_1.update,
|
|
20
|
+
resetAcceptances: reset_acceptances_1.resetAcceptances,
|
|
19
21
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ApiMethodDeclaration } from '..';
|
|
2
|
+
type ParamsData = undefined;
|
|
3
|
+
type ResponseData = {
|
|
4
|
+
affected: number;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Админ: сброс акцептов оферты у всех профилей (после публикации новой
|
|
8
|
+
* редакции документов). Владельцы увидят экран акцепта при следующем входе.
|
|
9
|
+
*/
|
|
10
|
+
export declare const resetAcceptances: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.resetAcceptances = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Админ: сброс акцептов оферты у всех профилей (после публикации новой
|
|
6
|
+
* редакции документов). Владельцы увидят экран акцепта при следующем входе.
|
|
7
|
+
*/
|
|
8
|
+
var resetAcceptances = function () { return ({
|
|
9
|
+
url: '/agbs/reset-acceptances',
|
|
10
|
+
method: 'POST',
|
|
11
|
+
}); };
|
|
12
|
+
exports.resetAcceptances = resetAcceptances;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ApiMethodDeclaration } from '..';
|
|
2
|
+
type ParamsData = {
|
|
3
|
+
id: number;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* Полная выгрузка данных клиента (GDPR Art. 15/20) в machine-readable JSON:
|
|
7
|
+
* профиль, заказы, сертификаты, метаданные коммуникаций. Требует право
|
|
8
|
+
* `canRevealClientContacts`, на бэке пишется аудит-запись.
|
|
9
|
+
*/
|
|
10
|
+
export type ClientGdprExportRO = {
|
|
11
|
+
exportedAt: string;
|
|
12
|
+
client: Record<string, unknown>;
|
|
13
|
+
billingDefaults: Record<string, unknown> | null;
|
|
14
|
+
orders: Array<Record<string, unknown>>;
|
|
15
|
+
certificates: Array<Record<string, unknown>>;
|
|
16
|
+
emails: Array<Record<string, unknown>>;
|
|
17
|
+
utmTouchpoints: Array<Record<string, unknown>>;
|
|
18
|
+
};
|
|
19
|
+
export declare const gdprExport: ApiMethodDeclaration<ParamsData, ClientGdprExportRO>;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.gdprExport = void 0;
|
|
4
|
+
var gdprExport = function (_a) {
|
|
5
|
+
var id = _a.id;
|
|
6
|
+
return ({
|
|
7
|
+
url: "/clients/".concat(id, "/gdpr-export"),
|
|
8
|
+
method: 'GET',
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
exports.gdprExport = gdprExport;
|
|
@@ -2,6 +2,7 @@ import { count } from './count';
|
|
|
2
2
|
import { create } from './create';
|
|
3
3
|
import { createComplaint } from './create-complaint';
|
|
4
4
|
import { exportClients } from './export';
|
|
5
|
+
import { gdprExport } from './gdpr-export';
|
|
5
6
|
import { getAll } from './get-all';
|
|
6
7
|
import { getBillingDefaults } from './get-billing-defaults';
|
|
7
8
|
import { getComplaints } from './get-complaints';
|
|
@@ -10,6 +11,7 @@ import { getUtmTouchpoints } from './get-utm-touchpoints';
|
|
|
10
11
|
import { query } from './query';
|
|
11
12
|
import { remove } from './remove';
|
|
12
13
|
import { restoreMarketingAudience } from './restore-marketing-audience';
|
|
14
|
+
import { revealContacts } from './reveal-contacts';
|
|
13
15
|
import { suggestUtm } from './suggest-utm';
|
|
14
16
|
import { toggleBlock } from './tobble-block';
|
|
15
17
|
import { update } from './update';
|
|
@@ -29,6 +31,8 @@ type ApiDeclaration = {
|
|
|
29
31
|
suggestUtm: typeof suggestUtm;
|
|
30
32
|
remove: typeof remove;
|
|
31
33
|
restoreMarketingAudience: typeof restoreMarketingAudience;
|
|
34
|
+
revealContacts: typeof revealContacts;
|
|
35
|
+
gdprExport: typeof gdprExport;
|
|
32
36
|
};
|
|
33
37
|
export declare const clientsApiDeclaration: ApiDeclaration;
|
|
34
38
|
export {};
|
|
@@ -5,6 +5,7 @@ var count_1 = require("./count");
|
|
|
5
5
|
var create_1 = require("./create");
|
|
6
6
|
var create_complaint_1 = require("./create-complaint");
|
|
7
7
|
var export_1 = require("./export");
|
|
8
|
+
var gdpr_export_1 = require("./gdpr-export");
|
|
8
9
|
var get_all_1 = require("./get-all");
|
|
9
10
|
var get_billing_defaults_1 = require("./get-billing-defaults");
|
|
10
11
|
var get_complaints_1 = require("./get-complaints");
|
|
@@ -13,6 +14,7 @@ var get_utm_touchpoints_1 = require("./get-utm-touchpoints");
|
|
|
13
14
|
var query_1 = require("./query");
|
|
14
15
|
var remove_1 = require("./remove");
|
|
15
16
|
var restore_marketing_audience_1 = require("./restore-marketing-audience");
|
|
17
|
+
var reveal_contacts_1 = require("./reveal-contacts");
|
|
16
18
|
var suggest_utm_1 = require("./suggest-utm");
|
|
17
19
|
var tobble_block_1 = require("./tobble-block");
|
|
18
20
|
var update_1 = require("./update");
|
|
@@ -32,4 +34,6 @@ exports.clientsApiDeclaration = {
|
|
|
32
34
|
suggestUtm: suggest_utm_1.suggestUtm,
|
|
33
35
|
remove: remove_1.remove,
|
|
34
36
|
restoreMarketingAudience: restore_marketing_audience_1.restoreMarketingAudience,
|
|
37
|
+
revealContacts: reveal_contacts_1.revealContacts,
|
|
38
|
+
gdprExport: gdpr_export_1.gdprExport,
|
|
35
39
|
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ApiMethodDeclaration } from '..';
|
|
2
|
+
type ParamsData = {
|
|
3
|
+
id: number;
|
|
4
|
+
field?: 'phone' | 'phone2' | 'email' | 'all';
|
|
5
|
+
};
|
|
6
|
+
export type RevealedContactsRO = {
|
|
7
|
+
phone: string | null;
|
|
8
|
+
phone2: string | null;
|
|
9
|
+
email: string | null;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Раскрыть полные контакты клиента («глазик» в UI). Требует право
|
|
13
|
+
* `canRevealClientContacts`, на бэке пишется аудит-запись.
|
|
14
|
+
*/
|
|
15
|
+
export declare const revealContacts: ApiMethodDeclaration<ParamsData, RevealedContactsRO>;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.revealContacts = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Раскрыть полные контакты клиента («глазик» в UI). Требует право
|
|
6
|
+
* `canRevealClientContacts`, на бэке пишется аудит-запись.
|
|
7
|
+
*/
|
|
8
|
+
var revealContacts = function (_a) {
|
|
9
|
+
var id = _a.id, field = _a.field;
|
|
10
|
+
return ({
|
|
11
|
+
url: "/clients/".concat(id, "/reveal-contacts"),
|
|
12
|
+
method: 'POST',
|
|
13
|
+
params: field ? { field: field } : undefined,
|
|
14
|
+
});
|
|
15
|
+
};
|
|
16
|
+
exports.revealContacts = revealContacts;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SuccessRO } from '@escapenavigator/types/dist/shared/success.ro';
|
|
2
|
+
import { ApiMethodDeclaration } from '..';
|
|
3
|
+
/** ID коалиции */
|
|
4
|
+
type ParamsData = number;
|
|
5
|
+
type ResponseData = SuccessRO;
|
|
6
|
+
export declare const accept: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CreateCoalitionRequestDto } from '@escapenavigator/types/dist/coalition/create-coalition-request.dto';
|
|
2
|
+
import { SuccessRO } from '@escapenavigator/types/dist/shared/success.ro';
|
|
3
|
+
import { ApiMethodDeclaration } from '..';
|
|
4
|
+
type ParamsData = {
|
|
5
|
+
data: CreateCoalitionRequestDto;
|
|
6
|
+
};
|
|
7
|
+
type ResponseData = SuccessRO;
|
|
8
|
+
export declare const create: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.create = void 0;
|
|
4
|
+
var create = function (_a) {
|
|
5
|
+
var data = _a.data;
|
|
6
|
+
return ({
|
|
7
|
+
url: '/coalitions',
|
|
8
|
+
method: 'POST',
|
|
9
|
+
data: data,
|
|
10
|
+
});
|
|
11
|
+
};
|
|
12
|
+
exports.create = create;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SuccessRO } from '@escapenavigator/types/dist/shared/success.ro';
|
|
2
|
+
import { ApiMethodDeclaration } from '..';
|
|
3
|
+
/** ID коалиции */
|
|
4
|
+
type ParamsData = number;
|
|
5
|
+
type ResponseData = SuccessRO;
|
|
6
|
+
export declare const decline: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { accept } from './accept';
|
|
2
|
+
import { create } from './create';
|
|
3
|
+
import { decline } from './decline';
|
|
4
|
+
import { list } from './list';
|
|
5
|
+
import { stats } from './stats';
|
|
6
|
+
import { terminate } from './terminate';
|
|
7
|
+
type ApiDeclaration = {
|
|
8
|
+
list: typeof list;
|
|
9
|
+
stats: typeof stats;
|
|
10
|
+
create: typeof create;
|
|
11
|
+
accept: typeof accept;
|
|
12
|
+
decline: typeof decline;
|
|
13
|
+
terminate: typeof terminate;
|
|
14
|
+
};
|
|
15
|
+
export declare const coalitionApiDeclaration: ApiDeclaration;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.coalitionApiDeclaration = void 0;
|
|
4
|
+
var accept_1 = require("./accept");
|
|
5
|
+
var create_1 = require("./create");
|
|
6
|
+
var decline_1 = require("./decline");
|
|
7
|
+
var list_1 = require("./list");
|
|
8
|
+
var stats_1 = require("./stats");
|
|
9
|
+
var terminate_1 = require("./terminate");
|
|
10
|
+
exports.coalitionApiDeclaration = {
|
|
11
|
+
list: list_1.list,
|
|
12
|
+
stats: stats_1.stats,
|
|
13
|
+
create: create_1.create,
|
|
14
|
+
accept: accept_1.accept,
|
|
15
|
+
decline: decline_1.decline,
|
|
16
|
+
terminate: terminate_1.terminate,
|
|
17
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CoalitionListRO } from '@escapenavigator/types/dist/coalition/coalition-list.ro';
|
|
2
|
+
import { ApiMethodDeclaration } from '..';
|
|
3
|
+
type ParamsData = undefined;
|
|
4
|
+
type ResponseData = CoalitionListRO;
|
|
5
|
+
export declare const list: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CoalitionStatsRO } from '@escapenavigator/types/dist/coalition/coalition-stats.ro';
|
|
2
|
+
import { ApiMethodDeclaration } from '..';
|
|
3
|
+
type ParamsData = {
|
|
4
|
+
from?: string;
|
|
5
|
+
to?: string;
|
|
6
|
+
} | undefined;
|
|
7
|
+
type ResponseData = CoalitionStatsRO[];
|
|
8
|
+
export declare const stats: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SuccessRO } from '@escapenavigator/types/dist/shared/success.ro';
|
|
2
|
+
import { ApiMethodDeclaration } from '..';
|
|
3
|
+
/** ID коалиции */
|
|
4
|
+
type ParamsData = number;
|
|
5
|
+
type ResponseData = SuccessRO;
|
|
6
|
+
export declare const terminate: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
7
|
+
export {};
|
|
@@ -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;
|