@merkaly/api 0.2.5-8 → 0.3.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/account/address/address.entity.d.ts +7 -0
- package/dist/account/address/address.validator.d.ts +17 -0
- package/dist/account/address/index.d.ts +2 -0
- package/dist/account/address/index.js +2 -0
- package/dist/account/user/index.d.ts +2 -0
- package/dist/account/user/index.js +2 -0
- package/dist/account/user/user.entity.d.ts +8 -0
- package/dist/account/user/user.validator.d.ts +17 -0
- package/dist/billing/payment/index.d.ts +2 -0
- package/dist/billing/payment/index.js +5 -0
- package/dist/billing/payment/payment.enum.d.ts +15 -0
- package/dist/billing/payment/payment.enum.js +21 -0
- package/dist/billing/payment/transaction.entity.d.ts +15 -0
- package/dist/billing/status/index.d.ts +1 -0
- package/dist/billing/status/index.js +2 -0
- package/dist/billing/status/status.entity.d.ts +8 -0
- package/dist/inventory/catalog/attribute/attribute.entity.d.ts +8 -0
- package/dist/inventory/catalog/attribute/attribute.validator.d.ts +15 -0
- package/dist/inventory/catalog/attribute/index.d.ts +2 -0
- package/dist/inventory/catalog/attribute/index.js +2 -0
- package/dist/inventory/catalog/brand/brand.entity.d.ts +7 -0
- package/dist/inventory/catalog/brand/brand.validator.d.ts +12 -0
- package/dist/inventory/catalog/brand/index.d.ts +2 -0
- package/dist/inventory/catalog/brand/index.js +2 -0
- package/dist/inventory/catalog/category/category.entity.d.ts +7 -0
- package/dist/inventory/catalog/category/category.validator.d.ts +12 -0
- package/dist/inventory/catalog/category/index.d.ts +2 -0
- package/dist/inventory/catalog/category/index.js +2 -0
- package/dist/inventory/catalog/collection/collection.entity.d.ts +7 -0
- package/dist/inventory/catalog/collection/collection.validator.d.ts +13 -0
- package/dist/inventory/catalog/collection/index.d.ts +2 -0
- package/dist/inventory/catalog/collection/index.js +2 -0
- package/dist/inventory/catalog/product/index.d.ts +3 -0
- package/dist/inventory/catalog/product/index.js +4 -0
- package/dist/inventory/catalog/product/product.entity.d.ts +31 -0
- package/dist/inventory/catalog/product/product.status.enum.d.ts +8 -0
- package/dist/inventory/catalog/product/product.status.enum.js +13 -0
- package/dist/inventory/catalog/product/product.validator.d.ts +39 -0
- package/dist/inventory/configuration/label/index.d.ts +2 -0
- package/dist/inventory/configuration/label/index.js +2 -0
- package/dist/inventory/configuration/label/label.entity.d.ts +7 -0
- package/dist/inventory/configuration/label/label.validator.d.ts +14 -0
- package/dist/inventory/configuration/measurement/index.d.ts +1 -0
- package/dist/inventory/configuration/measurement/index.js +2 -0
- package/dist/inventory/configuration/measurement/measurement.entity.d.ts +8 -0
- package/dist/inventory/configuration/unit/index.d.ts +1 -0
- package/dist/inventory/configuration/unit/index.js +2 -0
- package/dist/inventory/configuration/unit/unit.entity.d.ts +8 -0
- package/dist/inventory/stock/backorder/backorder.entity.d.ts +33 -0
- package/dist/inventory/stock/backorder/backorder.validator.d.ts +24 -0
- package/dist/inventory/stock/backorder/index.d.ts +2 -0
- package/dist/inventory/stock/backorder/index.js +2 -0
- package/dist/inventory/stock/transfer/index.d.ts +2 -0
- package/dist/inventory/stock/transfer/index.js +2 -0
- package/dist/inventory/stock/transfer/transfer.entity.d.ts +28 -0
- package/dist/inventory/stock/transfer/transfer.validator.d.ts +25 -0
- package/dist/inventory/stock/warehouse/index.d.ts +2 -0
- package/dist/inventory/stock/warehouse/index.js +2 -0
- package/dist/inventory/stock/warehouse/warehouse.entity.d.ts +21 -0
- package/dist/inventory/stock/warehouse/warehouse.validator.d.ts +27 -0
- package/dist/logistic/carrier/carrier.entity.d.ts +10 -0
- package/dist/logistic/carrier/carrier.validator.d.ts +17 -0
- package/dist/logistic/carrier/index.d.ts +2 -0
- package/dist/logistic/carrier/index.js +2 -0
- package/dist/logistic/shipment/index.d.ts +3 -0
- package/dist/logistic/shipment/index.js +5 -0
- package/dist/logistic/shipment/shipment.entity.d.ts +19 -0
- package/dist/logistic/shipment/shipment.enum.d.ts +16 -0
- package/dist/logistic/shipment/shipment.enum.js +22 -0
- package/dist/logistic/shipment/shipment.validator.d.ts +18 -0
- package/dist/order/purchase/item/index.d.ts +2 -0
- package/dist/order/purchase/item/index.js +2 -0
- package/dist/order/purchase/item/item.entity.d.ts +11 -0
- package/dist/order/purchase/item/item.validator.d.ts +7 -0
- package/dist/order/purchase/transaction/index.d.ts +3 -0
- package/dist/order/purchase/transaction/index.js +4 -0
- package/dist/order/purchase/transaction/transaction.entity.d.ts +17 -0
- package/dist/order/purchase/transaction/transaction.enum.d.ts +8 -0
- package/dist/order/purchase/transaction/transaction.enum.js +13 -0
- package/dist/order/purchase/transaction/transaction.validator.d.ts +21 -0
- package/dist/order/purchase/vendor/index.d.ts +2 -0
- package/dist/order/purchase/vendor/index.js +2 -0
- package/dist/order/purchase/vendor/vendor.entity.d.ts +11 -0
- package/dist/order/purchase/vendor/vendor.validator.d.ts +18 -0
- package/dist/order/sale/customer/customer.entity.d.ts +11 -0
- package/dist/order/sale/customer/customer.validator.d.ts +18 -0
- package/dist/order/sale/customer/index.d.ts +2 -0
- package/dist/order/sale/customer/index.js +2 -0
- package/dist/order/sale/item/index.d.ts +2 -0
- package/dist/order/sale/item/index.js +2 -0
- package/dist/order/sale/item/item.entity.d.ts +10 -0
- package/dist/order/sale/item/item.validator.d.ts +5 -0
- package/dist/order/sale/transaction/index.d.ts +3 -0
- package/dist/order/sale/transaction/index.js +4 -0
- package/dist/order/sale/transaction/transaction.entity.d.ts +21 -0
- package/dist/order/sale/transaction/transaction.enum.d.ts +8 -0
- package/dist/order/sale/transaction/transaction.enum.js +13 -0
- package/dist/order/sale/transaction/transaction.validator.d.ts +21 -0
- package/package.json +102 -86
- package/.output/abstracts/abstract.entity.d.ts +0 -14
- package/.output/abstracts/abstract.validator.d.ts +0 -24
- package/.output/abstracts/abstract.validator.js +0 -118
- package/.output/exceptions/missing-identity.exception.d.ts +0 -5
- package/.output/exceptions/missing-identity.exception.js +0 -30
- package/.output/modules/asset/files/file.entity.d.ts +0 -9
- package/.output/modules/asset/files/file.schema.d.ts +0 -34
- package/.output/modules/asset/files/file.schema.js +0 -10
- package/.output/modules/auth/organizations/organization.entity.d.ts +0 -8
- package/.output/modules/auth/users/user.entity.d.ts +0 -9
- package/.output/modules/auth/users/user.schema.d.ts +0 -34
- package/.output/modules/auth/users/user.schema.js +0 -10
- package/.output/modules/auth/users/user.validator.d.ts +0 -12
- package/.output/modules/auth/users/user.validator.js +0 -58
- package/.output/modules/inventory/brands/brand.entity.d.ts +0 -6
- package/.output/modules/inventory/brands/brand.schema.d.ts +0 -34
- package/.output/modules/inventory/brands/brand.schema.js +0 -10
- package/.output/modules/inventory/brands/brand.validator.d.ts +0 -11
- package/.output/modules/inventory/brands/brand.validator.js +0 -74
- package/.output/modules/inventory/categories/category.entity.d.ts +0 -6
- package/.output/modules/inventory/categories/category.schema.d.ts +0 -34
- package/.output/modules/inventory/categories/category.schema.js +0 -10
- package/.output/modules/inventory/categories/category.validator.d.ts +0 -8
- package/.output/modules/inventory/categories/category.validator.js +0 -42
- package/.output/modules/inventory/products/documents/attribute.document.d.ts +0 -5
- package/.output/modules/inventory/products/documents/attribute.document.js +0 -33
- package/.output/modules/inventory/products/documents/dimension.document.d.ts +0 -6
- package/.output/modules/inventory/products/documents/dimension.document.js +0 -35
- package/.output/modules/inventory/products/product.entity.d.ts +0 -19
- package/.output/modules/inventory/products/product.schema.d.ts +0 -34
- package/.output/modules/inventory/products/product.schema.js +0 -18
- package/.output/modules/inventory/products/product.validator.d.ts +0 -29
- package/.output/modules/inventory/products/product.validator.js +0 -181
- package/.output/modules/inventory/products/validators/attributes.validator.d.ts +0 -5
- package/.output/modules/inventory/products/validators/attributes.validator.js +0 -35
- package/.output/modules/inventory/products/validators/dimension.validator.d.ts +0 -6
- package/.output/modules/inventory/products/validators/dimension.validator.js +0 -38
- package/.output/modules/sale/customers/customer.entity.d.ts +0 -8
- package/.output/modules/sale/customers/customer.schema.d.ts +0 -34
- package/.output/modules/sale/customers/customer.schema.js +0 -10
- package/.output/modules/sale/customers/customer.validator.d.ts +0 -14
- package/.output/modules/sale/customers/customer.validator.js +0 -94
- package/.output/modules/sale/orders/documents/address.document.d.ts +0 -8
- package/.output/modules/sale/orders/documents/address.document.js +0 -43
- package/.output/modules/sale/orders/documents/status.document.d.ts +0 -8
- package/.output/modules/sale/orders/documents/status.document.js +0 -34
- package/.output/modules/sale/orders/entities/item.entity.d.ts +0 -38
- package/.output/modules/sale/orders/enums/order.status.d.ts +0 -6
- package/.output/modules/sale/orders/enums/order.status.js +0 -10
- package/.output/modules/sale/orders/order.entity.d.ts +0 -21
- package/.output/modules/sale/orders/order.validator.d.ts +0 -16
- package/.output/modules/sale/orders/order.validator.js +0 -86
- package/.output/modules/sale/orders/validators/address.validator.d.ts +0 -17
- package/.output/modules/sale/orders/validators/address.validator.js +0 -81
- package/.output/modules/sale/orders/validators/billing.validator.d.ts +0 -8
- package/.output/modules/sale/orders/validators/billing.validator.js +0 -13
- package/.output/modules/sale/orders/validators/item.validator.d.ts +0 -5
- package/.output/modules/sale/orders/validators/item.validator.js +0 -32
- package/.output/modules/sale/orders/validators/payment.validator.d.ts +0 -10
- package/.output/modules/sale/orders/validators/payment.validator.js +0 -62
- package/.output/modules/sale/orders/validators/shipping.validator.d.ts +0 -9
- package/.output/modules/sale/orders/validators/shipping.validator.js +0 -14
- package/.output/modules/sale/payments/entities/status.entity.d.ts +0 -8
- package/.output/modules/sale/payments/enums/billing.type.d.ts +0 -6
- package/.output/modules/sale/payments/enums/billing.type.js +0 -10
- package/.output/modules/sale/payments/enums/payment.status.d.ts +0 -7
- package/.output/modules/sale/payments/enums/payment.status.js +0 -11
- package/.output/modules/sale/payments/enums/shipping.type.d.ts +0 -4
- package/.output/modules/sale/payments/enums/shipping.type.js +0 -8
- package/.output/modules/sale/payments/payment.entity.d.ts +0 -12
- package/.output/modules/sale/payments/payment.schema.d.ts +0 -34
- package/.output/modules/sale/payments/payment.schema.js +0 -14
- package/.output/modules/sale/payments/payment.validator.d.ts +0 -16
- package/.output/modules/sale/payments/payment.validator.js +0 -77
- package/.output/tsconfig.package.tsbuildinfo +0 -1
- package/README.md +0 -79
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AccountUserEntity } from 'src/domain/account/entities/user.entity';
|
|
2
|
+
import { AddressEntity } from 'src/infrastructure/entities/address.entity';
|
|
3
|
+
import type { MongoEntity } from 'src/infrastructure/abstracts/abstract.entity';
|
|
4
|
+
export declare class AccountAddressEntity extends AddressEntity {
|
|
5
|
+
user: MongoEntity<AccountUserEntity>;
|
|
6
|
+
name: string;
|
|
7
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { AccountAddressEntity } from 'src/domain/account/entities/address.entity';
|
|
2
|
+
import { AbstractValidator, ReadValidator, SearchValidator } from 'src/infrastructure/abstracts/abstract.validator';
|
|
3
|
+
export declare class SearchAddressValidator extends SearchValidator<AccountAddressEntity> {
|
|
4
|
+
}
|
|
5
|
+
export declare class ReadAddressValidator extends ReadValidator<AccountAddressEntity> {
|
|
6
|
+
}
|
|
7
|
+
export declare class CreateAddressValidator extends AbstractValidator {
|
|
8
|
+
street: string;
|
|
9
|
+
name: string;
|
|
10
|
+
complement: string;
|
|
11
|
+
country: string;
|
|
12
|
+
code: string;
|
|
13
|
+
longitude: number;
|
|
14
|
+
latitude: number;
|
|
15
|
+
}
|
|
16
|
+
export declare class UpdateAddressValidator extends CreateAddressValidator {
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { AccountUserEntity } from 'src/domain/account/entities/user.entity';
|
|
2
|
+
import { AbstractValidator, ReadValidator, SearchValidator } from 'src/infrastructure/abstracts/abstract.validator';
|
|
3
|
+
export declare class SearchAccountUserValidator extends SearchValidator<AccountUserEntity> {
|
|
4
|
+
}
|
|
5
|
+
export declare class ReadAccountUserValidator extends ReadValidator<AccountUserEntity> {
|
|
6
|
+
}
|
|
7
|
+
export declare class CreateAccountUserValidator extends AbstractValidator {
|
|
8
|
+
name: string;
|
|
9
|
+
picture: string;
|
|
10
|
+
email: string;
|
|
11
|
+
phone?: string;
|
|
12
|
+
_id: string;
|
|
13
|
+
identities: any[];
|
|
14
|
+
active: boolean;
|
|
15
|
+
}
|
|
16
|
+
export declare class UpdateAccountUserValidator extends CreateAccountUserValidator {
|
|
17
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var payment.enum_1 = require("./payment.enum");
|
|
4
|
+
Object.defineProperty(exports, "PaymentStatusEnum", { enumerable: true, get: function () { return payment.enum_1.PaymentStatusEnum; } });
|
|
5
|
+
Object.defineProperty(exports, "PaymentTypeEnum", { enumerable: true, get: function () { return payment.enum_1.PaymentTypeEnum; } });
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare enum PaymentStatusEnum {
|
|
2
|
+
OPEN = "OPEN",
|
|
3
|
+
PENDING = "PENDING",
|
|
4
|
+
FAILED = "FAILED",
|
|
5
|
+
DISPUTED = "DISPUTED",
|
|
6
|
+
PAID = "PAID",
|
|
7
|
+
REFUNDED = "REFUNDED",
|
|
8
|
+
CANCELLED = "CANCELLED"
|
|
9
|
+
}
|
|
10
|
+
export declare enum PaymentTypeEnum {
|
|
11
|
+
CARD = "CARD",
|
|
12
|
+
TRANSFER = "TRANSFER",
|
|
13
|
+
CASH = "CASH",
|
|
14
|
+
CRYPTO = "CRYPTO"
|
|
15
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PaymentTypeEnum = exports.PaymentStatusEnum = void 0;
|
|
4
|
+
var PaymentStatusEnum;
|
|
5
|
+
(function (PaymentStatusEnum) {
|
|
6
|
+
PaymentStatusEnum["OPEN"] = "OPEN";
|
|
7
|
+
PaymentStatusEnum["PENDING"] = "PENDING";
|
|
8
|
+
PaymentStatusEnum["FAILED"] = "FAILED";
|
|
9
|
+
PaymentStatusEnum["DISPUTED"] = "DISPUTED";
|
|
10
|
+
PaymentStatusEnum["PAID"] = "PAID";
|
|
11
|
+
PaymentStatusEnum["REFUNDED"] = "REFUNDED";
|
|
12
|
+
PaymentStatusEnum["CANCELLED"] = "CANCELLED";
|
|
13
|
+
})(PaymentStatusEnum || (exports.PaymentStatusEnum = PaymentStatusEnum = {}));
|
|
14
|
+
var PaymentTypeEnum;
|
|
15
|
+
(function (PaymentTypeEnum) {
|
|
16
|
+
PaymentTypeEnum["CARD"] = "CARD";
|
|
17
|
+
PaymentTypeEnum["TRANSFER"] = "TRANSFER";
|
|
18
|
+
PaymentTypeEnum["CASH"] = "CASH";
|
|
19
|
+
PaymentTypeEnum["CRYPTO"] = "CRYPTO";
|
|
20
|
+
})(PaymentTypeEnum || (exports.PaymentTypeEnum = PaymentTypeEnum = {}));
|
|
21
|
+
//# sourceMappingURL=payment.enum.js.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { SaleTransactionEntity } from 'src/domain/order/sale/entities/transaction.entity';
|
|
2
|
+
import { AbstractEntity } from 'src/infrastructure/abstracts/abstract.entity';
|
|
3
|
+
import { PaymentTypeEnum } from '../enums/payment.enum';
|
|
4
|
+
import { PaymentStatusEntity } from './status.entity';
|
|
5
|
+
import type { MongoEntity } from 'src/infrastructure/abstracts/abstract.entity';
|
|
6
|
+
export declare class SalePaymentEntity extends AbstractEntity {
|
|
7
|
+
order: MongoEntity<SaleTransactionEntity>;
|
|
8
|
+
statuses: PaymentStatusEntity[];
|
|
9
|
+
total: number;
|
|
10
|
+
fee: number;
|
|
11
|
+
type: PaymentTypeEnum;
|
|
12
|
+
sequence: number;
|
|
13
|
+
readonly number: string;
|
|
14
|
+
readonly currentStatus: PaymentStatusEntity;
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { PaymentStatusEntity as PaymentStatus } from './status.entity';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { AccountUserEntity } from 'src/domain/account/entities/user.entity';
|
|
2
|
+
import { PaymentStatusEnum } from '../enums/payment.enum';
|
|
3
|
+
import type { MongoEntity } from 'src/infrastructure/abstracts/abstract.entity';
|
|
4
|
+
export declare class PaymentStatusEntity {
|
|
5
|
+
name: PaymentStatusEnum;
|
|
6
|
+
date: Date;
|
|
7
|
+
user: MongoEntity<AccountUserEntity>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { CatalogAttributeEntity } from 'src/domain/inventory/catalog/entities/attribute.entity';
|
|
2
|
+
import { AbstractValidator, ReadValidator, SearchValidator } from 'src/infrastructure/abstracts/abstract.validator';
|
|
3
|
+
export declare class SearchAttributeValidator extends SearchValidator<CatalogAttributeEntity> {
|
|
4
|
+
}
|
|
5
|
+
export declare class ReadAttributeValidator extends ReadValidator<CatalogAttributeEntity> {
|
|
6
|
+
}
|
|
7
|
+
export declare class CreateAttributeValidator extends AbstractValidator {
|
|
8
|
+
name: string;
|
|
9
|
+
type: string;
|
|
10
|
+
options?: string[];
|
|
11
|
+
required?: boolean;
|
|
12
|
+
active?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export declare class UpdateAttributeValidator extends CreateAttributeValidator {
|
|
15
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AbstractEntity } from 'src/infrastructure/abstracts/abstract.entity';
|
|
2
|
+
import { CatalogProductEntity } from './product.entity';
|
|
3
|
+
export declare class CatalogBrandEntity extends AbstractEntity {
|
|
4
|
+
name: string;
|
|
5
|
+
description: string;
|
|
6
|
+
readonly products?: CatalogProductEntity[];
|
|
7
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { CatalogBrandEntity } from 'src/domain/inventory/catalog/entities/brand.entity';
|
|
2
|
+
import { AbstractValidator, ReadValidator, SearchValidator } from 'src/infrastructure/abstracts/abstract.validator';
|
|
3
|
+
export declare class SearchBrandValidator extends SearchValidator<CatalogBrandEntity> {
|
|
4
|
+
}
|
|
5
|
+
export declare class ReadBrandValidator extends ReadValidator<CatalogBrandEntity> {
|
|
6
|
+
}
|
|
7
|
+
export declare class CreateBrandValidator extends AbstractValidator {
|
|
8
|
+
name: string;
|
|
9
|
+
description: string;
|
|
10
|
+
}
|
|
11
|
+
export declare class UpdateBrandValidator extends CreateBrandValidator {
|
|
12
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AbstractEntity } from 'src/infrastructure/abstracts/abstract.entity';
|
|
2
|
+
import { CatalogProductEntity } from './product.entity';
|
|
3
|
+
export declare class CatalogCategoryEntity extends AbstractEntity {
|
|
4
|
+
name: string;
|
|
5
|
+
description: string;
|
|
6
|
+
readonly products?: CatalogProductEntity[];
|
|
7
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { CatalogCategoryEntity } from 'src/domain/inventory/catalog/entities/category.entity';
|
|
2
|
+
import { AbstractValidator, ReadValidator, SearchValidator } from 'src/infrastructure/abstracts/abstract.validator';
|
|
3
|
+
export declare class SearchCategoryValidator extends SearchValidator<CatalogCategoryEntity> {
|
|
4
|
+
}
|
|
5
|
+
export declare class ReadCategoryValidator extends ReadValidator<CatalogCategoryEntity> {
|
|
6
|
+
}
|
|
7
|
+
export declare class CreateCategoryValidator extends AbstractValidator {
|
|
8
|
+
name: string;
|
|
9
|
+
description: string;
|
|
10
|
+
}
|
|
11
|
+
export declare class UpdateCategoryValidator extends CreateCategoryValidator {
|
|
12
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AbstractEntity, type MongoEntity } from 'src/infrastructure/abstracts/abstract.entity';
|
|
2
|
+
import { CatalogProductEntity } from './product.entity';
|
|
3
|
+
export declare class CatalogCollectionEntity extends AbstractEntity {
|
|
4
|
+
name: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
products: MongoEntity<CatalogProductEntity>[];
|
|
7
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { CatalogCollectionEntity } from 'src/domain/inventory/catalog/entities/collection.entity';
|
|
2
|
+
import { AbstractValidator, ReadValidator, SearchValidator } from 'src/infrastructure/abstracts/abstract.validator';
|
|
3
|
+
export declare class SearchCollectionValidator extends SearchValidator<CatalogCollectionEntity> {
|
|
4
|
+
}
|
|
5
|
+
export declare class ReadCollectionValidator extends ReadValidator<CatalogCollectionEntity> {
|
|
6
|
+
}
|
|
7
|
+
export declare class CreateCollectionValidator extends AbstractValidator {
|
|
8
|
+
name: string;
|
|
9
|
+
description: string;
|
|
10
|
+
products: string[];
|
|
11
|
+
}
|
|
12
|
+
export declare class UpdateCollectionValidator extends CreateCollectionValidator {
|
|
13
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { CatalogProductStatus } from './product.status.enum';
|
|
2
|
+
export type { CatalogProductEntity as Product } from './product.entity';
|
|
3
|
+
export type { CreateCatalogProductValidator as CreateProduct, UpdateCatalogProductValidator as UpdateProduct } from './product.validator';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var product.status.enum_1 = require("./product.status.enum");
|
|
4
|
+
Object.defineProperty(exports, "CatalogProductStatus", { enumerable: true, get: function () { return product.status.enum_1.CatalogProductStatus; } });
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { AccountWishlistEntity } from 'src/domain/account/entities/wishlist.entity';
|
|
2
|
+
import { AssetEntity } from 'src/domain/assets/entities/asset.entity';
|
|
3
|
+
import { CatalogProductStatus } from 'src/domain/inventory/catalog/enums/product.status.enum';
|
|
4
|
+
import { AbstractEntity } from 'src/infrastructure/abstracts/abstract.entity';
|
|
5
|
+
import { CatalogAttributeEntity } from './attribute.entity';
|
|
6
|
+
import type { CatalogBrandEntity } from './brand.entity';
|
|
7
|
+
import type { CatalogCategoryEntity } from './category.entity';
|
|
8
|
+
import type { MeasurementEntity } from 'src/domain/inventory/configuration/entities/measurement.entity';
|
|
9
|
+
import type { MongoEntity } from 'src/infrastructure/abstracts/abstract.entity';
|
|
10
|
+
export declare class CatalogProductEntity extends AbstractEntity {
|
|
11
|
+
sku?: string;
|
|
12
|
+
name: string;
|
|
13
|
+
description?: string;
|
|
14
|
+
price: number;
|
|
15
|
+
pictures: MongoEntity<AssetEntity>[];
|
|
16
|
+
category?: MongoEntity<CatalogCategoryEntity>;
|
|
17
|
+
brand?: MongoEntity<CatalogBrandEntity>;
|
|
18
|
+
attributes: {
|
|
19
|
+
content: any;
|
|
20
|
+
relation: MongoEntity<CatalogAttributeEntity>;
|
|
21
|
+
}[];
|
|
22
|
+
measure?: {
|
|
23
|
+
amount: number;
|
|
24
|
+
kind: MongoEntity<MeasurementEntity>;
|
|
25
|
+
unit: string;
|
|
26
|
+
};
|
|
27
|
+
hashtags: string[];
|
|
28
|
+
status: CatalogProductStatus;
|
|
29
|
+
stock: number;
|
|
30
|
+
readonly wishlist?: AccountWishlistEntity[];
|
|
31
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CatalogProductStatus = void 0;
|
|
4
|
+
var CatalogProductStatus;
|
|
5
|
+
(function (CatalogProductStatus) {
|
|
6
|
+
CatalogProductStatus["Draft"] = "draft";
|
|
7
|
+
CatalogProductStatus["Published"] = "published";
|
|
8
|
+
CatalogProductStatus["Archived"] = "archived";
|
|
9
|
+
CatalogProductStatus["OutOfStock"] = "out_of_stock";
|
|
10
|
+
CatalogProductStatus["Discontinued"] = "discontinued";
|
|
11
|
+
CatalogProductStatus["ComingSoon"] = "coming_soon";
|
|
12
|
+
})(CatalogProductStatus || (exports.CatalogProductStatus = CatalogProductStatus = {}));
|
|
13
|
+
//# sourceMappingURL=product.status.enum.js.map
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { CatalogProductEntity } from 'src/domain/inventory/catalog/entities/product.entity';
|
|
2
|
+
import { CatalogProductStatus } from 'src/domain/inventory/catalog/enums/product.status.enum';
|
|
3
|
+
import { AbstractValidator, ReadValidator, SearchValidator } from 'src/infrastructure/abstracts/abstract.validator';
|
|
4
|
+
export declare class SearchProductValidator extends SearchValidator<CatalogProductEntity> {
|
|
5
|
+
}
|
|
6
|
+
export declare class ReadProductValidator extends ReadValidator<CatalogProductEntity> {
|
|
7
|
+
}
|
|
8
|
+
export declare class ProductAttributeValidator extends AbstractValidator {
|
|
9
|
+
relation: string;
|
|
10
|
+
content: string;
|
|
11
|
+
required: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare class CreateProductValidator extends AbstractValidator {
|
|
14
|
+
sku?: string;
|
|
15
|
+
name: string;
|
|
16
|
+
description: string;
|
|
17
|
+
price: number;
|
|
18
|
+
measure?: {
|
|
19
|
+
amount: number;
|
|
20
|
+
kind: string;
|
|
21
|
+
unit: string;
|
|
22
|
+
};
|
|
23
|
+
pictures: string[];
|
|
24
|
+
stock: number;
|
|
25
|
+
category?: string;
|
|
26
|
+
brand?: string;
|
|
27
|
+
hashtags: string[];
|
|
28
|
+
attributes: string[];
|
|
29
|
+
status: CatalogProductStatus;
|
|
30
|
+
}
|
|
31
|
+
export declare class UpdateProductValidator extends CreateProductValidator {
|
|
32
|
+
name: string;
|
|
33
|
+
price: number;
|
|
34
|
+
measure: {
|
|
35
|
+
amount: number;
|
|
36
|
+
kind: string;
|
|
37
|
+
unit: string;
|
|
38
|
+
};
|
|
39
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ConfigurationLabelEntity } from 'src/domain/inventory/configuration/entities/label.entity';
|
|
2
|
+
import { AbstractValidator, ReadValidator, SearchValidator } from 'src/infrastructure/abstracts/abstract.validator';
|
|
3
|
+
export declare class SearchLabelValidator extends SearchValidator<ConfigurationLabelEntity> {
|
|
4
|
+
}
|
|
5
|
+
export declare class ReadLabelValidator extends ReadValidator<ConfigurationLabelEntity> {
|
|
6
|
+
}
|
|
7
|
+
export declare class CreateLabelValidator extends AbstractValidator {
|
|
8
|
+
name: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
color?: string;
|
|
11
|
+
active?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare class UpdateLabelValidator extends CreateLabelValidator {
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { ConfigurationMeasurementEntity as Measurement } from './measurement.entity';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { AbstractEntity } from 'src/infrastructure/abstracts/abstract.entity';
|
|
2
|
+
import { MeasurementUnitEntity } from './unit.entity';
|
|
3
|
+
export declare class MeasurementEntity extends AbstractEntity {
|
|
4
|
+
name: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
active: boolean;
|
|
7
|
+
units: MeasurementUnitEntity[];
|
|
8
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { ConfigurationUnitEntity as Unit } from './unit.entity';
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { CatalogProductEntity } from 'src/domain/inventory/catalog/entities/product.entity';
|
|
2
|
+
import { StockWarehouseEntity } from 'src/domain/inventory/stock/entities/warehouse.entity';
|
|
3
|
+
import { SaleCustomerEntity } from 'src/domain/order/sale/entities/customer.entity';
|
|
4
|
+
import { SaleTransactionEntity } from 'src/domain/order/sale/entities/transaction.entity';
|
|
5
|
+
import { AbstractEntity, MongoEntity } from 'src/infrastructure/abstracts/abstract.entity';
|
|
6
|
+
export declare enum BackorderStatusEnum {
|
|
7
|
+
PENDING = "PENDING",
|
|
8
|
+
PARTIALLY_FULFILLED = "PARTIALLY_FULFILLED",
|
|
9
|
+
FULFILLED = "FULFILLED",
|
|
10
|
+
CANCELLED = "CANCELLED"
|
|
11
|
+
}
|
|
12
|
+
export declare enum BackorderPriorityEnum {
|
|
13
|
+
LOW = "LOW",
|
|
14
|
+
NORMAL = "NORMAL",
|
|
15
|
+
HIGH = "HIGH",
|
|
16
|
+
URGENT = "URGENT"
|
|
17
|
+
}
|
|
18
|
+
export declare class StockBackorderEntity extends AbstractEntity {
|
|
19
|
+
product: MongoEntity<CatalogProductEntity>;
|
|
20
|
+
quantityOrdered: number;
|
|
21
|
+
quantityFulfilled: number;
|
|
22
|
+
customer?: MongoEntity<SaleCustomerEntity>;
|
|
23
|
+
saleOrder?: MongoEntity<SaleTransactionEntity>;
|
|
24
|
+
warehouse?: MongoEntity<StockWarehouseEntity>;
|
|
25
|
+
sequence: number;
|
|
26
|
+
status: BackorderStatusEnum;
|
|
27
|
+
priority: BackorderPriorityEnum;
|
|
28
|
+
notes?: string;
|
|
29
|
+
expectedRestockDate?: Date;
|
|
30
|
+
fulfilledDate?: Date;
|
|
31
|
+
readonly number: string;
|
|
32
|
+
readonly quantityPending: number;
|
|
33
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { BackorderPriorityEnum, BackorderStatusEnum, StockBackorderEntity } from 'src/domain/inventory/stock/entities/backorder.entity';
|
|
2
|
+
import { AbstractValidator, ReadValidator, SearchValidator } from 'src/infrastructure/abstracts/abstract.validator';
|
|
3
|
+
export declare class SearchBackorderValidator extends SearchValidator<StockBackorderEntity> {
|
|
4
|
+
}
|
|
5
|
+
export declare class ReadBackorderValidator extends ReadValidator<StockBackorderEntity> {
|
|
6
|
+
}
|
|
7
|
+
export declare class CreateBackorderValidator extends AbstractValidator {
|
|
8
|
+
product: string;
|
|
9
|
+
quantityOrdered: number;
|
|
10
|
+
customer?: string;
|
|
11
|
+
saleOrder?: string;
|
|
12
|
+
warehouse?: string;
|
|
13
|
+
priority?: BackorderPriorityEnum;
|
|
14
|
+
notes?: string;
|
|
15
|
+
expectedRestockDate?: string;
|
|
16
|
+
}
|
|
17
|
+
export declare class UpdateBackorderValidator extends AbstractValidator {
|
|
18
|
+
status?: BackorderStatusEnum;
|
|
19
|
+
priority?: BackorderPriorityEnum;
|
|
20
|
+
quantityFulfilled?: number;
|
|
21
|
+
notes?: string;
|
|
22
|
+
expectedRestockDate?: string;
|
|
23
|
+
fulfilledDate?: string;
|
|
24
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { AccountUserEntity } from 'src/domain/account/entities/user.entity';
|
|
2
|
+
import { CatalogProductEntity } from 'src/domain/inventory/catalog/entities/product.entity';
|
|
3
|
+
import { StockWarehouseEntity } from 'src/domain/inventory/stock/entities/warehouse.entity';
|
|
4
|
+
import { AbstractEntity, MongoEntity } from 'src/infrastructure/abstracts/abstract.entity';
|
|
5
|
+
export declare enum TransferStatusEnum {
|
|
6
|
+
PENDING = "PENDING",
|
|
7
|
+
IN_TRANSIT = "IN_TRANSIT",
|
|
8
|
+
COMPLETED = "COMPLETED",
|
|
9
|
+
CANCELLED = "CANCELLED"
|
|
10
|
+
}
|
|
11
|
+
export declare class TransferItemEntity {
|
|
12
|
+
product: MongoEntity<CatalogProductEntity>;
|
|
13
|
+
quantity: number;
|
|
14
|
+
notes?: string;
|
|
15
|
+
}
|
|
16
|
+
export declare class StockTransferEntity extends AbstractEntity {
|
|
17
|
+
sourceWarehouse: MongoEntity<StockWarehouseEntity>;
|
|
18
|
+
destinationWarehouse: MongoEntity<StockWarehouseEntity>;
|
|
19
|
+
items: TransferItemEntity[];
|
|
20
|
+
sequence: number;
|
|
21
|
+
status: TransferStatusEnum;
|
|
22
|
+
notes?: string;
|
|
23
|
+
requestedDate: Date;
|
|
24
|
+
shippedDate?: Date;
|
|
25
|
+
receivedDate?: Date;
|
|
26
|
+
user: MongoEntity<AccountUserEntity>;
|
|
27
|
+
readonly number: string;
|
|
28
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { StockTransferEntity, TransferStatusEnum } from 'src/domain/inventory/stock/entities/transfer.entity';
|
|
2
|
+
import { AbstractValidator, ReadValidator, SearchValidator } from 'src/infrastructure/abstracts/abstract.validator';
|
|
3
|
+
export declare class TransferItemValidator {
|
|
4
|
+
product: string;
|
|
5
|
+
quantity: number;
|
|
6
|
+
notes?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare class SearchTransferValidator extends SearchValidator<StockTransferEntity> {
|
|
9
|
+
}
|
|
10
|
+
export declare class ReadTransferValidator extends ReadValidator<StockTransferEntity> {
|
|
11
|
+
}
|
|
12
|
+
export declare class CreateTransferValidator extends AbstractValidator {
|
|
13
|
+
sourceWarehouse: string;
|
|
14
|
+
destinationWarehouse: string;
|
|
15
|
+
items: TransferItemValidator[];
|
|
16
|
+
notes?: string;
|
|
17
|
+
requestedDate?: string;
|
|
18
|
+
user: string;
|
|
19
|
+
}
|
|
20
|
+
export declare class UpdateTransferValidator extends AbstractValidator {
|
|
21
|
+
status?: TransferStatusEnum;
|
|
22
|
+
notes?: string;
|
|
23
|
+
shippedDate?: string;
|
|
24
|
+
receivedDate?: string;
|
|
25
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { AbstractEntity } from 'src/infrastructure/abstracts/abstract.entity';
|
|
2
|
+
export declare class StockWarehouseEntity extends AbstractEntity {
|
|
3
|
+
name: string;
|
|
4
|
+
code: string;
|
|
5
|
+
description: string;
|
|
6
|
+
address: {
|
|
7
|
+
line1: string;
|
|
8
|
+
line2?: string;
|
|
9
|
+
city: string;
|
|
10
|
+
state: string;
|
|
11
|
+
locality?: string;
|
|
12
|
+
country: string;
|
|
13
|
+
code: string;
|
|
14
|
+
location: {
|
|
15
|
+
lat: number;
|
|
16
|
+
lng: number;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
isDefault: boolean;
|
|
20
|
+
active: boolean;
|
|
21
|
+
}
|