@escapenavigator/services 1.4.82 → 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/profiles-api/bookeo/get-bookeo-info.d.ts +2 -1
- 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/index.d.ts +6 -0
- package/dist/api/profiles-api/index.js +6 -0
- package/dist/api/profiles-api/initial-customization.d.ts +7 -0
- package/dist/api/profiles-api/initial-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/index.d.ts +2 -0
- package/dist/api/questrooms-api/index.js +2 -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/hooks/use-api-method/index.d.ts +2 -3
- package/dist/hooks/use-api-method/index.js +11 -15
- package/package.json +4 -4
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { BookeoInfoRO } from '@escapenavigator/types/dist/bookeo/bookeo-info.ro';
|
|
1
2
|
import { ApiMethodDeclaration } from '../..';
|
|
2
3
|
declare type ParamsData = undefined;
|
|
3
|
-
declare type ResponseData =
|
|
4
|
+
declare type ResponseData = BookeoInfoRO;
|
|
4
5
|
export declare const getBookeoInfo: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
5
6
|
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { BookeoOrderRO } from '@escapenavigator/types/dist/bookeo/bookeo-order.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
|
+
declare type ParamsData = QueryDto;
|
|
6
|
+
declare type ResponseData = QueryRO<BookeoOrderRO>;
|
|
7
|
+
export declare const getBookeoOrders: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getBookeoOrders = void 0;
|
|
4
|
+
var getBookeoOrders = function (params) { return ({
|
|
5
|
+
url: '/bookeo-orders',
|
|
6
|
+
method: 'GET',
|
|
7
|
+
params: params,
|
|
8
|
+
}); };
|
|
9
|
+
exports.getBookeoOrders = getBookeoOrders;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { SuccessRO } from '@escapenavigator/types/dist/shared/success.ro';
|
|
2
|
+
import { ApiMethodDeclaration } from '../..';
|
|
3
|
+
declare type ParamsData = undefined;
|
|
4
|
+
declare type ResponseData = SuccessRO;
|
|
5
|
+
export declare const resyncBookeo: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
6
|
+
export {};
|
|
@@ -3,6 +3,8 @@ import { getProfileAgbForOrderService } from './agb/get-profile-agb-for-order-se
|
|
|
3
3
|
import { updateProfileAgb } from './agb/update-profile-agb';
|
|
4
4
|
import { getBookeoInfo } from './bookeo/get-bookeo-info';
|
|
5
5
|
import { getBookeoIntegrationLink } from './bookeo/get-bookeo-integration-link';
|
|
6
|
+
import { getBookeoOrders } from './bookeo/get-bookeo-orders';
|
|
7
|
+
import { resyncBookeo } from './bookeo/resync-bookeo';
|
|
6
8
|
import { createSubscriptionSession } from './subscription/create-subscription-session';
|
|
7
9
|
import { getPaymentSettings } from './subscription/get-payment-settings';
|
|
8
10
|
import { getPrices } from './subscription/get-prices';
|
|
@@ -15,14 +17,17 @@ import { finalizeCurrent } from './finalize-current';
|
|
|
15
17
|
import { getBySlugForVerify } from './get-by-slug-for-verify';
|
|
16
18
|
import { getCustomization } from './get-customization';
|
|
17
19
|
import { getOne } from './get-one';
|
|
20
|
+
import { initialCustomization } from './initial-customization';
|
|
18
21
|
import { query } from './query';
|
|
19
22
|
import { remove } from './remove';
|
|
20
23
|
import { update } from './update';
|
|
21
24
|
import { updateCurrent } from './update-current';
|
|
22
25
|
import { updateCustomization } from './update-customization';
|
|
23
26
|
declare type ApiDeclaration = {
|
|
27
|
+
resyncBookeo: typeof resyncBookeo;
|
|
24
28
|
getBookeoInfo: typeof getBookeoInfo;
|
|
25
29
|
getBookeoIntegrationLink: typeof getBookeoIntegrationLink;
|
|
30
|
+
getBookeoOrders: typeof getBookeoOrders;
|
|
26
31
|
getProfileAgb: typeof getProfileAgb;
|
|
27
32
|
getProfileAgbForOrderService: typeof getProfileAgbForOrderService;
|
|
28
33
|
updateProfileAgb: typeof updateProfileAgb;
|
|
@@ -32,6 +37,7 @@ declare type ApiDeclaration = {
|
|
|
32
37
|
getPaymentSettings: typeof getPaymentSettings;
|
|
33
38
|
getStripeSessionLink: typeof getStripeSessionLink;
|
|
34
39
|
getProfileInvoices: typeof getProfileInvoices;
|
|
40
|
+
initialCustomization: typeof initialCustomization;
|
|
35
41
|
finalizeCurrent: typeof finalizeCurrent;
|
|
36
42
|
updateCurrent: typeof updateCurrent;
|
|
37
43
|
create: typeof create;
|
|
@@ -6,6 +6,8 @@ var get_profile_agb_for_order_service_1 = require("./agb/get-profile-agb-for-ord
|
|
|
6
6
|
var update_profile_agb_1 = require("./agb/update-profile-agb");
|
|
7
7
|
var get_bookeo_info_1 = require("./bookeo/get-bookeo-info");
|
|
8
8
|
var get_bookeo_integration_link_1 = require("./bookeo/get-bookeo-integration-link");
|
|
9
|
+
var get_bookeo_orders_1 = require("./bookeo/get-bookeo-orders");
|
|
10
|
+
var resync_bookeo_1 = require("./bookeo/resync-bookeo");
|
|
9
11
|
var create_subscription_session_1 = require("./subscription/create-subscription-session");
|
|
10
12
|
var get_payment_settings_1 = require("./subscription/get-payment-settings");
|
|
11
13
|
var get_prices_1 = require("./subscription/get-prices");
|
|
@@ -18,6 +20,7 @@ var finalize_current_1 = require("./finalize-current");
|
|
|
18
20
|
var get_by_slug_for_verify_1 = require("./get-by-slug-for-verify");
|
|
19
21
|
var get_customization_1 = require("./get-customization");
|
|
20
22
|
var get_one_1 = require("./get-one");
|
|
23
|
+
var initial_customization_1 = require("./initial-customization");
|
|
21
24
|
var query_1 = require("./query");
|
|
22
25
|
var remove_1 = require("./remove");
|
|
23
26
|
var update_1 = require("./update");
|
|
@@ -35,8 +38,11 @@ exports.profilesApiDeclaration = {
|
|
|
35
38
|
getProfileInvoices: get_profile_invoices_1.getProfileInvoices,
|
|
36
39
|
getStripeSessionLink: get_stripe_session_link_1.getStripeSessionLink,
|
|
37
40
|
finalizeCurrent: finalize_current_1.finalizeCurrent,
|
|
41
|
+
resyncBookeo: resync_bookeo_1.resyncBookeo,
|
|
42
|
+
getBookeoOrders: get_bookeo_orders_1.getBookeoOrders,
|
|
38
43
|
getBookeoInfo: get_bookeo_info_1.getBookeoInfo,
|
|
39
44
|
getBookeoIntegrationLink: get_bookeo_integration_link_1.getBookeoIntegrationLink,
|
|
45
|
+
initialCustomization: initial_customization_1.initialCustomization,
|
|
40
46
|
create: create_1.create,
|
|
41
47
|
remove: remove_1.remove,
|
|
42
48
|
update: update_1.update,
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { InitialCustomizationDto } from '@escapenavigator/types/dist/profile/initial-cusomization.dto';
|
|
2
|
+
import { SuccessRO } from '@escapenavigator/types/dist/shared/success.ro';
|
|
3
|
+
import { ApiMethodDeclaration } from '..';
|
|
4
|
+
declare type ParamsData = InitialCustomizationDto;
|
|
5
|
+
declare type ResponseData = SuccessRO;
|
|
6
|
+
export declare const initialCustomization: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.initialCustomization = void 0;
|
|
4
|
+
var initialCustomization = function (data) { return ({
|
|
5
|
+
url: '/customization/initial',
|
|
6
|
+
method: 'POST',
|
|
7
|
+
data: data,
|
|
8
|
+
}); };
|
|
9
|
+
exports.initialCustomization = initialCustomization;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BindBookeoDto } from '@escapenavigator/types/dist/questroom/bind-bookeo.dto';
|
|
2
|
+
import { QuestroomRO } from '@escapenavigator/types/dist/questroom/questroom.ro';
|
|
3
|
+
import { ApiMethodDeclaration } from '..';
|
|
4
|
+
declare type ParamsData = BindBookeoDto;
|
|
5
|
+
declare type ResponseData = QuestroomRO;
|
|
6
|
+
export declare const bindBookeo: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.bindBookeo = void 0;
|
|
4
|
+
var bindBookeo = function (data) { return ({
|
|
5
|
+
url: '/questrooms/bind-bookeo',
|
|
6
|
+
method: 'PATCH',
|
|
7
|
+
data: data,
|
|
8
|
+
}); };
|
|
9
|
+
exports.bindBookeo = bindBookeo;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { bindBookeo } from './bind-bookeo';
|
|
1
2
|
import { closeMany } from './close-many';
|
|
2
3
|
import { create } from './create';
|
|
3
4
|
import { getByCoordinates } from './get-by-coordinates';
|
|
@@ -11,6 +12,7 @@ import { recover } from './recover';
|
|
|
11
12
|
import { remove } from './remove';
|
|
12
13
|
import { update } from './update';
|
|
13
14
|
declare type ApiDeclaration = {
|
|
15
|
+
bindBookeo: typeof bindBookeo;
|
|
14
16
|
closeMany: typeof closeMany;
|
|
15
17
|
getByTitle: typeof getByTitle;
|
|
16
18
|
create: typeof create;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.questroomsApiDeclaration = void 0;
|
|
4
|
+
var bind_bookeo_1 = require("./bind-bookeo");
|
|
4
5
|
var close_many_1 = require("./close-many");
|
|
5
6
|
var create_1 = require("./create");
|
|
6
7
|
var get_by_coordinates_1 = require("./get-by-coordinates");
|
|
@@ -14,6 +15,7 @@ var recover_1 = require("./recover");
|
|
|
14
15
|
var remove_1 = require("./remove");
|
|
15
16
|
var update_1 = require("./update");
|
|
16
17
|
exports.questroomsApiDeclaration = {
|
|
18
|
+
bindBookeo: bind_bookeo_1.bindBookeo,
|
|
17
19
|
closeMany: close_many_1.closeMany,
|
|
18
20
|
getByTitle: get_by_title_1.getByTitle,
|
|
19
21
|
create: create_1.create,
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { OpenapiBookeoOrderRO } from '@escapenavigator/types/dist/widget-openapi/openapi-bookeo-order.ro';
|
|
2
|
+
import { OpenapiCreateBookeoOrderDto } from '@escapenavigator/types/dist/widget-openapi/openapi-create-bookeo-order.dto';
|
|
3
|
+
import { ApiMethodDeclaration } from '..';
|
|
4
|
+
declare type ParamsData = OpenapiCreateBookeoOrderDto;
|
|
5
|
+
declare type ResponseData = OpenapiBookeoOrderRO;
|
|
6
|
+
export declare const createBookeoOrder: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createBookeoOrder = void 0;
|
|
4
|
+
var createBookeoOrder = function (data) { return ({
|
|
5
|
+
url: '/widget/openapi/bookeo/order',
|
|
6
|
+
method: 'POST',
|
|
7
|
+
data: data,
|
|
8
|
+
}); };
|
|
9
|
+
exports.createBookeoOrder = createBookeoOrder;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { OpenapiCertificateRO } from '@escapenavigator/types/dist/widget-openapi/openapi-certificate.ro';
|
|
2
|
+
import { OpenapiCreateCertificateDto } from '@escapenavigator/types/dist/widget-openapi/openapi-create-certificate.dto';
|
|
3
3
|
import { ApiMethodDeclaration } from '..';
|
|
4
4
|
declare type ParamsData = {
|
|
5
|
-
data:
|
|
5
|
+
data: OpenapiCreateCertificateDto;
|
|
6
6
|
};
|
|
7
|
-
declare type ResponseData =
|
|
7
|
+
declare type ResponseData = OpenapiCertificateRO;
|
|
8
8
|
export declare const createCertificate: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
9
9
|
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { OpenapiSlotAddHoldDto } from '@escapenavigator/types/dist/widget-openapi/openapi-slot-add-hold.dto';
|
|
2
|
+
import { OpenapiSlotAddHoldRO } from '@escapenavigator/types/dist/widget-openapi/openapi-slot-add-hold.ro';
|
|
3
|
+
import { ApiMethodDeclaration } from '..';
|
|
4
|
+
declare type ParamsData = OpenapiSlotAddHoldDto;
|
|
5
|
+
declare type ResponseData = OpenapiSlotAddHoldRO;
|
|
6
|
+
export declare const createHold: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
7
|
+
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { OpenapiCreateOrderDto } from '@escapenavigator/types/dist/widget-openapi/openapi-create-order.dto';
|
|
2
|
+
import { OpenapiOrderRO } from '@escapenavigator/types/dist/widget-openapi/openapi-order.ro';
|
|
3
3
|
import { ApiMethodDeclaration } from '..';
|
|
4
4
|
declare type ParamsData = {
|
|
5
|
-
data:
|
|
5
|
+
data: OpenapiCreateOrderDto;
|
|
6
6
|
};
|
|
7
|
-
declare type ResponseData =
|
|
7
|
+
declare type ResponseData = OpenapiOrderRO;
|
|
8
8
|
export declare const createOrder: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
9
9
|
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { WigetOpenapiReviewRO } from '@escapenavigator/types/dist/widget-openapi/
|
|
1
|
+
import { OpenapiCreateReviewDto } from '@escapenavigator/types/dist/widget-openapi/openapi-create-review.dto';
|
|
2
|
+
import { WigetOpenapiReviewRO } from '@escapenavigator/types/dist/widget-openapi/openapi-review.ro';
|
|
3
3
|
import { ApiMethodDeclaration } from '..';
|
|
4
4
|
declare type ParamsData = {
|
|
5
|
-
data:
|
|
5
|
+
data: OpenapiCreateReviewDto;
|
|
6
6
|
};
|
|
7
7
|
declare type ResponseData = WigetOpenapiReviewRO;
|
|
8
8
|
export declare const createReview: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { OpenapiFindDiscountByCodeDto } from '@escapenavigator/types/dist/widget-openapi/openapi-find-discount-by-code.dto';
|
|
2
|
+
import { OpenapiFindedCertificateRO } from '@escapenavigator/types/dist/widget-openapi/openapi-finded-certificate.ro';
|
|
3
3
|
import { ApiMethodDeclaration } from '..';
|
|
4
|
-
declare type ParamsData =
|
|
5
|
-
declare type ResponseData =
|
|
4
|
+
declare type ParamsData = OpenapiFindDiscountByCodeDto;
|
|
5
|
+
declare type ResponseData = OpenapiFindedCertificateRO;
|
|
6
6
|
export declare const findCertificate: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
7
7
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OpenapiCertificateRO } from '@escapenavigator/types/dist/widget-openapi/openapi-certificate.ro';
|
|
2
2
|
import { ApiMethodDeclaration } from '..';
|
|
3
3
|
declare type ParamsData = string;
|
|
4
|
-
declare type ResponseData =
|
|
4
|
+
declare type ResponseData = OpenapiCertificateRO;
|
|
5
5
|
export declare const findCertificatesale: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
6
6
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OpenapiOrderRO } from '@escapenavigator/types/dist/widget-openapi/openapi-order.ro';
|
|
2
2
|
import { ApiMethodDeclaration } from '..';
|
|
3
3
|
declare type ParamsData = string;
|
|
4
|
-
declare type ResponseData =
|
|
4
|
+
declare type ResponseData = OpenapiOrderRO;
|
|
5
5
|
export declare const findOrder: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
6
6
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OpenapiWidgetRO } from '@escapenavigator/types/dist/widget-openapi/openapi-widget.ro';
|
|
2
2
|
import { ApiMethodDeclaration } from '..';
|
|
3
3
|
/** Questroom ID виджета */
|
|
4
4
|
declare type ParamsData = string;
|
|
5
|
-
declare type ResponseData =
|
|
5
|
+
declare type ResponseData = OpenapiWidgetRO;
|
|
6
6
|
export declare const getAgregatorInfo: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
7
7
|
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { OpenapiSlotGetBookeoPriceDto } from '@escapenavigator/types/dist/widget-openapi/openapi-slot-get-bookeo-price.dto';
|
|
2
|
+
import { OpenapiSlotGetBookeoPriceRO } from '@escapenavigator/types/dist/widget-openapi/openapi-slot-get-bookeo-price.ro';
|
|
3
|
+
import { ApiMethodDeclaration } from '..';
|
|
4
|
+
declare type ParamsData = OpenapiSlotGetBookeoPriceDto;
|
|
5
|
+
declare type ResponseData = OpenapiSlotGetBookeoPriceRO;
|
|
6
|
+
export declare const getBookeoPrice: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getBookeoPrice = void 0;
|
|
4
|
+
var getBookeoPrice = function (data) { return ({
|
|
5
|
+
url: '/widget/openapi/bookeo/price',
|
|
6
|
+
method: 'PATCH',
|
|
7
|
+
data: data,
|
|
8
|
+
}); };
|
|
9
|
+
exports.getBookeoPrice = getBookeoPrice;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OpenapiCertificateCardRO } from '@escapenavigator/types/dist/widget-openapi/openapi-certificate-card.ro';
|
|
2
2
|
import { ApiMethodDeclaration } from '..';
|
|
3
3
|
/** id квеста */
|
|
4
4
|
declare type ParamsData = string;
|
|
5
|
-
declare type ResponseData =
|
|
5
|
+
declare type ResponseData = OpenapiCertificateCardRO[];
|
|
6
6
|
export declare const getCertificatesForAgregator: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
7
7
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OpenapiCertificateCardRO } from '@escapenavigator/types/dist/widget-openapi/openapi-certificate-card.ro';
|
|
2
2
|
import { ApiMethodDeclaration } from '..';
|
|
3
3
|
/** widget uid */
|
|
4
4
|
declare type ParamsData = string;
|
|
5
|
-
declare type ResponseData =
|
|
5
|
+
declare type ResponseData = OpenapiCertificateCardRO[];
|
|
6
6
|
export declare const getCertificates: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
7
7
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OpenapiQuestroomRO } from '@escapenavigator/types/dist/widget-openapi/openapi-questroom.ro';
|
|
2
2
|
import { ApiMethodDeclaration } from '..';
|
|
3
3
|
/** questroom id */
|
|
4
4
|
declare type ParamsData = string;
|
|
5
|
-
declare type ResponseData =
|
|
5
|
+
declare type ResponseData = OpenapiQuestroomRO;
|
|
6
6
|
export declare const getQuestroom: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
7
7
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OpenapiQuestroomRO } from '@escapenavigator/types/dist/widget-openapi/openapi-questroom.ro';
|
|
2
2
|
import { ApiMethodDeclaration } from '..';
|
|
3
3
|
/** widget slug */
|
|
4
4
|
declare type ParamsData = string;
|
|
5
|
-
declare type ResponseData =
|
|
5
|
+
declare type ResponseData = OpenapiQuestroomRO[];
|
|
6
6
|
export declare const getQuestrooms: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
7
7
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { WigetOpenapiReviewRO } from '@escapenavigator/types/dist/widget-openapi/
|
|
1
|
+
import { OpenapiFindReviewsDto } from '@escapenavigator/types/dist/widget-openapi/openapi-find-reviews.dto';
|
|
2
|
+
import { WigetOpenapiReviewRO } from '@escapenavigator/types/dist/widget-openapi/openapi-review.ro';
|
|
3
3
|
import { ApiMethodDeclaration } from '..';
|
|
4
|
-
declare type ParamsData =
|
|
4
|
+
declare type ParamsData = OpenapiFindReviewsDto;
|
|
5
5
|
declare type ResponseData = WigetOpenapiReviewRO[];
|
|
6
6
|
export declare const getReviews: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
7
7
|
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { OpenapiGetWidgetInfoDto } from '@escapenavigator/types/dist/widget-openapi/openapi-get-widgget-info.dto';
|
|
2
|
+
import { OpenapiWidgetRO } from '@escapenavigator/types/dist/widget-openapi/openapi-widget.ro';
|
|
3
3
|
import { ApiMethodDeclaration } from '..';
|
|
4
4
|
/** UID виджета */
|
|
5
|
-
declare type ParamsData =
|
|
6
|
-
declare type ResponseData =
|
|
5
|
+
declare type ParamsData = OpenapiGetWidgetInfoDto;
|
|
6
|
+
declare type ResponseData = OpenapiWidgetRO;
|
|
7
7
|
export declare const getWidgetInfo: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
8
8
|
export {};
|
|
@@ -1,19 +1,27 @@
|
|
|
1
|
+
import { createBookeoOrder } from './create-bookeo-order';
|
|
1
2
|
import { createCertificate } from './create-certificate';
|
|
3
|
+
import { createHold } from './create-hold';
|
|
2
4
|
import { createOrder } from './create-order';
|
|
3
5
|
import { createReview } from './create-review';
|
|
4
6
|
import { findCertificate } from './find-certificate';
|
|
5
7
|
import { findCertificatesale } from './find-certificatesale';
|
|
6
8
|
import { findOrder } from './find-order';
|
|
7
9
|
import { getAgregatorInfo } from './get-agreagator-info';
|
|
10
|
+
import { getBookeoPrice } from './get-bookeo-price';
|
|
8
11
|
import { getCertificates } from './get-certificates';
|
|
9
12
|
import { getCertificatesForAgregator } from './get-certificates-for-agregator';
|
|
10
13
|
import { getQuestroom } from './get-questroom';
|
|
11
14
|
import { getQuestrooms } from './get-questrooms';
|
|
12
15
|
import { getReviews } from './get-reviews';
|
|
13
16
|
import { getWidgetInfo } from './get-widget-info';
|
|
17
|
+
import { removeHold } from './remove-hold';
|
|
14
18
|
import { daily } from './widget-daily';
|
|
15
19
|
import { weekly } from './widget-weekly';
|
|
16
20
|
declare type ApiDeclaration = {
|
|
21
|
+
removeHold: typeof removeHold;
|
|
22
|
+
getBookeoPrice: typeof getBookeoPrice;
|
|
23
|
+
createHold: typeof createHold;
|
|
24
|
+
createBookeoOrder: typeof createBookeoOrder;
|
|
17
25
|
getAgregatorInfo: typeof getAgregatorInfo;
|
|
18
26
|
findCertificatesale: typeof findCertificatesale;
|
|
19
27
|
findOrder: typeof findOrder;
|
|
@@ -1,22 +1,30 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.widgetsOpenApiDeclaration = void 0;
|
|
4
|
+
var create_bookeo_order_1 = require("./create-bookeo-order");
|
|
4
5
|
var create_certificate_1 = require("./create-certificate");
|
|
6
|
+
var create_hold_1 = require("./create-hold");
|
|
5
7
|
var create_order_1 = require("./create-order");
|
|
6
8
|
var create_review_1 = require("./create-review");
|
|
7
9
|
var find_certificate_1 = require("./find-certificate");
|
|
8
10
|
var find_certificatesale_1 = require("./find-certificatesale");
|
|
9
11
|
var find_order_1 = require("./find-order");
|
|
10
12
|
var get_agreagator_info_1 = require("./get-agreagator-info");
|
|
13
|
+
var get_bookeo_price_1 = require("./get-bookeo-price");
|
|
11
14
|
var get_certificates_1 = require("./get-certificates");
|
|
12
15
|
var get_certificates_for_agregator_1 = require("./get-certificates-for-agregator");
|
|
13
16
|
var get_questroom_1 = require("./get-questroom");
|
|
14
17
|
var get_questrooms_1 = require("./get-questrooms");
|
|
15
18
|
var get_reviews_1 = require("./get-reviews");
|
|
16
19
|
var get_widget_info_1 = require("./get-widget-info");
|
|
20
|
+
var remove_hold_1 = require("./remove-hold");
|
|
17
21
|
var widget_daily_1 = require("./widget-daily");
|
|
18
22
|
var widget_weekly_1 = require("./widget-weekly");
|
|
19
23
|
exports.widgetsOpenApiDeclaration = {
|
|
24
|
+
removeHold: remove_hold_1.removeHold,
|
|
25
|
+
createHold: create_hold_1.createHold,
|
|
26
|
+
getBookeoPrice: get_bookeo_price_1.getBookeoPrice,
|
|
27
|
+
createBookeoOrder: create_bookeo_order_1.createBookeoOrder,
|
|
20
28
|
getQuestrooms: get_questrooms_1.getQuestrooms,
|
|
21
29
|
getAgregatorInfo: get_agreagator_info_1.getAgregatorInfo,
|
|
22
30
|
findCertificatesale: find_certificatesale_1.findCertificatesale,
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SuccessRO } from '@escapenavigator/types/dist/shared/success.ro';
|
|
2
|
+
import { OpenapiSlotRemoveHoldDto } from '@escapenavigator/types/dist/widget-openapi/openapi-slot-remove-hold.dto';
|
|
3
|
+
import { ApiMethodDeclaration } from '..';
|
|
4
|
+
declare type ParamsData = OpenapiSlotRemoveHoldDto;
|
|
5
|
+
declare type ResponseData = SuccessRO;
|
|
6
|
+
export declare const removeHold: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.removeHold = void 0;
|
|
4
|
+
var removeHold = function (params) { return ({
|
|
5
|
+
url: '/widget/openapi/hold',
|
|
6
|
+
method: 'DELETE',
|
|
7
|
+
params: params,
|
|
8
|
+
}); };
|
|
9
|
+
exports.removeHold = removeHold;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { OpenapiDayScheduleDto } from '@escapenavigator/types/dist/widget-openapi/openapi-day-schedule.dto';
|
|
2
|
+
import { OpenapiSlotRO } from '@escapenavigator/types/dist/widget-openapi/openapi-slots.ro';
|
|
3
3
|
import { ApiMethodDeclaration } from '..';
|
|
4
|
-
declare type ParamsData =
|
|
5
|
-
declare type ResponseData =
|
|
4
|
+
declare type ParamsData = OpenapiDayScheduleDto;
|
|
5
|
+
declare type ResponseData = OpenapiSlotRO[];
|
|
6
6
|
export declare const daily: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
7
7
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { OpenapiSlotRO } from '@escapenavigator/types/dist/widget-openapi/openapi-slots.ro';
|
|
2
|
+
import { OpenapiWeekScheduleDto } from '@escapenavigator/types/dist/widget-openapi/openapi-week-schedule.dto';
|
|
3
3
|
import { ApiMethodDeclaration } from '..';
|
|
4
|
-
declare type ParamsData =
|
|
5
|
-
declare type ResponseData =
|
|
4
|
+
declare type ParamsData = OpenapiWeekScheduleDto;
|
|
5
|
+
declare type ResponseData = OpenapiSlotRO[];
|
|
6
6
|
export declare const weekly: ApiMethodDeclaration<ParamsData, ResponseData>;
|
|
7
7
|
export {};
|
|
@@ -16,9 +16,8 @@ declare type Result<P, T, R, DisplayName extends string> = {
|
|
|
16
16
|
};
|
|
17
17
|
declare type Props<P, T, R, DisplayName extends string> = {
|
|
18
18
|
api: ApiMethod<P, T, R, DisplayName>;
|
|
19
|
-
successCallback?: (data: AxiosResponse<R
|
|
19
|
+
successCallback?: (data: AxiosResponse<R>, params: P) => void;
|
|
20
20
|
errorCallback?: (error: ServiceError) => void;
|
|
21
|
-
delay?: number;
|
|
22
21
|
};
|
|
23
|
-
export declare const useApiMethod: <P, T, R, DisplayName extends string>({ api, successCallback, errorCallback,
|
|
22
|
+
export declare const useApiMethod: <P, T, R, DisplayName extends string>({ api, successCallback, errorCallback, }: Props<P, T, R, DisplayName>) => Result<P, T, R, DisplayName>;
|
|
24
23
|
export {};
|
|
@@ -47,45 +47,41 @@ var api_1 = require("./actions/creators/api");
|
|
|
47
47
|
var api_2 = require("./reducers/api");
|
|
48
48
|
var useApiMethod = function (_a) {
|
|
49
49
|
var _b;
|
|
50
|
-
var api = _a.api, successCallback = _a.successCallback, errorCallback = _a.errorCallback
|
|
50
|
+
var api = _a.api, successCallback = _a.successCallback, errorCallback = _a.errorCallback;
|
|
51
51
|
var mounted = (0, react_1.useRef)(false);
|
|
52
52
|
var source = (0, react_1.useRef)(null);
|
|
53
53
|
var _c = (0, react_1.useReducer)(api_2.apiReducer, api_2.initialState), state = _c[0], dispatch = _c[1];
|
|
54
54
|
var fetch = (0, react_1.useCallback)(function (params) { return __awaiter(void 0, void 0, void 0, function () {
|
|
55
|
-
var
|
|
55
|
+
var response, error_1, err;
|
|
56
56
|
return __generator(this, function (_a) {
|
|
57
57
|
switch (_a.label) {
|
|
58
58
|
case 0:
|
|
59
59
|
source.current = axios_1.default.CancelToken.source();
|
|
60
|
-
startTime = Date.now();
|
|
61
60
|
_a.label = 1;
|
|
62
61
|
case 1:
|
|
63
62
|
_a.trys.push([1, 3, , 4]);
|
|
64
63
|
dispatch((0, api_1.fetchStart)());
|
|
65
64
|
return [4 /*yield*/, api(params)];
|
|
66
65
|
case 2:
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
successCallback(response_1);
|
|
73
|
-
dispatch((0, api_1.fetchSuccess)(response_1));
|
|
74
|
-
}, delta);
|
|
75
|
-
return [3 /*break*/, 4];
|
|
66
|
+
response = _a.sent();
|
|
67
|
+
if (successCallback)
|
|
68
|
+
successCallback(response, params);
|
|
69
|
+
dispatch((0, api_1.fetchSuccess)(response));
|
|
70
|
+
return [2 /*return*/, response];
|
|
76
71
|
case 3:
|
|
77
72
|
error_1 = _a.sent();
|
|
78
73
|
if (!mounted.current)
|
|
79
|
-
return [2 /*return
|
|
74
|
+
return [2 /*return*/, null];
|
|
80
75
|
err = (0, get_service_error_1.getServiceError)(error_1);
|
|
81
76
|
if (errorCallback)
|
|
82
77
|
errorCallback(err);
|
|
83
78
|
dispatch((0, api_1.fetchFailure)(err));
|
|
84
|
-
throw
|
|
79
|
+
// eslint-disable-next-line @typescript-eslint/no-throw-literal
|
|
80
|
+
throw err;
|
|
85
81
|
case 4: return [2 /*return*/];
|
|
86
82
|
}
|
|
87
83
|
});
|
|
88
|
-
}); }, [api, successCallback, errorCallback
|
|
84
|
+
}); }, [api, successCallback, errorCallback]);
|
|
89
85
|
(0, react_1.useEffect)(function () {
|
|
90
86
|
mounted.current = true;
|
|
91
87
|
return function () {
|
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
|
-
"@escapenavigator/utils": "^1.4.
|
|
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",
|