@escapenavigator/types 2.1.8 → 2.1.10
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/constants/navigator-certificate-redeem.d.ts +9 -0
- package/dist/constants/navigator-certificate-redeem.js +15 -0
- package/dist/constants/navigator-site.d.ts +4 -0
- package/dist/constants/navigator-site.js +12 -0
- package/dist/integrations/connect-integration.dto.d.ts +6 -0
- package/dist/integrations/connect-integration.dto.js +5 -0
- package/dist/integrations/provider-code.enum.d.ts +1 -1
- package/dist/integrations/provider-code.enum.js +1 -1
- package/dist/navigator-certificate/request-navigator-certificate-redeem.dto.d.ts +2 -1
- package/dist/navigator-certificate/request-navigator-certificate-redeem.dto.js +1 -0
- package/dist/openapi/orders/openapi-update-order.dto.d.ts +9 -0
- package/dist/openapi/orders/openapi-update-order.dto.js +24 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** International (Stripe) platform fee when a questroom redeems a Navigator certificate. */
|
|
2
|
+
export declare const NAVIGATOR_CERTIFICATE_REDEEM_FEE_RATE_INTL = 0.08;
|
|
3
|
+
/** RU payout goes to CRM balance; platform fee is 20%. */
|
|
4
|
+
export declare const NAVIGATOR_CERTIFICATE_REDEEM_FEE_RATE_RU = 0.2;
|
|
5
|
+
export declare const navigatorCertificateRedeemFeeRate: (ru: boolean) => number;
|
|
6
|
+
export declare const navigatorCertificateRedeemPayout: (usedAmount: number, feeRate: number) => {
|
|
7
|
+
amountToPay: number;
|
|
8
|
+
commission: number;
|
|
9
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.navigatorCertificateRedeemPayout = exports.navigatorCertificateRedeemFeeRate = exports.NAVIGATOR_CERTIFICATE_REDEEM_FEE_RATE_RU = exports.NAVIGATOR_CERTIFICATE_REDEEM_FEE_RATE_INTL = void 0;
|
|
4
|
+
/** International (Stripe) platform fee when a questroom redeems a Navigator certificate. */
|
|
5
|
+
exports.NAVIGATOR_CERTIFICATE_REDEEM_FEE_RATE_INTL = 0.08;
|
|
6
|
+
/** RU payout goes to CRM balance; platform fee is 20%. */
|
|
7
|
+
exports.NAVIGATOR_CERTIFICATE_REDEEM_FEE_RATE_RU = 0.2;
|
|
8
|
+
const navigatorCertificateRedeemFeeRate = (ru) => ru ? exports.NAVIGATOR_CERTIFICATE_REDEEM_FEE_RATE_RU : exports.NAVIGATOR_CERTIFICATE_REDEEM_FEE_RATE_INTL;
|
|
9
|
+
exports.navigatorCertificateRedeemFeeRate = navigatorCertificateRedeemFeeRate;
|
|
10
|
+
const navigatorCertificateRedeemPayout = (usedAmount, feeRate) => {
|
|
11
|
+
const amountToPay = Math.round(usedAmount * (1 - feeRate));
|
|
12
|
+
const commission = usedAmount - amountToPay;
|
|
13
|
+
return { amountToPay, commission };
|
|
14
|
+
};
|
|
15
|
+
exports.navigatorCertificateRedeemPayout = navigatorCertificateRedeemPayout;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { CountriesEnum } from '../shared/enum/countries.enum';
|
|
2
|
+
export declare const navigatorSiteHost: (country?: CountriesEnum | null) => string;
|
|
3
|
+
export declare const navigatorSiteUrl: (country?: CountriesEnum | null) => string;
|
|
4
|
+
export declare const navigatorInfoEmail: (country?: CountriesEnum | null) => string;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.navigatorInfoEmail = exports.navigatorSiteUrl = exports.navigatorSiteHost = void 0;
|
|
4
|
+
const countries_enum_1 = require("../shared/enum/countries.enum");
|
|
5
|
+
const namespaces_enum_1 = require("../shared/enum/namespaces.enum");
|
|
6
|
+
const namespace_by_country_1 = require("./namespace-by-country");
|
|
7
|
+
const navigatorSiteHost = (country) => `escapenavigator.${namespace_by_country_1.namespaceByCountry[country || countries_enum_1.CountriesEnum.USA] || namespaces_enum_1.NamespacesEnum.USA}`;
|
|
8
|
+
exports.navigatorSiteHost = navigatorSiteHost;
|
|
9
|
+
const navigatorSiteUrl = (country) => `https://${(0, exports.navigatorSiteHost)(country)}`;
|
|
10
|
+
exports.navigatorSiteUrl = navigatorSiteUrl;
|
|
11
|
+
const navigatorInfoEmail = (country) => country === countries_enum_1.CountriesEnum.RUSSIA ? 'info@escapenavigator.ru' : 'info@escapenavigator.com';
|
|
12
|
+
exports.navigatorInfoEmail = navigatorInfoEmail;
|
|
@@ -10,6 +10,12 @@ export declare class ConnectIntegrationDto {
|
|
|
10
10
|
* рассинхрон при добавлении следующего.
|
|
11
11
|
*/
|
|
12
12
|
credentials: Record<string, string>;
|
|
13
|
+
/**
|
|
14
|
+
* Несекретные признаки вендора. Для MyERP-совместимых систем сюда уходит
|
|
15
|
+
* `vendor` с карточки в кабинете (myerp / questadmin / chezakod), чтобы
|
|
16
|
+
* бронь ушла с нужными именами полей.
|
|
17
|
+
*/
|
|
18
|
+
settings?: Record<string, unknown>;
|
|
13
19
|
/**
|
|
14
20
|
* К какому нашему квесту относится доступ. Обязателен для систем с
|
|
15
21
|
* `connectionScope: 'resource'` (MyERP-совместимые): там ссылка открывает
|
|
@@ -30,6 +30,11 @@ __decorate([
|
|
|
30
30
|
(0, class_validator_1.IsObject)(),
|
|
31
31
|
__metadata("design:type", Object)
|
|
32
32
|
], ConnectIntegrationDto.prototype, "credentials", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, class_validator_1.IsOptional)(),
|
|
35
|
+
(0, class_validator_1.IsObject)(),
|
|
36
|
+
__metadata("design:type", Object)
|
|
37
|
+
], ConnectIntegrationDto.prototype, "settings", void 0);
|
|
33
38
|
__decorate([
|
|
34
39
|
(0, class_validator_1.IsOptional)(),
|
|
35
40
|
(0, class_validator_1.IsInt)(),
|
|
@@ -15,7 +15,7 @@ export declare enum IntegrationProviderCodeEnum {
|
|
|
15
15
|
CRM = "crm",
|
|
16
16
|
/** Partner Booking API — зеркало Morty-стандарта, реализует партнёр. */
|
|
17
17
|
PARTNER_API = "partner_api",
|
|
18
|
-
/** Легаси: МойЭРП / КвестАдмин / «Мир квестов» — per-quest URL'ы. */
|
|
18
|
+
/** Легаси: МойЭРП / КвестАдмин / Чеширский код / «Мир квестов» — per-quest URL'ы. */
|
|
19
19
|
MYERP = "myerp",
|
|
20
20
|
BOOKEO = "bookeo",
|
|
21
21
|
OFFTHECOUCH = "offthecouch",
|
|
@@ -19,7 +19,7 @@ var IntegrationProviderCodeEnum;
|
|
|
19
19
|
IntegrationProviderCodeEnum["CRM"] = "crm";
|
|
20
20
|
/** Partner Booking API — зеркало Morty-стандарта, реализует партнёр. */
|
|
21
21
|
IntegrationProviderCodeEnum["PARTNER_API"] = "partner_api";
|
|
22
|
-
/** Легаси: МойЭРП / КвестАдмин / «Мир квестов» — per-quest URL'ы. */
|
|
22
|
+
/** Легаси: МойЭРП / КвестАдмин / Чеширский код / «Мир квестов» — per-quest URL'ы. */
|
|
23
23
|
IntegrationProviderCodeEnum["MYERP"] = "myerp";
|
|
24
24
|
IntegrationProviderCodeEnum["BOOKEO"] = "bookeo";
|
|
25
25
|
IntegrationProviderCodeEnum["OFFTHECOUCH"] = "offthecouch";
|
|
@@ -32,6 +32,7 @@ __decorate([
|
|
|
32
32
|
__metadata("design:type", Number)
|
|
33
33
|
], RequestNavigatorCertificateRedeemDto.prototype, "usedAmount", void 0);
|
|
34
34
|
__decorate([
|
|
35
|
+
(0, class_validator_1.IsOptional)(),
|
|
35
36
|
(0, class_transformer_1.Type)(() => Number),
|
|
36
37
|
(0, class_validator_1.IsInt)(),
|
|
37
38
|
(0, class_validator_1.Min)(1),
|
|
@@ -32,4 +32,13 @@ export declare class OpenapiUpdateOrderDto extends ClientFormDto {
|
|
|
32
32
|
}>;
|
|
33
33
|
upsellingIds?: any;
|
|
34
34
|
customFields: CustomFiled[];
|
|
35
|
+
/**
|
|
36
|
+
* PT / Moloni: реквизиты компании на retry шага «Контакт».
|
|
37
|
+
* Виджет шлёт только для Portugal. Если не передано — колонки ордера
|
|
38
|
+
* не трогаем (AT/DE retry не затирает и не шлёт эти поля).
|
|
39
|
+
*/
|
|
40
|
+
billedAsCompany?: boolean;
|
|
41
|
+
billingOrganizationName?: string | null;
|
|
42
|
+
billingTaxId?: string | null;
|
|
43
|
+
billingAddress?: string | null;
|
|
35
44
|
}
|
|
@@ -88,3 +88,27 @@ __decorate([
|
|
|
88
88
|
(0, class_transformer_1.Type)(() => openapi_create_preorder_dto_1.CustomFiled),
|
|
89
89
|
__metadata("design:type", Array)
|
|
90
90
|
], OpenapiUpdateOrderDto.prototype, "customFields", void 0);
|
|
91
|
+
__decorate([
|
|
92
|
+
(0, class_validator_1.IsOptional)(),
|
|
93
|
+
(0, class_validator_1.IsBoolean)(),
|
|
94
|
+
(0, class_transformer_1.Expose)(),
|
|
95
|
+
__metadata("design:type", Boolean)
|
|
96
|
+
], OpenapiUpdateOrderDto.prototype, "billedAsCompany", void 0);
|
|
97
|
+
__decorate([
|
|
98
|
+
(0, class_validator_1.IsOptional)(),
|
|
99
|
+
(0, class_validator_1.IsString)(),
|
|
100
|
+
(0, class_transformer_1.Expose)(),
|
|
101
|
+
__metadata("design:type", String)
|
|
102
|
+
], OpenapiUpdateOrderDto.prototype, "billingOrganizationName", void 0);
|
|
103
|
+
__decorate([
|
|
104
|
+
(0, class_validator_1.IsOptional)(),
|
|
105
|
+
(0, class_validator_1.IsString)(),
|
|
106
|
+
(0, class_transformer_1.Expose)(),
|
|
107
|
+
__metadata("design:type", String)
|
|
108
|
+
], OpenapiUpdateOrderDto.prototype, "billingTaxId", void 0);
|
|
109
|
+
__decorate([
|
|
110
|
+
(0, class_validator_1.IsOptional)(),
|
|
111
|
+
(0, class_validator_1.IsString)(),
|
|
112
|
+
(0, class_transformer_1.Expose)(),
|
|
113
|
+
__metadata("design:type", String)
|
|
114
|
+
], OpenapiUpdateOrderDto.prototype, "billingAddress", void 0);
|