@merkaly/api 0.4.2 → 0.4.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/address.validator.d.ts +12 -0
- package/dist/address.validator.js +66 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/inventory/stock/transfer/index.d.ts +1 -0
- package/dist/inventory/stock/transfer/index.js +1 -0
- package/dist/inventory/stock/transfer/transfer.entity.d.ts +1 -6
- package/dist/inventory/stock/transfer/transfer.status.enum.d.ts +6 -0
- package/dist/inventory/stock/transfer/transfer.status.enum.js +7 -0
- package/dist/inventory/stock/transfer/transfer.validator.d.ts +2 -1
- package/dist/inventory/stock/transfer/transfer.validator.js +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import * as class_validator_1 from "class-validator";
|
|
11
|
+
export class AddressValidator {
|
|
12
|
+
line1;
|
|
13
|
+
line2;
|
|
14
|
+
name;
|
|
15
|
+
city;
|
|
16
|
+
state;
|
|
17
|
+
locality;
|
|
18
|
+
country;
|
|
19
|
+
code;
|
|
20
|
+
latitude;
|
|
21
|
+
longitude;
|
|
22
|
+
}
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, class_validator_1.IsString)(),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], AddressValidator.prototype, "line1", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, class_validator_1.IsString)(),
|
|
29
|
+
(0, class_validator_1.IsOptional)(),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], AddressValidator.prototype, "line2", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, class_validator_1.IsString)(),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], AddressValidator.prototype, "name", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, class_validator_1.IsString)(),
|
|
38
|
+
__metadata("design:type", String)
|
|
39
|
+
], AddressValidator.prototype, "city", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, class_validator_1.IsString)(),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], AddressValidator.prototype, "state", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, class_validator_1.IsString)(),
|
|
46
|
+
(0, class_validator_1.IsOptional)(),
|
|
47
|
+
__metadata("design:type", String)
|
|
48
|
+
], AddressValidator.prototype, "locality", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, class_validator_1.IsString)(),
|
|
51
|
+
__metadata("design:type", String)
|
|
52
|
+
], AddressValidator.prototype, "country", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, class_validator_1.IsString)(),
|
|
55
|
+
__metadata("design:type", String)
|
|
56
|
+
], AddressValidator.prototype, "code", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, class_validator_1.IsLatitude)(),
|
|
59
|
+
(0, class_validator_1.IsOptional)(),
|
|
60
|
+
__metadata("design:type", Number)
|
|
61
|
+
], AddressValidator.prototype, "latitude", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
(0, class_validator_1.IsLongitude)(),
|
|
64
|
+
(0, class_validator_1.IsOptional)(),
|
|
65
|
+
__metadata("design:type", Number)
|
|
66
|
+
], AddressValidator.prototype, "longitude", void 0);
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
import { AccountUserEntity } from '../../../account/user';
|
|
2
2
|
import { CatalogProductEntity } from '../../catalog/product';
|
|
3
3
|
import { StockWarehouseEntity } from '../warehouse';
|
|
4
|
+
import { TransferStatusEnum } from './';
|
|
4
5
|
import { AbstractEntity, MongoEntity } from '../../..';
|
|
5
|
-
export declare enum TransferStatusEnum {
|
|
6
|
-
PENDING = "PENDING",
|
|
7
|
-
IN_TRANSIT = "IN_TRANSIT",
|
|
8
|
-
COMPLETED = "COMPLETED",
|
|
9
|
-
CANCELLED = "CANCELLED"
|
|
10
|
-
}
|
|
11
6
|
export declare class StockTransferItemEntity {
|
|
12
7
|
product: MongoEntity<CatalogProductEntity>;
|
|
13
8
|
quantity: number;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export var TransferStatusEnum;
|
|
2
|
+
(function (TransferStatusEnum) {
|
|
3
|
+
TransferStatusEnum["PENDING"] = "PENDING";
|
|
4
|
+
TransferStatusEnum["IN_TRANSIT"] = "IN_TRANSIT";
|
|
5
|
+
TransferStatusEnum["COMPLETED"] = "COMPLETED";
|
|
6
|
+
TransferStatusEnum["CANCELLED"] = "CANCELLED";
|
|
7
|
+
})(TransferStatusEnum || (TransferStatusEnum = {}));
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { StockTransferEntity
|
|
1
|
+
import { StockTransferEntity } from './';
|
|
2
|
+
import { TransferStatusEnum } from './';
|
|
2
3
|
import { AbstractValidator, ReadValidator, SearchValidator } from '../../..';
|
|
3
4
|
export declare class StockTransferItemValidator {
|
|
4
5
|
product: string;
|
|
@@ -9,7 +9,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
};
|
|
10
10
|
import * as class_transformer_1 from "class-transformer";
|
|
11
11
|
import * as class_validator_1 from "class-validator";
|
|
12
|
-
import * as
|
|
12
|
+
import * as transfer_status_enum_1 from './transfer.status.enum.js';
|
|
13
13
|
import * as abstract_validator_1 from '../../..';
|
|
14
14
|
export class StockTransferItemValidator {
|
|
15
15
|
product;
|
|
@@ -81,7 +81,7 @@ __decorate([
|
|
|
81
81
|
__metadata("design:type", String)
|
|
82
82
|
], SaveStockTransferValidator.prototype, "notes", void 0);
|
|
83
83
|
__decorate([
|
|
84
|
-
(0, class_validator_1.IsEnum)(
|
|
84
|
+
(0, class_validator_1.IsEnum)(transfer_status_enum_1.TransferStatusEnum),
|
|
85
85
|
(0, class_validator_1.IsOptional)(),
|
|
86
86
|
__metadata("design:type", String)
|
|
87
87
|
], SaveStockTransferValidator.prototype, "status", void 0);
|