@merkaly/api 0.2.5-6 → 0.2.5-7
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/abstracts/abstract.entity.d.ts +14 -0
- package/.output/abstracts/abstract.validator.d.ts +24 -0
- package/.output/abstracts/abstract.validator.js +118 -0
- package/.output/exceptions/missing-identity.exception.d.ts +5 -0
- package/.output/exceptions/missing-identity.exception.js +30 -0
- package/.output/modules/asset/files/file.entity.d.ts +9 -0
- package/.output/modules/asset/files/file.schema.d.ts +34 -0
- package/.output/modules/asset/files/file.schema.js +10 -0
- package/.output/modules/auth/organizations/organization.entity.d.ts +8 -0
- package/.output/modules/auth/users/user.entity.d.ts +9 -0
- package/.output/modules/auth/users/user.schema.d.ts +34 -0
- package/.output/modules/auth/users/user.schema.js +10 -0
- package/.output/modules/auth/users/user.validator.d.ts +12 -0
- package/.output/modules/auth/users/user.validator.js +58 -0
- package/.output/modules/inventory/brands/brand.entity.d.ts +6 -0
- package/.output/modules/inventory/brands/brand.schema.d.ts +34 -0
- package/.output/modules/inventory/brands/brand.schema.js +10 -0
- package/.output/modules/inventory/brands/brand.validator.d.ts +11 -0
- package/.output/modules/inventory/brands/brand.validator.js +74 -0
- package/.output/modules/inventory/categories/category.entity.d.ts +6 -0
- package/.output/modules/inventory/categories/category.schema.d.ts +34 -0
- package/.output/modules/inventory/categories/category.schema.js +10 -0
- package/.output/modules/inventory/categories/category.validator.d.ts +8 -0
- package/.output/modules/inventory/categories/category.validator.js +42 -0
- package/.output/modules/inventory/complements/complement.entity.d.ts +6 -0
- package/.output/modules/inventory/complements/complement.validator.d.ts +10 -0
- package/.output/modules/inventory/complements/complement.validator.js +52 -0
- package/.output/modules/inventory/products/documents/attribute.document.d.ts +5 -0
- package/.output/modules/inventory/products/documents/attribute.document.js +33 -0
- package/.output/modules/inventory/products/documents/dimension.document.d.ts +6 -0
- package/.output/modules/inventory/products/documents/dimension.document.js +35 -0
- package/.output/modules/inventory/products/product.entity.d.ts +19 -0
- package/.output/modules/inventory/products/product.schema.d.ts +34 -0
- package/.output/modules/inventory/products/product.schema.js +18 -0
- package/.output/modules/inventory/products/product.validator.d.ts +29 -0
- package/.output/modules/inventory/products/product.validator.js +179 -0
- package/.output/modules/inventory/products/validators/attributes.validator.d.ts +5 -0
- package/.output/modules/inventory/products/validators/attributes.validator.js +35 -0
- package/.output/modules/inventory/products/validators/dimension.validator.d.ts +6 -0
- package/.output/modules/inventory/products/validators/dimension.validator.js +38 -0
- package/.output/modules/sale/customers/customer.entity.d.ts +8 -0
- package/.output/modules/sale/customers/customer.schema.d.ts +34 -0
- package/.output/modules/sale/customers/customer.schema.js +10 -0
- package/.output/modules/sale/customers/customer.validator.d.ts +14 -0
- package/.output/modules/sale/customers/customer.validator.js +94 -0
- package/.output/modules/sale/orders/documents/address.document.d.ts +8 -0
- package/.output/modules/sale/orders/documents/address.document.js +43 -0
- package/.output/modules/sale/orders/documents/status.document.d.ts +8 -0
- package/.output/modules/sale/orders/documents/status.document.js +34 -0
- package/.output/modules/sale/orders/entities/item.entity.d.ts +38 -0
- package/.output/modules/sale/orders/enums/order.status.d.ts +6 -0
- package/.output/modules/sale/orders/enums/order.status.js +10 -0
- package/.output/modules/sale/orders/order.entity.d.ts +21 -0
- package/.output/modules/sale/orders/order.validator.d.ts +16 -0
- package/.output/modules/sale/orders/order.validator.js +86 -0
- package/.output/modules/sale/orders/validators/address.validator.d.ts +17 -0
- package/.output/modules/sale/orders/validators/address.validator.js +81 -0
- package/{src/modules/sale/orders/validators/billing.validator.ts → .output/modules/sale/orders/validators/billing.validator.d.ts} +4 -7
- package/.output/modules/sale/orders/validators/billing.validator.js +13 -0
- package/.output/modules/sale/orders/validators/item.validator.d.ts +5 -0
- package/.output/modules/sale/orders/validators/item.validator.js +32 -0
- package/.output/modules/sale/orders/validators/payment.validator.d.ts +10 -0
- package/.output/modules/sale/orders/validators/payment.validator.js +62 -0
- package/.output/modules/sale/orders/validators/shipping.validator.d.ts +9 -0
- package/.output/modules/sale/orders/validators/shipping.validator.js +14 -0
- package/.output/modules/sale/payments/entities/status.entity.d.ts +8 -0
- package/.output/modules/sale/payments/enums/billing.type.d.ts +6 -0
- package/.output/modules/sale/payments/enums/billing.type.js +10 -0
- package/.output/modules/sale/payments/enums/payment.status.d.ts +7 -0
- package/.output/modules/sale/payments/enums/payment.status.js +11 -0
- package/.output/modules/sale/payments/enums/shipping.type.d.ts +4 -0
- package/.output/modules/sale/payments/enums/shipping.type.js +8 -0
- package/.output/modules/sale/payments/payment.entity.d.ts +12 -0
- package/.output/modules/sale/payments/payment.schema.d.ts +34 -0
- package/.output/modules/sale/payments/payment.schema.js +14 -0
- package/.output/modules/sale/payments/payment.validator.d.ts +16 -0
- package/.output/modules/sale/payments/payment.validator.js +77 -0
- package/.output/tsconfig.package.tsbuildinfo +1 -0
- package/package.json +4 -1
- package/.bin/deploy.sh +0 -9
- package/.bin/package.sh +0 -12
- package/.docker/Dockerfile +0 -21
- package/.dockerignore +0 -12
- package/.github/dependabot.yml +0 -17
- package/.github/semantic.yml +0 -5
- package/.github/workflows/pull_request.yml +0 -35
- package/.prettierrc +0 -5
- package/app.ts +0 -11
- package/authCertificate.pem +0 -19
- package/nest-cli.json +0 -8
- package/src/abstracts/abstarct.repository.ts +0 -62
- package/src/abstracts/abstract.controller.ts +0 -18
- package/src/abstracts/abstract.entity.ts +0 -22
- package/src/abstracts/abstract.router.ts +0 -7
- package/src/abstracts/abstract.validator.ts +0 -61
- package/src/app.config.ts +0 -59
- package/src/app.console.ts +0 -24
- package/src/app.guard.ts +0 -39
- package/src/app.module.ts +0 -54
- package/src/app.strategy.ts +0 -21
- package/src/commands/seed.command.ts +0 -263
- package/src/decorators/public.decorator.ts +0 -5
- package/src/decorators/user.decorator.ts +0 -30
- package/src/exceptions/missing-identity.exception.ts +0 -11
- package/src/interceptors/mongoose.interceptor.ts +0 -63
- package/src/main.ts +0 -27
- package/src/middlewares/router.middleware.ts +0 -14
- package/src/modules/asset/asset.module.ts +0 -19
- package/src/modules/asset/files/file.controller.ts +0 -22
- package/src/modules/asset/files/file.entity.ts +0 -24
- package/src/modules/asset/files/file.module.ts +0 -21
- package/src/modules/asset/files/file.repository.ts +0 -44
- package/src/modules/asset/files/file.schema.ts +0 -8
- package/src/modules/asset/files/file.service.ts +0 -4
- package/src/modules/auth/auth.controller.ts +0 -57
- package/src/modules/auth/auth.module.ts +0 -20
- package/src/modules/auth/organizations/organization.controller.ts +0 -20
- package/src/modules/auth/organizations/organization.entity.ts +0 -22
- package/src/modules/auth/organizations/organization.module.ts +0 -21
- package/src/modules/auth/organizations/organization.repository.ts +0 -16
- package/src/modules/auth/organizations/organization.schema.ts +0 -8
- package/src/modules/auth/users/user.controller.ts +0 -23
- package/src/modules/auth/users/user.entity.ts +0 -25
- package/src/modules/auth/users/user.module.ts +0 -20
- package/src/modules/auth/users/user.repository.ts +0 -79
- package/src/modules/auth/users/user.schema.ts +0 -8
- package/src/modules/auth/users/user.validator.ts +0 -32
- package/src/modules/command.module.ts +0 -15
- package/src/modules/global.module.ts +0 -46
- package/src/modules/inventory/brands/brand.controller.ts +0 -44
- package/src/modules/inventory/brands/brand.entity.ts +0 -20
- package/src/modules/inventory/brands/brand.module.ts +0 -20
- package/src/modules/inventory/brands/brand.repository.ts +0 -40
- package/src/modules/inventory/brands/brand.schema.ts +0 -8
- package/src/modules/inventory/brands/brand.validator.ts +0 -31
- package/src/modules/inventory/categories/category.controller.ts +0 -42
- package/src/modules/inventory/categories/category.entity.ts +0 -15
- package/src/modules/inventory/categories/category.module.ts +0 -19
- package/src/modules/inventory/categories/category.repository.ts +0 -34
- package/src/modules/inventory/categories/category.schema.ts +0 -8
- package/src/modules/inventory/categories/category.validator.ts +0 -20
- package/src/modules/inventory/complements/complement.controller.ts +0 -41
- package/src/modules/inventory/complements/complement.entity.ts +0 -15
- package/src/modules/inventory/complements/complement.module.ts +0 -19
- package/src/modules/inventory/complements/complement.repository.ts +0 -37
- package/src/modules/inventory/complements/complement.schema.ts +0 -8
- package/src/modules/inventory/complements/complement.validator.ts +0 -28
- package/src/modules/inventory/inventory.module.ts +0 -23
- package/src/modules/inventory/products/documents/attribute.document.ts +0 -14
- package/src/modules/inventory/products/documents/dimension.document.ts +0 -16
- package/src/modules/inventory/products/product.controller.ts +0 -62
- package/src/modules/inventory/products/product.entity.ts +0 -46
- package/src/modules/inventory/products/product.module.ts +0 -19
- package/src/modules/inventory/products/product.repository.ts +0 -64
- package/src/modules/inventory/products/product.schema.ts +0 -19
- package/src/modules/inventory/products/product.validator.ts +0 -132
- package/src/modules/inventory/products/validators/attributes.validator.ts +0 -15
- package/src/modules/inventory/products/validators/dimension.validator.ts +0 -19
- package/src/modules/sale/customers/customer.controller.ts +0 -41
- package/src/modules/sale/customers/customer.entity.ts +0 -19
- package/src/modules/sale/customers/customer.module.ts +0 -18
- package/src/modules/sale/customers/customer.repository.ts +0 -30
- package/src/modules/sale/customers/customer.schema.ts +0 -8
- package/src/modules/sale/customers/customer.validator.ts +0 -43
- package/src/modules/sale/orders/documents/address.document.ts +0 -22
- package/src/modules/sale/orders/documents/status.document.ts +0 -17
- package/src/modules/sale/orders/entities/item.entity.ts +0 -24
- package/src/modules/sale/orders/enums/order.status.ts +0 -6
- package/src/modules/sale/orders/order.controller.ts +0 -65
- package/src/modules/sale/orders/order.entity.ts +0 -46
- package/src/modules/sale/orders/order.module.ts +0 -22
- package/src/modules/sale/orders/order.repository.ts +0 -122
- package/src/modules/sale/orders/order.schema.ts +0 -36
- package/src/modules/sale/orders/order.validator.ts +0 -44
- package/src/modules/sale/orders/validators/address.validator.ts +0 -50
- package/src/modules/sale/orders/validators/item.validator.ts +0 -14
- package/src/modules/sale/orders/validators/payment.validator.ts +0 -44
- package/src/modules/sale/orders/validators/shipping.validator.ts +0 -14
- package/src/modules/sale/payments/entities/status.entity.ts +0 -17
- package/src/modules/sale/payments/enums/billing.type.ts +0 -6
- package/src/modules/sale/payments/enums/payment.status.ts +0 -7
- package/src/modules/sale/payments/enums/shipping.type.ts +0 -4
- package/src/modules/sale/payments/payment.controller.ts +0 -45
- package/src/modules/sale/payments/payment.entity.ts +0 -25
- package/src/modules/sale/payments/payment.module.ts +0 -20
- package/src/modules/sale/payments/payment.repository.ts +0 -57
- package/src/modules/sale/payments/payment.schema.ts +0 -14
- package/src/modules/sale/payments/payment.validator.ts +0 -32
- package/src/modules/sale/sale.module.ts +0 -20
- package/src/services/auth0.service.ts +0 -49
- package/src/services/mongo.service.ts +0 -52
- package/test/auth/auth.spec.ts +0 -20
- package/test/main.ts +0 -12
- package/tsconfig.build.json +0 -4
- package/tsconfig.json +0 -21
- package/tsconfig.package.json +0 -22
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { MaybeEntity } from '../../../../abstracts/abstract.entity';
|
|
2
|
+
import { UserEntity } from '../../../auth/users/user.entity';
|
|
3
|
+
import { PaymentStatus } from '../enums/payment.status';
|
|
4
|
+
export declare class StatusEntity {
|
|
5
|
+
name: PaymentStatus;
|
|
6
|
+
user: MaybeEntity<UserEntity>;
|
|
7
|
+
date: Date;
|
|
8
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BillingType = void 0;
|
|
4
|
+
var BillingType;
|
|
5
|
+
(function (BillingType) {
|
|
6
|
+
BillingType["PIX"] = "PIX";
|
|
7
|
+
BillingType["BOLETO"] = "BOLETO";
|
|
8
|
+
BillingType["CARD"] = "CARD";
|
|
9
|
+
BillingType["TRANSFER"] = "TRANSFER";
|
|
10
|
+
})(BillingType || (exports.BillingType = BillingType = {}));
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PaymentStatus = void 0;
|
|
4
|
+
var PaymentStatus;
|
|
5
|
+
(function (PaymentStatus) {
|
|
6
|
+
PaymentStatus["UNPAID"] = "UNPAID";
|
|
7
|
+
PaymentStatus["WAITING"] = "WAITING";
|
|
8
|
+
PaymentStatus["PAID"] = "PAID";
|
|
9
|
+
PaymentStatus["REFUNDED"] = "REFUNDED";
|
|
10
|
+
PaymentStatus["CANCELLED"] = "CANCELLED";
|
|
11
|
+
})(PaymentStatus || (exports.PaymentStatus = PaymentStatus = {}));
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ShippingType = void 0;
|
|
4
|
+
var ShippingType;
|
|
5
|
+
(function (ShippingType) {
|
|
6
|
+
ShippingType["RETIRE"] = "RETIRE";
|
|
7
|
+
ShippingType["DELIVERY"] = "DELIVERY";
|
|
8
|
+
})(ShippingType || (exports.ShippingType = ShippingType = {}));
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { AbstractEntity } from '../../../abstracts/abstract.entity';
|
|
2
|
+
import { OrderEntity } from '../orders/order.entity';
|
|
3
|
+
import { StatusEntity } from './entities/status.entity';
|
|
4
|
+
import { BillingType } from './enums/billing.type';
|
|
5
|
+
export declare class PaymentEntity extends AbstractEntity {
|
|
6
|
+
status: StatusEntity[];
|
|
7
|
+
total: number;
|
|
8
|
+
fee: number;
|
|
9
|
+
type: BillingType;
|
|
10
|
+
readonly order: OrderEntity;
|
|
11
|
+
readonly lastStatus: StatusEntity;
|
|
12
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
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" />
|
|
25
|
+
/// <reference types="mongoose/types/inferschematype" />
|
|
26
|
+
import { PaymentEntity } from './payment.entity';
|
|
27
|
+
export declare namespace PaymentSchema {
|
|
28
|
+
const name = "sales_payments";
|
|
29
|
+
const schema: import("mongoose").Schema<PaymentEntity, import("mongoose").Model<PaymentEntity, any, any, any, import("mongoose").Document<unknown, any, PaymentEntity> & PaymentEntity & Required<{
|
|
30
|
+
_id: string;
|
|
31
|
+
}>, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, PaymentEntity, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<PaymentEntity>> & import("mongoose").FlatRecord<PaymentEntity> & Required<{
|
|
32
|
+
_id: string;
|
|
33
|
+
}>>;
|
|
34
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PaymentSchema = void 0;
|
|
4
|
+
var mongoose_1 = require("@nestjs/mongoose");
|
|
5
|
+
var payment_entity_1 = require("./payment.entity");
|
|
6
|
+
var PaymentSchema;
|
|
7
|
+
(function (PaymentSchema) {
|
|
8
|
+
PaymentSchema.name = 'sales_payments';
|
|
9
|
+
PaymentSchema.schema = mongoose_1.SchemaFactory.createForClass(payment_entity_1.PaymentEntity);
|
|
10
|
+
PaymentSchema.schema.virtual('lastStatus').get(function () {
|
|
11
|
+
var first = this.status.reverse()[0];
|
|
12
|
+
return first;
|
|
13
|
+
});
|
|
14
|
+
})(PaymentSchema || (exports.PaymentSchema = PaymentSchema = {}));
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { IdMongoValidator } from '../../../abstracts/abstract.validator';
|
|
2
|
+
import { PaymentValidator } from '../orders/validators/payment.validator';
|
|
3
|
+
import { BillingType } from './enums/billing.type';
|
|
4
|
+
import { PaymentStatus } from './enums/payment.status';
|
|
5
|
+
export declare class CreatePaymentValidator {
|
|
6
|
+
type: BillingType;
|
|
7
|
+
total: number;
|
|
8
|
+
order: string;
|
|
9
|
+
user: string;
|
|
10
|
+
payload: PaymentValidator;
|
|
11
|
+
}
|
|
12
|
+
export declare class UpdatePaymentValidator {
|
|
13
|
+
}
|
|
14
|
+
export declare class UpdatePaymentStatusValidator extends IdMongoValidator {
|
|
15
|
+
type: PaymentStatus;
|
|
16
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
18
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
19
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
20
|
+
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;
|
|
21
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
22
|
+
};
|
|
23
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
24
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
25
|
+
};
|
|
26
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
+
exports.UpdatePaymentStatusValidator = exports.UpdatePaymentValidator = exports.CreatePaymentValidator = void 0;
|
|
28
|
+
var class_transformer_1 = require("class-transformer");
|
|
29
|
+
var class_validator_1 = require("class-validator");
|
|
30
|
+
var abstract_validator_1 = require("../../../abstracts/abstract.validator");
|
|
31
|
+
var payment_validator_1 = require("../orders/validators/payment.validator");
|
|
32
|
+
var billing_type_1 = require("./enums/billing.type");
|
|
33
|
+
var payment_status_1 = require("./enums/payment.status");
|
|
34
|
+
var CreatePaymentValidator = exports.CreatePaymentValidator = (function () {
|
|
35
|
+
function CreatePaymentValidator() {
|
|
36
|
+
}
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, class_validator_1.IsEnum)(billing_type_1.BillingType),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], CreatePaymentValidator.prototype, "type", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, class_validator_1.IsPositive)(),
|
|
43
|
+
__metadata("design:type", Number)
|
|
44
|
+
], CreatePaymentValidator.prototype, "total", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, class_validator_1.IsMongoId)(),
|
|
47
|
+
__metadata("design:type", String)
|
|
48
|
+
], CreatePaymentValidator.prototype, "order", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, class_validator_1.IsMongoId)(),
|
|
51
|
+
__metadata("design:type", String)
|
|
52
|
+
], CreatePaymentValidator.prototype, "user", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, class_validator_1.ValidateNested)(),
|
|
55
|
+
(0, class_transformer_1.Type)(function () { return payment_validator_1.PaymentValidator; }),
|
|
56
|
+
(0, class_validator_1.IsNotEmptyObject)(),
|
|
57
|
+
__metadata("design:type", payment_validator_1.PaymentValidator)
|
|
58
|
+
], CreatePaymentValidator.prototype, "payload", void 0);
|
|
59
|
+
return CreatePaymentValidator;
|
|
60
|
+
}());
|
|
61
|
+
var UpdatePaymentValidator = (function () {
|
|
62
|
+
function UpdatePaymentValidator() {
|
|
63
|
+
}
|
|
64
|
+
return UpdatePaymentValidator;
|
|
65
|
+
}());
|
|
66
|
+
exports.UpdatePaymentValidator = UpdatePaymentValidator;
|
|
67
|
+
var UpdatePaymentStatusValidator = exports.UpdatePaymentStatusValidator = (function (_super) {
|
|
68
|
+
__extends(UpdatePaymentStatusValidator, _super);
|
|
69
|
+
function UpdatePaymentStatusValidator() {
|
|
70
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
71
|
+
}
|
|
72
|
+
__decorate([
|
|
73
|
+
(0, class_validator_1.IsEnum)(payment_status_1.PaymentStatus),
|
|
74
|
+
__metadata("design:type", String)
|
|
75
|
+
], UpdatePaymentStatusValidator.prototype, "type", void 0);
|
|
76
|
+
return UpdatePaymentStatusValidator;
|
|
77
|
+
}(abstract_validator_1.IdMongoValidator));
|