@escapenavigator/services 1.4.81 → 1.4.83
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/agb-api/create.d.ts +9 -0
- package/dist/api/agb-api/{create-inside-agb.js → create.js} +3 -3
- package/dist/api/agb-api/get-all.d.ts +7 -0
- package/dist/api/agb-api/get-all.js +8 -0
- package/dist/api/agb-api/get-for-order-service.d.ts +2 -2
- package/dist/api/agb-api/get-one.d.ts +7 -0
- package/dist/api/agb-api/{get-one-by-id.js → get-one.js} +3 -3
- package/dist/api/agb-api/index.d.ts +8 -12
- package/dist/api/agb-api/index.js +8 -12
- package/dist/api/agb-api/{update-inside-agb.d.ts → update.d.ts} +3 -3
- package/dist/api/agb-api/{update-inside-agb.js → update.js} +3 -3
- package/dist/api/init-client-api.d.ts +2 -0
- package/dist/api/init-client-api.js +2 -0
- package/dist/api/{transactions-api → order-transactions-api}/create-order-payment.d.ts +1 -1
- package/dist/api/{transactions-api → order-transactions-api}/create-order-refund.d.ts +2 -2
- package/dist/api/order-transactions-api/create-order-stripe-refund.d.ts +9 -0
- package/dist/api/order-transactions-api/create-order-stripe-refund.js +12 -0
- package/dist/api/order-transactions-api/index.d.ts +10 -0
- package/dist/api/order-transactions-api/index.js +11 -0
- package/dist/api/profiles-api/agb/get-profile-agb-for-order-service.d.ts +6 -0
- package/dist/api/profiles-api/agb/get-profile-agb-for-order-service.js +8 -0
- package/dist/api/profiles-api/agb/get-profile-agb.d.ts +6 -0
- package/dist/api/profiles-api/agb/get-profile-agb.js +8 -0
- package/dist/api/profiles-api/agb/update-profile-agb.d.ts +9 -0
- package/dist/api/{agb-api → profiles-api/agb}/update-profile-agb.js +1 -1
- package/dist/api/profiles-api/bookeo/get-bookeo-info.d.ts +6 -0
- package/dist/api/profiles-api/bookeo/get-bookeo-info.js +8 -0
- package/dist/api/profiles-api/bookeo/get-bookeo-integration-link.d.ts +5 -0
- package/dist/api/profiles-api/bookeo/get-bookeo-integration-link.js +8 -0
- package/dist/api/profiles-api/bookeo/get-bookeo-orders.d.ts +8 -0
- package/dist/api/profiles-api/bookeo/get-bookeo-orders.js +9 -0
- package/dist/api/profiles-api/bookeo/resync-bookeo.d.ts +6 -0
- package/dist/api/profiles-api/bookeo/resync-bookeo.js +8 -0
- package/dist/api/profiles-api/finalize-current.d.ts +9 -0
- package/dist/api/profiles-api/finalize-current.js +12 -0
- package/dist/api/profiles-api/get-customization.d.ts +7 -0
- package/dist/api/profiles-api/get-customization.js +8 -0
- package/dist/api/profiles-api/index.d.ts +30 -8
- package/dist/api/profiles-api/index.js +30 -8
- package/dist/api/profiles-api/initial-customization.d.ts +7 -0
- package/dist/api/profiles-api/initial-customization.js +9 -0
- package/dist/api/profiles-api/subscription/create-subscription-session.d.ts +8 -0
- package/dist/api/profiles-api/subscription/create-subscription-session.js +11 -0
- package/dist/api/profiles-api/{get-payment-settings.d.ts → subscription/get-payment-settings.d.ts} +1 -1
- package/dist/api/profiles-api/subscription/get-prices.d.ts +6 -0
- package/dist/api/profiles-api/subscription/get-prices.js +8 -0
- package/dist/api/profiles-api/{get-profile-invoices.d.ts → subscription/get-profile-invoices.d.ts} +1 -1
- package/dist/api/profiles-api/{get-stripe-session-link.d.ts → subscription/get-stripe-session-link.d.ts} +1 -1
- package/dist/api/profiles-api/{paginate-bills.d.ts → subscription/paginate-bills.d.ts} +1 -1
- package/dist/api/profiles-api/update-customization.d.ts +7 -0
- package/dist/api/profiles-api/update-customization.js +9 -0
- package/dist/api/questrooms-api/bind-bookeo.d.ts +7 -0
- package/dist/api/questrooms-api/bind-bookeo.js +9 -0
- package/dist/api/questrooms-api/close-many.d.ts +8 -0
- package/dist/api/questrooms-api/close-many.js +9 -0
- package/dist/api/questrooms-api/index.d.ts +4 -0
- package/dist/api/questrooms-api/index.js +4 -0
- package/dist/api/slot-templates-api/update.d.ts +2 -2
- package/dist/api/transactions-api/index.d.ts +0 -8
- package/dist/api/transactions-api/index.js +0 -8
- package/dist/api/users-api/check-token.d.ts +2 -2
- package/dist/api/users-api/complite-setup.d.ts +2 -2
- package/dist/api/users-api/create.d.ts +2 -2
- package/dist/api/users-api/current-update-notifications.d.ts +1 -1
- package/dist/api/users-api/current-update-password.d.ts +1 -1
- package/dist/api/users-api/current-update.d.ts +1 -1
- package/dist/api/users-api/get-one.d.ts +1 -1
- package/dist/api/users-api/index.d.ts +18 -20
- package/dist/api/users-api/index.js +18 -20
- package/dist/api/users-api/login.d.ts +1 -1
- package/dist/api/users-api/me-ping.d.ts +6 -0
- package/dist/api/users-api/me-ping.js +8 -0
- package/dist/api/users-api/me.d.ts +1 -1
- package/dist/api/users-api/query.d.ts +1 -1
- package/dist/api/users-api/recover.d.ts +1 -1
- package/dist/api/users-api/remove.d.ts +1 -1
- package/dist/api/users-api/send-invite.d.ts +1 -1
- package/dist/api/users-api/sessions/create-session.d.ts +9 -0
- package/dist/api/users-api/{create-report.js → sessions/create-session.js} +4 -4
- package/dist/api/users-api/sessions/export-sessions.d.ts +6 -0
- package/dist/api/users-api/sessions/export-sessions.js +10 -0
- package/dist/api/users-api/sessions/get-by-user-and-date.d.ts +7 -0
- package/dist/api/users-api/sessions/get-by-user-and-date.js +9 -0
- package/dist/api/users-api/sessions/get-calendar-sessions.d.ts +7 -0
- package/dist/api/users-api/sessions/get-calendar-sessions.js +9 -0
- package/dist/api/users-api/sessions/get-session.d.ts +6 -0
- package/dist/api/users-api/sessions/get-session.js +8 -0
- package/dist/api/users-api/sessions/query-sessions.d.ts +8 -0
- package/dist/api/users-api/sessions/query-sessions.js +9 -0
- package/dist/api/users-api/sessions/remove-session.d.ts +6 -0
- package/dist/api/users-api/sessions/remove-session.js +8 -0
- package/dist/api/users-api/sessions/update-session.d.ts +10 -0
- package/dist/api/users-api/{update-report.js → sessions/update-session.js} +4 -4
- package/dist/api/users-api/set-cookie.d.ts +1 -1
- package/dist/api/users-api/update-password.d.ts +1 -1
- package/dist/api/users-api/update.d.ts +2 -2
- package/dist/api/widgets-api/get-instruction-token.d.ts +6 -0
- package/dist/api/widgets-api/get-instruction-token.js +8 -0
- package/dist/api/widgets-api/get-instruction.d.ts +7 -0
- package/dist/api/widgets-api/get-instruction.js +9 -0
- package/dist/api/widgets-api/index.d.ts +6 -4
- package/dist/api/widgets-api/index.js +6 -4
- package/dist/api/widgets-api/init.d.ts +7 -0
- package/dist/api/widgets-api/init.js +9 -0
- package/dist/api/widgets-openapi/create-bookeo-order.d.ts +7 -0
- package/dist/api/widgets-openapi/create-bookeo-order.js +9 -0
- package/dist/api/widgets-openapi/create-certificate.d.ts +4 -4
- package/dist/api/widgets-openapi/create-hold.d.ts +7 -0
- package/dist/api/widgets-openapi/create-hold.js +9 -0
- package/dist/api/widgets-openapi/create-order.d.ts +4 -4
- package/dist/api/widgets-openapi/create-review.d.ts +3 -3
- package/dist/api/widgets-openapi/find-certificate.d.ts +4 -4
- package/dist/api/widgets-openapi/find-certificatesale.d.ts +2 -2
- package/dist/api/widgets-openapi/find-order.d.ts +2 -2
- package/dist/api/widgets-openapi/get-agreagator-info.d.ts +2 -2
- package/dist/api/widgets-openapi/get-bookeo-price.d.ts +7 -0
- package/dist/api/widgets-openapi/get-bookeo-price.js +9 -0
- package/dist/api/widgets-openapi/get-certificates-for-agregator.d.ts +2 -2
- package/dist/api/widgets-openapi/get-certificates.d.ts +2 -2
- package/dist/api/widgets-openapi/get-questroom.d.ts +2 -2
- package/dist/api/widgets-openapi/get-questrooms.d.ts +2 -2
- package/dist/api/widgets-openapi/get-reviews.d.ts +3 -3
- package/dist/api/widgets-openapi/get-widget-info.d.ts +4 -4
- package/dist/api/widgets-openapi/index.d.ts +8 -0
- package/dist/api/widgets-openapi/index.js +8 -0
- package/dist/api/widgets-openapi/remove-hold.d.ts +7 -0
- package/dist/api/widgets-openapi/remove-hold.js +9 -0
- package/dist/api/widgets-openapi/widget-daily.d.ts +4 -4
- package/dist/api/widgets-openapi/widget-weekly.d.ts +4 -4
- package/dist/api/widgets-orders/cancel-order.d.ts +2 -2
- package/dist/api/widgets-orders/find-order.d.ts +2 -2
- package/dist/hooks/use-api-method/actions/creators/api.d.ts +1 -1
- package/dist/hooks/use-api-method/index.d.ts +3 -4
- package/dist/hooks/use-api-method/index.js +12 -16
- package/dist/hooks/use-api-method/reducers/api.d.ts +1 -1
- package/package.json +4 -4
- package/dist/api/agb-api/create-inside-agb.d.ts +0 -9
- package/dist/api/agb-api/get-all-inside.d.ts +0 -7
- package/dist/api/agb-api/get-all-inside.js +0 -8
- package/dist/api/agb-api/get-one-by-id.d.ts +0 -7
- package/dist/api/agb-api/get-one-for-profile.d.ts +0 -7
- package/dist/api/agb-api/get-one-for-profile.js +0 -8
- package/dist/api/agb-api/update-profile-agb.d.ts +0 -9
- package/dist/api/profiles-api/_get-by-slug.d.ts +0 -7
- package/dist/api/profiles-api/_get-by-slug.js +0 -8
- package/dist/api/profiles-api/get-all-daily-reports.d.ts +0 -9
- package/dist/api/profiles-api/get-all-daily-reports.js +0 -8
- package/dist/api/profiles-api/update-payment-settings.d.ts +0 -6
- package/dist/api/profiles-api/update-payment-settings.js +0 -9
- package/dist/api/transactions-api/remove-order-payment.d.ts +0 -7
- package/dist/api/transactions-api/remove-order-payment.js +0 -8
- package/dist/api/transactions-api/remove-order-refund.d.ts +0 -7
- package/dist/api/transactions-api/remove-order-refund.js +0 -8
- package/dist/api/users-api/create-report.d.ts +0 -9
- package/dist/api/users-api/query-daily-reports.d.ts +0 -6
- package/dist/api/users-api/query-daily-reports.js +0 -8
- package/dist/api/users-api/query-month-reports.d.ts +0 -6
- package/dist/api/users-api/query-month-reports.js +0 -8
- package/dist/api/users-api/query-reports.d.ts +0 -8
- package/dist/api/users-api/query-reports.js +0 -9
- package/dist/api/users-api/remove-report.d.ts +0 -7
- package/dist/api/users-api/remove-report.js +0 -8
- package/dist/api/users-api/reports-count.d.ts +0 -6
- package/dist/api/users-api/reports-count.js +0 -9
- package/dist/api/users-api/reports-export.d.ts +0 -8
- package/dist/api/users-api/reports-export.js +0 -10
- package/dist/api/users-api/start-timer.d.ts +0 -6
- package/dist/api/users-api/start-timer.js +0 -8
- package/dist/api/users-api/stop-timer.d.ts +0 -6
- package/dist/api/users-api/stop-timer.js +0 -8
- package/dist/api/users-api/update-report.d.ts +0 -10
- package/dist/api/widgets-api/get-widget-customization.d.ts +0 -7
- package/dist/api/widgets-api/get-widget-customization.js +0 -8
- package/dist/api/widgets-api/update-widget-customization.d.ts +0 -7
- package/dist/api/widgets-api/update-widget-customization.js +0 -9
- package/dist/utils/convert-to-options.d.ts +0 -13
- package/dist/utils/convert-to-options.js +0 -17
- package/dist/utils/enum-to-options.d.ts +0 -5
- package/dist/utils/enum-to-options.js +0 -10
- package/dist/utils/get-documents-links.d.ts +0 -8
- package/dist/utils/get-documents-links.js +0 -14
- package/dist/utils/get-handled-error-message.d.ts +0 -1
- package/dist/utils/get-handled-error-message.js +0 -7
- package/dist/utils/get-many.d.ts +0 -1
- package/dist/utils/get-many.js +0 -13
- package/dist/utils/get-one.d.ts +0 -1
- package/dist/utils/get-one.js +0 -13
- package/dist/utils/get-service-error.d.ts +0 -18
- package/dist/utils/get-service-error.js +0 -67
- package/dist/utils/index.d.ts +0 -5
- package/dist/utils/index.js +0 -21
- package/dist/utils/is-axios-error.d.ts +0 -6
- package/dist/utils/is-axios-error.js +0 -11
- package/dist/utils/is-network-error.d.ts +0 -5
- package/dist/utils/is-network-error.js +0 -18
- package/dist/utils/redirect.d.ts +0 -1
- package/dist/utils/redirect.js +0 -7
- package/dist/utils/serialize-record.d.ts +0 -2
- package/dist/utils/serialize-record.js +0 -10
- package/dist/utils/serialize-slot.d.ts +0 -9
- package/dist/utils/serialize-slot.js +0 -48
- package/dist/utils/tz-date.d.ts +0 -19
- package/dist/utils/tz-date.js +0 -37
- package/dist/utils/validate-by-dto.d.ts +0 -1
- package/dist/utils/validate-by-dto.js +0 -18
- /package/dist/api/{transactions-api → order-transactions-api}/create-order-payment.js +0 -0
- /package/dist/api/{transactions-api → order-transactions-api}/create-order-refund.js +0 -0
- /package/dist/api/profiles-api/{get-payment-settings.js → subscription/get-payment-settings.js} +0 -0
- /package/dist/api/profiles-api/{get-profile-invoices.js → subscription/get-profile-invoices.js} +0 -0
- /package/dist/api/profiles-api/{get-stripe-session-link.js → subscription/get-stripe-session-link.js} +0 -0
- /package/dist/api/profiles-api/{paginate-bills.js → subscription/paginate-bills.js} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@escapenavigator/services",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.83",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
"scripts": {
|
|
13
13
|
"build": "rm -rf dist && tsc --project tsconfig.json"
|
|
14
14
|
},
|
|
15
|
-
"gitHead": "
|
|
15
|
+
"gitHead": "a487b83fa9969e33854d06b3af8e5034a4bacc90",
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@escapenavigator/types": "^1.4.
|
|
18
|
-
"@
|
|
17
|
+
"@escapenavigator/types": "^1.4.81",
|
|
18
|
+
"@escapenavigator/utils": "^1.4.83",
|
|
19
19
|
"axios": "^0.21.4",
|
|
20
20
|
"class-transformer": "^0.5.1",
|
|
21
21
|
"class-validator": "^0.13.1",
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { AgbResponseObject } from '@escapenavigator/types/dist/agb/agb.ro';
|
|
2
|
-
import { CreateInsideAgbDto } from '@escapenavigator/types/dist/agb/create-inside-agb.dto';
|
|
3
|
-
import { ApiMethodDeclaration } from '..';
|
|
4
|
-
declare type ParamsData = {
|
|
5
|
-
data: CreateInsideAgbDto;
|
|
6
|
-
};
|
|
7
|
-
declare type ResponseData = AgbResponseObject;
|
|
8
|
-
export declare const createInsideAgb: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
9
|
-
export {};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { AgbResponseObject } from '@escapenavigator/types/dist/agb/agb.ro';
|
|
2
|
-
import { ApiMethodDeclaration } from '..';
|
|
3
|
-
/** ID профиля */
|
|
4
|
-
declare type ParamsData = undefined;
|
|
5
|
-
declare type ResponseData = AgbResponseObject[];
|
|
6
|
-
export declare const getAllInside: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
7
|
-
export {};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { AgbResponseObject } from '@escapenavigator/types/dist/agb/agb.ro';
|
|
2
|
-
import { ApiMethodDeclaration } from '..';
|
|
3
|
-
/** ID профиля */
|
|
4
|
-
declare type ParamsData = number;
|
|
5
|
-
declare type ResponseData = AgbResponseObject;
|
|
6
|
-
export declare const getOneByIde: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
7
|
-
export {};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { AgbResponseObject } from '@escapenavigator/types/dist/agb/agb.ro';
|
|
2
|
-
import { ApiMethodDeclaration } from '..';
|
|
3
|
-
/** ID профиля */
|
|
4
|
-
declare type ParamsData = undefined;
|
|
5
|
-
declare type ResponseData = AgbResponseObject;
|
|
6
|
-
export declare const getOneForProfile: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
7
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { AgbResponseObject } from '@escapenavigator/types/dist/agb/agb.ro';
|
|
2
|
-
import { UpdateAgbDto } from '@escapenavigator/types/dist/agb/update-agb.dto';
|
|
3
|
-
import { ApiMethodDeclaration } from '..';
|
|
4
|
-
declare type ParamsData = {
|
|
5
|
-
data: UpdateAgbDto;
|
|
6
|
-
};
|
|
7
|
-
declare type ResponseData = AgbResponseObject;
|
|
8
|
-
export declare const updateProfileAgb: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
9
|
-
export {};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { AgregatorProfileRO } from '@escapenavigator/types/dist/profile/agregator-profile.ro';
|
|
2
|
-
import { ApiMethodDeclaration } from '..';
|
|
3
|
-
/** slug */
|
|
4
|
-
declare type ParamsData = string;
|
|
5
|
-
declare type ResponseData = AgregatorProfileRO;
|
|
6
|
-
export declare const getBySlug: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
7
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ApiMethodDeclaration } from '..';
|
|
2
|
-
declare type ParamsData = string;
|
|
3
|
-
declare type ResponseData = Array<{
|
|
4
|
-
month: string;
|
|
5
|
-
questroomsCount: number;
|
|
6
|
-
amount: number;
|
|
7
|
-
}>;
|
|
8
|
-
export declare const getAllDailyReports: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
9
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getAllDailyReports = void 0;
|
|
4
|
-
var getAllDailyReports = function (month) { return ({
|
|
5
|
-
url: "/subscription/daily-reports/".concat(month),
|
|
6
|
-
method: 'GET',
|
|
7
|
-
}); };
|
|
8
|
-
exports.getAllDailyReports = getAllDailyReports;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { UpdatePaymentSettingsDto } from '@escapenavigator/types/dist/profile/update-payment-settings.dto';
|
|
2
|
-
import { ApiMethodDeclaration } from '..';
|
|
3
|
-
declare type ParamsData = UpdatePaymentSettingsDto;
|
|
4
|
-
declare type ResponseData = string;
|
|
5
|
-
export declare const updatePaymentSettings: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
6
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.updatePaymentSettings = void 0;
|
|
4
|
-
var updatePaymentSettings = function (data) { return ({
|
|
5
|
-
url: '/subscription/payment-settings',
|
|
6
|
-
method: 'PATCH',
|
|
7
|
-
data: data,
|
|
8
|
-
}); };
|
|
9
|
-
exports.updatePaymentSettings = updatePaymentSettings;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { OrderRO } from '@escapenavigator/types/dist/order/order.ro';
|
|
2
|
-
import { ApiMethodDeclaration } from '..';
|
|
3
|
-
/** ID транзакции */
|
|
4
|
-
declare type ParamsData = number;
|
|
5
|
-
declare type ResponseData = OrderRO;
|
|
6
|
-
export declare const removeOrderPayment: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
7
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.removeOrderPayment = void 0;
|
|
4
|
-
var removeOrderPayment = function (id) { return ({
|
|
5
|
-
url: "/order-transactions/".concat(id),
|
|
6
|
-
method: 'DELETE',
|
|
7
|
-
}); };
|
|
8
|
-
exports.removeOrderPayment = removeOrderPayment;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { OrderRO } from '@escapenavigator/types/dist/order/order.ro';
|
|
2
|
-
import { ApiMethodDeclaration } from '..';
|
|
3
|
-
/** ID транзакции */
|
|
4
|
-
declare type ParamsData = number;
|
|
5
|
-
declare type ResponseData = OrderRO;
|
|
6
|
-
export declare const removeOrderRefund: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
7
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.removeOrderRefund = void 0;
|
|
4
|
-
var removeOrderRefund = function (id) { return ({
|
|
5
|
-
url: "/transactions/order-refund/".concat(id),
|
|
6
|
-
method: 'DELETE',
|
|
7
|
-
}); };
|
|
8
|
-
exports.removeOrderRefund = removeOrderRefund;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { SuccessRO } from '@escapenavigator/types/dist/shared/success.ro';
|
|
2
|
-
import { CreateUserReportDto } from '@escapenavigator/types/dist/user/create-user-report.dto';
|
|
3
|
-
import { ApiMethodDeclaration } from '..';
|
|
4
|
-
declare type ParamsData = {
|
|
5
|
-
data: CreateUserReportDto;
|
|
6
|
-
};
|
|
7
|
-
declare type ResponseData = SuccessRO;
|
|
8
|
-
export declare const createReport: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
9
|
-
export {};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { UserReportRO } from '@escapenavigator/types/dist/user/user-report.ro';
|
|
2
|
-
import { ApiMethodDeclaration } from '..';
|
|
3
|
-
declare type ParamsData = string;
|
|
4
|
-
declare type ResponseData = UserReportRO[];
|
|
5
|
-
export declare const queryDailyReports: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
6
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.queryDailyReports = void 0;
|
|
4
|
-
var queryDailyReports = function (params) { return ({
|
|
5
|
-
url: "/user-reports/day/".concat(params),
|
|
6
|
-
method: 'GET',
|
|
7
|
-
}); };
|
|
8
|
-
exports.queryDailyReports = queryDailyReports;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { UserMonthlyReportRO } from '@escapenavigator/types/dist/user/user-monthly-report.ro';
|
|
2
|
-
import { ApiMethodDeclaration } from '..';
|
|
3
|
-
declare type ParamsData = string;
|
|
4
|
-
declare type ResponseData = UserMonthlyReportRO[];
|
|
5
|
-
export declare const queryMonthReports: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
6
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.queryMonthReports = void 0;
|
|
4
|
-
var queryMonthReports = function (params) { return ({
|
|
5
|
-
url: "/user-reports/month/".concat(params),
|
|
6
|
-
method: 'GET',
|
|
7
|
-
}); };
|
|
8
|
-
exports.queryMonthReports = queryMonthReports;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { QueryDto } from '@escapenavigator/types/dist/shared/query.dto';
|
|
2
|
-
import { QueryRO } from '@escapenavigator/types/dist/shared/query.ro';
|
|
3
|
-
import { UserReportRO } from '@escapenavigator/types/dist/user/user-report.ro';
|
|
4
|
-
import { ApiMethodDeclaration } from '..';
|
|
5
|
-
declare type ParamsData = QueryDto;
|
|
6
|
-
declare type ResponseData = QueryRO<UserReportRO>;
|
|
7
|
-
export declare const queryReports: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
8
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.queryReports = void 0;
|
|
4
|
-
var queryReports = function (params) { return ({
|
|
5
|
-
url: '/user-reports',
|
|
6
|
-
method: 'GET',
|
|
7
|
-
params: params,
|
|
8
|
-
}); };
|
|
9
|
-
exports.queryReports = queryReports;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { UserReportRO } from '@escapenavigator/types/dist/user/user-report.ro';
|
|
2
|
-
import { ApiMethodDeclaration } from '..';
|
|
3
|
-
/** ID репорта */
|
|
4
|
-
declare type ParamsData = number;
|
|
5
|
-
declare type ResponseData = UserReportRO;
|
|
6
|
-
export declare const removeReport: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
7
|
-
export {};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { QueryUserReportDto } from '@escapenavigator/types/dist/user/query-user-report.dto';
|
|
2
|
-
import { ApiMethodDeclaration } from '..';
|
|
3
|
-
declare type ParamsData = QueryUserReportDto;
|
|
4
|
-
declare type ResponseData = number;
|
|
5
|
-
export declare const reportsCount: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
6
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.reportsCount = void 0;
|
|
4
|
-
var reportsCount = function (params) { return ({
|
|
5
|
-
url: '/user-reports/count',
|
|
6
|
-
method: 'GET',
|
|
7
|
-
params: params,
|
|
8
|
-
}); };
|
|
9
|
-
exports.reportsCount = reportsCount;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { QueryRO } from '@escapenavigator/types/dist/shared/query.ro';
|
|
2
|
-
import { QueryUserReportDto } from '@escapenavigator/types/dist/user/query-user-report.dto';
|
|
3
|
-
import { UserReportRO } from '@escapenavigator/types/dist/user/user-report.ro';
|
|
4
|
-
import { ApiMethodDeclaration } from '..';
|
|
5
|
-
declare type ParamsData = QueryUserReportDto;
|
|
6
|
-
declare type ResponseData = QueryRO<UserReportRO>;
|
|
7
|
-
export declare const reportsExport: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
8
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.reportsExport = void 0;
|
|
4
|
-
var reportsExport = function (params) { return ({
|
|
5
|
-
url: '/user-reports/export',
|
|
6
|
-
method: 'GET',
|
|
7
|
-
responseType: 'blob',
|
|
8
|
-
params: params,
|
|
9
|
-
}); };
|
|
10
|
-
exports.reportsExport = reportsExport;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { CurrentUserRO } from '@escapenavigator/types/dist/user/current-user.ro';
|
|
2
|
-
import { ApiMethodDeclaration } from '..';
|
|
3
|
-
declare type ParamsData = undefined;
|
|
4
|
-
declare type ResponseData = CurrentUserRO;
|
|
5
|
-
export declare const startTimer: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
6
|
-
export {};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { CurrentUserRO } from '@escapenavigator/types/dist/user/current-user.ro';
|
|
2
|
-
import { ApiMethodDeclaration } from '..';
|
|
3
|
-
declare type ParamsData = undefined;
|
|
4
|
-
declare type ResponseData = CurrentUserRO;
|
|
5
|
-
export declare const stopTimer: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
6
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { UpdateUserReportDto } from '@escapenavigator/types/dist/user/update-user-report.dto';
|
|
2
|
-
import { UserReportRO } from '@escapenavigator/types/dist/user/user-report.ro';
|
|
3
|
-
import { ApiMethodDeclaration } from '..';
|
|
4
|
-
declare type ParamsData = {
|
|
5
|
-
id: number;
|
|
6
|
-
data: UpdateUserReportDto;
|
|
7
|
-
};
|
|
8
|
-
declare type ResponseData = UserReportRO;
|
|
9
|
-
export declare const updateReport: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
10
|
-
export {};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { WidgetCustomizationRO } from '@escapenavigator/types/dist/widget/widget-customization.ro';
|
|
2
|
-
import { ApiMethodDeclaration } from '..';
|
|
3
|
-
/** ID профиля */
|
|
4
|
-
declare type ParamsData = undefined;
|
|
5
|
-
declare type ResponseData = WidgetCustomizationRO;
|
|
6
|
-
export declare const getWidgetCustomization: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
7
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getWidgetCustomization = void 0;
|
|
4
|
-
var getWidgetCustomization = function () { return ({
|
|
5
|
-
url: '/widget/customization',
|
|
6
|
-
method: 'GET',
|
|
7
|
-
}); };
|
|
8
|
-
exports.getWidgetCustomization = getWidgetCustomization;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { UpdateWidgetCustomizationDto } from '@escapenavigator/types/dist/widget/update-widget-customization.dto';
|
|
2
|
-
import { WidgetRO } from '@escapenavigator/types/dist/widget/widget.ro';
|
|
3
|
-
import { ApiMethodDeclaration } from '..';
|
|
4
|
-
declare type ParamsData = UpdateWidgetCustomizationDto;
|
|
5
|
-
declare type ResponseData = WidgetRO;
|
|
6
|
-
export declare const updateWidgetCustomization: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
7
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.updateWidgetCustomization = void 0;
|
|
4
|
-
var updateWidgetCustomization = function (data) { return ({
|
|
5
|
-
url: '/widget/customization',
|
|
6
|
-
method: 'PATCH',
|
|
7
|
-
data: data,
|
|
8
|
-
}); };
|
|
9
|
-
exports.updateWidgetCustomization = updateWidgetCustomization;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export declare type OptionsType<T> = Array<{
|
|
2
|
-
key: T;
|
|
3
|
-
content: any;
|
|
4
|
-
}>;
|
|
5
|
-
declare type ConvertToOptions = <T extends {
|
|
6
|
-
id: string | number;
|
|
7
|
-
[field: string]: any;
|
|
8
|
-
}>(data: T[]) => Array<{
|
|
9
|
-
key: T['id'];
|
|
10
|
-
content: any;
|
|
11
|
-
}>;
|
|
12
|
-
export declare const convertToOptions: ConvertToOptions;
|
|
13
|
-
export {};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.convertToOptions = void 0;
|
|
4
|
-
var getContentByItemField = function (item) {
|
|
5
|
-
if (item.surname)
|
|
6
|
-
return "".concat(item.name, " ").concat(item.surname);
|
|
7
|
-
if (item.name)
|
|
8
|
-
return item.name;
|
|
9
|
-
return item.title;
|
|
10
|
-
};
|
|
11
|
-
var convertToOptions = function (data, field) {
|
|
12
|
-
return data.map(function (item) { return ({
|
|
13
|
-
key: item.id,
|
|
14
|
-
content: field ? item[field] : getContentByItemField(item),
|
|
15
|
-
}); });
|
|
16
|
-
};
|
|
17
|
-
exports.convertToOptions = convertToOptions;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.enumToOptions = void 0;
|
|
4
|
-
var enumToOptions = function (options, t, modelName) {
|
|
5
|
-
return Object.values(options).map(function (option) { return ({
|
|
6
|
-
key: option,
|
|
7
|
-
content: t ? t("options.".concat(modelName, ".").concat(option)) : option.toString().toUpperCase(),
|
|
8
|
-
}); });
|
|
9
|
-
};
|
|
10
|
-
exports.enumToOptions = enumToOptions;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { CountriesEnum } from '@escapenavigator/types/dist/shared/enum/countries.enum';
|
|
2
|
-
export declare function getLinks(lang: CountriesEnum, domain: string): {
|
|
3
|
-
COOKIES: string;
|
|
4
|
-
AGREEMENT: string;
|
|
5
|
-
IMPRINT: string;
|
|
6
|
-
PRIVACY_POLICY: string;
|
|
7
|
-
REGISTRATION_NEW_PROFILE: string;
|
|
8
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getLinks = void 0;
|
|
4
|
-
var agb_type_enum_1 = require("@escapenavigator/types/dist/agb/agb-type.enum");
|
|
5
|
-
function getLinks(lang, domain) {
|
|
6
|
-
return {
|
|
7
|
-
COOKIES: "".concat(domain, "?type=").concat(agb_type_enum_1.AgbTypeEnum.COOKIES, "&country=").concat(lang),
|
|
8
|
-
AGREEMENT: "".concat(domain, "?type=").concat(agb_type_enum_1.AgbTypeEnum.AGREEMENT, "&country=").concat(lang),
|
|
9
|
-
IMPRINT: "".concat(domain, "?type=").concat(agb_type_enum_1.AgbTypeEnum.IMPRINT, "&country=").concat(lang),
|
|
10
|
-
PRIVACY_POLICY: "".concat(domain, "?type=").concat(agb_type_enum_1.AgbTypeEnum.PRIVACY_POLICY, "&country=").concat(lang),
|
|
11
|
-
REGISTRATION_NEW_PROFILE: "".concat(domain, "?type=").concat(agb_type_enum_1.AgbTypeEnum.REGISTRATION_NEW_PROFILE, "&country=").concat(lang),
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
exports.getLinks = getLinks;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const getHandledErrorMessage: (error: any) => any;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getHandledErrorMessage = void 0;
|
|
4
|
-
var getHandledErrorMessage = function (error) {
|
|
5
|
-
return (error.response ? error.response.data.message : error.message);
|
|
6
|
-
};
|
|
7
|
-
exports.getHandledErrorMessage = getHandledErrorMessage;
|
package/dist/utils/get-many.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function getMany(ids: any, records: any, field?: string): any[];
|
package/dist/utils/get-many.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getMany = void 0;
|
|
4
|
-
function getMany(ids, records, field) {
|
|
5
|
-
if (field === void 0) { field = 'title'; }
|
|
6
|
-
if (!Array.isArray(ids) || !Array.isArray(records))
|
|
7
|
-
return null;
|
|
8
|
-
var filtred = records.filter(function (r) { return ids.includes(r.id); });
|
|
9
|
-
if (!filtred.length)
|
|
10
|
-
return null;
|
|
11
|
-
return filtred.map(function (r) { return r[field] || r.title; });
|
|
12
|
-
}
|
|
13
|
-
exports.getMany = getMany;
|
package/dist/utils/get-one.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function getOne(id: any, records: any, field?: string): any;
|
package/dist/utils/get-one.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getOne = void 0;
|
|
4
|
-
function getOne(id, records, field) {
|
|
5
|
-
if (field === void 0) { field = 'title'; }
|
|
6
|
-
if (!id || !Array.isArray(records))
|
|
7
|
-
return null;
|
|
8
|
-
var record = records.filter(function (r) { return r.id === id; })[0];
|
|
9
|
-
if (!record)
|
|
10
|
-
return null;
|
|
11
|
-
return record[field] || record.title;
|
|
12
|
-
}
|
|
13
|
-
exports.getOne = getOne;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { AxiosError } from 'axios';
|
|
2
|
-
import { ErrorData } from '../api';
|
|
3
|
-
export declare enum ErrorType {
|
|
4
|
-
NETWORK = "NETWORK",
|
|
5
|
-
BUSINESS = "BUSINESS",
|
|
6
|
-
INTERNAL = "INTERNAL"
|
|
7
|
-
}
|
|
8
|
-
export declare type ServiceError = {
|
|
9
|
-
code: string;
|
|
10
|
-
message: string;
|
|
11
|
-
errorType: ErrorType;
|
|
12
|
-
originalError: unknown | AxiosError<ErrorData>;
|
|
13
|
-
};
|
|
14
|
-
/**
|
|
15
|
-
* Возвращает обработанную ошибку с дополнительной информацией.
|
|
16
|
-
* @param error Ошибка от сервиса
|
|
17
|
-
*/
|
|
18
|
-
export declare function getServiceError(error: unknown): ServiceError;
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var _a, _b;
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.getServiceError = exports.ErrorType = void 0;
|
|
5
|
-
var is_axios_error_1 = require("./is-axios-error");
|
|
6
|
-
var is_network_error_1 = require("./is-network-error");
|
|
7
|
-
var ErrorType;
|
|
8
|
-
(function (ErrorType) {
|
|
9
|
-
ErrorType["NETWORK"] = "NETWORK";
|
|
10
|
-
ErrorType["BUSINESS"] = "BUSINESS";
|
|
11
|
-
ErrorType["INTERNAL"] = "INTERNAL";
|
|
12
|
-
})(ErrorType = exports.ErrorType || (exports.ErrorType = {}));
|
|
13
|
-
var ERROR_CODES = (_a = {},
|
|
14
|
-
_a[ErrorType.INTERNAL] = 'INTERNAL_ERROR',
|
|
15
|
-
_a[ErrorType.NETWORK] = 'NETWORK_ERROR',
|
|
16
|
-
_a);
|
|
17
|
-
var ERROR_MESSAGES = (_b = {},
|
|
18
|
-
_b[ErrorType.INTERNAL] = 'Пожалуйста, попробуйте ещё раз позже.',
|
|
19
|
-
_b[ErrorType.NETWORK] = 'Проверьте подключение и попробуйте ещё раз позже.',
|
|
20
|
-
_b);
|
|
21
|
-
var INTERNAL_SERVICE_ERROR_CODES = [
|
|
22
|
-
'BAD_REQUEST',
|
|
23
|
-
'INTERNAL_SERVER_ERROR',
|
|
24
|
-
'INTERNAL_ERROR',
|
|
25
|
-
'WS_ERROR',
|
|
26
|
-
'DEFAULT',
|
|
27
|
-
];
|
|
28
|
-
/**
|
|
29
|
-
* Возвращает обработанную ошибку с дополнительной информацией.
|
|
30
|
-
* @param error Ошибка от сервиса
|
|
31
|
-
*/
|
|
32
|
-
function getServiceError(error) {
|
|
33
|
-
if ((0, is_network_error_1.isNetworkError)(error)) {
|
|
34
|
-
return {
|
|
35
|
-
code: ERROR_CODES[ErrorType.NETWORK],
|
|
36
|
-
message: ERROR_MESSAGES[ErrorType.NETWORK],
|
|
37
|
-
errorType: ErrorType.NETWORK,
|
|
38
|
-
originalError: error,
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
if ((0, is_axios_error_1.isAxiosError)(error)) {
|
|
42
|
-
var _a = error.response.data, errorCode = _a.errorCode, originalErrorCode = _a.originalErrorCode, message = _a.message;
|
|
43
|
-
var code = errorCode;
|
|
44
|
-
var errorType = ErrorType.BUSINESS;
|
|
45
|
-
if (INTERNAL_SERVICE_ERROR_CODES.includes(code)) {
|
|
46
|
-
if (typeof originalErrorCode === 'undefined') {
|
|
47
|
-
errorType = ErrorType.INTERNAL;
|
|
48
|
-
}
|
|
49
|
-
else {
|
|
50
|
-
code = originalErrorCode;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
return {
|
|
54
|
-
code: code,
|
|
55
|
-
message: message,
|
|
56
|
-
errorType: errorType,
|
|
57
|
-
originalError: error,
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
return {
|
|
61
|
-
code: ERROR_CODES[ErrorType.INTERNAL],
|
|
62
|
-
message: ERROR_MESSAGES[ErrorType.INTERNAL],
|
|
63
|
-
errorType: ErrorType.INTERNAL,
|
|
64
|
-
originalError: error,
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
exports.getServiceError = getServiceError;
|