@merkaly/api 0.26.4 → 0.27.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/app.schemas.d.ts +3 -0
- package/dist/finance/payment/index.d.ts +0 -2
- package/dist/finance/payment/payment.entity.d.ts +75 -2
- package/dist/finance/payment/report.d.ts +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/integration/payment/charge.request.validator.js +8 -8
- package/dist/integration/payment/request.validator.js +16 -16
- package/dist/integration/supplier/order.d.ts +6 -6
- package/dist/logistics/shipment/index.d.ts +3 -0
- package/dist/logistics/shipment/index.js +1 -0
- package/dist/logistics/shipment/shipment.d.ts +26 -0
- package/dist/logistics/shipment/shipment.entity.d.ts +36 -0
- package/dist/logistics/shipment/shipment.enum.d.ts +24 -0
- package/dist/logistics/shipment/shipment.enum.js +28 -0
- package/dist/order/purchase/index.d.ts +0 -2
- package/dist/order/purchase/index.js +0 -1
- package/dist/order/purchase/purchase.entity.d.ts +20 -1
- package/dist/order/purchase/purchase.enum.d.ts +9 -5
- package/dist/order/purchase/purchase.enum.js +20 -8
- package/dist/order/purchase/purchase.transition.js +8 -5
- package/dist/order/purchase/request.validator.js +2 -2
- package/dist/order/purchase/supplier.order.request.validator.js +2 -2
- package/dist/order/sale/attention.d.ts +2 -2
- package/dist/order/sale/attention.enum.d.ts +1 -0
- package/dist/order/sale/attention.enum.js +1 -0
- package/dist/order/sale/checkout.request.validator.d.ts +2 -2
- package/dist/order/sale/checkout.request.validator.js +4 -4
- package/dist/order/sale/{shipping.request.validator.d.ts → delivery.request.validator.d.ts} +7 -7
- package/dist/order/sale/{shipping.request.validator.js → delivery.request.validator.js} +26 -26
- package/dist/order/sale/{shipping.update.request.validator.d.ts → delivery.update.request.validator.d.ts} +5 -5
- package/dist/order/sale/{shipping.update.request.validator.js → delivery.update.request.validator.js} +36 -36
- package/dist/order/sale/fulfillment.d.ts +11 -10
- package/dist/order/sale/fulfillment.enum.d.ts +6 -14
- package/dist/order/sale/fulfillment.enum.js +9 -21
- package/dist/order/sale/index.d.ts +2 -4
- package/dist/order/sale/index.js +2 -2
- package/dist/order/sale/request.validator.js +2 -2
- package/dist/order/sale/sale.entity.d.ts +84 -5
- package/dist/order/sale/sale.enum.d.ts +11 -6
- package/dist/order/sale/sale.enum.js +15 -9
- package/dist/order/sale/sale.import.d.ts +3 -2
- package/dist/order/sale/sale.transition.js +7 -6
- package/package.json +1 -1
- package/dist/finance/payment/payment.attempt.entity.d.ts +0 -26
- package/dist/finance/payment/payment.gateway.entity.d.ts +0 -53
- package/dist/order/purchase/purchase.supplier.order.entity.d.ts +0 -24
- package/dist/order/purchase/supplier.order.enum.d.ts +0 -11
- package/dist/order/purchase/supplier.order.enum.js +0 -23
- package/dist/order/sale/sale.import.entity.d.ts +0 -15
- package/dist/order/sale/sale.shipping.entity.d.ts +0 -80
|
@@ -1,15 +1,94 @@
|
|
|
1
|
+
import { Schema as MongoSchema } from 'mongoose';
|
|
1
2
|
import { ContactCustomerEntity } from '../../contact/customer';
|
|
2
3
|
import { ItemEntity } from '../item';
|
|
3
4
|
import { TransactionEntity } from '../../transaction.entity.js';
|
|
4
|
-
import { OrderSaleStatusEnum } from './sale.enum.js';
|
|
5
|
-
import { OrderSaleImportEntity } from './sale.import.entity.js';
|
|
6
|
-
import { OrderSaleShippingEntity } from './sale.shipping.entity.js';
|
|
5
|
+
import { OrderSaleSourceEnum, OrderSaleStatusEnum } from './sale.enum.js';
|
|
7
6
|
import type { OrderPurchaseEntity } from '../purchase';
|
|
7
|
+
export declare class OrderSaleDeliveryRecipientEntity {
|
|
8
|
+
name: string;
|
|
9
|
+
email: string;
|
|
10
|
+
phone: string;
|
|
11
|
+
document: string;
|
|
12
|
+
birthday?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare const OrderSaleDeliveryRecipientSchema: MongoSchema<OrderSaleDeliveryRecipientEntity, import("mongoose").Model<OrderSaleDeliveryRecipientEntity, any, any, any, import("mongoose").Document<unknown, any, OrderSaleDeliveryRecipientEntity, any, {}> & OrderSaleDeliveryRecipientEntity & {
|
|
15
|
+
_id: import("mongoose").Types.ObjectId;
|
|
16
|
+
} & {
|
|
17
|
+
__v: number;
|
|
18
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, OrderSaleDeliveryRecipientEntity, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<OrderSaleDeliveryRecipientEntity>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<OrderSaleDeliveryRecipientEntity> & {
|
|
19
|
+
_id: import("mongoose").Types.ObjectId;
|
|
20
|
+
} & {
|
|
21
|
+
__v: number;
|
|
22
|
+
}>;
|
|
23
|
+
export declare class OrderSaleDeliveryAddressEntity {
|
|
24
|
+
postalCode: string;
|
|
25
|
+
street: string;
|
|
26
|
+
number: string;
|
|
27
|
+
complement?: string;
|
|
28
|
+
district: string;
|
|
29
|
+
city: string;
|
|
30
|
+
state: string;
|
|
31
|
+
country: string;
|
|
32
|
+
}
|
|
33
|
+
export declare const OrderSaleDeliveryAddressSchema: MongoSchema<OrderSaleDeliveryAddressEntity, import("mongoose").Model<OrderSaleDeliveryAddressEntity, any, any, any, import("mongoose").Document<unknown, any, OrderSaleDeliveryAddressEntity, any, {}> & OrderSaleDeliveryAddressEntity & {
|
|
34
|
+
_id: import("mongoose").Types.ObjectId;
|
|
35
|
+
} & {
|
|
36
|
+
__v: number;
|
|
37
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, OrderSaleDeliveryAddressEntity, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<OrderSaleDeliveryAddressEntity>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<OrderSaleDeliveryAddressEntity> & {
|
|
38
|
+
_id: import("mongoose").Types.ObjectId;
|
|
39
|
+
} & {
|
|
40
|
+
__v: number;
|
|
41
|
+
}>;
|
|
42
|
+
export declare class OrderSaleDeliveryDaysEntity {
|
|
43
|
+
min?: number;
|
|
44
|
+
max?: number;
|
|
45
|
+
}
|
|
46
|
+
export declare const OrderSaleDeliveryDaysSchema: MongoSchema<OrderSaleDeliveryDaysEntity, import("mongoose").Model<OrderSaleDeliveryDaysEntity, any, any, any, import("mongoose").Document<unknown, any, OrderSaleDeliveryDaysEntity, any, {}> & OrderSaleDeliveryDaysEntity & {
|
|
47
|
+
_id: import("mongoose").Types.ObjectId;
|
|
48
|
+
} & {
|
|
49
|
+
__v: number;
|
|
50
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, OrderSaleDeliveryDaysEntity, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<OrderSaleDeliveryDaysEntity>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<OrderSaleDeliveryDaysEntity> & {
|
|
51
|
+
_id: import("mongoose").Types.ObjectId;
|
|
52
|
+
} & {
|
|
53
|
+
__v: number;
|
|
54
|
+
}>;
|
|
55
|
+
export declare class OrderSaleDeliveryLineEntity {
|
|
56
|
+
variant: string;
|
|
57
|
+
amount: number;
|
|
58
|
+
method?: string;
|
|
59
|
+
deliveryDays?: OrderSaleDeliveryDaysEntity;
|
|
60
|
+
}
|
|
61
|
+
export declare const OrderSaleDeliveryLineSchema: MongoSchema<OrderSaleDeliveryLineEntity, import("mongoose").Model<OrderSaleDeliveryLineEntity, any, any, any, import("mongoose").Document<unknown, any, OrderSaleDeliveryLineEntity, any, {}> & OrderSaleDeliveryLineEntity & {
|
|
62
|
+
_id: import("mongoose").Types.ObjectId;
|
|
63
|
+
} & {
|
|
64
|
+
__v: number;
|
|
65
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, OrderSaleDeliveryLineEntity, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<OrderSaleDeliveryLineEntity>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<OrderSaleDeliveryLineEntity> & {
|
|
66
|
+
_id: import("mongoose").Types.ObjectId;
|
|
67
|
+
} & {
|
|
68
|
+
__v: number;
|
|
69
|
+
}>;
|
|
70
|
+
export declare class OrderSaleDeliveryEntity {
|
|
71
|
+
recipient: OrderSaleDeliveryRecipientEntity;
|
|
72
|
+
address: OrderSaleDeliveryAddressEntity;
|
|
73
|
+
fee?: number;
|
|
74
|
+
quotedAt?: Date;
|
|
75
|
+
lines?: OrderSaleDeliveryLineEntity[];
|
|
76
|
+
}
|
|
77
|
+
export declare const OrderSaleDeliverySchema: MongoSchema<OrderSaleDeliveryEntity, import("mongoose").Model<OrderSaleDeliveryEntity, any, any, any, import("mongoose").Document<unknown, any, OrderSaleDeliveryEntity, any, {}> & OrderSaleDeliveryEntity & {
|
|
78
|
+
_id: import("mongoose").Types.ObjectId;
|
|
79
|
+
} & {
|
|
80
|
+
__v: number;
|
|
81
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, OrderSaleDeliveryEntity, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<OrderSaleDeliveryEntity>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<OrderSaleDeliveryEntity> & {
|
|
82
|
+
_id: import("mongoose").Types.ObjectId;
|
|
83
|
+
} & {
|
|
84
|
+
__v: number;
|
|
85
|
+
}>;
|
|
8
86
|
export declare class OrderSaleEntity extends TransactionEntity<OrderSaleStatusEnum> {
|
|
9
87
|
customer: ContactCustomerEntity;
|
|
10
88
|
items: ItemEntity[];
|
|
11
|
-
|
|
12
|
-
|
|
89
|
+
delivery?: OrderSaleDeliveryEntity;
|
|
90
|
+
cancelledAt?: Date | null;
|
|
91
|
+
source: OrderSaleSourceEnum;
|
|
13
92
|
readonly purchases: OrderPurchaseEntity[];
|
|
14
93
|
readonly cost: number | null;
|
|
15
94
|
readonly profit: number | null;
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
export declare enum OrderSaleStatusEnum {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
AWAITING_PAYMENT = "AWAITING_PAYMENT",
|
|
3
|
+
PAID = "PAID",
|
|
4
|
+
ORDERED = "ORDERED",
|
|
5
|
+
SHIPPED = "SHIPPED",
|
|
6
|
+
DELIVERED = "DELIVERED",
|
|
7
|
+
CANCELLED = "CANCELLED"
|
|
7
8
|
}
|
|
8
|
-
export declare const SALE_PRE_FULFILLMENT_STATUSES: readonly OrderSaleStatusEnum[];
|
|
9
9
|
export declare const SALE_OPEN_STATUSES: readonly OrderSaleStatusEnum[];
|
|
10
|
+
export declare enum OrderSaleSourceEnum {
|
|
11
|
+
CHECKOUT = "CHECKOUT",
|
|
12
|
+
ADMIN = "ADMIN",
|
|
13
|
+
IMPORT = "IMPORT"
|
|
14
|
+
}
|
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
export var OrderSaleStatusEnum;
|
|
2
2
|
(function (OrderSaleStatusEnum) {
|
|
3
|
-
OrderSaleStatusEnum["
|
|
4
|
-
OrderSaleStatusEnum["
|
|
5
|
-
OrderSaleStatusEnum["
|
|
3
|
+
OrderSaleStatusEnum["AWAITING_PAYMENT"] = "AWAITING_PAYMENT";
|
|
4
|
+
OrderSaleStatusEnum["PAID"] = "PAID";
|
|
5
|
+
OrderSaleStatusEnum["ORDERED"] = "ORDERED";
|
|
6
|
+
OrderSaleStatusEnum["SHIPPED"] = "SHIPPED";
|
|
7
|
+
OrderSaleStatusEnum["DELIVERED"] = "DELIVERED";
|
|
6
8
|
OrderSaleStatusEnum["CANCELLED"] = "CANCELLED";
|
|
7
|
-
OrderSaleStatusEnum["RETURNED"] = "RETURNED";
|
|
8
9
|
})(OrderSaleStatusEnum || (OrderSaleStatusEnum = {}));
|
|
9
|
-
export const SALE_PRE_FULFILLMENT_STATUSES = [
|
|
10
|
-
OrderSaleStatusEnum.OPEN,
|
|
11
|
-
];
|
|
12
10
|
export const SALE_OPEN_STATUSES = [
|
|
13
|
-
|
|
14
|
-
OrderSaleStatusEnum.
|
|
11
|
+
OrderSaleStatusEnum.AWAITING_PAYMENT,
|
|
12
|
+
OrderSaleStatusEnum.PAID,
|
|
13
|
+
OrderSaleStatusEnum.ORDERED,
|
|
14
|
+
OrderSaleStatusEnum.SHIPPED,
|
|
15
15
|
];
|
|
16
|
+
export var OrderSaleSourceEnum;
|
|
17
|
+
(function (OrderSaleSourceEnum) {
|
|
18
|
+
OrderSaleSourceEnum["CHECKOUT"] = "CHECKOUT";
|
|
19
|
+
OrderSaleSourceEnum["ADMIN"] = "ADMIN";
|
|
20
|
+
OrderSaleSourceEnum["IMPORT"] = "IMPORT";
|
|
21
|
+
})(OrderSaleSourceEnum || (OrderSaleSourceEnum = {}));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { OrderPurchaseStatusEnum } from '../purchase';
|
|
2
2
|
export interface SaleImportPreviewLine {
|
|
3
3
|
externalProductId: string;
|
|
4
4
|
externalVariantId: string;
|
|
@@ -17,7 +17,8 @@ export interface SaleImportPreview {
|
|
|
17
17
|
externalOrderId: string;
|
|
18
18
|
store?: string;
|
|
19
19
|
placedAt: Date;
|
|
20
|
-
status?:
|
|
20
|
+
status?: OrderPurchaseStatusEnum;
|
|
21
|
+
received: boolean;
|
|
21
22
|
rawStatus: string;
|
|
22
23
|
trackingNumbers: string[];
|
|
23
24
|
currency: string;
|
|
@@ -3,18 +3,19 @@ import * as sale_enum_1 from './sale.enum.js';
|
|
|
3
3
|
|
|
4
4
|
export class OrderSaleTransition extends AbstractTransition {
|
|
5
5
|
$states = {
|
|
6
|
-
[sale_enum_1.OrderSaleStatusEnum.
|
|
7
|
-
[sale_enum_1.OrderSaleStatusEnum.
|
|
8
|
-
[sale_enum_1.OrderSaleStatusEnum.
|
|
6
|
+
[sale_enum_1.OrderSaleStatusEnum.AWAITING_PAYMENT]: [],
|
|
7
|
+
[sale_enum_1.OrderSaleStatusEnum.PAID]: [],
|
|
8
|
+
[sale_enum_1.OrderSaleStatusEnum.ORDERED]: [],
|
|
9
|
+
[sale_enum_1.OrderSaleStatusEnum.SHIPPED]: [],
|
|
10
|
+
[sale_enum_1.OrderSaleStatusEnum.DELIVERED]: [],
|
|
9
11
|
[sale_enum_1.OrderSaleStatusEnum.CANCELLED]: [],
|
|
10
|
-
[sale_enum_1.OrderSaleStatusEnum.RETURNED]: [],
|
|
11
12
|
};
|
|
12
13
|
|
|
13
|
-
constructor(status = sale_enum_1.OrderSaleStatusEnum.
|
|
14
|
+
constructor(status = sale_enum_1.OrderSaleStatusEnum.AWAITING_PAYMENT) {
|
|
14
15
|
super(status);
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
get initialStates() {
|
|
18
|
-
return [sale_enum_1.OrderSaleStatusEnum.
|
|
19
|
+
return [sale_enum_1.OrderSaleStatusEnum.AWAITING_PAYMENT];
|
|
19
20
|
}
|
|
20
21
|
}
|
package/package.json
CHANGED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { Schema as MongoSchema } from 'mongoose';
|
|
2
|
-
import { FinancePaymentMethodEnum } from './payment.enum.js';
|
|
3
|
-
import { FinancePaymentGatewayCardEntity } from './payment.gateway.entity.js';
|
|
4
|
-
import type { PaymentChargeStatusEnum } from '../../integration/payment';
|
|
5
|
-
export type FinancePaymentAttemptStatus = PaymentChargeStatusEnum | 'UNKNOWN';
|
|
6
|
-
export declare class FinancePaymentAttemptEntity {
|
|
7
|
-
reference?: string | null;
|
|
8
|
-
method: FinancePaymentMethodEnum;
|
|
9
|
-
status: FinancePaymentAttemptStatus;
|
|
10
|
-
rawStatus: string;
|
|
11
|
-
amount: number;
|
|
12
|
-
message?: string | null;
|
|
13
|
-
card?: FinancePaymentGatewayCardEntity | null;
|
|
14
|
-
expiresAt?: Date | null;
|
|
15
|
-
createdAt: Date;
|
|
16
|
-
syncedAt: Date;
|
|
17
|
-
}
|
|
18
|
-
export declare const FinancePaymentAttemptSchema: MongoSchema<FinancePaymentAttemptEntity, import("mongoose").Model<FinancePaymentAttemptEntity, any, any, any, import("mongoose").Document<unknown, any, FinancePaymentAttemptEntity, any, {}> & FinancePaymentAttemptEntity & {
|
|
19
|
-
_id: import("mongoose").Types.ObjectId;
|
|
20
|
-
} & {
|
|
21
|
-
__v: number;
|
|
22
|
-
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, FinancePaymentAttemptEntity, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<FinancePaymentAttemptEntity>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<FinancePaymentAttemptEntity> & {
|
|
23
|
-
_id: import("mongoose").Types.ObjectId;
|
|
24
|
-
} & {
|
|
25
|
-
__v: number;
|
|
26
|
-
}>;
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { Schema as MongoSchema } from 'mongoose';
|
|
2
|
-
import { PaymentChargeAccountEnum } from '../../integration/payment';
|
|
3
|
-
import { FinancePaymentMethodEnum } from './payment.enum.js';
|
|
4
|
-
export declare class FinancePaymentGatewayPixEntity {
|
|
5
|
-
qrCode?: string | null;
|
|
6
|
-
qrCodeImage?: string | null;
|
|
7
|
-
}
|
|
8
|
-
export declare const FinancePaymentGatewayPixSchema: MongoSchema<FinancePaymentGatewayPixEntity, import("mongoose").Model<FinancePaymentGatewayPixEntity, any, any, any, import("mongoose").Document<unknown, any, FinancePaymentGatewayPixEntity, any, {}> & FinancePaymentGatewayPixEntity & {
|
|
9
|
-
_id: import("mongoose").Types.ObjectId;
|
|
10
|
-
} & {
|
|
11
|
-
__v: number;
|
|
12
|
-
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, FinancePaymentGatewayPixEntity, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<FinancePaymentGatewayPixEntity>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<FinancePaymentGatewayPixEntity> & {
|
|
13
|
-
_id: import("mongoose").Types.ObjectId;
|
|
14
|
-
} & {
|
|
15
|
-
__v: number;
|
|
16
|
-
}>;
|
|
17
|
-
export declare class FinancePaymentGatewayCardEntity {
|
|
18
|
-
brand?: string | null;
|
|
19
|
-
last4?: string | null;
|
|
20
|
-
}
|
|
21
|
-
export declare const FinancePaymentGatewayCardSchema: MongoSchema<FinancePaymentGatewayCardEntity, import("mongoose").Model<FinancePaymentGatewayCardEntity, any, any, any, import("mongoose").Document<unknown, any, FinancePaymentGatewayCardEntity, any, {}> & FinancePaymentGatewayCardEntity & {
|
|
22
|
-
_id: import("mongoose").Types.ObjectId;
|
|
23
|
-
} & {
|
|
24
|
-
__v: number;
|
|
25
|
-
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, FinancePaymentGatewayCardEntity, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<FinancePaymentGatewayCardEntity>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<FinancePaymentGatewayCardEntity> & {
|
|
26
|
-
_id: import("mongoose").Types.ObjectId;
|
|
27
|
-
} & {
|
|
28
|
-
__v: number;
|
|
29
|
-
}>;
|
|
30
|
-
export declare class FinancePaymentGatewayEntity {
|
|
31
|
-
provider: string;
|
|
32
|
-
reference?: string | null;
|
|
33
|
-
account?: PaymentChargeAccountEnum | null;
|
|
34
|
-
method: FinancePaymentMethodEnum;
|
|
35
|
-
status: string;
|
|
36
|
-
message?: string | null;
|
|
37
|
-
attempt: number;
|
|
38
|
-
cardAttempts: number;
|
|
39
|
-
amount: number;
|
|
40
|
-
pix?: FinancePaymentGatewayPixEntity | null;
|
|
41
|
-
card?: FinancePaymentGatewayCardEntity | null;
|
|
42
|
-
expiresAt?: Date | null;
|
|
43
|
-
syncedAt: Date;
|
|
44
|
-
}
|
|
45
|
-
export declare const FinancePaymentGatewaySchema: MongoSchema<FinancePaymentGatewayEntity, import("mongoose").Model<FinancePaymentGatewayEntity, any, any, any, import("mongoose").Document<unknown, any, FinancePaymentGatewayEntity, any, {}> & FinancePaymentGatewayEntity & {
|
|
46
|
-
_id: import("mongoose").Types.ObjectId;
|
|
47
|
-
} & {
|
|
48
|
-
__v: number;
|
|
49
|
-
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, FinancePaymentGatewayEntity, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<FinancePaymentGatewayEntity>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<FinancePaymentGatewayEntity> & {
|
|
50
|
-
_id: import("mongoose").Types.ObjectId;
|
|
51
|
-
} & {
|
|
52
|
-
__v: number;
|
|
53
|
-
}>;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { SupplierProviderEnum } from '../../integration/supplier';
|
|
2
|
-
import { OrderSupplierOrderStatusEnum } from './supplier.order.enum.js';
|
|
3
|
-
export declare class OrderPurchaseSupplierOrderEntity {
|
|
4
|
-
provider: SupplierProviderEnum;
|
|
5
|
-
externalOrderIds: string[];
|
|
6
|
-
reference?: string;
|
|
7
|
-
status: OrderSupplierOrderStatusEnum;
|
|
8
|
-
rawStatus?: string;
|
|
9
|
-
placedAt: Date;
|
|
10
|
-
syncedAt?: Date;
|
|
11
|
-
trackingNumbers: string[];
|
|
12
|
-
carrier?: string;
|
|
13
|
-
trackingUrl?: string;
|
|
14
|
-
error?: string;
|
|
15
|
-
}
|
|
16
|
-
export declare const OrderPurchaseSupplierOrderSchema: import("mongoose").Schema<OrderPurchaseSupplierOrderEntity, import("mongoose").Model<OrderPurchaseSupplierOrderEntity, any, any, any, import("mongoose").Document<unknown, any, OrderPurchaseSupplierOrderEntity, any, {}> & OrderPurchaseSupplierOrderEntity & {
|
|
17
|
-
_id: import("mongoose").Types.ObjectId;
|
|
18
|
-
} & {
|
|
19
|
-
__v: number;
|
|
20
|
-
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, OrderPurchaseSupplierOrderEntity, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<OrderPurchaseSupplierOrderEntity>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<OrderPurchaseSupplierOrderEntity> & {
|
|
21
|
-
_id: import("mongoose").Types.ObjectId;
|
|
22
|
-
} & {
|
|
23
|
-
__v: number;
|
|
24
|
-
}>;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export declare enum OrderSupplierOrderStatusEnum {
|
|
2
|
-
PLACED = "PLACED",
|
|
3
|
-
AWAITING_PAYMENT = "AWAITING_PAYMENT",
|
|
4
|
-
PAID = "PAID",
|
|
5
|
-
SHIPPED = "SHIPPED",
|
|
6
|
-
DELIVERED = "DELIVERED",
|
|
7
|
-
CANCELLED = "CANCELLED",
|
|
8
|
-
FAILED = "FAILED"
|
|
9
|
-
}
|
|
10
|
-
export declare const SUPPLIER_ORDER_PROGRESS: readonly OrderSupplierOrderStatusEnum[];
|
|
11
|
-
export declare const SUPPLIER_ORDER_SYNCABLE_STATUSES: readonly OrderSupplierOrderStatusEnum[];
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
export var OrderSupplierOrderStatusEnum;
|
|
2
|
-
(function (OrderSupplierOrderStatusEnum) {
|
|
3
|
-
OrderSupplierOrderStatusEnum["PLACED"] = "PLACED";
|
|
4
|
-
OrderSupplierOrderStatusEnum["AWAITING_PAYMENT"] = "AWAITING_PAYMENT";
|
|
5
|
-
OrderSupplierOrderStatusEnum["PAID"] = "PAID";
|
|
6
|
-
OrderSupplierOrderStatusEnum["SHIPPED"] = "SHIPPED";
|
|
7
|
-
OrderSupplierOrderStatusEnum["DELIVERED"] = "DELIVERED";
|
|
8
|
-
OrderSupplierOrderStatusEnum["CANCELLED"] = "CANCELLED";
|
|
9
|
-
OrderSupplierOrderStatusEnum["FAILED"] = "FAILED";
|
|
10
|
-
})(OrderSupplierOrderStatusEnum || (OrderSupplierOrderStatusEnum = {}));
|
|
11
|
-
export const SUPPLIER_ORDER_PROGRESS = [
|
|
12
|
-
OrderSupplierOrderStatusEnum.PLACED,
|
|
13
|
-
OrderSupplierOrderStatusEnum.AWAITING_PAYMENT,
|
|
14
|
-
OrderSupplierOrderStatusEnum.PAID,
|
|
15
|
-
OrderSupplierOrderStatusEnum.SHIPPED,
|
|
16
|
-
OrderSupplierOrderStatusEnum.DELIVERED,
|
|
17
|
-
];
|
|
18
|
-
export const SUPPLIER_ORDER_SYNCABLE_STATUSES = [
|
|
19
|
-
OrderSupplierOrderStatusEnum.PLACED,
|
|
20
|
-
OrderSupplierOrderStatusEnum.AWAITING_PAYMENT,
|
|
21
|
-
OrderSupplierOrderStatusEnum.PAID,
|
|
22
|
-
OrderSupplierOrderStatusEnum.SHIPPED,
|
|
23
|
-
];
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { SupplierProviderEnum } from '../../integration/supplier';
|
|
2
|
-
export declare class OrderSaleImportEntity {
|
|
3
|
-
provider: SupplierProviderEnum;
|
|
4
|
-
externalOrderId: string;
|
|
5
|
-
importedAt: Date;
|
|
6
|
-
}
|
|
7
|
-
export declare const OrderSaleImportSchema: import("mongoose").Schema<OrderSaleImportEntity, import("mongoose").Model<OrderSaleImportEntity, any, any, any, import("mongoose").Document<unknown, any, OrderSaleImportEntity, any, {}> & OrderSaleImportEntity & {
|
|
8
|
-
_id: import("mongoose").Types.ObjectId;
|
|
9
|
-
} & {
|
|
10
|
-
__v: number;
|
|
11
|
-
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, OrderSaleImportEntity, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<OrderSaleImportEntity>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<OrderSaleImportEntity> & {
|
|
12
|
-
_id: import("mongoose").Types.ObjectId;
|
|
13
|
-
} & {
|
|
14
|
-
__v: number;
|
|
15
|
-
}>;
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { Schema as MongoSchema } from 'mongoose';
|
|
2
|
-
export declare class OrderSaleShippingRecipientEntity {
|
|
3
|
-
name: string;
|
|
4
|
-
email: string;
|
|
5
|
-
phone: string;
|
|
6
|
-
document: string;
|
|
7
|
-
birthday?: string;
|
|
8
|
-
}
|
|
9
|
-
export declare const OrderSaleShippingRecipientSchema: MongoSchema<OrderSaleShippingRecipientEntity, import("mongoose").Model<OrderSaleShippingRecipientEntity, any, any, any, import("mongoose").Document<unknown, any, OrderSaleShippingRecipientEntity, any, {}> & OrderSaleShippingRecipientEntity & {
|
|
10
|
-
_id: import("mongoose").Types.ObjectId;
|
|
11
|
-
} & {
|
|
12
|
-
__v: number;
|
|
13
|
-
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, OrderSaleShippingRecipientEntity, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<OrderSaleShippingRecipientEntity>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<OrderSaleShippingRecipientEntity> & {
|
|
14
|
-
_id: import("mongoose").Types.ObjectId;
|
|
15
|
-
} & {
|
|
16
|
-
__v: number;
|
|
17
|
-
}>;
|
|
18
|
-
export declare class OrderSaleShippingAddressEntity {
|
|
19
|
-
postalCode: string;
|
|
20
|
-
street: string;
|
|
21
|
-
number: string;
|
|
22
|
-
complement?: string;
|
|
23
|
-
district: string;
|
|
24
|
-
city: string;
|
|
25
|
-
state: string;
|
|
26
|
-
country: string;
|
|
27
|
-
}
|
|
28
|
-
export declare const OrderSaleShippingAddressSchema: MongoSchema<OrderSaleShippingAddressEntity, import("mongoose").Model<OrderSaleShippingAddressEntity, any, any, any, import("mongoose").Document<unknown, any, OrderSaleShippingAddressEntity, any, {}> & OrderSaleShippingAddressEntity & {
|
|
29
|
-
_id: import("mongoose").Types.ObjectId;
|
|
30
|
-
} & {
|
|
31
|
-
__v: number;
|
|
32
|
-
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, OrderSaleShippingAddressEntity, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<OrderSaleShippingAddressEntity>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<OrderSaleShippingAddressEntity> & {
|
|
33
|
-
_id: import("mongoose").Types.ObjectId;
|
|
34
|
-
} & {
|
|
35
|
-
__v: number;
|
|
36
|
-
}>;
|
|
37
|
-
export declare class OrderSaleShippingDaysEntity {
|
|
38
|
-
min?: number;
|
|
39
|
-
max?: number;
|
|
40
|
-
}
|
|
41
|
-
export declare const OrderSaleShippingDaysSchema: MongoSchema<OrderSaleShippingDaysEntity, import("mongoose").Model<OrderSaleShippingDaysEntity, any, any, any, import("mongoose").Document<unknown, any, OrderSaleShippingDaysEntity, any, {}> & OrderSaleShippingDaysEntity & {
|
|
42
|
-
_id: import("mongoose").Types.ObjectId;
|
|
43
|
-
} & {
|
|
44
|
-
__v: number;
|
|
45
|
-
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, OrderSaleShippingDaysEntity, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<OrderSaleShippingDaysEntity>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<OrderSaleShippingDaysEntity> & {
|
|
46
|
-
_id: import("mongoose").Types.ObjectId;
|
|
47
|
-
} & {
|
|
48
|
-
__v: number;
|
|
49
|
-
}>;
|
|
50
|
-
export declare class OrderSaleShippingLineEntity {
|
|
51
|
-
variant: string;
|
|
52
|
-
amount: number;
|
|
53
|
-
method?: string;
|
|
54
|
-
deliveryDays?: OrderSaleShippingDaysEntity;
|
|
55
|
-
}
|
|
56
|
-
export declare const OrderSaleShippingLineSchema: MongoSchema<OrderSaleShippingLineEntity, import("mongoose").Model<OrderSaleShippingLineEntity, any, any, any, import("mongoose").Document<unknown, any, OrderSaleShippingLineEntity, any, {}> & OrderSaleShippingLineEntity & {
|
|
57
|
-
_id: import("mongoose").Types.ObjectId;
|
|
58
|
-
} & {
|
|
59
|
-
__v: number;
|
|
60
|
-
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, OrderSaleShippingLineEntity, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<OrderSaleShippingLineEntity>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<OrderSaleShippingLineEntity> & {
|
|
61
|
-
_id: import("mongoose").Types.ObjectId;
|
|
62
|
-
} & {
|
|
63
|
-
__v: number;
|
|
64
|
-
}>;
|
|
65
|
-
export declare class OrderSaleShippingEntity {
|
|
66
|
-
recipient: OrderSaleShippingRecipientEntity;
|
|
67
|
-
address: OrderSaleShippingAddressEntity;
|
|
68
|
-
fee?: number;
|
|
69
|
-
quotedAt?: Date;
|
|
70
|
-
lines?: OrderSaleShippingLineEntity[];
|
|
71
|
-
}
|
|
72
|
-
export declare const OrderSaleShippingSchema: MongoSchema<OrderSaleShippingEntity, import("mongoose").Model<OrderSaleShippingEntity, any, any, any, import("mongoose").Document<unknown, any, OrderSaleShippingEntity, any, {}> & OrderSaleShippingEntity & {
|
|
73
|
-
_id: import("mongoose").Types.ObjectId;
|
|
74
|
-
} & {
|
|
75
|
-
__v: number;
|
|
76
|
-
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, OrderSaleShippingEntity, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<OrderSaleShippingEntity>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<OrderSaleShippingEntity> & {
|
|
77
|
-
_id: import("mongoose").Types.ObjectId;
|
|
78
|
-
} & {
|
|
79
|
-
__v: number;
|
|
80
|
-
}>;
|