@escapenavigator/services 1.2.3 → 1.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/init-client-api.d.ts +2 -0
- package/dist/api/init-client-api.js +2 -0
- package/dist/api/widgets-api/index.d.ts +0 -2
- package/dist/api/widgets-api/index.js +0 -2
- package/dist/api/widgets-openapi/get-widget-info.d.ts +7 -0
- package/dist/api/widgets-openapi/get-widget-info.js +8 -0
- package/dist/api/widgets-openapi/index.d.ts +10 -0
- package/dist/api/widgets-openapi/index.js +11 -0
- package/dist/api/widgets-openapi/widget-daily.d.ts +5 -5
- package/dist/api/widgets-openapi/widget-daily.js +4 -4
- package/dist/api/widgets-openapi/widget-weekly.d.ts +4 -4
- package/dist/api/widgets-openapi/widget-weekly.js +1 -1
- package/dist/utils/serialize-record.d.ts +1 -1
- package/dist/utils/serialize-record.js +2 -2
- package/package.json +3 -3
- package/dist/api/widgets-api/get-info.d.ts +0 -7
- package/dist/api/widgets-api/get-info.js +0 -8
|
@@ -27,6 +27,7 @@ import { upsellingsApiDeclaration } from './upsellings-api';
|
|
|
27
27
|
import { userMessagesApiDeclaration } from './user-messages-api';
|
|
28
28
|
import { usersApiDeclaration } from './users-api';
|
|
29
29
|
import { widgetsApiDeclaration } from './widgets-api';
|
|
30
|
+
import { widgetsOpenApiDeclaration } from './widgets-openapi';
|
|
30
31
|
import { citiesApiDeclaration } from './cities-api';
|
|
31
32
|
import { Api } from '.';
|
|
32
33
|
export declare type InitApiDeclaration = {
|
|
@@ -50,6 +51,7 @@ export declare type InitApiDeclaration = {
|
|
|
50
51
|
partners: Api<typeof partnersApiDeclaration>;
|
|
51
52
|
questrooms: Api<typeof questroomsApiDeclaration>;
|
|
52
53
|
widgets: Api<typeof widgetsApiDeclaration>;
|
|
54
|
+
widgetsOpenApi: Api<typeof widgetsOpenApiDeclaration>;
|
|
53
55
|
profiles: Api<typeof profilesApiDeclaration>;
|
|
54
56
|
users: Api<typeof usersApiDeclaration>;
|
|
55
57
|
clients: Api<typeof clientsApiDeclaration>;
|
|
@@ -30,6 +30,7 @@ const upsellings_api_1 = require("./upsellings-api");
|
|
|
30
30
|
const user_messages_api_1 = require("./user-messages-api");
|
|
31
31
|
const users_api_1 = require("./users-api");
|
|
32
32
|
const widgets_api_1 = require("./widgets-api");
|
|
33
|
+
const widgets_openapi_1 = require("./widgets-openapi");
|
|
33
34
|
const cities_api_1 = require("./cities-api");
|
|
34
35
|
const _1 = require(".");
|
|
35
36
|
const initClientApi = (url) => {
|
|
@@ -54,6 +55,7 @@ const initClientApi = (url) => {
|
|
|
54
55
|
partners: (0, _1.initApi)(partners_api_1.partnersApiDeclaration, url),
|
|
55
56
|
questrooms: (0, _1.initApi)(questrooms_api_1.questroomsApiDeclaration, url),
|
|
56
57
|
widgets: (0, _1.initApi)(widgets_api_1.widgetsApiDeclaration, url),
|
|
58
|
+
widgetsOpenApi: (0, _1.initApi)(widgets_openapi_1.widgetsOpenApiDeclaration, url),
|
|
57
59
|
profiles: (0, _1.initApi)(profiles_api_1.profilesApiDeclaration, url),
|
|
58
60
|
users: (0, _1.initApi)(users_api_1.usersApiDeclaration, url),
|
|
59
61
|
clients: (0, _1.initApi)(clients_api_1.clientsApiDeclaration, url),
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { create } from './create';
|
|
2
|
-
import { getInfo } from './get-info';
|
|
3
2
|
import { getOne } from './get-one';
|
|
4
3
|
import { query } from './query';
|
|
5
4
|
import { remove } from './remove';
|
|
@@ -9,7 +8,6 @@ declare type ApiDeclaration = {
|
|
|
9
8
|
remove: typeof remove;
|
|
10
9
|
update: typeof update;
|
|
11
10
|
query: typeof query;
|
|
12
|
-
getInfo: typeof getInfo;
|
|
13
11
|
getOne: typeof getOne;
|
|
14
12
|
};
|
|
15
13
|
export declare const widgetsApiDeclaration: ApiDeclaration;
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.widgetsApiDeclaration = void 0;
|
|
4
4
|
const create_1 = require("./create");
|
|
5
|
-
const get_info_1 = require("./get-info");
|
|
6
5
|
const get_one_1 = require("./get-one");
|
|
7
6
|
const query_1 = require("./query");
|
|
8
7
|
const remove_1 = require("./remove");
|
|
@@ -12,6 +11,5 @@ exports.widgetsApiDeclaration = {
|
|
|
12
11
|
remove: remove_1.remove,
|
|
13
12
|
update: update_1.update,
|
|
14
13
|
query: query_1.query,
|
|
15
|
-
getInfo: get_info_1.getInfo,
|
|
16
14
|
getOne: get_one_1.getOne,
|
|
17
15
|
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { WidgetOpenApiResponseObject } from '@escapenavigator/types/dist/widget-openapi/widget-openapi.ro';
|
|
2
|
+
import { ApiMethodDeclaration } from '..';
|
|
3
|
+
/** UID виджета */
|
|
4
|
+
declare type ParamsData = string;
|
|
5
|
+
declare type ResponseData = WidgetOpenApiResponseObject;
|
|
6
|
+
export declare const getWidgetInfo: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { getWidgetInfo } from './get-widget-info';
|
|
2
|
+
import { daily } from './widget-daily';
|
|
3
|
+
import { weekly } from './widget-weekly';
|
|
4
|
+
declare type ApiDeclaration = {
|
|
5
|
+
getWidgetInfo: typeof getWidgetInfo;
|
|
6
|
+
daily: typeof daily;
|
|
7
|
+
weekly: typeof weekly;
|
|
8
|
+
};
|
|
9
|
+
export declare const widgetsOpenApiDeclaration: ApiDeclaration;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.widgetsOpenApiDeclaration = void 0;
|
|
4
|
+
const get_widget_info_1 = require("./get-widget-info");
|
|
5
|
+
const widget_daily_1 = require("./widget-daily");
|
|
6
|
+
const widget_weekly_1 = require("./widget-weekly");
|
|
7
|
+
exports.widgetsOpenApiDeclaration = {
|
|
8
|
+
getWidgetInfo: get_widget_info_1.getWidgetInfo,
|
|
9
|
+
daily: widget_daily_1.daily,
|
|
10
|
+
weekly: widget_weekly_1.weekly,
|
|
11
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { WidgetOpenapiScheduleQueryDto } from '@escapenavigator/types/dist/widget-openapi/widget-openapi-schedule-query.dto';
|
|
2
|
+
import { WidgetOpenapiSlotResponseObject } from '@escapenavigator/types/dist/widget-openapi/widget-openapi-slot.ro';
|
|
3
3
|
import { ApiMethodDeclaration } from '..';
|
|
4
|
-
declare type ParamsData =
|
|
5
|
-
declare type ResponseData =
|
|
6
|
-
export declare const
|
|
4
|
+
declare type ParamsData = WidgetOpenapiScheduleQueryDto;
|
|
5
|
+
declare type ResponseData = WidgetOpenapiSlotResponseObject[];
|
|
6
|
+
export declare const daily: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
7
7
|
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
const
|
|
5
|
-
url: '/widget
|
|
3
|
+
exports.daily = void 0;
|
|
4
|
+
const daily = (params) => ({
|
|
5
|
+
url: '/widget/openapi/daily',
|
|
6
6
|
method: 'GET',
|
|
7
7
|
params,
|
|
8
8
|
});
|
|
9
|
-
exports.
|
|
9
|
+
exports.daily = daily;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { WidgetOpenapiScheduleQueryDto } from '@escapenavigator/types/dist/widget-openapi/widget-openapi-schedule-query.dto';
|
|
2
|
+
import { WidgetOpenapiSlotResponseObject } from '@escapenavigator/types/dist/widget-openapi/widget-openapi-slot.ro';
|
|
3
3
|
import { ApiMethodDeclaration } from '..';
|
|
4
|
-
declare type ParamsData =
|
|
5
|
-
declare type ResponseData =
|
|
4
|
+
declare type ParamsData = WidgetOpenapiSlotResponseObject;
|
|
5
|
+
declare type ResponseData = WidgetOpenapiScheduleQueryDto[];
|
|
6
6
|
export declare const weekly: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
7
7
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { ClassConstructor } from 'class-transformer';
|
|
2
|
-
export declare const serializeRecord: <T
|
|
2
|
+
export declare const serializeRecord: <T, D>(Dto: ClassConstructor<T>, data: D) => T;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.serializeRecord = void 0;
|
|
4
4
|
const class_transformer_1 = require("class-transformer");
|
|
5
|
+
// export const serializeRecord = <T extends ClassConstructor<unknown>>(Dto: T, data): T =>
|
|
6
|
+
// plainToClass(Dto, data, { strategy: 'excludeAll' }) as unknown as T;
|
|
5
7
|
const serializeRecord = (Dto, data) => (0, class_transformer_1.plainToClass)(Dto, data, { strategy: 'excludeAll' });
|
|
6
8
|
exports.serializeRecord = serializeRecord;
|
|
7
|
-
// export const serializeRecord = <T, D>(Dto: T, data: D) =>
|
|
8
|
-
// plainToClass(Dto as unknown as ClassConstructor<T>, data, { strategy: 'excludeAll' });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@escapenavigator/services",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.7",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
"scripts": {
|
|
13
13
|
"build": "rm -rf dist && tsc --project tsconfig.build.json"
|
|
14
14
|
},
|
|
15
|
-
"gitHead": "
|
|
15
|
+
"gitHead": "f78cf6f1bbe5c6d9d51c42376c88eb38699c64a3",
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@escapenavigator/types": "^1.2.
|
|
17
|
+
"@escapenavigator/types": "^1.2.5",
|
|
18
18
|
"axios": "^0.21.4",
|
|
19
19
|
"class-transformer": "^0.5.1",
|
|
20
20
|
"class-validator": "^0.13.1",
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { WidgetResponseObject } from '@escapenavigator/types/dist/widget/widget.ro';
|
|
2
|
-
import { ApiMethodDeclaration } from '..';
|
|
3
|
-
/** ID виджета */
|
|
4
|
-
declare type ParamsData = number;
|
|
5
|
-
declare type ResponseData = WidgetResponseObject;
|
|
6
|
-
export declare const getInfo: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
7
|
-
export {};
|