@escapenavigator/types 2.2.3 → 2.2.4

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.
@@ -1,5 +1,7 @@
1
1
  import { CashboxLightRO } from './cashbox-light.ro';
2
2
  export declare class CashboxRO extends CashboxLightRO {
3
3
  squareLocationId: string;
4
+ fiscalFfdVersion?: '1.05' | '1.2';
5
+ fiscalTaxation?: 'osn' | 'usn_income' | 'usn_income_outcome' | 'esn' | 'patent' | null;
4
6
  hasApiSecret?: boolean;
5
7
  }
@@ -19,6 +19,14 @@ __decorate([
19
19
  (0, class_transformer_1.Expose)(),
20
20
  __metadata("design:type", String)
21
21
  ], CashboxRO.prototype, "squareLocationId", void 0);
22
+ __decorate([
23
+ (0, class_transformer_1.Expose)(),
24
+ __metadata("design:type", String)
25
+ ], CashboxRO.prototype, "fiscalFfdVersion", void 0);
26
+ __decorate([
27
+ (0, class_transformer_1.Expose)(),
28
+ __metadata("design:type", String)
29
+ ], CashboxRO.prototype, "fiscalTaxation", void 0);
22
30
  __decorate([
23
31
  (0, class_transformer_1.Expose)(),
24
32
  (0, class_transformer_1.Transform)(({ obj }) => !!obj.apiSecret || !!obj.hasApiSecret),
@@ -10,4 +10,8 @@ export declare class CreateOnlineCashboxDto {
10
10
  increase: number;
11
11
  increaseType: PrepaymentTypeEnum;
12
12
  squareLocationId: string;
13
+ /** ФФД чека Т‑Банка. Пусто и `1.05` не меняют чек. `1.2` включает версию. */
14
+ fiscalFfdVersion?: '1.05' | '1.2';
15
+ /** СНО чека Т‑Банка. Пусто — из НДС профиля. */
16
+ fiscalTaxation?: 'osn' | 'usn_income' | 'usn_income_outcome' | 'esn' | 'patent' | null;
13
17
  }
@@ -74,3 +74,15 @@ __decorate([
74
74
  (0, class_transformer_1.Expose)(),
75
75
  __metadata("design:type", String)
76
76
  ], CreateOnlineCashboxDto.prototype, "squareLocationId", void 0);
77
+ __decorate([
78
+ (0, class_validator_1.IsOptional)(),
79
+ (0, class_validator_1.IsIn)(['1.05', '1.2']),
80
+ (0, class_transformer_1.Expose)(),
81
+ __metadata("design:type", String)
82
+ ], CreateOnlineCashboxDto.prototype, "fiscalFfdVersion", void 0);
83
+ __decorate([
84
+ (0, class_validator_1.IsOptional)(),
85
+ (0, class_validator_1.IsIn)(['osn', 'usn_income', 'usn_income_outcome', 'esn', 'patent']),
86
+ (0, class_transformer_1.Expose)(),
87
+ __metadata("design:type", String)
88
+ ], CreateOnlineCashboxDto.prototype, "fiscalTaxation", void 0);
@@ -8,4 +8,6 @@ export declare class UpdateOnlineCashboxDto {
8
8
  increase: number;
9
9
  increaseType: PrepaymentTypeEnum;
10
10
  squareLocationId: string;
11
+ fiscalFfdVersion?: '1.05' | '1.2';
12
+ fiscalTaxation?: 'osn' | 'usn_income' | 'usn_income_outcome' | 'esn' | 'patent' | null;
11
13
  }
@@ -60,3 +60,15 @@ __decorate([
60
60
  (0, class_transformer_1.Expose)(),
61
61
  __metadata("design:type", String)
62
62
  ], UpdateOnlineCashboxDto.prototype, "squareLocationId", void 0);
63
+ __decorate([
64
+ (0, class_validator_1.IsOptional)(),
65
+ (0, class_validator_1.IsIn)(['1.05', '1.2']),
66
+ (0, class_transformer_1.Expose)(),
67
+ __metadata("design:type", String)
68
+ ], UpdateOnlineCashboxDto.prototype, "fiscalFfdVersion", void 0);
69
+ __decorate([
70
+ (0, class_validator_1.IsOptional)(),
71
+ (0, class_validator_1.IsIn)(['osn', 'usn_income', 'usn_income_outcome', 'esn', 'patent']),
72
+ (0, class_transformer_1.Expose)(),
73
+ __metadata("design:type", String)
74
+ ], UpdateOnlineCashboxDto.prototype, "fiscalTaxation", void 0);
@@ -13,4 +13,7 @@ export declare class CertificateDesignRO extends RO {
13
13
  deliveryPrice: number;
14
14
  deliveryExtraPrice: number;
15
15
  order: number;
16
+ onlinePaymentsCashbox: number | null;
17
+ paypalCashbox: number | null;
18
+ ruOnlineCashbox: number | null;
16
19
  }
@@ -67,3 +67,15 @@ __decorate([
67
67
  (0, class_transformer_1.Expose)(),
68
68
  __metadata("design:type", Number)
69
69
  ], CertificateDesignRO.prototype, "order", void 0);
70
+ __decorate([
71
+ (0, class_transformer_1.Expose)(),
72
+ __metadata("design:type", Number)
73
+ ], CertificateDesignRO.prototype, "onlinePaymentsCashbox", void 0);
74
+ __decorate([
75
+ (0, class_transformer_1.Expose)(),
76
+ __metadata("design:type", Number)
77
+ ], CertificateDesignRO.prototype, "paypalCashbox", void 0);
78
+ __decorate([
79
+ (0, class_transformer_1.Expose)(),
80
+ __metadata("design:type", Number)
81
+ ], CertificateDesignRO.prototype, "ruOnlineCashbox", void 0);
@@ -11,4 +11,7 @@ export declare class CreateCertificateDesignDto {
11
11
  deliveryPrice?: number;
12
12
  deliveryExtraPrice?: number;
13
13
  order?: number;
14
+ onlinePaymentsCashbox?: number | null;
15
+ paypalCashbox?: number | null;
16
+ ruOnlineCashbox?: number | null;
14
17
  }
@@ -17,6 +17,14 @@ const is_not_blank_1 = require("../shared/is-not-blank");
17
17
  function checkBoolean({ value }, defaultValue) {
18
18
  return value === undefined ? (defaultValue !== null && defaultValue !== void 0 ? defaultValue : false) : value;
19
19
  }
20
+ /** Пустое значение — «не переопределять», касса берётся из настроек магазина. */
21
+ function optionalCashboxId({ value }) {
22
+ if (value === undefined)
23
+ return undefined;
24
+ if (value === null || value === '' || value === 0)
25
+ return null;
26
+ return Number(value);
27
+ }
20
28
  class CreateCertificateDesignDto {
21
29
  }
22
30
  exports.CreateCertificateDesignDto = CreateCertificateDesignDto;
@@ -100,3 +108,27 @@ __decorate([
100
108
  (0, class_transformer_1.Expose)(),
101
109
  __metadata("design:type", Number)
102
110
  ], CreateCertificateDesignDto.prototype, "order", void 0);
111
+ __decorate([
112
+ (0, class_validator_1.IsOptional)(),
113
+ (0, class_transformer_1.Transform)(({ value }) => optionalCashboxId({ value })),
114
+ (0, class_validator_1.IsInt)(),
115
+ (0, class_validator_1.Min)(1),
116
+ (0, class_transformer_1.Expose)(),
117
+ __metadata("design:type", Number)
118
+ ], CreateCertificateDesignDto.prototype, "onlinePaymentsCashbox", void 0);
119
+ __decorate([
120
+ (0, class_validator_1.IsOptional)(),
121
+ (0, class_transformer_1.Transform)(({ value }) => optionalCashboxId({ value })),
122
+ (0, class_validator_1.IsInt)(),
123
+ (0, class_validator_1.Min)(1),
124
+ (0, class_transformer_1.Expose)(),
125
+ __metadata("design:type", Number)
126
+ ], CreateCertificateDesignDto.prototype, "paypalCashbox", void 0);
127
+ __decorate([
128
+ (0, class_validator_1.IsOptional)(),
129
+ (0, class_transformer_1.Transform)(({ value }) => optionalCashboxId({ value })),
130
+ (0, class_validator_1.IsInt)(),
131
+ (0, class_validator_1.Min)(1),
132
+ (0, class_transformer_1.Expose)(),
133
+ __metadata("design:type", Number)
134
+ ], CreateCertificateDesignDto.prototype, "ruOnlineCashbox", void 0);