@merkaly/api 0.2.2-20 → 0.2.2-21
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/abstract/abstract.document.d.ts +5 -2
- package/.output/abstract/abstract.document.js +6 -2
- package/.output/modules/{settings → setting}/connections/connection.validator.d.ts +0 -0
- package/.output/modules/{settings → setting}/connections/connection.validator.js +0 -0
- package/.output/modules/{settings → setting}/members/member.validator.d.ts +0 -0
- package/.output/modules/{settings → setting}/members/member.validator.js +0 -0
- package/.output/modules/{settings → setting}/organization/organization.validator.d.ts +0 -0
- package/.output/modules/{settings → setting}/organization/organization.validator.js +0 -0
- package/.output/modules/{settings → setting}/payments/payment.entity.d.ts +0 -0
- package/.output/modules/{settings → setting}/payments/payment.entity.js +0 -0
- package/.output/modules/{settings → setting}/payments/payment.validator.d.ts +0 -0
- package/.output/modules/{settings → setting}/payments/payment.validator.js +0 -0
- package/.output/modules/setting/social/social.entity.d.ts +8 -0
- package/.output/modules/setting/social/social.entity.js +38 -0
- package/.output/modules/setting/social/social.validator.d.ts +11 -0
- package/.output/modules/setting/social/social.validator.js +35 -0
- package/.output/modules/store/cart/cart.validator.d.ts +1 -1
- package/.output/modules/store/cart/cart.validator.js +1 -1
- package/.output/modules/store/orders/billing/billing.document.d.ts +7 -0
- package/.output/modules/store/orders/billing/billing.document.js +11 -0
- package/.output/modules/store/orders/item/item.document.d.ts +6 -0
- package/.output/modules/store/orders/item/item.document.js +9 -0
- package/.output/modules/store/orders/order.document.d.ts +21 -0
- package/.output/modules/store/orders/order.document.js +15 -0
- package/.output/modules/store/orders/order.entity.d.ts +5 -5
- package/.output/modules/store/orders/order.entity.js +8 -3
- package/.output/modules/store/orders/order.validator.d.ts +2 -1
- package/.output/modules/store/orders/order.validator.js +6 -1
- package/.output/modules/store/orders/shipping/shipping.document.d.ts +7 -0
- package/.output/modules/store/orders/shipping/shipping.document.js +11 -0
- package/.output/modules/store/orders/status/status.document.d.ts +5 -0
- package/.output/modules/store/orders/status/status.document.js +9 -0
- package/.output/types.d.ts +1 -2
- package/package.json +1 -1
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
import { AbstractEntity } from './abstract.entity';
|
|
1
2
|
export declare abstract class AbstractDocument {
|
|
2
|
-
id: string;
|
|
3
|
-
|
|
3
|
+
readonly id: string;
|
|
4
|
+
readonly createdAt: Date;
|
|
5
|
+
readonly updatedAt: Date;
|
|
6
|
+
constructor(entity: AbstractEntity);
|
|
4
7
|
}
|
|
@@ -3,8 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.AbstractDocument = void 0;
|
|
4
4
|
class AbstractDocument {
|
|
5
5
|
id;
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
createdAt;
|
|
7
|
+
updatedAt;
|
|
8
|
+
constructor(entity) {
|
|
9
|
+
this.id = entity._id;
|
|
10
|
+
this.createdAt = entity.createdAt;
|
|
11
|
+
this.updatedAt = entity.updatedAt;
|
|
8
12
|
}
|
|
9
13
|
}
|
|
10
14
|
exports.AbstractDocument = AbstractDocument;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { AbstractEntity } from '../../../abstract/abstract.entity';
|
|
2
|
+
import { SocialType } from './social.validator';
|
|
3
|
+
export declare class SocialEntity extends AbstractEntity {
|
|
4
|
+
static readonly $index = "settings_social";
|
|
5
|
+
name: SocialType;
|
|
6
|
+
url: SocialType;
|
|
7
|
+
active: boolean;
|
|
8
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.SocialEntity = void 0;
|
|
13
|
+
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
|
+
const mongoose_2 = require("mongoose");
|
|
15
|
+
const abstract_entity_1 = require("../../../abstract/abstract.entity");
|
|
16
|
+
const social_validator_1 = require("./social.validator");
|
|
17
|
+
let SocialEntity = class SocialEntity extends abstract_entity_1.AbstractEntity {
|
|
18
|
+
static $index = 'settings_social';
|
|
19
|
+
name;
|
|
20
|
+
url;
|
|
21
|
+
active = true;
|
|
22
|
+
};
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, enum: social_validator_1.SocialType, required: true, unique: true }),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], SocialEntity.prototype, "name", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, required: true, unique: true }),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], SocialEntity.prototype, "url", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Boolean, default: true }),
|
|
33
|
+
__metadata("design:type", Object)
|
|
34
|
+
], SocialEntity.prototype, "active", void 0);
|
|
35
|
+
SocialEntity = __decorate([
|
|
36
|
+
(0, mongoose_1.Schema)({ timestamps: true })
|
|
37
|
+
], SocialEntity);
|
|
38
|
+
exports.SocialEntity = SocialEntity;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.CreateSocialValidator = exports.SocialType = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
var SocialType;
|
|
15
|
+
(function (SocialType) {
|
|
16
|
+
SocialType["FACEBOOK"] = "facebook";
|
|
17
|
+
SocialType["TWITTER"] = "twitter";
|
|
18
|
+
SocialType["INSTAGRAM"] = "instagram";
|
|
19
|
+
SocialType["TIKTOK"] = "tiktok";
|
|
20
|
+
SocialType["LINKEDIN"] = "linkedin";
|
|
21
|
+
})(SocialType = exports.SocialType || (exports.SocialType = {}));
|
|
22
|
+
class CreateSocialValidator {
|
|
23
|
+
name;
|
|
24
|
+
url;
|
|
25
|
+
}
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, class_validator_1.IsString)(),
|
|
28
|
+
(0, class_validator_1.IsEnum)(SocialType),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], CreateSocialValidator.prototype, "name", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, class_validator_1.IsUrl)(),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], CreateSocialValidator.prototype, "url", void 0);
|
|
35
|
+
exports.CreateSocialValidator = CreateSocialValidator;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PaymentType } from '../../
|
|
1
|
+
import { PaymentType } from '../../setting/payments/payment.validator';
|
|
2
2
|
import { CreateBillingValidator } from '../orders/billing/billing.validator';
|
|
3
3
|
import { CreateShippingValidator } from '../orders/shipping/shipping.validator';
|
|
4
4
|
export declare enum CartStatus {
|
|
@@ -12,7 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.AddItemValidator = exports.CheckoutCartValidator = exports.CartStatus = void 0;
|
|
13
13
|
const class_transformer_1 = require("class-transformer");
|
|
14
14
|
const class_validator_1 = require("class-validator");
|
|
15
|
-
const payment_validator_1 = require("../../
|
|
15
|
+
const payment_validator_1 = require("../../setting/payments/payment.validator");
|
|
16
16
|
const billing_validator_1 = require("../orders/billing/billing.validator");
|
|
17
17
|
const shipping_validator_1 = require("../orders/shipping/shipping.validator");
|
|
18
18
|
var CartStatus;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { AbstractDocument } from '../../../abstract/abstract.document';
|
|
2
|
+
import { PaymentType } from '../../setting/payments/payment.validator';
|
|
3
|
+
import { BillingDocument } from './billing/billing.document';
|
|
4
|
+
import { ItemDocument } from './item/item.document';
|
|
5
|
+
import { ShippingDocument } from './shipping/shipping.document';
|
|
6
|
+
import { StatusDocument } from './status/status.document';
|
|
7
|
+
interface Payment {
|
|
8
|
+
name: PaymentType;
|
|
9
|
+
id: string;
|
|
10
|
+
}
|
|
11
|
+
export declare class OrderDocument extends AbstractDocument {
|
|
12
|
+
number: string;
|
|
13
|
+
owner: string;
|
|
14
|
+
notes: string;
|
|
15
|
+
status: StatusDocument[];
|
|
16
|
+
items: ItemDocument[];
|
|
17
|
+
payment: Payment;
|
|
18
|
+
billing: BillingDocument;
|
|
19
|
+
shipping: ShippingDocument;
|
|
20
|
+
}
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OrderDocument = void 0;
|
|
4
|
+
const abstract_document_1 = require("../../../abstract/abstract.document");
|
|
5
|
+
class OrderDocument extends abstract_document_1.AbstractDocument {
|
|
6
|
+
number;
|
|
7
|
+
owner;
|
|
8
|
+
notes;
|
|
9
|
+
status;
|
|
10
|
+
items;
|
|
11
|
+
payment;
|
|
12
|
+
billing;
|
|
13
|
+
shipping;
|
|
14
|
+
}
|
|
15
|
+
exports.OrderDocument = OrderDocument;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
+
import { Types } from 'mongoose';
|
|
1
2
|
import { AbstractEntity } from '../../../abstract/abstract.entity';
|
|
2
|
-
import { PaymentEntity } from '../../
|
|
3
|
-
import { BillingEntity } from './billing/billing.entity';
|
|
3
|
+
import { PaymentEntity } from '../../setting/payments/payment.entity';
|
|
4
4
|
import { ItemEntity } from './item/item.entity';
|
|
5
|
-
import { ShippingEntity } from './shipping/shipping.entity';
|
|
6
5
|
import { StatusEntity } from './status/status.entity';
|
|
7
6
|
export declare class OrderEntity extends AbstractEntity {
|
|
8
7
|
static readonly $index = "store_orders";
|
|
9
8
|
number: string;
|
|
10
9
|
status: StatusEntity[];
|
|
11
10
|
items: ItemEntity[];
|
|
12
|
-
billing:
|
|
13
|
-
shipping:
|
|
11
|
+
billing: Types.Map<string>;
|
|
12
|
+
shipping: Types.Map<string>;
|
|
14
13
|
payment: PaymentEntity;
|
|
15
14
|
owner: string;
|
|
15
|
+
notes: string;
|
|
16
16
|
}
|
|
@@ -13,7 +13,7 @@ exports.OrderEntity = void 0;
|
|
|
13
13
|
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
14
|
const mongoose_2 = require("mongoose");
|
|
15
15
|
const abstract_entity_1 = require("../../../abstract/abstract.entity");
|
|
16
|
-
const payment_entity_1 = require("../../
|
|
16
|
+
const payment_entity_1 = require("../../setting/payments/payment.entity");
|
|
17
17
|
const billing_entity_1 = require("./billing/billing.entity");
|
|
18
18
|
const item_schema_1 = require("./item/item.schema");
|
|
19
19
|
const shipping_entity_1 = require("./shipping/shipping.entity");
|
|
@@ -26,6 +26,7 @@ let OrderEntity = class OrderEntity extends abstract_entity_1.AbstractEntity {
|
|
|
26
26
|
shipping;
|
|
27
27
|
payment;
|
|
28
28
|
owner;
|
|
29
|
+
notes;
|
|
29
30
|
};
|
|
30
31
|
__decorate([
|
|
31
32
|
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, required: true, unique: true }),
|
|
@@ -41,11 +42,11 @@ __decorate([
|
|
|
41
42
|
], OrderEntity.prototype, "items", void 0);
|
|
42
43
|
__decorate([
|
|
43
44
|
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Map, ref: () => billing_entity_1.BillingEntity }),
|
|
44
|
-
__metadata("design:type",
|
|
45
|
+
__metadata("design:type", mongoose_2.Types.Map)
|
|
45
46
|
], OrderEntity.prototype, "billing", void 0);
|
|
46
47
|
__decorate([
|
|
47
48
|
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Map, ref: () => shipping_entity_1.ShippingEntity }),
|
|
48
|
-
__metadata("design:type",
|
|
49
|
+
__metadata("design:type", mongoose_2.Types.Map)
|
|
49
50
|
], OrderEntity.prototype, "shipping", void 0);
|
|
50
51
|
__decorate([
|
|
51
52
|
(0, mongoose_1.Prop)({ type: mongoose_2.Types.ObjectId, ref: payment_entity_1.PaymentEntity.$index }),
|
|
@@ -55,6 +56,10 @@ __decorate([
|
|
|
55
56
|
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String }),
|
|
56
57
|
__metadata("design:type", String)
|
|
57
58
|
], OrderEntity.prototype, "owner", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String }),
|
|
61
|
+
__metadata("design:type", String)
|
|
62
|
+
], OrderEntity.prototype, "notes", void 0);
|
|
58
63
|
OrderEntity = __decorate([
|
|
59
64
|
(0, mongoose_1.Schema)({ timestamps: true })
|
|
60
65
|
], OrderEntity);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PaymentType } from '../../
|
|
1
|
+
import { PaymentType } from '../../setting/payments/payment.validator';
|
|
2
2
|
import { CreateBillingValidator } from './billing/billing.validator';
|
|
3
3
|
import { CreateItemValidator } from './item/item.validator';
|
|
4
4
|
import { CreateShippingValidator } from './shipping/shipping.validator';
|
|
@@ -7,6 +7,7 @@ export declare class CreateOrderValidator {
|
|
|
7
7
|
billing: CreateBillingValidator;
|
|
8
8
|
shipping: CreateShippingValidator;
|
|
9
9
|
payment: PaymentType;
|
|
10
|
+
notes: string;
|
|
10
11
|
}
|
|
11
12
|
export declare class UpdateOrderValidator {
|
|
12
13
|
}
|
|
@@ -12,7 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.UpdateOrderValidator = exports.CreateOrderValidator = void 0;
|
|
13
13
|
const class_transformer_1 = require("class-transformer");
|
|
14
14
|
const class_validator_1 = require("class-validator");
|
|
15
|
-
const payment_validator_1 = require("../../
|
|
15
|
+
const payment_validator_1 = require("../../setting/payments/payment.validator");
|
|
16
16
|
const billing_validator_1 = require("./billing/billing.validator");
|
|
17
17
|
const item_validator_1 = require("./item/item.validator");
|
|
18
18
|
const shipping_validator_1 = require("./shipping/shipping.validator");
|
|
@@ -21,6 +21,7 @@ class CreateOrderValidator {
|
|
|
21
21
|
billing;
|
|
22
22
|
shipping;
|
|
23
23
|
payment;
|
|
24
|
+
notes;
|
|
24
25
|
}
|
|
25
26
|
__decorate([
|
|
26
27
|
(0, class_validator_1.ArrayNotEmpty)(),
|
|
@@ -42,6 +43,10 @@ __decorate([
|
|
|
42
43
|
(0, class_validator_1.IsEnum)(payment_validator_1.PaymentType),
|
|
43
44
|
__metadata("design:type", String)
|
|
44
45
|
], CreateOrderValidator.prototype, "payment", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, class_validator_1.IsOptional)(),
|
|
48
|
+
__metadata("design:type", String)
|
|
49
|
+
], CreateOrderValidator.prototype, "notes", void 0);
|
|
45
50
|
exports.CreateOrderValidator = CreateOrderValidator;
|
|
46
51
|
class UpdateOrderValidator {
|
|
47
52
|
}
|
package/.output/types.d.ts
CHANGED