@merkaly/api 0.28.3 → 0.28.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.
- package/dist/abstract.validator.d.ts +6 -2
- package/dist/abstract.validator.js +47 -5
- package/dist/finance/payment/payment.entity.d.ts +4 -4
- package/dist/integration/payment/payment.account.entity.d.ts +4 -4
- package/dist/integration/supplier/supplier.connection.entity.d.ts +1 -1
- package/dist/inventory/catalog/product/product.entity.d.ts +1 -1
- package/dist/inventory/catalog/variant/variant.option.entity.d.ts +1 -1
- package/dist/logistics/shipment/shipment.entity.d.ts +1 -1
- package/dist/order/purchase/purchase.entity.d.ts +1 -1
- package/dist/order/sale/sale.entity.d.ts +5 -5
- package/dist/order/sale/search.request.validator.d.ts +1 -2
- package/dist/order/sale/search.request.validator.js +0 -1
- package/package.json +1 -1
|
@@ -7,13 +7,17 @@ declare class PaginationValidator {
|
|
|
7
7
|
export type AbstractEntityValidator = Record<string, any>;
|
|
8
8
|
export declare abstract class AbstractRequestValidator {
|
|
9
9
|
}
|
|
10
|
+
export interface ReadRules {
|
|
11
|
+
join: readonly string[];
|
|
12
|
+
}
|
|
10
13
|
export declare class ReadValidator extends AbstractRequestValidator {
|
|
14
|
+
static readonly rules: ReadRules;
|
|
11
15
|
join?: PopulateOptions[];
|
|
12
16
|
select?: string;
|
|
13
17
|
}
|
|
14
|
-
export interface SearchRules {
|
|
18
|
+
export interface SearchRules extends ReadRules {
|
|
15
19
|
filters: readonly string[];
|
|
16
|
-
sort
|
|
20
|
+
sort?: readonly string[];
|
|
17
21
|
}
|
|
18
22
|
export declare class SearchValidator<E = AbstractEntity> extends ReadValidator {
|
|
19
23
|
static readonly rules: SearchRules;
|
|
@@ -29,12 +29,14 @@ __decorate([
|
|
|
29
29
|
export class AbstractRequestValidator {
|
|
30
30
|
}
|
|
31
31
|
export class ReadValidator extends AbstractRequestValidator {
|
|
32
|
+
static rules = { join: [] };
|
|
32
33
|
join = [];
|
|
33
34
|
select;
|
|
34
35
|
}
|
|
35
36
|
__decorate([
|
|
36
37
|
(0, class_validator_1.IsOptional)(),
|
|
37
38
|
(0, class_transformer_1.Transform)(({ value }) => transformJoinsIntoPopulate(value)),
|
|
39
|
+
AllowedBy('join', joinViolation),
|
|
38
40
|
__metadata("design:type", Array)
|
|
39
41
|
], ReadValidator.prototype, "join", void 0);
|
|
40
42
|
__decorate([
|
|
@@ -42,7 +44,7 @@ __decorate([
|
|
|
42
44
|
__metadata("design:type", String)
|
|
43
45
|
], ReadValidator.prototype, "select", void 0);
|
|
44
46
|
export class SearchValidator extends ReadValidator {
|
|
45
|
-
static rules = { filters: [],
|
|
47
|
+
static rules = { filters: [], join: [] };
|
|
46
48
|
pagination = new PaginationValidator();
|
|
47
49
|
sort = {};
|
|
48
50
|
filters = {};
|
|
@@ -67,7 +69,7 @@ __decorate([
|
|
|
67
69
|
__metadata("design:type", Object)
|
|
68
70
|
], SearchValidator.prototype, "sort", void 0);
|
|
69
71
|
__decorate([
|
|
70
|
-
(0, class_transformer_1.Transform)(({ key, value }) => transformStructuredValue(key, value)),
|
|
72
|
+
(0, class_transformer_1.Transform)(({ key, value }) => escapeRegexOperands(key, transformStructuredValue(key, value))),
|
|
71
73
|
AllowedBy('filters', filterViolation),
|
|
72
74
|
(0, class_validator_1.IsOptional)(),
|
|
73
75
|
__metadata("design:type", Object)
|
|
@@ -90,7 +92,11 @@ const FIELD_OPERATORS = new Set([
|
|
|
90
92
|
'$exists',
|
|
91
93
|
]);
|
|
92
94
|
const LOGICAL_OPERATORS = new Set(['$and', '$or']);
|
|
93
|
-
const
|
|
95
|
+
const REGEX_MAX_LENGTH = 100;
|
|
96
|
+
const REGEX_OPTIONS = /^[ims]*$/;
|
|
97
|
+
const REGEX_SPECIALS = /[\\^$.*+?()[\]{}|]/g;
|
|
98
|
+
const REGEX_ESCAPED = /\\([\\^$.*+?()[\]{}|])/g;
|
|
99
|
+
const rulesOf = (object) => object.constructor.rules ?? ReadValidator.rules;
|
|
94
100
|
function AllowedBy(name, violation) {
|
|
95
101
|
return (0, class_validator_1.ValidateBy)({
|
|
96
102
|
name: `${name}Allowed`,
|
|
@@ -118,7 +124,7 @@ function filterViolation(value, rules, path = 'filters') {
|
|
|
118
124
|
return nested;
|
|
119
125
|
continue;
|
|
120
126
|
}
|
|
121
|
-
if (!rules.filters.includes(field))
|
|
127
|
+
if (!(rules.filters ?? []).includes(field))
|
|
122
128
|
return `${path}.${field} is not filterable`;
|
|
123
129
|
if (isPlainValue(condition))
|
|
124
130
|
continue;
|
|
@@ -129,6 +135,10 @@ function filterViolation(value, rules, path = 'filters') {
|
|
|
129
135
|
return `${path}.${field} must not use ${operator}`;
|
|
130
136
|
if (!isPlainValue(operand))
|
|
131
137
|
return `${path}.${field}.${operator} must be a plain value`;
|
|
138
|
+
if (operator === '$regex' && !(0, class_validator_1.isString)(operand))
|
|
139
|
+
return `${path}.${field}.$regex must be a string`;
|
|
140
|
+
if (operator === '$options' && !((0, class_validator_1.isString)(operand) && REGEX_OPTIONS.test(operand)))
|
|
141
|
+
return `${path}.${field}.$options must only use i, m or s`;
|
|
132
142
|
}
|
|
133
143
|
}
|
|
134
144
|
return undefined;
|
|
@@ -136,9 +146,41 @@ function filterViolation(value, rules, path = 'filters') {
|
|
|
136
146
|
function sortViolation(value, rules) {
|
|
137
147
|
if (!(0, class_validator_1.isObject)(value))
|
|
138
148
|
return undefined;
|
|
139
|
-
const field = Object.keys(value).find((key) => !rules.sort.includes(key));
|
|
149
|
+
const field = Object.keys(value).find((key) => !(rules.sort ?? rules.filters ?? []).includes(key));
|
|
140
150
|
return field ? `sort.${field} is not sortable` : undefined;
|
|
141
151
|
}
|
|
152
|
+
function joinViolation(value, rules, prefix = '') {
|
|
153
|
+
if (value === undefined || value === null)
|
|
154
|
+
return undefined;
|
|
155
|
+
if (!(0, class_validator_1.isArray)(value))
|
|
156
|
+
return 'join must be a list';
|
|
157
|
+
for (const entry of value) {
|
|
158
|
+
if (!(0, class_validator_1.isString)(entry?.path))
|
|
159
|
+
return 'join entries must have a path';
|
|
160
|
+
const path = prefix ? `${prefix}.${entry.path}` : entry.path;
|
|
161
|
+
if (!(rules.join ?? []).includes(path))
|
|
162
|
+
return `join.${path} is not allowed`;
|
|
163
|
+
const nested = joinViolation(entry.populate, rules, path);
|
|
164
|
+
if (nested)
|
|
165
|
+
return nested;
|
|
166
|
+
}
|
|
167
|
+
return undefined;
|
|
168
|
+
}
|
|
169
|
+
const escapeRegex = (term) => term.replace(REGEX_ESCAPED, '$1').replace(REGEX_SPECIALS, '\\$&');
|
|
170
|
+
function escapeRegexOperands(key, value) {
|
|
171
|
+
if ((0, class_validator_1.isArray)(value))
|
|
172
|
+
return value.map((item) => escapeRegexOperands(key, item));
|
|
173
|
+
if (!(0, class_validator_1.isObject)(value))
|
|
174
|
+
return value;
|
|
175
|
+
const entries = Object.entries(value).map(([field, nested]) => {
|
|
176
|
+
if (field !== '$regex' || !(0, class_validator_1.isString)(nested))
|
|
177
|
+
return [field, escapeRegexOperands(key, nested)];
|
|
178
|
+
if (nested.length > REGEX_MAX_LENGTH)
|
|
179
|
+
throw new QueryValidationError(`${key} $regex must be at most ${REGEX_MAX_LENGTH} characters`);
|
|
180
|
+
return [field, escapeRegex(nested)];
|
|
181
|
+
});
|
|
182
|
+
return Object.fromEntries(entries);
|
|
183
|
+
}
|
|
142
184
|
const SORT_ORDERS = new Set([1, -1, 'asc', 'desc', 'ascending', 'descending']);
|
|
143
185
|
function assertSortOrder(sort) {
|
|
144
186
|
if (!sort)
|
|
@@ -16,7 +16,7 @@ export declare const FinancePaymentGatewayPixSchema: MongoSchema<FinancePaymentG
|
|
|
16
16
|
_id: import("mongoose").Types.ObjectId;
|
|
17
17
|
} & {
|
|
18
18
|
__v: number;
|
|
19
|
-
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, FinancePaymentGatewayPixEntity, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<FinancePaymentGatewayPixEntity>, {}, import("mongoose").
|
|
19
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, FinancePaymentGatewayPixEntity, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<FinancePaymentGatewayPixEntity>, {}, import("mongoose").DefaultSchemaOptions> & import("mongoose").FlatRecord<FinancePaymentGatewayPixEntity> & {
|
|
20
20
|
_id: import("mongoose").Types.ObjectId;
|
|
21
21
|
} & {
|
|
22
22
|
__v: number;
|
|
@@ -29,7 +29,7 @@ export declare const FinancePaymentGatewayCardSchema: MongoSchema<FinancePayment
|
|
|
29
29
|
_id: import("mongoose").Types.ObjectId;
|
|
30
30
|
} & {
|
|
31
31
|
__v: number;
|
|
32
|
-
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, FinancePaymentGatewayCardEntity, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<FinancePaymentGatewayCardEntity>, {}, import("mongoose").
|
|
32
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, FinancePaymentGatewayCardEntity, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<FinancePaymentGatewayCardEntity>, {}, import("mongoose").DefaultSchemaOptions> & import("mongoose").FlatRecord<FinancePaymentGatewayCardEntity> & {
|
|
33
33
|
_id: import("mongoose").Types.ObjectId;
|
|
34
34
|
} & {
|
|
35
35
|
__v: number;
|
|
@@ -53,7 +53,7 @@ export declare const FinancePaymentGatewaySchema: MongoSchema<FinancePaymentGate
|
|
|
53
53
|
_id: import("mongoose").Types.ObjectId;
|
|
54
54
|
} & {
|
|
55
55
|
__v: number;
|
|
56
|
-
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, FinancePaymentGatewayEntity, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<FinancePaymentGatewayEntity>, {}, import("mongoose").
|
|
56
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, FinancePaymentGatewayEntity, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<FinancePaymentGatewayEntity>, {}, import("mongoose").DefaultSchemaOptions> & import("mongoose").FlatRecord<FinancePaymentGatewayEntity> & {
|
|
57
57
|
_id: import("mongoose").Types.ObjectId;
|
|
58
58
|
} & {
|
|
59
59
|
__v: number;
|
|
@@ -75,7 +75,7 @@ export declare const FinancePaymentAttemptSchema: MongoSchema<FinancePaymentAtte
|
|
|
75
75
|
_id: import("mongoose").Types.ObjectId;
|
|
76
76
|
} & {
|
|
77
77
|
__v: number;
|
|
78
|
-
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, FinancePaymentAttemptEntity, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<FinancePaymentAttemptEntity>, {}, import("mongoose").
|
|
78
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, FinancePaymentAttemptEntity, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<FinancePaymentAttemptEntity>, {}, import("mongoose").DefaultSchemaOptions> & import("mongoose").FlatRecord<FinancePaymentAttemptEntity> & {
|
|
79
79
|
_id: import("mongoose").Types.ObjectId;
|
|
80
80
|
} & {
|
|
81
81
|
__v: number;
|
|
@@ -10,7 +10,7 @@ export declare const IntegrationPaymentAccountApprovalSchema: MongoSchema<Integr
|
|
|
10
10
|
_id: import("mongoose").Types.ObjectId;
|
|
11
11
|
} & {
|
|
12
12
|
__v: number;
|
|
13
|
-
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, IntegrationPaymentAccountApprovalEntity, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<IntegrationPaymentAccountApprovalEntity>, {}, import("mongoose").
|
|
13
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, IntegrationPaymentAccountApprovalEntity, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<IntegrationPaymentAccountApprovalEntity>, {}, import("mongoose").DefaultSchemaOptions> & import("mongoose").FlatRecord<IntegrationPaymentAccountApprovalEntity> & {
|
|
14
14
|
_id: import("mongoose").Types.ObjectId;
|
|
15
15
|
} & {
|
|
16
16
|
__v: number;
|
|
@@ -23,7 +23,7 @@ export declare const IntegrationPaymentAccountWithdrawalSchema: MongoSchema<Inte
|
|
|
23
23
|
_id: import("mongoose").Types.ObjectId;
|
|
24
24
|
} & {
|
|
25
25
|
__v: number;
|
|
26
|
-
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, IntegrationPaymentAccountWithdrawalEntity, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<IntegrationPaymentAccountWithdrawalEntity>, {}, import("mongoose").
|
|
26
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, IntegrationPaymentAccountWithdrawalEntity, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<IntegrationPaymentAccountWithdrawalEntity>, {}, import("mongoose").DefaultSchemaOptions> & import("mongoose").FlatRecord<IntegrationPaymentAccountWithdrawalEntity> & {
|
|
27
27
|
_id: import("mongoose").Types.ObjectId;
|
|
28
28
|
} & {
|
|
29
29
|
__v: number;
|
|
@@ -37,7 +37,7 @@ export declare const IntegrationPaymentAccountPixSchema: MongoSchema<Integration
|
|
|
37
37
|
_id: import("mongoose").Types.ObjectId;
|
|
38
38
|
} & {
|
|
39
39
|
__v: number;
|
|
40
|
-
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, IntegrationPaymentAccountPixEntity, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<IntegrationPaymentAccountPixEntity>, {}, import("mongoose").
|
|
40
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, IntegrationPaymentAccountPixEntity, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<IntegrationPaymentAccountPixEntity>, {}, import("mongoose").DefaultSchemaOptions> & import("mongoose").FlatRecord<IntegrationPaymentAccountPixEntity> & {
|
|
41
41
|
_id: import("mongoose").Types.ObjectId;
|
|
42
42
|
} & {
|
|
43
43
|
__v: number;
|
|
@@ -60,7 +60,7 @@ export declare const IntegrationPaymentAccountSchema: MongoSchema<IntegrationPay
|
|
|
60
60
|
_id: import("mongoose").Types.ObjectId;
|
|
61
61
|
} & {
|
|
62
62
|
__v: number;
|
|
63
|
-
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, IntegrationPaymentAccountEntity, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<IntegrationPaymentAccountEntity>, {}, import("mongoose").
|
|
63
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, IntegrationPaymentAccountEntity, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<IntegrationPaymentAccountEntity>, {}, import("mongoose").DefaultSchemaOptions> & import("mongoose").FlatRecord<IntegrationPaymentAccountEntity> & {
|
|
64
64
|
_id: import("mongoose").Types.ObjectId;
|
|
65
65
|
} & {
|
|
66
66
|
__v: number;
|
|
@@ -11,7 +11,7 @@ export declare const IntegrationSupplierConnectionSchema: MongoSchema<Integratio
|
|
|
11
11
|
_id: import("mongoose").Types.ObjectId;
|
|
12
12
|
} & {
|
|
13
13
|
__v: number;
|
|
14
|
-
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, IntegrationSupplierConnectionEntity, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<IntegrationSupplierConnectionEntity>, {}, import("mongoose").
|
|
14
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, IntegrationSupplierConnectionEntity, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<IntegrationSupplierConnectionEntity>, {}, import("mongoose").DefaultSchemaOptions> & import("mongoose").FlatRecord<IntegrationSupplierConnectionEntity> & {
|
|
15
15
|
_id: import("mongoose").Types.ObjectId;
|
|
16
16
|
} & {
|
|
17
17
|
__v: number;
|
|
@@ -14,7 +14,7 @@ export declare const CatalogProductPropertySchema: MongoSchema<CatalogProductPro
|
|
|
14
14
|
_id: Types.ObjectId;
|
|
15
15
|
} & {
|
|
16
16
|
__v: number;
|
|
17
|
-
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, CatalogProductPropertyEntity, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<CatalogProductPropertyEntity>, {}, import("mongoose").
|
|
17
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, CatalogProductPropertyEntity, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<CatalogProductPropertyEntity>, {}, import("mongoose").DefaultSchemaOptions> & import("mongoose").FlatRecord<CatalogProductPropertyEntity> & {
|
|
18
18
|
_id: Types.ObjectId;
|
|
19
19
|
} & {
|
|
20
20
|
__v: number;
|
|
@@ -9,7 +9,7 @@ export declare const CatalogVariantOptionSchema: import("mongoose").Schema<Catal
|
|
|
9
9
|
_id: import("mongoose").Types.ObjectId;
|
|
10
10
|
} & {
|
|
11
11
|
__v: number;
|
|
12
|
-
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, CatalogVariantOptionEntity, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<CatalogVariantOptionEntity>, {}, import("mongoose").
|
|
12
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, CatalogVariantOptionEntity, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<CatalogVariantOptionEntity>, {}, import("mongoose").DefaultSchemaOptions> & import("mongoose").FlatRecord<CatalogVariantOptionEntity> & {
|
|
13
13
|
_id: import("mongoose").Types.ObjectId;
|
|
14
14
|
} & {
|
|
15
15
|
__v: number;
|
|
@@ -14,7 +14,7 @@ export declare const LogisticsShipmentEventSchema: MongoSchema<LogisticsShipment
|
|
|
14
14
|
_id: import("mongoose").Types.ObjectId;
|
|
15
15
|
} & {
|
|
16
16
|
__v: number;
|
|
17
|
-
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, LogisticsShipmentEventEntity, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<LogisticsShipmentEventEntity>, {}, import("mongoose").
|
|
17
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, LogisticsShipmentEventEntity, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<LogisticsShipmentEventEntity>, {}, import("mongoose").DefaultSchemaOptions> & import("mongoose").FlatRecord<LogisticsShipmentEventEntity> & {
|
|
18
18
|
_id: import("mongoose").Types.ObjectId;
|
|
19
19
|
} & {
|
|
20
20
|
__v: number;
|
|
@@ -18,7 +18,7 @@ export declare const OrderPurchaseSupplierOrderSchema: MongoSchema<OrderPurchase
|
|
|
18
18
|
_id: import("mongoose").Types.ObjectId;
|
|
19
19
|
} & {
|
|
20
20
|
__v: number;
|
|
21
|
-
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, OrderPurchaseSupplierOrderEntity, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<OrderPurchaseSupplierOrderEntity>, {}, import("mongoose").
|
|
21
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, OrderPurchaseSupplierOrderEntity, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<OrderPurchaseSupplierOrderEntity>, {}, import("mongoose").DefaultSchemaOptions> & import("mongoose").FlatRecord<OrderPurchaseSupplierOrderEntity> & {
|
|
22
22
|
_id: import("mongoose").Types.ObjectId;
|
|
23
23
|
} & {
|
|
24
24
|
__v: number;
|
|
@@ -15,7 +15,7 @@ export declare const OrderSaleDeliveryRecipientSchema: MongoSchema<OrderSaleDeli
|
|
|
15
15
|
_id: import("mongoose").Types.ObjectId;
|
|
16
16
|
} & {
|
|
17
17
|
__v: number;
|
|
18
|
-
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, OrderSaleDeliveryRecipientEntity, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<OrderSaleDeliveryRecipientEntity>, {}, import("mongoose").
|
|
18
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, OrderSaleDeliveryRecipientEntity, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<OrderSaleDeliveryRecipientEntity>, {}, import("mongoose").DefaultSchemaOptions> & import("mongoose").FlatRecord<OrderSaleDeliveryRecipientEntity> & {
|
|
19
19
|
_id: import("mongoose").Types.ObjectId;
|
|
20
20
|
} & {
|
|
21
21
|
__v: number;
|
|
@@ -34,7 +34,7 @@ export declare const OrderSaleDeliveryAddressSchema: MongoSchema<OrderSaleDelive
|
|
|
34
34
|
_id: import("mongoose").Types.ObjectId;
|
|
35
35
|
} & {
|
|
36
36
|
__v: number;
|
|
37
|
-
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, OrderSaleDeliveryAddressEntity, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<OrderSaleDeliveryAddressEntity>, {}, import("mongoose").
|
|
37
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, OrderSaleDeliveryAddressEntity, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<OrderSaleDeliveryAddressEntity>, {}, import("mongoose").DefaultSchemaOptions> & import("mongoose").FlatRecord<OrderSaleDeliveryAddressEntity> & {
|
|
38
38
|
_id: import("mongoose").Types.ObjectId;
|
|
39
39
|
} & {
|
|
40
40
|
__v: number;
|
|
@@ -47,7 +47,7 @@ export declare const OrderSaleDeliveryDaysSchema: MongoSchema<OrderSaleDeliveryD
|
|
|
47
47
|
_id: import("mongoose").Types.ObjectId;
|
|
48
48
|
} & {
|
|
49
49
|
__v: number;
|
|
50
|
-
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, OrderSaleDeliveryDaysEntity, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<OrderSaleDeliveryDaysEntity>, {}, import("mongoose").
|
|
50
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, OrderSaleDeliveryDaysEntity, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<OrderSaleDeliveryDaysEntity>, {}, import("mongoose").DefaultSchemaOptions> & import("mongoose").FlatRecord<OrderSaleDeliveryDaysEntity> & {
|
|
51
51
|
_id: import("mongoose").Types.ObjectId;
|
|
52
52
|
} & {
|
|
53
53
|
__v: number;
|
|
@@ -62,7 +62,7 @@ export declare const OrderSaleDeliveryLineSchema: MongoSchema<OrderSaleDeliveryL
|
|
|
62
62
|
_id: import("mongoose").Types.ObjectId;
|
|
63
63
|
} & {
|
|
64
64
|
__v: number;
|
|
65
|
-
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, OrderSaleDeliveryLineEntity, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<OrderSaleDeliveryLineEntity>, {}, import("mongoose").
|
|
65
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, OrderSaleDeliveryLineEntity, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<OrderSaleDeliveryLineEntity>, {}, import("mongoose").DefaultSchemaOptions> & import("mongoose").FlatRecord<OrderSaleDeliveryLineEntity> & {
|
|
66
66
|
_id: import("mongoose").Types.ObjectId;
|
|
67
67
|
} & {
|
|
68
68
|
__v: number;
|
|
@@ -78,7 +78,7 @@ export declare const OrderSaleDeliverySchema: MongoSchema<OrderSaleDeliveryEntit
|
|
|
78
78
|
_id: import("mongoose").Types.ObjectId;
|
|
79
79
|
} & {
|
|
80
80
|
__v: number;
|
|
81
|
-
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, OrderSaleDeliveryEntity, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<OrderSaleDeliveryEntity>, {}, import("mongoose").
|
|
81
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, OrderSaleDeliveryEntity, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<OrderSaleDeliveryEntity>, {}, import("mongoose").DefaultSchemaOptions> & import("mongoose").FlatRecord<OrderSaleDeliveryEntity> & {
|
|
82
82
|
_id: import("mongoose").Types.ObjectId;
|
|
83
83
|
} & {
|
|
84
84
|
__v: number;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { OrderBuyerStageEnum } from './fulfillment.enum.js';
|
|
2
|
-
import { SearchValidator
|
|
2
|
+
import { SearchValidator } from '../../abstract.validator.js';
|
|
3
3
|
import type { OrderSaleEntity } from './sale.entity.js';
|
|
4
4
|
export declare class SearchBuyerOrdersRequestValidator extends SearchValidator<OrderSaleEntity> {
|
|
5
|
-
static readonly rules: SearchRules;
|
|
6
5
|
stage?: OrderBuyerStageEnum;
|
|
7
6
|
}
|
|
@@ -12,7 +12,6 @@ import * as class_validator_1 from "class-validator";
|
|
|
12
12
|
import * as fulfillment_enum_1 from './fulfillment.enum.js';
|
|
13
13
|
import * as abstract_validator_1 from '../../abstract.validator.js';
|
|
14
14
|
export class SearchBuyerOrdersRequestValidator extends abstract_validator_1.SearchValidator {
|
|
15
|
-
static rules = { filters: ['number'], sort: [] };
|
|
16
15
|
stage;
|
|
17
16
|
}
|
|
18
17
|
__decorate([
|