@escapenavigator/services 1.2.4 → 1.3.1
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/README.md +1 -1
- package/dist/api/admins-api/get-profile-token.js +3 -3
- package/dist/api/admins-api/index.js +4 -4
- package/dist/api/admins-api/login.js +8 -5
- package/dist/api/admins-api/logout.js +2 -2
- package/dist/api/admins-api/me.js +2 -2
- package/dist/api/agb-api/get-one.js +3 -3
- package/dist/api/agb-api/index.js +2 -2
- package/dist/api/agb-api/update.js +8 -5
- package/dist/api/cashboxes-api/create.js +8 -5
- package/dist/api/cashboxes-api/get-one.js +3 -3
- package/dist/api/cashboxes-api/index.js +5 -5
- package/dist/api/cashboxes-api/query.js +2 -2
- package/dist/api/cashboxes-api/recover.js +3 -3
- package/dist/api/cashboxes-api/remove.js +3 -3
- package/dist/api/cashboxes-api/update.js +8 -5
- package/dist/api/certificates-api/create.js +8 -5
- package/dist/api/certificates-api/get-one.js +3 -3
- package/dist/api/certificates-api/index.js +6 -6
- package/dist/api/certificates-api/query.js +2 -2
- package/dist/api/certificates-api/recover.js +3 -3
- package/dist/api/certificates-api/remove.js +3 -3
- package/dist/api/certificates-api/update.js +8 -5
- package/dist/api/certificatesales-api/annul.js +8 -5
- package/dist/api/certificatesales-api/create.js +8 -5
- package/dist/api/certificatesales-api/get-one-by-code.js +3 -3
- package/dist/api/certificatesales-api/get-one.js +3 -3
- package/dist/api/certificatesales-api/index.js +9 -9
- package/dist/api/certificatesales-api/paginate.js +3 -3
- package/dist/api/certificatesales-api/query.js +3 -3
- package/dist/api/certificatesales-api/update-expire-date.js +8 -5
- package/dist/api/certificatesales-api/update-status.js +8 -5
- package/dist/api/certificatesales-api/update.js +8 -5
- package/dist/api/cities-api/get-cities-by-country.js +2 -2
- package/dist/api/cities-api/get-city-by-ip.js +2 -2
- package/dist/api/cities-api/get-city-by-slug.js +2 -2
- package/dist/api/cities-api/get-one.js +3 -3
- package/dist/api/cities-api/get-popular-cities-near.js +2 -2
- package/dist/api/cities-api/index.js +7 -7
- package/dist/api/cities-api/query.js +3 -3
- package/dist/api/cities-api/remove.js +3 -3
- package/dist/api/cities-api/update.js +8 -5
- package/dist/api/clients-api/create-from-widget.js +8 -5
- package/dist/api/clients-api/create.js +8 -5
- package/dist/api/clients-api/get-all.js +3 -3
- package/dist/api/clients-api/get-one.js +3 -3
- package/dist/api/clients-api/index.js +6 -6
- package/dist/api/clients-api/query.js +3 -3
- package/dist/api/clients-api/update.js +8 -5
- package/dist/api/emails-api/index.js +1 -1
- package/dist/api/emails-api/query.js +3 -3
- package/dist/api/financeitems-api/create.js +8 -5
- package/dist/api/financeitems-api/get-all.js +3 -3
- package/dist/api/financeitems-api/get-one.js +3 -3
- package/dist/api/financeitems-api/index.js +5 -5
- package/dist/api/financeitems-api/query.js +3 -3
- package/dist/api/financeitems-api/remove.js +3 -3
- package/dist/api/images-api/create.js +8 -5
- package/dist/api/images-api/index.js +1 -1
- package/dist/api/index.js +71 -20
- package/dist/api/init-client-api.d.ts +2 -0
- package/dist/api/init-client-api.js +34 -32
- package/dist/api/locations-api/create.js +8 -5
- package/dist/api/locations-api/get-by-coordinates.js +3 -3
- package/dist/api/locations-api/get-one.js +3 -3
- package/dist/api/locations-api/index.js +7 -7
- package/dist/api/locations-api/query.js +3 -3
- package/dist/api/locations-api/recover.js +3 -3
- package/dist/api/locations-api/remove.js +3 -3
- package/dist/api/locations-api/update.js +8 -5
- package/dist/api/order-discounts-api/create.js +8 -5
- package/dist/api/order-discounts-api/index.js +2 -2
- package/dist/api/order-discounts-api/remove.js +3 -3
- package/dist/api/order-penalties-api/create.js +8 -5
- package/dist/api/order-penalties-api/index.js +2 -2
- package/dist/api/order-penalties-api/remove.js +3 -3
- package/dist/api/order-upsellings-api/create.js +8 -5
- package/dist/api/order-upsellings-api/index.js +2 -2
- package/dist/api/order-upsellings-api/remove.js +3 -3
- package/dist/api/orders-api/add-certificate.js +8 -5
- package/dist/api/orders-api/create-from-widget.js +8 -5
- package/dist/api/orders-api/create.js +8 -5
- package/dist/api/orders-api/get-one.js +3 -3
- package/dist/api/orders-api/index.js +11 -11
- package/dist/api/orders-api/paginate.js +3 -3
- package/dist/api/orders-api/query.js +3 -3
- package/dist/api/orders-api/remove-certificate.js +8 -5
- package/dist/api/orders-api/remove.js +3 -3
- package/dist/api/orders-api/update-slot.js +8 -5
- package/dist/api/orders-api/update-status.js +8 -5
- package/dist/api/orders-api/update.js +8 -5
- package/dist/api/partners-api/create.js +8 -5
- package/dist/api/partners-api/get-all.js +3 -3
- package/dist/api/partners-api/get-one.js +3 -3
- package/dist/api/partners-api/index.js +7 -7
- package/dist/api/partners-api/query.js +3 -3
- package/dist/api/partners-api/recover.js +3 -3
- package/dist/api/partners-api/remove.js +3 -3
- package/dist/api/partners-api/update.js +8 -5
- package/dist/api/profiles-api/create.js +8 -5
- package/dist/api/profiles-api/current.js +2 -2
- package/dist/api/profiles-api/get-by-slug.js +3 -3
- package/dist/api/profiles-api/get-one.js +3 -3
- package/dist/api/profiles-api/index.js +7 -7
- package/dist/api/profiles-api/query.js +3 -3
- package/dist/api/profiles-api/remove.js +3 -3
- package/dist/api/profiles-api/update-current.js +8 -5
- package/dist/api/profiles-api/update.js +8 -5
- package/dist/api/questrooms-api/create.js +8 -5
- package/dist/api/questrooms-api/get-by-coordinates.js +3 -3
- package/dist/api/questrooms-api/get-by-location.js +3 -3
- package/dist/api/questrooms-api/get-by-slug.js +3 -3
- package/dist/api/questrooms-api/get-by-title.js +3 -3
- package/dist/api/questrooms-api/get-one.js +3 -3
- package/dist/api/questrooms-api/index.js +9 -9
- package/dist/api/questrooms-api/query.js +3 -3
- package/dist/api/questrooms-api/recover.js +3 -3
- package/dist/api/questrooms-api/remove.js +3 -3
- package/dist/api/questrooms-api/update.js +8 -5
- package/dist/api/registration-requests-api/create.js +8 -5
- package/dist/api/registration-requests-api/get-one.js +3 -3
- package/dist/api/registration-requests-api/index.js +5 -5
- package/dist/api/registration-requests-api/query.js +3 -3
- package/dist/api/registration-requests-api/remove.js +3 -3
- package/dist/api/registration-requests-api/update.js +8 -5
- package/dist/api/roles-api/create.js +8 -5
- package/dist/api/roles-api/get-one.js +3 -3
- package/dist/api/roles-api/index.js +5 -5
- package/dist/api/roles-api/query.js +3 -3
- package/dist/api/roles-api/remove.js +3 -3
- package/dist/api/roles-api/update.js +8 -5
- package/dist/api/slot-templates-api/get.js +3 -3
- package/dist/api/slot-templates-api/index.js +2 -2
- package/dist/api/slot-templates-api/update.js +8 -5
- package/dist/api/slots-api/add-breaks.js +8 -5
- package/dist/api/slots-api/add-or-remove-break.js +8 -5
- package/dist/api/slots-api/calendar.js +3 -3
- package/dist/api/slots-api/create.js +8 -5
- package/dist/api/slots-api/daily.js +3 -3
- package/dist/api/slots-api/index.js +8 -8
- package/dist/api/slots-api/remove-breaks.js +8 -5
- package/dist/api/slots-api/remove.js +3 -3
- package/dist/api/slots-api/weekly.js +3 -3
- package/dist/api/support/create.js +8 -5
- package/dist/api/support/index.js +1 -1
- package/dist/api/tariffs-api/create.js +8 -5
- package/dist/api/tariffs-api/get-one.js +3 -3
- package/dist/api/tariffs-api/index.js +5 -5
- package/dist/api/tariffs-api/query.js +3 -3
- package/dist/api/tariffs-api/remove.js +3 -3
- package/dist/api/tariffs-api/update.js +8 -5
- package/dist/api/transactions-api/create-certificate-payment.js +8 -5
- package/dist/api/transactions-api/create-certificate-refund.js +8 -5
- package/dist/api/transactions-api/create-order-payment.js +8 -5
- package/dist/api/transactions-api/create-order-refund.js +8 -5
- package/dist/api/transactions-api/create.js +8 -5
- package/dist/api/transactions-api/get-one.js +3 -3
- package/dist/api/transactions-api/index.js +13 -13
- package/dist/api/transactions-api/query.js +3 -3
- package/dist/api/transactions-api/remove-certificate-payment.js +3 -3
- package/dist/api/transactions-api/remove-certificate-refund.js +3 -3
- package/dist/api/transactions-api/remove-order-payment.js +3 -3
- package/dist/api/transactions-api/remove-order-refund.js +3 -3
- package/dist/api/transactions-api/remove.js +3 -3
- package/dist/api/transactions-api/update.js +8 -5
- package/dist/api/uploads-api/index.js +1 -1
- package/dist/api/uploads-api/upload-image.js +12 -9
- package/dist/api/upsellings-api/create.js +8 -5
- package/dist/api/upsellings-api/get-one.js +3 -3
- package/dist/api/upsellings-api/index.js +5 -5
- package/dist/api/upsellings-api/query.js +3 -3
- package/dist/api/upsellings-api/remove.js +3 -3
- package/dist/api/upsellings-api/update.js +8 -5
- package/dist/api/user-messages-api/create.js +8 -5
- package/dist/api/user-messages-api/get-one.js +3 -3
- package/dist/api/user-messages-api/index.js +4 -4
- package/dist/api/user-messages-api/query.js +3 -3
- package/dist/api/user-messages-api/remove.js +3 -3
- package/dist/api/users-api/check-token.js +7 -4
- package/dist/api/users-api/create.js +8 -5
- package/dist/api/users-api/current-update-password.js +8 -5
- package/dist/api/users-api/current-update.js +8 -5
- package/dist/api/users-api/get-one.js +3 -3
- package/dist/api/users-api/index.js +15 -15
- package/dist/api/users-api/login.js +8 -5
- package/dist/api/users-api/logout.js +2 -2
- package/dist/api/users-api/me.js +2 -2
- package/dist/api/users-api/query.js +3 -3
- package/dist/api/users-api/recover.js +3 -3
- package/dist/api/users-api/remove.js +3 -3
- package/dist/api/users-api/send-invite.js +3 -3
- package/dist/api/users-api/send-recover-link.js +3 -3
- package/dist/api/users-api/update-password.js +8 -5
- package/dist/api/users-api/update.js +8 -5
- package/dist/api/widgets-api/create.js +8 -5
- package/dist/api/widgets-api/get-one.js +3 -3
- package/dist/api/widgets-api/index.d.ts +0 -2
- package/dist/api/widgets-api/index.js +5 -7
- package/dist/api/widgets-api/query.js +3 -3
- package/dist/api/widgets-api/remove.js +3 -3
- package/dist/api/widgets-api/update.js +8 -5
- package/dist/api/widgets-openapi/create-certificate.d.ts +9 -0
- package/dist/api/widgets-openapi/create-certificate.js +12 -0
- package/dist/api/widgets-openapi/create-order.d.ts +9 -0
- package/dist/api/widgets-openapi/create-order.js +12 -0
- package/dist/api/widgets-openapi/find-certificate.d.ts +6 -0
- package/dist/api/widgets-openapi/find-certificate.js +8 -0
- 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 +16 -0
- package/dist/api/widgets-openapi/index.js +17 -0
- package/dist/api/widgets-openapi/widget-daily.d.ts +5 -5
- package/dist/api/widgets-openapi/widget-daily.js +6 -6
- package/dist/api/widgets-openapi/widget-weekly.d.ts +4 -4
- package/dist/api/widgets-openapi/widget-weekly.js +4 -4
- package/dist/hooks/use-api-method/actions/creators/api.js +9 -9
- package/dist/hooks/use-api-method/index.js +83 -43
- package/dist/hooks/use-api-method/reducers/api.js +17 -5
- package/dist/utils/convert-to-options.js +3 -3
- package/dist/utils/define-status.js +4 -4
- package/dist/utils/enum-to-options.js +3 -3
- package/dist/utils/get-handled-error-message.js +1 -1
- package/dist/utils/get-many.js +4 -3
- package/dist/utils/get-one.js +3 -2
- package/dist/utils/get-service-error.js +18 -17
- package/dist/utils/is-network-error.js +3 -3
- package/dist/utils/redirect.js +1 -1
- package/dist/utils/serialize-record.js +4 -2
- package/dist/utils/validate-by-dto.js +8 -7
- package/package.json +4 -4
- package/dist/api/widgets-api/get-info.d.ts +0 -7
- package/dist/api/widgets-api/get-info.js +0 -8
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.update = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
var update = function (_a) {
|
|
5
|
+
var id = _a.id, data = _a.data;
|
|
6
|
+
return ({
|
|
7
|
+
url: "/cities/".concat(id),
|
|
8
|
+
method: 'PATCH',
|
|
9
|
+
data: data,
|
|
10
|
+
});
|
|
11
|
+
};
|
|
9
12
|
exports.update = update;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createFromWidget = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
var createFromWidget = function (_a) {
|
|
5
|
+
var data = _a.data;
|
|
6
|
+
return ({
|
|
7
|
+
url: '/clients/from-widget',
|
|
8
|
+
method: 'POST',
|
|
9
|
+
data: data,
|
|
10
|
+
});
|
|
11
|
+
};
|
|
9
12
|
exports.createFromWidget = createFromWidget;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.create = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
var create = function (_a) {
|
|
5
|
+
var data = _a.data;
|
|
6
|
+
return ({
|
|
7
|
+
url: '/clients',
|
|
8
|
+
method: 'POST',
|
|
9
|
+
data: data,
|
|
10
|
+
});
|
|
11
|
+
};
|
|
9
12
|
exports.create = create;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getAll = void 0;
|
|
4
|
-
|
|
4
|
+
var getAll = function (params) { return ({
|
|
5
5
|
url: '/clients/get-all',
|
|
6
6
|
method: 'GET',
|
|
7
|
-
params,
|
|
8
|
-
});
|
|
7
|
+
params: params,
|
|
8
|
+
}); };
|
|
9
9
|
exports.getAll = getAll;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getOne = void 0;
|
|
4
|
-
|
|
5
|
-
url:
|
|
4
|
+
var getOne = function (id) { return ({
|
|
5
|
+
url: "/clients/".concat(id),
|
|
6
6
|
method: 'GET',
|
|
7
|
-
});
|
|
7
|
+
}); };
|
|
8
8
|
exports.getOne = getOne;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.clientsApiDeclaration = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
var create_1 = require("./create");
|
|
5
|
+
var create_from_widget_1 = require("./create-from-widget");
|
|
6
|
+
var get_all_1 = require("./get-all");
|
|
7
|
+
var get_one_1 = require("./get-one");
|
|
8
|
+
var query_1 = require("./query");
|
|
9
|
+
var update_1 = require("./update");
|
|
10
10
|
exports.clientsApiDeclaration = {
|
|
11
11
|
create: create_1.create,
|
|
12
12
|
update: update_1.update,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.query = void 0;
|
|
4
|
-
|
|
4
|
+
var query = function (params) { return ({
|
|
5
5
|
url: '/clients',
|
|
6
6
|
method: 'GET',
|
|
7
|
-
params,
|
|
8
|
-
});
|
|
7
|
+
params: params,
|
|
8
|
+
}); };
|
|
9
9
|
exports.query = query;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.update = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
var update = function (_a) {
|
|
5
|
+
var id = _a.id, data = _a.data;
|
|
6
|
+
return ({
|
|
7
|
+
url: "/clients/".concat(id),
|
|
8
|
+
method: 'PATCH',
|
|
9
|
+
data: data,
|
|
10
|
+
});
|
|
11
|
+
};
|
|
9
12
|
exports.update = update;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.query = void 0;
|
|
4
|
-
|
|
4
|
+
var query = function (params) { return ({
|
|
5
5
|
url: '/emails',
|
|
6
6
|
method: 'GET',
|
|
7
|
-
params,
|
|
8
|
-
});
|
|
7
|
+
params: params,
|
|
8
|
+
}); };
|
|
9
9
|
exports.query = query;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.create = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
var create = function (_a) {
|
|
5
|
+
var data = _a.data;
|
|
6
|
+
return ({
|
|
7
|
+
url: '/financeitems',
|
|
8
|
+
method: 'POST',
|
|
9
|
+
data: data,
|
|
10
|
+
});
|
|
11
|
+
};
|
|
9
12
|
exports.create = create;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getAll = void 0;
|
|
4
|
-
|
|
4
|
+
var getAll = function (params) { return ({
|
|
5
5
|
url: '/financeitems/get-all',
|
|
6
6
|
method: 'GET',
|
|
7
|
-
params,
|
|
8
|
-
});
|
|
7
|
+
params: params,
|
|
8
|
+
}); };
|
|
9
9
|
exports.getAll = getAll;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getOne = void 0;
|
|
4
|
-
|
|
5
|
-
url:
|
|
4
|
+
var getOne = function (id) { return ({
|
|
5
|
+
url: "/financeitems/".concat(id),
|
|
6
6
|
method: 'GET',
|
|
7
|
-
});
|
|
7
|
+
}); };
|
|
8
8
|
exports.getOne = getOne;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.financeItemsApiDeclaration = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
var create_1 = require("./create");
|
|
5
|
+
var get_all_1 = require("./get-all");
|
|
6
|
+
var get_one_1 = require("./get-one");
|
|
7
|
+
var query_1 = require("./query");
|
|
8
|
+
var remove_1 = require("./remove");
|
|
9
9
|
exports.financeItemsApiDeclaration = {
|
|
10
10
|
create: create_1.create,
|
|
11
11
|
remove: remove_1.remove,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.query = void 0;
|
|
4
|
-
|
|
4
|
+
var query = function (params) { return ({
|
|
5
5
|
url: '/financeitems',
|
|
6
6
|
method: 'GET',
|
|
7
|
-
params,
|
|
8
|
-
});
|
|
7
|
+
params: params,
|
|
8
|
+
}); };
|
|
9
9
|
exports.query = query;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.remove = void 0;
|
|
4
|
-
|
|
5
|
-
url:
|
|
4
|
+
var remove = function (id) { return ({
|
|
5
|
+
url: "/financeitems/".concat(id),
|
|
6
6
|
method: 'DELETE',
|
|
7
|
-
});
|
|
7
|
+
}); };
|
|
8
8
|
exports.remove = remove;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.create = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
var create = function (_a) {
|
|
5
|
+
var data = _a.data;
|
|
6
|
+
return ({
|
|
7
|
+
url: '/images',
|
|
8
|
+
method: 'POST',
|
|
9
|
+
data: data,
|
|
10
|
+
});
|
|
11
|
+
};
|
|
9
12
|
exports.create = create;
|
package/dist/api/index.js
CHANGED
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
2
13
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
14
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
15
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -8,6 +19,33 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
19
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
20
|
});
|
|
10
21
|
};
|
|
22
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
23
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
24
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
25
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
26
|
+
function step(op) {
|
|
27
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
28
|
+
while (_) try {
|
|
29
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
30
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
31
|
+
switch (op[0]) {
|
|
32
|
+
case 0: case 1: t = op; break;
|
|
33
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
34
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
35
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
36
|
+
default:
|
|
37
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
38
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
39
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
40
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
41
|
+
if (t[2]) _.ops.pop();
|
|
42
|
+
_.trys.pop(); continue;
|
|
43
|
+
}
|
|
44
|
+
op = body.call(thisArg, _);
|
|
45
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
46
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
47
|
+
}
|
|
48
|
+
};
|
|
11
49
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
50
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
51
|
};
|
|
@@ -16,28 +54,41 @@ exports.initApi = void 0;
|
|
|
16
54
|
/* eslint-disable import/no-extraneous-dependencies */
|
|
17
55
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
18
56
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
19
|
-
|
|
57
|
+
var axios_1 = __importDefault(require("axios"));
|
|
20
58
|
function initApi(apiDeclaration, baseURL) {
|
|
21
|
-
|
|
59
|
+
var _this = this;
|
|
60
|
+
var api = {};
|
|
22
61
|
// Wrap with axios and apply config extenders
|
|
23
|
-
Object.keys(apiDeclaration).forEach((key)
|
|
24
|
-
api[key] =
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
62
|
+
Object.keys(apiDeclaration).forEach(function (key) {
|
|
63
|
+
api[key] = function (params) {
|
|
64
|
+
if (params === void 0) { params = undefined; }
|
|
65
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
66
|
+
var axiosConfig, result, error_1, e;
|
|
67
|
+
return __generator(this, function (_a) {
|
|
68
|
+
switch (_a.label) {
|
|
69
|
+
case 0:
|
|
70
|
+
axiosConfig = apiDeclaration[key](params);
|
|
71
|
+
axiosConfig = __assign(__assign({}, axiosConfig), { baseURL: baseURL, withCredentials: true });
|
|
72
|
+
_a.label = 1;
|
|
73
|
+
case 1:
|
|
74
|
+
_a.trys.push([1, 3, , 4]);
|
|
75
|
+
return [4 /*yield*/, (0, axios_1.default)(axiosConfig)];
|
|
76
|
+
case 2:
|
|
77
|
+
result = _a.sent();
|
|
78
|
+
return [2 /*return*/, result];
|
|
79
|
+
case 3:
|
|
80
|
+
error_1 = _a.sent();
|
|
81
|
+
e = error_1;
|
|
82
|
+
if (e.code === 401) {
|
|
83
|
+
document.cookie = 'user=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;';
|
|
84
|
+
document.cookie = 'token=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;';
|
|
85
|
+
}
|
|
86
|
+
throw error_1;
|
|
87
|
+
case 4: return [2 /*return*/];
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
});
|
|
91
|
+
};
|
|
41
92
|
api[key].displayName = key;
|
|
42
93
|
});
|
|
43
94
|
return api;
|
|
@@ -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>;
|
|
@@ -1,38 +1,39 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.initClientApi = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
4
|
+
var admins_api_1 = require("./admins-api");
|
|
5
|
+
var agb_api_1 = require("./agb-api");
|
|
6
|
+
var cashboxes_api_1 = require("./cashboxes-api");
|
|
7
|
+
var certificates_api_1 = require("./certificates-api");
|
|
8
|
+
var certificatesales_api_1 = require("./certificatesales-api");
|
|
9
|
+
var clients_api_1 = require("./clients-api");
|
|
10
|
+
var emails_api_1 = require("./emails-api");
|
|
11
|
+
var financeitems_api_1 = require("./financeitems-api");
|
|
12
|
+
var images_api_1 = require("./images-api");
|
|
13
|
+
var locations_api_1 = require("./locations-api");
|
|
14
|
+
var order_discounts_api_1 = require("./order-discounts-api");
|
|
15
|
+
var order_penalties_api_1 = require("./order-penalties-api");
|
|
16
|
+
var order_upsellings_api_1 = require("./order-upsellings-api");
|
|
17
|
+
var orders_api_1 = require("./orders-api");
|
|
18
|
+
var partners_api_1 = require("./partners-api");
|
|
19
|
+
var profiles_api_1 = require("./profiles-api");
|
|
20
|
+
var questrooms_api_1 = require("./questrooms-api");
|
|
21
|
+
var registration_requests_api_1 = require("./registration-requests-api");
|
|
22
|
+
var roles_api_1 = require("./roles-api");
|
|
23
|
+
var slot_templates_api_1 = require("./slot-templates-api");
|
|
24
|
+
var slots_api_1 = require("./slots-api");
|
|
25
|
+
var support_1 = require("./support");
|
|
26
|
+
var tariffs_api_1 = require("./tariffs-api");
|
|
27
|
+
var transactions_api_1 = require("./transactions-api");
|
|
28
|
+
var uploads_api_1 = require("./uploads-api");
|
|
29
|
+
var upsellings_api_1 = require("./upsellings-api");
|
|
30
|
+
var user_messages_api_1 = require("./user-messages-api");
|
|
31
|
+
var users_api_1 = require("./users-api");
|
|
32
|
+
var widgets_api_1 = require("./widgets-api");
|
|
33
|
+
var widgets_openapi_1 = require("./widgets-openapi");
|
|
34
|
+
var cities_api_1 = require("./cities-api");
|
|
35
|
+
var _1 = require(".");
|
|
36
|
+
var initClientApi = function (url) {
|
|
36
37
|
return {
|
|
37
38
|
cities: (0, _1.initApi)(cities_api_1.citiesApiDeclaration, url),
|
|
38
39
|
agbs: (0, _1.initApi)(agb_api_1.agbApiDeclaration, 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,9 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.create = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
var create = function (_a) {
|
|
5
|
+
var data = _a.data;
|
|
6
|
+
return ({
|
|
7
|
+
url: '/locations',
|
|
8
|
+
method: 'POST',
|
|
9
|
+
data: data,
|
|
10
|
+
});
|
|
11
|
+
};
|
|
9
12
|
exports.create = create;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getByCoordinates = void 0;
|
|
4
|
-
|
|
5
|
-
url:
|
|
4
|
+
var getByCoordinates = function (id) { return ({
|
|
5
|
+
url: "/locations/near/".concat(id),
|
|
6
6
|
method: 'GET',
|
|
7
|
-
});
|
|
7
|
+
}); };
|
|
8
8
|
exports.getByCoordinates = getByCoordinates;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getOne = void 0;
|
|
4
|
-
|
|
5
|
-
url:
|
|
4
|
+
var getOne = function (id) { return ({
|
|
5
|
+
url: "/locations/".concat(id),
|
|
6
6
|
method: 'GET',
|
|
7
|
-
});
|
|
7
|
+
}); };
|
|
8
8
|
exports.getOne = getOne;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.locationsApiDeclaration = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
4
|
+
var create_1 = require("./create");
|
|
5
|
+
var get_one_1 = require("./get-one");
|
|
6
|
+
var query_1 = require("./query");
|
|
7
|
+
var recover_1 = require("./recover");
|
|
8
|
+
var remove_1 = require("./remove");
|
|
9
|
+
var update_1 = require("./update");
|
|
10
|
+
var get_by_coordinates_1 = require("./get-by-coordinates");
|
|
11
11
|
exports.locationsApiDeclaration = {
|
|
12
12
|
create: create_1.create,
|
|
13
13
|
remove: remove_1.remove,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.query = void 0;
|
|
4
|
-
|
|
4
|
+
var query = function (params) { return ({
|
|
5
5
|
url: '/locations',
|
|
6
6
|
method: 'GET',
|
|
7
|
-
params,
|
|
8
|
-
});
|
|
7
|
+
params: params,
|
|
8
|
+
}); };
|
|
9
9
|
exports.query = query;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.recover = void 0;
|
|
4
|
-
|
|
5
|
-
url:
|
|
4
|
+
var recover = function (id) { return ({
|
|
5
|
+
url: "/locations/recover/".concat(id),
|
|
6
6
|
method: 'PATCH',
|
|
7
|
-
});
|
|
7
|
+
}); };
|
|
8
8
|
exports.recover = recover;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.remove = void 0;
|
|
4
|
-
|
|
5
|
-
url:
|
|
4
|
+
var remove = function (id) { return ({
|
|
5
|
+
url: "/locations/".concat(id),
|
|
6
6
|
method: 'DELETE',
|
|
7
|
-
});
|
|
7
|
+
}); };
|
|
8
8
|
exports.remove = remove;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.update = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
var update = function (_a) {
|
|
5
|
+
var id = _a.id, data = _a.data;
|
|
6
|
+
return ({
|
|
7
|
+
url: "/locations/".concat(id),
|
|
8
|
+
method: 'PATCH',
|
|
9
|
+
data: data,
|
|
10
|
+
});
|
|
11
|
+
};
|
|
9
12
|
exports.update = update;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.create = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
var create = function (_a) {
|
|
5
|
+
var data = _a.data;
|
|
6
|
+
return ({
|
|
7
|
+
url: '/order-discounts',
|
|
8
|
+
method: 'POST',
|
|
9
|
+
data: data,
|
|
10
|
+
});
|
|
11
|
+
};
|
|
9
12
|
exports.create = create;
|