@merkaly/api 0.3.4 → 0.3.6
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.repository.d.ts +3 -13
- package/dist/abstract.validator.d.ts +4 -1
- package/dist/account/address/index.js +1 -2
- package/dist/account/cart/index.js +1 -2
- package/dist/account/payment/index.js +1 -2
- package/dist/account/payment/payment.entity.d.ts +5 -4
- package/dist/account/payment/payment.validator.d.ts +12 -5
- package/dist/account/user/index.js +1 -2
- package/dist/account/user/user.validator.d.ts +4 -4
- package/dist/account/wishlist/index.js +1 -2
- package/dist/assets/asset/asset.entity.d.ts +0 -1
- package/dist/assets/asset/asset.enum.js +2 -6
- package/dist/assets/asset/index.js +1 -7
- package/dist/finance/invoice/index.d.ts +3 -0
- package/dist/finance/invoice/index.js +1 -0
- package/dist/finance/invoice/invoice.entity.d.ts +15 -0
- package/dist/finance/invoice/invoice.enum.d.ts +14 -0
- package/dist/finance/invoice/invoice.enum.js +16 -0
- package/dist/finance/invoice/invoice.validator.d.ts +21 -0
- package/dist/finance/payment/index.d.ts +4 -0
- package/dist/finance/payment/index.js +1 -0
- package/dist/finance/payment/payment.entity.d.ts +19 -0
- package/dist/{billing → finance}/payment/payment.enum.d.ts +7 -2
- package/dist/finance/payment/payment.enum.js +23 -0
- package/dist/finance/payment/payment.validator.d.ts +20 -0
- package/dist/finance/refund/index.d.ts +3 -0
- package/dist/finance/refund/index.js +1 -0
- package/dist/finance/refund/refund.entity.d.ts +12 -0
- package/dist/finance/refund/refund.enum.d.ts +16 -0
- package/dist/finance/refund/refund.enum.js +18 -0
- package/dist/finance/refund/refund.validator.d.ts +19 -0
- package/dist/finance/subscription/index.d.ts +3 -0
- package/dist/finance/subscription/index.js +1 -0
- package/dist/finance/subscription/subscription.entity.d.ts +15 -0
- package/dist/finance/subscription/subscription.enum.d.ts +15 -0
- package/dist/finance/subscription/subscription.enum.js +17 -0
- package/dist/finance/subscription/subscription.validator.d.ts +19 -0
- package/dist/finance/tax/index.d.ts +3 -0
- package/dist/finance/tax/index.js +1 -0
- package/dist/finance/tax/tax.entity.d.ts +10 -0
- package/dist/finance/tax/tax.enum.d.ts +8 -0
- package/dist/finance/tax/tax.enum.js +9 -0
- package/dist/finance/tax/tax.validator.d.ts +17 -0
- package/dist/index.js +1 -2
- package/dist/inventory/catalog/attribute/attribute.entity.d.ts +1 -3
- package/dist/inventory/catalog/attribute/attribute.validator.d.ts +5 -7
- package/dist/inventory/catalog/attribute/index.js +1 -2
- package/dist/inventory/catalog/brand/brand.validator.d.ts +4 -4
- package/dist/inventory/catalog/brand/index.js +1 -2
- package/dist/inventory/catalog/category/category.validator.d.ts +4 -4
- package/dist/inventory/catalog/category/index.js +1 -2
- package/dist/inventory/catalog/collection/collection.validator.d.ts +4 -4
- package/dist/inventory/catalog/collection/index.js +1 -2
- package/dist/inventory/catalog/product/index.js +1 -7
- package/dist/inventory/catalog/product/product.entity.d.ts +4 -3
- package/dist/inventory/catalog/product/product.status.enum.js +2 -6
- package/dist/inventory/catalog/product/product.validator.d.ts +9 -11
- package/dist/inventory/catalog/variant/index.d.ts +2 -0
- package/dist/inventory/catalog/variant/index.js +1 -0
- package/dist/inventory/catalog/variant/variant.entity.d.ts +19 -0
- package/dist/inventory/catalog/variant/variant.validator.d.ts +27 -0
- package/dist/inventory/configuration/label/index.js +1 -2
- package/dist/inventory/configuration/measurement/index.js +1 -2
- package/dist/inventory/configuration/measurement/measurement.validator.d.ts +4 -4
- package/dist/inventory/configuration/unit/index.js +1 -2
- package/dist/inventory/stock/transfer/index.js +1 -2
- package/dist/inventory/stock/transfer/transfer.validator.d.ts +5 -4
- package/dist/inventory/stock/warehouse/index.js +1 -2
- package/dist/inventory/stock/warehouse/warehouse.validator.d.ts +4 -4
- package/dist/order/purchase/item/index.js +1 -2
- package/dist/order/purchase/item/item.entity.d.ts +2 -0
- package/dist/order/purchase/item/item.validator.d.ts +1 -0
- package/dist/order/purchase/transaction/index.js +1 -7
- package/dist/order/purchase/transaction/transaction.entity.d.ts +1 -1
- package/dist/order/purchase/transaction/transaction.enum.js +2 -6
- package/dist/order/purchase/transaction/transaction.validator.d.ts +0 -2
- package/dist/order/purchase/vendor/index.js +1 -2
- package/dist/order/sale/address/index.js +1 -2
- package/dist/order/sale/customer/customer.entity.d.ts +2 -0
- package/dist/order/sale/customer/customer.enum.d.ts +4 -0
- package/dist/order/sale/customer/customer.enum.js +5 -0
- package/dist/order/sale/customer/customer.validator.d.ts +2 -0
- package/dist/order/sale/customer/index.d.ts +1 -0
- package/dist/order/sale/customer/index.js +1 -2
- package/dist/order/sale/item/index.js +1 -2
- package/dist/order/sale/item/item.entity.d.ts +7 -0
- package/dist/order/sale/item/item.validator.d.ts +2 -1
- package/dist/order/sale/payment/index.js +1 -2
- package/dist/order/sale/payment/payment.validator.d.ts +3 -12
- package/dist/order/sale/shipping/index.d.ts +4 -0
- package/dist/order/sale/shipping/index.js +1 -0
- package/dist/order/sale/shipping/shipping.entity.d.ts +18 -0
- package/dist/{logistic/shipment/shipment.enum.d.ts → order/sale/shipping/shipping.enum.d.ts} +2 -2
- package/dist/order/sale/shipping/shipping.enum.js +18 -0
- package/dist/{logistic/shipment/shipment.validator.d.ts → order/sale/shipping/shipping.validator.d.ts} +7 -7
- package/dist/order/sale/transaction/index.js +1 -7
- package/dist/order/sale/transaction/transaction.entity.d.ts +5 -5
- package/dist/order/sale/transaction/transaction.enum.js +2 -6
- package/dist/order/sale/transaction/transaction.validator.d.ts +11 -10
- package/dist/settings/organization/index.d.ts +3 -0
- package/dist/settings/organization/index.js +1 -0
- package/dist/settings/organization/organization.entity.d.ts +5 -0
- package/dist/settings/organization/organization.enum.d.ts +13 -0
- package/dist/settings/organization/organization.enum.js +14 -0
- package/dist/settings/organization/organization.validator.d.ts +13 -0
- package/package.json +26 -17
- package/dist/billing/payment/index.d.ts +0 -2
- package/dist/billing/payment/index.js +0 -7
- package/dist/billing/payment/payment.enum.js +0 -21
- package/dist/billing/payment/transaction.entity.d.ts +0 -15
- package/dist/billing/status/index.d.ts +0 -1
- package/dist/billing/status/index.js +0 -2
- package/dist/billing/status/status.entity.d.ts +0 -8
- package/dist/inventory/configuration/label/label.entity.d.ts +0 -7
- package/dist/inventory/configuration/label/label.validator.d.ts +0 -14
- package/dist/inventory/stock/backorder/backorder.entity.d.ts +0 -33
- package/dist/inventory/stock/backorder/backorder.validator.d.ts +0 -24
- package/dist/inventory/stock/backorder/index.d.ts +0 -2
- package/dist/inventory/stock/backorder/index.js +0 -2
- package/dist/logistic/carrier/carrier.entity.d.ts +0 -10
- package/dist/logistic/carrier/carrier.validator.d.ts +0 -17
- package/dist/logistic/carrier/index.d.ts +0 -2
- package/dist/logistic/carrier/index.js +0 -2
- package/dist/logistic/shipment/index.d.ts +0 -3
- package/dist/logistic/shipment/index.js +0 -7
- package/dist/logistic/shipment/shipment.entity.d.ts +0 -19
- package/dist/logistic/shipment/shipment.enum.js +0 -22
|
@@ -25,7 +25,7 @@ export declare abstract class AbstractRepository<E extends AbstractEntity = Abst
|
|
|
25
25
|
protected readonly $request: Request;
|
|
26
26
|
protected readonly $mongo: MongoService<E>;
|
|
27
27
|
readonly $cache: CacheService;
|
|
28
|
-
protected readonly $joins: Record<string, AbstractSchema<any
|
|
28
|
+
protected readonly $joins: Record<string, AbstractSchema<any> | null>;
|
|
29
29
|
constructor($request: Request, $mongo: MongoService<E>, $logger: LoggerService);
|
|
30
30
|
get $builder(): Model<E>;
|
|
31
31
|
get $user(): import("../../app.types").AppAuthUser;
|
|
@@ -50,17 +50,7 @@ export declare abstract class AbstractRepository<E extends AbstractEntity = Abst
|
|
|
50
50
|
} ? T : T & {
|
|
51
51
|
__v: number;
|
|
52
52
|
} : never : never)> | Document<string, object, E, Record<string, any>, {}>>;
|
|
53
|
-
update(
|
|
54
|
-
delete(
|
|
55
|
-
findByCreatedAtRange(startDate: Date, endDate: Date): Promise<{
|
|
56
|
-
data: import("mongoose").IfAny<E, any, Document<unknown, {}, E, {}, {}> & (import("mongoose").Require_id<E> extends infer T ? T extends import("mongoose").Require_id<E> ? T extends {
|
|
57
|
-
__v?: infer U;
|
|
58
|
-
} ? T : T & {
|
|
59
|
-
__v: number;
|
|
60
|
-
} : never : never)>[];
|
|
61
|
-
limit: number;
|
|
62
|
-
pages: number;
|
|
63
|
-
total: number;
|
|
64
|
-
}>;
|
|
53
|
+
update(param: string | RootFilterQuery<E>, payload: UpdateEntityArgs<E> | AbstractValidator, validator?: ReadValidator): Promise<HydratedDocument<E>>;
|
|
54
|
+
delete(param: string | RootFilterQuery<E>): Promise<void>;
|
|
65
55
|
}
|
|
66
56
|
export {};
|
|
@@ -10,9 +10,12 @@ export type KeyOfType<T, V> = keyof {
|
|
|
10
10
|
export declare class ReadValidator<E = AbstractEntity> extends AbstractValidator {
|
|
11
11
|
join?: PopulateOptions[];
|
|
12
12
|
}
|
|
13
|
-
export declare class
|
|
13
|
+
export declare class PaginationValidator {
|
|
14
14
|
limit?: number;
|
|
15
15
|
page?: number;
|
|
16
|
+
}
|
|
17
|
+
export declare class SearchValidator<E = AbstractEntity> {
|
|
18
|
+
pagination?: PaginationValidator;
|
|
16
19
|
sort?: {
|
|
17
20
|
[key: string]: SortOrder;
|
|
18
21
|
};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
|
|
@@ -3,9 +3,10 @@ import { AbstractEntity } from '../..';
|
|
|
3
3
|
import type { MongoEntity } from '../..';
|
|
4
4
|
export declare class AccountPaymentEntity extends AbstractEntity {
|
|
5
5
|
user: MongoEntity<AccountUserEntity>;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
hash: string;
|
|
7
|
+
last4: string;
|
|
8
|
+
brand: string;
|
|
9
|
+
expMonth: number;
|
|
10
|
+
expYear: number;
|
|
10
11
|
holder: string;
|
|
11
12
|
}
|
|
@@ -6,10 +6,17 @@ export declare class ReadPaymentValidator extends ReadValidator<AccountPaymentEn
|
|
|
6
6
|
}
|
|
7
7
|
export declare class CreatePaymentValidator extends AbstractValidator {
|
|
8
8
|
holder: string;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
hash: string;
|
|
10
|
+
last4: string;
|
|
11
|
+
brand: string;
|
|
12
|
+
expMonth: number;
|
|
13
|
+
expYear: number;
|
|
12
14
|
}
|
|
13
|
-
export declare class UpdatePaymentValidator extends
|
|
14
|
-
|
|
15
|
+
export declare class UpdatePaymentValidator extends AbstractValidator {
|
|
16
|
+
holder?: string;
|
|
17
|
+
hash: string;
|
|
18
|
+
last4: string;
|
|
19
|
+
brand: string;
|
|
20
|
+
expMonth?: number;
|
|
21
|
+
expYear?: number;
|
|
15
22
|
}
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { AccountUserEntity } from './';
|
|
2
2
|
import { AbstractValidator, ReadValidator, SearchValidator } from '../..';
|
|
3
|
-
export declare class
|
|
3
|
+
export declare class SearchUserValidator extends SearchValidator<AccountUserEntity> {
|
|
4
4
|
}
|
|
5
|
-
export declare class
|
|
5
|
+
export declare class ReadUserValidator extends ReadValidator<AccountUserEntity> {
|
|
6
6
|
}
|
|
7
|
-
export declare class
|
|
7
|
+
export declare class CreateUserValidator extends AbstractValidator {
|
|
8
8
|
name: string;
|
|
9
9
|
picture: string;
|
|
10
10
|
email: string;
|
|
@@ -13,5 +13,5 @@ export declare class CreateAccountUserValidator extends AbstractValidator {
|
|
|
13
13
|
identities: any[];
|
|
14
14
|
active: boolean;
|
|
15
15
|
}
|
|
16
|
-
export declare class
|
|
16
|
+
export declare class UpdateUserValidator extends CreateUserValidator {
|
|
17
17
|
}
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
|
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AssetType = void 0;
|
|
4
|
-
var AssetType;
|
|
1
|
+
export var AssetType;
|
|
5
2
|
(function (AssetType) {
|
|
6
3
|
AssetType["FILE"] = "file";
|
|
7
4
|
AssetType["VIDEO"] = "video";
|
|
8
5
|
AssetType["IMAGE"] = "image";
|
|
9
6
|
AssetType["DOCUMENT"] = "document";
|
|
10
|
-
})(AssetType || (
|
|
11
|
-
//# sourceMappingURL=asset.enum.js.map
|
|
7
|
+
})(AssetType || (AssetType = {}));
|
|
@@ -1,7 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var asset_enum_1 = require("./asset.enum");
|
|
4
|
-
Object.keys(asset_enum_1).forEach(function (key) {
|
|
5
|
-
if (key === "default" || key === "__esModule") return;
|
|
6
|
-
Object.defineProperty(exports, key, { enumerable: true, get: function () { return asset_enum_1[key]; } });
|
|
7
|
-
});
|
|
1
|
+
export * from './asset.enum.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './invoice.enum.js';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AbstractEntity, MongoEntity } from '../..';
|
|
2
|
+
import { FinanceInvoiceStatusEnum, FinanceInvoiceTypeEnum } from './';
|
|
3
|
+
export declare class FinanceInvoiceEntity extends AbstractEntity {
|
|
4
|
+
order: MongoEntity<any>;
|
|
5
|
+
orderModel: string;
|
|
6
|
+
total: number;
|
|
7
|
+
subtotal: number;
|
|
8
|
+
tax: number;
|
|
9
|
+
status: FinanceInvoiceStatusEnum;
|
|
10
|
+
type: FinanceInvoiceTypeEnum;
|
|
11
|
+
sequence: number;
|
|
12
|
+
dueDate?: Date;
|
|
13
|
+
notes?: string;
|
|
14
|
+
readonly number: string;
|
|
15
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare enum FinanceInvoiceStatusEnum {
|
|
2
|
+
DRAFT = "DRAFT",
|
|
3
|
+
SENT = "SENT",
|
|
4
|
+
PAID = "PAID",
|
|
5
|
+
OVERDUE = "OVERDUE",
|
|
6
|
+
CANCELLED = "CANCELLED",
|
|
7
|
+
VOIDED = "VOIDED"
|
|
8
|
+
}
|
|
9
|
+
export declare enum FinanceInvoiceTypeEnum {
|
|
10
|
+
STANDARD = "STANDARD",
|
|
11
|
+
CREDIT_NOTE = "CREDIT_NOTE",
|
|
12
|
+
DEBIT_NOTE = "DEBIT_NOTE",
|
|
13
|
+
PROFORMA = "PROFORMA"
|
|
14
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export var FinanceInvoiceStatusEnum;
|
|
2
|
+
(function (FinanceInvoiceStatusEnum) {
|
|
3
|
+
FinanceInvoiceStatusEnum["DRAFT"] = "DRAFT";
|
|
4
|
+
FinanceInvoiceStatusEnum["SENT"] = "SENT";
|
|
5
|
+
FinanceInvoiceStatusEnum["PAID"] = "PAID";
|
|
6
|
+
FinanceInvoiceStatusEnum["OVERDUE"] = "OVERDUE";
|
|
7
|
+
FinanceInvoiceStatusEnum["CANCELLED"] = "CANCELLED";
|
|
8
|
+
FinanceInvoiceStatusEnum["VOIDED"] = "VOIDED";
|
|
9
|
+
})(FinanceInvoiceStatusEnum || (FinanceInvoiceStatusEnum = {}));
|
|
10
|
+
export var FinanceInvoiceTypeEnum;
|
|
11
|
+
(function (FinanceInvoiceTypeEnum) {
|
|
12
|
+
FinanceInvoiceTypeEnum["STANDARD"] = "STANDARD";
|
|
13
|
+
FinanceInvoiceTypeEnum["CREDIT_NOTE"] = "CREDIT_NOTE";
|
|
14
|
+
FinanceInvoiceTypeEnum["DEBIT_NOTE"] = "DEBIT_NOTE";
|
|
15
|
+
FinanceInvoiceTypeEnum["PROFORMA"] = "PROFORMA";
|
|
16
|
+
})(FinanceInvoiceTypeEnum || (FinanceInvoiceTypeEnum = {}));
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { FinanceInvoiceEntity } from './';
|
|
2
|
+
import { FinanceInvoiceStatusEnum, FinanceInvoiceTypeEnum } from './';
|
|
3
|
+
import { AbstractValidator, ReadValidator, SearchValidator } from '../..';
|
|
4
|
+
export declare class SearchFinanceInvoiceValidator extends SearchValidator<FinanceInvoiceEntity> {
|
|
5
|
+
}
|
|
6
|
+
export declare class ReadFinanceInvoiceValidator extends ReadValidator<FinanceInvoiceEntity> {
|
|
7
|
+
}
|
|
8
|
+
export declare class CreateFinanceInvoiceValidator extends AbstractValidator {
|
|
9
|
+
order: string;
|
|
10
|
+
orderModel: string;
|
|
11
|
+
customer?: string;
|
|
12
|
+
type: FinanceInvoiceTypeEnum;
|
|
13
|
+
total?: number;
|
|
14
|
+
subtotal?: number;
|
|
15
|
+
tax?: number;
|
|
16
|
+
dueDate?: Date;
|
|
17
|
+
notes?: string;
|
|
18
|
+
}
|
|
19
|
+
export declare class UpdateFinanceInvoiceValidator extends CreateFinanceInvoiceValidator {
|
|
20
|
+
status?: FinanceInvoiceStatusEnum;
|
|
21
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './payment.enum.js';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { PurchaseTransactionEntity } from '../../order/purchase/transaction';
|
|
2
|
+
import { SaleTransactionEntity } from '../../order/sale/transaction';
|
|
3
|
+
import { AbstractEntity, MongoEntity } from '../..';
|
|
4
|
+
import { FinancePaymentTypeEnum, FinancePaymentMethodEnum, FinancePaymentStatusEnum } from './';
|
|
5
|
+
import type { FinanceRefundEntity } from '../refund';
|
|
6
|
+
export declare class FinancePaymentEntity extends AbstractEntity {
|
|
7
|
+
type: FinancePaymentTypeEnum;
|
|
8
|
+
target: string;
|
|
9
|
+
order: MongoEntity<SaleTransactionEntity | PurchaseTransactionEntity>;
|
|
10
|
+
status: FinancePaymentStatusEnum;
|
|
11
|
+
date: Date;
|
|
12
|
+
total: number;
|
|
13
|
+
fee: number;
|
|
14
|
+
method: FinancePaymentMethodEnum;
|
|
15
|
+
sequence: number;
|
|
16
|
+
refunds: MongoEntity<FinanceRefundEntity>[];
|
|
17
|
+
readonly number: string;
|
|
18
|
+
readonly refundedTotal: number;
|
|
19
|
+
}
|
|
@@ -1,15 +1,20 @@
|
|
|
1
|
-
export declare enum
|
|
1
|
+
export declare enum FinancePaymentStatusEnum {
|
|
2
2
|
OPEN = "OPEN",
|
|
3
3
|
PENDING = "PENDING",
|
|
4
4
|
FAILED = "FAILED",
|
|
5
5
|
DISPUTED = "DISPUTED",
|
|
6
6
|
PAID = "PAID",
|
|
7
|
+
PARTIALLY_REFUNDED = "PARTIALLY_REFUNDED",
|
|
7
8
|
REFUNDED = "REFUNDED",
|
|
8
9
|
CANCELLED = "CANCELLED"
|
|
9
10
|
}
|
|
10
|
-
export declare enum
|
|
11
|
+
export declare enum FinancePaymentMethodEnum {
|
|
11
12
|
CARD = "CARD",
|
|
12
13
|
TRANSFER = "TRANSFER",
|
|
13
14
|
CASH = "CASH",
|
|
14
15
|
CRYPTO = "CRYPTO"
|
|
15
16
|
}
|
|
17
|
+
export declare enum FinancePaymentTypeEnum {
|
|
18
|
+
SALE = "SALE",
|
|
19
|
+
PURCHASE = "PURCHASE"
|
|
20
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export var FinancePaymentStatusEnum;
|
|
2
|
+
(function (FinancePaymentStatusEnum) {
|
|
3
|
+
FinancePaymentStatusEnum["OPEN"] = "OPEN";
|
|
4
|
+
FinancePaymentStatusEnum["PENDING"] = "PENDING";
|
|
5
|
+
FinancePaymentStatusEnum["FAILED"] = "FAILED";
|
|
6
|
+
FinancePaymentStatusEnum["DISPUTED"] = "DISPUTED";
|
|
7
|
+
FinancePaymentStatusEnum["PAID"] = "PAID";
|
|
8
|
+
FinancePaymentStatusEnum["PARTIALLY_REFUNDED"] = "PARTIALLY_REFUNDED";
|
|
9
|
+
FinancePaymentStatusEnum["REFUNDED"] = "REFUNDED";
|
|
10
|
+
FinancePaymentStatusEnum["CANCELLED"] = "CANCELLED";
|
|
11
|
+
})(FinancePaymentStatusEnum || (FinancePaymentStatusEnum = {}));
|
|
12
|
+
export var FinancePaymentMethodEnum;
|
|
13
|
+
(function (FinancePaymentMethodEnum) {
|
|
14
|
+
FinancePaymentMethodEnum["CARD"] = "CARD";
|
|
15
|
+
FinancePaymentMethodEnum["TRANSFER"] = "TRANSFER";
|
|
16
|
+
FinancePaymentMethodEnum["CASH"] = "CASH";
|
|
17
|
+
FinancePaymentMethodEnum["CRYPTO"] = "CRYPTO";
|
|
18
|
+
})(FinancePaymentMethodEnum || (FinancePaymentMethodEnum = {}));
|
|
19
|
+
export var FinancePaymentTypeEnum;
|
|
20
|
+
(function (FinancePaymentTypeEnum) {
|
|
21
|
+
FinancePaymentTypeEnum["SALE"] = "SALE";
|
|
22
|
+
FinancePaymentTypeEnum["PURCHASE"] = "PURCHASE";
|
|
23
|
+
})(FinancePaymentTypeEnum || (FinancePaymentTypeEnum = {}));
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { FinancePaymentEntity } from './';
|
|
2
|
+
import { FinancePaymentTypeEnum, FinancePaymentStatusEnum, FinancePaymentMethodEnum } from './';
|
|
3
|
+
import { AbstractValidator, ReadValidator, SearchValidator } from '../..';
|
|
4
|
+
export declare class SearchFinancePaymentValidator extends SearchValidator<FinancePaymentEntity> {
|
|
5
|
+
}
|
|
6
|
+
export declare class ReadFinancePaymentValidator extends ReadValidator<FinancePaymentEntity> {
|
|
7
|
+
}
|
|
8
|
+
export declare class CreateFinancePaymentValidator extends AbstractValidator {
|
|
9
|
+
orderType: FinancePaymentTypeEnum;
|
|
10
|
+
target: string;
|
|
11
|
+
order?: string;
|
|
12
|
+
method: FinancePaymentMethodEnum;
|
|
13
|
+
details?: unknown;
|
|
14
|
+
total?: number;
|
|
15
|
+
}
|
|
16
|
+
export declare class UpdateFinancePaymentValidator extends CreateFinancePaymentValidator {
|
|
17
|
+
}
|
|
18
|
+
export declare class UpdateFinancePaymentStatusValidator {
|
|
19
|
+
type: FinancePaymentStatusEnum;
|
|
20
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './refund.enum.js';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { AbstractEntity, MongoEntity } from '../..';
|
|
2
|
+
import { FinanceRefundReasonEnum, FinanceRefundStatusEnum } from './';
|
|
3
|
+
import type { FinancePaymentEntity } from '../payment';
|
|
4
|
+
export declare class FinanceRefundEntity extends AbstractEntity {
|
|
5
|
+
payment: MongoEntity<FinancePaymentEntity>;
|
|
6
|
+
amount: number;
|
|
7
|
+
status: FinanceRefundStatusEnum;
|
|
8
|
+
reason: FinanceRefundReasonEnum;
|
|
9
|
+
sequence: number;
|
|
10
|
+
notes?: string;
|
|
11
|
+
readonly number: string;
|
|
12
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare enum FinanceRefundStatusEnum {
|
|
2
|
+
PENDING = "PENDING",
|
|
3
|
+
APPROVED = "APPROVED",
|
|
4
|
+
PROCESSING = "PROCESSING",
|
|
5
|
+
COMPLETED = "COMPLETED",
|
|
6
|
+
REJECTED = "REJECTED",
|
|
7
|
+
CANCELLED = "CANCELLED"
|
|
8
|
+
}
|
|
9
|
+
export declare enum FinanceRefundReasonEnum {
|
|
10
|
+
CUSTOMER_REQUEST = "CUSTOMER_REQUEST",
|
|
11
|
+
DEFECTIVE_PRODUCT = "DEFECTIVE_PRODUCT",
|
|
12
|
+
WRONG_ITEM = "WRONG_ITEM",
|
|
13
|
+
ORDER_CANCELLED = "ORDER_CANCELLED",
|
|
14
|
+
DUPLICATE_CHARGE = "DUPLICATE_CHARGE",
|
|
15
|
+
OTHER = "OTHER"
|
|
16
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export var FinanceRefundStatusEnum;
|
|
2
|
+
(function (FinanceRefundStatusEnum) {
|
|
3
|
+
FinanceRefundStatusEnum["PENDING"] = "PENDING";
|
|
4
|
+
FinanceRefundStatusEnum["APPROVED"] = "APPROVED";
|
|
5
|
+
FinanceRefundStatusEnum["PROCESSING"] = "PROCESSING";
|
|
6
|
+
FinanceRefundStatusEnum["COMPLETED"] = "COMPLETED";
|
|
7
|
+
FinanceRefundStatusEnum["REJECTED"] = "REJECTED";
|
|
8
|
+
FinanceRefundStatusEnum["CANCELLED"] = "CANCELLED";
|
|
9
|
+
})(FinanceRefundStatusEnum || (FinanceRefundStatusEnum = {}));
|
|
10
|
+
export var FinanceRefundReasonEnum;
|
|
11
|
+
(function (FinanceRefundReasonEnum) {
|
|
12
|
+
FinanceRefundReasonEnum["CUSTOMER_REQUEST"] = "CUSTOMER_REQUEST";
|
|
13
|
+
FinanceRefundReasonEnum["DEFECTIVE_PRODUCT"] = "DEFECTIVE_PRODUCT";
|
|
14
|
+
FinanceRefundReasonEnum["WRONG_ITEM"] = "WRONG_ITEM";
|
|
15
|
+
FinanceRefundReasonEnum["ORDER_CANCELLED"] = "ORDER_CANCELLED";
|
|
16
|
+
FinanceRefundReasonEnum["DUPLICATE_CHARGE"] = "DUPLICATE_CHARGE";
|
|
17
|
+
FinanceRefundReasonEnum["OTHER"] = "OTHER";
|
|
18
|
+
})(FinanceRefundReasonEnum || (FinanceRefundReasonEnum = {}));
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { FinanceRefundEntity } from './';
|
|
2
|
+
import { FinanceRefundReasonEnum, FinanceRefundStatusEnum } from './';
|
|
3
|
+
import { AbstractValidator, ReadValidator, SearchValidator } from '../..';
|
|
4
|
+
export declare class SearchFinanceRefundValidator extends SearchValidator<FinanceRefundEntity> {
|
|
5
|
+
}
|
|
6
|
+
export declare class ReadFinanceRefundValidator extends ReadValidator<FinanceRefundEntity> {
|
|
7
|
+
}
|
|
8
|
+
export declare class CreateFinanceRefundValidator extends AbstractValidator {
|
|
9
|
+
payment: string;
|
|
10
|
+
reason: FinanceRefundReasonEnum;
|
|
11
|
+
amount: number;
|
|
12
|
+
notes?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare class UpdateFinanceRefundValidator extends AbstractValidator {
|
|
15
|
+
reason?: FinanceRefundReasonEnum;
|
|
16
|
+
amount?: number;
|
|
17
|
+
notes?: string;
|
|
18
|
+
status?: FinanceRefundStatusEnum;
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './subscription.enum.js';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AbstractEntity } from '../..';
|
|
2
|
+
import { FinanceSubscriptionIntervalEnum, FinanceSubscriptionStatusEnum } from './';
|
|
3
|
+
export declare class FinanceSubscriptionEntity extends AbstractEntity {
|
|
4
|
+
name: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
price: number;
|
|
7
|
+
status: FinanceSubscriptionStatusEnum;
|
|
8
|
+
interval: FinanceSubscriptionIntervalEnum;
|
|
9
|
+
intervalCount: number;
|
|
10
|
+
currentPeriodStart?: Date;
|
|
11
|
+
currentPeriodEnd?: Date;
|
|
12
|
+
cancelledAt?: Date;
|
|
13
|
+
sequence: number;
|
|
14
|
+
readonly number: string;
|
|
15
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare enum FinanceSubscriptionStatusEnum {
|
|
2
|
+
ACTIVE = "ACTIVE",
|
|
3
|
+
TRIALING = "TRIALING",
|
|
4
|
+
PAST_DUE = "PAST_DUE",
|
|
5
|
+
PAUSED = "PAUSED",
|
|
6
|
+
CANCELLED = "CANCELLED",
|
|
7
|
+
EXPIRED = "EXPIRED"
|
|
8
|
+
}
|
|
9
|
+
export declare enum FinanceSubscriptionIntervalEnum {
|
|
10
|
+
DAILY = "DAILY",
|
|
11
|
+
WEEKLY = "WEEKLY",
|
|
12
|
+
MONTHLY = "MONTHLY",
|
|
13
|
+
QUARTERLY = "QUARTERLY",
|
|
14
|
+
YEARLY = "YEARLY"
|
|
15
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export var FinanceSubscriptionStatusEnum;
|
|
2
|
+
(function (FinanceSubscriptionStatusEnum) {
|
|
3
|
+
FinanceSubscriptionStatusEnum["ACTIVE"] = "ACTIVE";
|
|
4
|
+
FinanceSubscriptionStatusEnum["TRIALING"] = "TRIALING";
|
|
5
|
+
FinanceSubscriptionStatusEnum["PAST_DUE"] = "PAST_DUE";
|
|
6
|
+
FinanceSubscriptionStatusEnum["PAUSED"] = "PAUSED";
|
|
7
|
+
FinanceSubscriptionStatusEnum["CANCELLED"] = "CANCELLED";
|
|
8
|
+
FinanceSubscriptionStatusEnum["EXPIRED"] = "EXPIRED";
|
|
9
|
+
})(FinanceSubscriptionStatusEnum || (FinanceSubscriptionStatusEnum = {}));
|
|
10
|
+
export var FinanceSubscriptionIntervalEnum;
|
|
11
|
+
(function (FinanceSubscriptionIntervalEnum) {
|
|
12
|
+
FinanceSubscriptionIntervalEnum["DAILY"] = "DAILY";
|
|
13
|
+
FinanceSubscriptionIntervalEnum["WEEKLY"] = "WEEKLY";
|
|
14
|
+
FinanceSubscriptionIntervalEnum["MONTHLY"] = "MONTHLY";
|
|
15
|
+
FinanceSubscriptionIntervalEnum["QUARTERLY"] = "QUARTERLY";
|
|
16
|
+
FinanceSubscriptionIntervalEnum["YEARLY"] = "YEARLY";
|
|
17
|
+
})(FinanceSubscriptionIntervalEnum || (FinanceSubscriptionIntervalEnum = {}));
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { FinanceSubscriptionEntity } from './';
|
|
2
|
+
import { FinanceSubscriptionIntervalEnum, FinanceSubscriptionStatusEnum } from './';
|
|
3
|
+
import { AbstractValidator, ReadValidator, SearchValidator } from '../..';
|
|
4
|
+
export declare class SearchFinanceSubscriptionValidator extends SearchValidator<FinanceSubscriptionEntity> {
|
|
5
|
+
}
|
|
6
|
+
export declare class ReadFinanceSubscriptionValidator extends ReadValidator<FinanceSubscriptionEntity> {
|
|
7
|
+
}
|
|
8
|
+
export declare class CreateFinanceSubscriptionValidator extends AbstractValidator {
|
|
9
|
+
name: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
price: number;
|
|
12
|
+
interval: FinanceSubscriptionIntervalEnum;
|
|
13
|
+
intervalCount?: number;
|
|
14
|
+
currentPeriodStart?: Date;
|
|
15
|
+
currentPeriodEnd?: Date;
|
|
16
|
+
}
|
|
17
|
+
export declare class UpdateFinanceSubscriptionValidator extends CreateFinanceSubscriptionValidator {
|
|
18
|
+
status?: FinanceSubscriptionStatusEnum;
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './tax.enum.js';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AbstractEntity } from '../..';
|
|
2
|
+
import { FinanceTaxTypeEnum } from './';
|
|
3
|
+
export declare class FinanceTaxEntity extends AbstractEntity {
|
|
4
|
+
name: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
rate: number;
|
|
7
|
+
type: FinanceTaxTypeEnum;
|
|
8
|
+
isActive: boolean;
|
|
9
|
+
code?: string;
|
|
10
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export var FinanceTaxTypeEnum;
|
|
2
|
+
(function (FinanceTaxTypeEnum) {
|
|
3
|
+
FinanceTaxTypeEnum["VAT"] = "VAT";
|
|
4
|
+
FinanceTaxTypeEnum["SALES_TAX"] = "SALES_TAX";
|
|
5
|
+
FinanceTaxTypeEnum["GST"] = "GST";
|
|
6
|
+
FinanceTaxTypeEnum["INCOME_TAX"] = "INCOME_TAX";
|
|
7
|
+
FinanceTaxTypeEnum["WITHHOLDING"] = "WITHHOLDING";
|
|
8
|
+
FinanceTaxTypeEnum["CUSTOM"] = "CUSTOM";
|
|
9
|
+
})(FinanceTaxTypeEnum || (FinanceTaxTypeEnum = {}));
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { FinanceTaxEntity } from './';
|
|
2
|
+
import { FinanceTaxTypeEnum } from './';
|
|
3
|
+
import { AbstractValidator, ReadValidator, SearchValidator } from '../..';
|
|
4
|
+
export declare class SearchFinanceTaxValidator extends SearchValidator<FinanceTaxEntity> {
|
|
5
|
+
}
|
|
6
|
+
export declare class ReadFinanceTaxValidator extends ReadValidator<FinanceTaxEntity> {
|
|
7
|
+
}
|
|
8
|
+
export declare class CreateFinanceTaxValidator extends AbstractValidator {
|
|
9
|
+
name: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
rate: number;
|
|
12
|
+
type: FinanceTaxTypeEnum;
|
|
13
|
+
code?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare class UpdateFinanceTaxValidator extends CreateFinanceTaxValidator {
|
|
16
|
+
isActive?: boolean;
|
|
17
|
+
}
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import { CatalogAttributeEntity } from './';
|
|
2
2
|
import { AbstractValidator, ReadValidator, SearchValidator } from '../../..';
|
|
3
|
-
export declare class
|
|
3
|
+
export declare class SearchCatalogAttributeValidator extends SearchValidator<CatalogAttributeEntity> {
|
|
4
4
|
}
|
|
5
|
-
export declare class
|
|
5
|
+
export declare class ReadCatalogAttributeValidator extends ReadValidator<CatalogAttributeEntity> {
|
|
6
6
|
}
|
|
7
|
-
export declare class
|
|
7
|
+
export declare class CreateCatalogAttributeValidator extends AbstractValidator {
|
|
8
8
|
name: string;
|
|
9
|
-
|
|
10
|
-
options?: string[];
|
|
11
|
-
required?: boolean;
|
|
9
|
+
values?: string[];
|
|
12
10
|
active?: boolean;
|
|
13
11
|
}
|
|
14
|
-
export declare class
|
|
12
|
+
export declare class UpdateCatalogAttributeValidator extends CreateCatalogAttributeValidator {
|
|
15
13
|
}
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { CatalogBrandEntity } from './';
|
|
2
2
|
import { AbstractValidator, ReadValidator, SearchValidator } from '../../..';
|
|
3
|
-
export declare class
|
|
3
|
+
export declare class SearchCatalogBrandValidator extends SearchValidator<CatalogBrandEntity> {
|
|
4
4
|
}
|
|
5
|
-
export declare class
|
|
5
|
+
export declare class ReadCatalogBrandValidator extends ReadValidator<CatalogBrandEntity> {
|
|
6
6
|
}
|
|
7
|
-
export declare class
|
|
7
|
+
export declare class CreateCatalogBrandValidator extends AbstractValidator {
|
|
8
8
|
name: string;
|
|
9
9
|
description: string;
|
|
10
10
|
}
|
|
11
|
-
export declare class
|
|
11
|
+
export declare class UpdateCatalogBrandValidator extends CreateCatalogBrandValidator {
|
|
12
12
|
}
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
|