@merkaly/api 0.25.2 → 0.26.0
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/finance/payment/payment.gateway.entity.d.ts +2 -0
- package/dist/integration/payment/charge.enum.d.ts +4 -0
- package/dist/integration/payment/charge.enum.js +5 -0
- package/dist/inventory/catalog/product/product.entity.d.ts +1 -4
- package/dist/inventory/catalog/product/request.validator.d.ts +1 -1
- package/dist/inventory/catalog/product/request.validator.js +8 -9
- package/package.json +2 -2
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Schema as MongoSchema } from 'mongoose';
|
|
2
|
+
import { PaymentChargeAccountEnum } from '../../integration/payment';
|
|
2
3
|
import { FinancePaymentMethodEnum } from './payment.enum.js';
|
|
3
4
|
export declare class FinancePaymentGatewayPixEntity {
|
|
4
5
|
qrCode?: string | null;
|
|
@@ -29,6 +30,7 @@ export declare const FinancePaymentGatewayCardSchema: MongoSchema<FinancePayment
|
|
|
29
30
|
export declare class FinancePaymentGatewayEntity {
|
|
30
31
|
provider: string;
|
|
31
32
|
reference?: string | null;
|
|
33
|
+
account?: PaymentChargeAccountEnum | null;
|
|
32
34
|
method: FinancePaymentMethodEnum;
|
|
33
35
|
status: string;
|
|
34
36
|
message?: string | null;
|
|
@@ -8,3 +8,8 @@ export var PaymentChargeStatusEnum;
|
|
|
8
8
|
PaymentChargeStatusEnum["EXPIRED"] = "EXPIRED";
|
|
9
9
|
PaymentChargeStatusEnum["REFUNDED"] = "REFUNDED";
|
|
10
10
|
})(PaymentChargeStatusEnum || (PaymentChargeStatusEnum = {}));
|
|
11
|
+
export var PaymentChargeAccountEnum;
|
|
12
|
+
(function (PaymentChargeAccountEnum) {
|
|
13
|
+
PaymentChargeAccountEnum["MAIN"] = "MAIN";
|
|
14
|
+
PaymentChargeAccountEnum["SUBCONTA"] = "SUBCONTA";
|
|
15
|
+
})(PaymentChargeAccountEnum || (PaymentChargeAccountEnum = {}));
|
|
@@ -5,7 +5,6 @@ import type { CatalogBrandEntity } from '../brand';
|
|
|
5
5
|
import type { CatalogCategoryEntity } from '../category';
|
|
6
6
|
import type { CatalogVariantEntity } from '../variant';
|
|
7
7
|
import type { ContactVendorEntity } from '../../../contact/vendor';
|
|
8
|
-
import type { IntegrationSupplierEntity } from '../../../integration/supplier';
|
|
9
8
|
export declare class CatalogProductPropertyEntity {
|
|
10
9
|
name: string;
|
|
11
10
|
value: string;
|
|
@@ -25,7 +24,6 @@ export declare class CatalogProductEntity extends AbstractEntity {
|
|
|
25
24
|
name: string;
|
|
26
25
|
description?: string;
|
|
27
26
|
active: boolean;
|
|
28
|
-
supplier?: IntegrationSupplierEntity;
|
|
29
27
|
vendor?: ContactVendorEntity;
|
|
30
28
|
externalProductId?: string;
|
|
31
29
|
handlingDays?: number | null;
|
|
@@ -33,13 +31,12 @@ export declare class CatalogProductEntity extends AbstractEntity {
|
|
|
33
31
|
ratingValue?: number | null;
|
|
34
32
|
ratingCount?: number | null;
|
|
35
33
|
soldCount?: number | null;
|
|
36
|
-
reviewCount?: number | null;
|
|
37
34
|
variant: CatalogVariantEntity;
|
|
38
35
|
readonly supplierPrice: number;
|
|
39
36
|
readonly retailPrice: number;
|
|
40
37
|
category?: CatalogCategoryEntity;
|
|
41
38
|
brand?: CatalogBrandEntity;
|
|
42
|
-
|
|
39
|
+
posterId?: string | null;
|
|
43
40
|
readonly picture: AssetEntity;
|
|
44
41
|
readonly assets: AssetEntity[];
|
|
45
42
|
readonly options: {
|
|
@@ -7,7 +7,6 @@ declare class ProductMetadataRequestValidator extends AbstractRequestValidator {
|
|
|
7
7
|
description?: string;
|
|
8
8
|
category?: string;
|
|
9
9
|
brand?: string;
|
|
10
|
-
hashtags?: string[];
|
|
11
10
|
constructor(product?: CatalogProductEntity);
|
|
12
11
|
}
|
|
13
12
|
declare class UpdateProductVariantRequestValidator extends UpdateVariantRequestValidator {
|
|
@@ -20,6 +19,7 @@ declare class UpdateProductVariantsItemRequestValidator extends UpdateVariantReq
|
|
|
20
19
|
export declare class UpdateProductRequestValidator extends ProductMetadataRequestValidator {
|
|
21
20
|
name: string;
|
|
22
21
|
active?: boolean;
|
|
22
|
+
posterId?: string | null;
|
|
23
23
|
variant?: UpdateProductVariantRequestValidator;
|
|
24
24
|
variants?: UpdateProductVariantsItemRequestValidator[];
|
|
25
25
|
constructor(product?: CatalogProductEntity);
|
|
@@ -17,7 +17,6 @@ class ProductMetadataRequestValidator extends abstract_validator_1.AbstractReque
|
|
|
17
17
|
description;
|
|
18
18
|
category;
|
|
19
19
|
brand;
|
|
20
|
-
hashtags;
|
|
21
20
|
constructor(product) {
|
|
22
21
|
super();
|
|
23
22
|
if (!product)
|
|
@@ -26,7 +25,6 @@ class ProductMetadataRequestValidator extends abstract_validator_1.AbstractReque
|
|
|
26
25
|
this.description = product.description;
|
|
27
26
|
this.category = (product.category?._id || product.category);
|
|
28
27
|
this.brand = (product.brand?._id || product.brand);
|
|
29
|
-
this.hashtags = product.hashtags ?? [];
|
|
30
28
|
}
|
|
31
29
|
}
|
|
32
30
|
__decorate([
|
|
@@ -52,13 +50,6 @@ __decorate([
|
|
|
52
50
|
(0, class_validator_1.IsOptional)(),
|
|
53
51
|
__metadata("design:type", String)
|
|
54
52
|
], ProductMetadataRequestValidator.prototype, "brand", void 0);
|
|
55
|
-
__decorate([
|
|
56
|
-
(0, class_validator_1.IsArray)(),
|
|
57
|
-
(0, class_validator_1.IsString)({ each: true }),
|
|
58
|
-
(0, class_validator_1.Length)(0, 50, { each: true }),
|
|
59
|
-
(0, class_validator_1.IsOptional)(),
|
|
60
|
-
__metadata("design:type", Array)
|
|
61
|
-
], ProductMetadataRequestValidator.prototype, "hashtags", void 0);
|
|
62
53
|
class UpdateProductVariantRequestValidator extends request_validator_1.UpdateVariantRequestValidator {
|
|
63
54
|
_id;
|
|
64
55
|
constructor(variant) {
|
|
@@ -81,12 +72,15 @@ __decorate([
|
|
|
81
72
|
], UpdateProductVariantsItemRequestValidator.prototype, "_id", void 0);
|
|
82
73
|
export class UpdateProductRequestValidator extends ProductMetadataRequestValidator {
|
|
83
74
|
active;
|
|
75
|
+
posterId;
|
|
84
76
|
variant;
|
|
85
77
|
variants;
|
|
86
78
|
constructor(product) {
|
|
87
79
|
super(product);
|
|
88
80
|
if (product)
|
|
89
81
|
this.active = product.active;
|
|
82
|
+
if (product)
|
|
83
|
+
this.posterId = product.posterId ? String(product.posterId) : null;
|
|
90
84
|
if (product?.variant)
|
|
91
85
|
this.variant = new UpdateProductVariantRequestValidator(product.variant);
|
|
92
86
|
}
|
|
@@ -100,6 +94,11 @@ __decorate([
|
|
|
100
94
|
(0, class_validator_1.IsOptional)(),
|
|
101
95
|
__metadata("design:type", Boolean)
|
|
102
96
|
], UpdateProductRequestValidator.prototype, "active", void 0);
|
|
97
|
+
__decorate([
|
|
98
|
+
(0, class_validator_1.IsMongoId)(),
|
|
99
|
+
(0, class_validator_1.IsOptional)(),
|
|
100
|
+
__metadata("design:type", String)
|
|
101
|
+
], UpdateProductRequestValidator.prototype, "posterId", void 0);
|
|
103
102
|
__decorate([
|
|
104
103
|
(0, class_validator_1.IsOptional)(),
|
|
105
104
|
(0, class_validator_1.ValidateNested)(),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@merkaly/api",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.26.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Shared TypeScript interfaces and enums for Merkaly API",
|
|
6
6
|
"repository": {
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/node": "^26.6.1",
|
|
33
33
|
"changelogen": "^0.6.2",
|
|
34
|
-
"oxlint": "^1.
|
|
34
|
+
"oxlint": "^1.90.0",
|
|
35
35
|
"tsx": "^4.23.0",
|
|
36
36
|
"typescript": "^7.0.2"
|
|
37
37
|
},
|