@merkaly/api 0.2.2-7 → 0.2.2-8
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/.output/modules/store/cart/cart.entity.d.ts +7 -6
- package/.output/modules/store/cart/cart.validator.d.ts +6 -10
- package/.output/modules/store/orders/billing/billing.entity.d.ts +7 -0
- package/.output/modules/store/orders/billing/billing.validator.d.ts +7 -0
- package/.output/modules/store/orders/item/item.entity.d.ts +32 -0
- package/.output/modules/store/orders/item/item.validator.d.ts +4 -0
- package/.output/modules/store/orders/order.entity.d.ts +9 -7
- package/.output/modules/store/orders/order.validator.d.ts +6 -18
- package/.output/modules/store/orders/shipping/shipping.entity.d.ts +7 -0
- package/.output/modules/store/orders/shipping/shipping.validator.d.ts +7 -0
- package/.output/modules/store/orders/status/status.entity.d.ts +13 -0
- package/package.json +2 -2
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { AppEntity } from '../../../configs/app.entity';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
import { ItemEntity } from '../orders/item/item.entity';
|
|
3
|
+
export declare enum CartStatus {
|
|
4
|
+
EMPTY = "EMPTY",
|
|
5
|
+
FILLED = "FILLED",
|
|
6
|
+
FINISHED = "FINISHED",
|
|
7
|
+
ABANDONED = "ABANDONED"
|
|
7
8
|
}
|
|
8
9
|
export declare class CartEntity extends AppEntity {
|
|
9
10
|
static readonly $index = "store_carts";
|
|
10
11
|
user: string;
|
|
11
12
|
status: CartStatus;
|
|
12
|
-
items:
|
|
13
|
+
items: ItemEntity[];
|
|
13
14
|
}
|
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export declare class CreateCartValidator {
|
|
8
|
-
user: string;
|
|
9
|
-
}
|
|
10
|
-
export declare class UpdateCartValidator {
|
|
1
|
+
import { CreateBillingValidator } from '../orders/billing/billing.validator';
|
|
2
|
+
import { CreateShippingValidator } from '../orders/shipping/shipping.validator';
|
|
3
|
+
export declare class CheckoutCartValidator {
|
|
4
|
+
cart: string;
|
|
5
|
+
billing: CreateBillingValidator;
|
|
6
|
+
shipping: CreateShippingValidator;
|
|
11
7
|
}
|
|
12
8
|
export declare class AddItemValidator {
|
|
13
9
|
product: string;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/// <reference types="mongoose/types/aggregate" />
|
|
2
|
+
/// <reference types="mongoose/types/callback" />
|
|
3
|
+
/// <reference types="mongoose/types/collection" />
|
|
4
|
+
/// <reference types="mongoose/types/connection" />
|
|
5
|
+
/// <reference types="mongoose/types/cursor" />
|
|
6
|
+
/// <reference types="mongoose/types/document" />
|
|
7
|
+
/// <reference types="mongoose/types/error" />
|
|
8
|
+
/// <reference types="mongoose/types/expressions" />
|
|
9
|
+
/// <reference types="mongoose/types/helpers" />
|
|
10
|
+
/// <reference types="mongoose/types/middlewares" />
|
|
11
|
+
/// <reference types="mongoose/types/indexes" />
|
|
12
|
+
/// <reference types="mongoose/types/models" />
|
|
13
|
+
/// <reference types="mongoose/types/mongooseoptions" />
|
|
14
|
+
/// <reference types="mongoose/types/pipelinestage" />
|
|
15
|
+
/// <reference types="mongoose/types/populate" />
|
|
16
|
+
/// <reference types="mongoose/types/query" />
|
|
17
|
+
/// <reference types="mongoose/types/schemaoptions" />
|
|
18
|
+
/// <reference types="mongoose/types/schematypes" />
|
|
19
|
+
/// <reference types="mongoose/types/session" />
|
|
20
|
+
/// <reference types="mongoose/types/types" />
|
|
21
|
+
/// <reference types="mongoose/types/utility" />
|
|
22
|
+
/// <reference types="mongoose/types/validation" />
|
|
23
|
+
/// <reference types="mongoose/types/virtuals" />
|
|
24
|
+
/// <reference types="mongoose/types/inferschematype" />
|
|
25
|
+
import { Schema } from 'mongoose';
|
|
26
|
+
import { AppEntity } from '../../../../configs/app.entity';
|
|
27
|
+
import { ProductEntity } from '../../../inventory/products/product.entity';
|
|
28
|
+
export declare class ItemEntity extends AppEntity {
|
|
29
|
+
quantity: number;
|
|
30
|
+
product: ProductEntity;
|
|
31
|
+
}
|
|
32
|
+
export declare const ItemSchema: Schema<ItemEntity, import("mongoose").Model<ItemEntity, any, any, any, any>, {}, {}, {}, {}, "type", ItemEntity>;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { AppEntity } from '../../../configs/app.entity';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { BillingEntity } from './billing/billing.entity';
|
|
3
|
+
import { ItemEntity } from './item/item.entity';
|
|
4
|
+
import { ShippingEntity } from './shipping/shipping.entity';
|
|
5
|
+
import { StatusEntity } from './status/status.entity';
|
|
4
6
|
export declare class OrderEntity extends AppEntity {
|
|
5
7
|
static readonly $index = "store_orders";
|
|
6
|
-
status: OrderStatus;
|
|
7
8
|
number: string;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
billing
|
|
9
|
+
amount: number;
|
|
10
|
+
status: StatusEntity[];
|
|
11
|
+
items: ItemEntity[];
|
|
12
|
+
billing: BillingEntity;
|
|
13
|
+
shipping: ShippingEntity;
|
|
12
14
|
}
|
|
@@ -1,22 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
IN_PROGRESS = "IN_PROGRESS",
|
|
5
|
-
COMPLETED = "COMPLETED",
|
|
6
|
-
CANCELED = "CANCELED"
|
|
7
|
-
}
|
|
8
|
-
export declare class BillingValidator {
|
|
9
|
-
firstName: string;
|
|
10
|
-
lastName: string;
|
|
11
|
-
emailAddress: string;
|
|
12
|
-
phoneNumber: string;
|
|
13
|
-
lineAddress: string;
|
|
14
|
-
zipCode: string;
|
|
15
|
-
notes: string;
|
|
16
|
-
}
|
|
1
|
+
import { CreateBillingValidator } from './billing/billing.validator';
|
|
2
|
+
import { CreateItemValidator } from './item/item.validator';
|
|
3
|
+
import { CreateShippingValidator } from './shipping/shipping.validator';
|
|
17
4
|
export declare class CreateOrderValidator {
|
|
18
|
-
|
|
19
|
-
billing:
|
|
5
|
+
items: CreateItemValidator[];
|
|
6
|
+
billing: CreateBillingValidator;
|
|
7
|
+
shipping: CreateShippingValidator;
|
|
20
8
|
}
|
|
21
9
|
export declare class UpdateOrderValidator {
|
|
22
10
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare enum StatusType {
|
|
2
|
+
CREATED = "CREATED",
|
|
3
|
+
APPROVED = "APPROVED",
|
|
4
|
+
ON_HOLD = "ON_HOLD",
|
|
5
|
+
IN_PROGRESS = "IN_PROGRESS",
|
|
6
|
+
COMPLETED = "COMPLETED",
|
|
7
|
+
CANCELED = "CANCELED"
|
|
8
|
+
}
|
|
9
|
+
export declare class StatusEntity {
|
|
10
|
+
status: StatusType;
|
|
11
|
+
user: string;
|
|
12
|
+
readonly date: Date;
|
|
13
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@merkaly/api",
|
|
3
|
-
"version": "0.2.2-
|
|
3
|
+
"version": "0.2.2-8",
|
|
4
4
|
"description": "NestJS Backend ApiRest Service",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"ts-loader": "^9.2.3",
|
|
85
85
|
"ts-node": "^10.0.0",
|
|
86
86
|
"tsconfig-paths": "^4.0.0",
|
|
87
|
-
"typescript": "
|
|
87
|
+
"typescript": "4.4.4",
|
|
88
88
|
"webpack": "^5"
|
|
89
89
|
},
|
|
90
90
|
"engines": {
|