@lyxa.ai/core 1.4.44 → 1.4.45
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/libraries/mongo/models/cart-participant.model.d.ts +2 -0
- package/dist/libraries/mongo/models/cart-participant.model.js +6 -0
- package/dist/libraries/mongo/models/cart-participant.model.js.map +1 -1
- package/dist/types/README.md +1 -1
- package/dist/types/package.json +1 -1
- package/package.json +1 -1
|
@@ -7,6 +7,7 @@ import { RegularOrderPricing } from './embedded/order-pricing.model';
|
|
|
7
7
|
import { CartStatus } from '../../../utilities/enum';
|
|
8
8
|
import { Shop } from './shop.model';
|
|
9
9
|
import { PaymentRecord } from './embedded/payment-record.model';
|
|
10
|
+
import { Card } from './card.model';
|
|
10
11
|
export declare class CartParticipant extends TimeStamps {
|
|
11
12
|
cart: Ref<Cart>;
|
|
12
13
|
user: Ref<User>;
|
|
@@ -16,6 +17,7 @@ export declare class CartParticipant extends TimeStamps {
|
|
|
16
17
|
spentAmount: number;
|
|
17
18
|
secondarySpentAmount: number;
|
|
18
19
|
paymentInformation?: PaymentInformation;
|
|
20
|
+
card?: Ref<Card>;
|
|
19
21
|
paymentRecords?: PaymentRecord[];
|
|
20
22
|
isCreator: boolean;
|
|
21
23
|
name: string;
|
|
@@ -19,6 +19,7 @@ const order_pricing_model_1 = require("./embedded/order-pricing.model");
|
|
|
19
19
|
const enum_1 = require("../../../utilities/enum");
|
|
20
20
|
const shop_model_1 = require("./shop.model");
|
|
21
21
|
const payment_record_model_1 = require("./embedded/payment-record.model");
|
|
22
|
+
const card_model_1 = require("./card.model");
|
|
22
23
|
let CartParticipant = class CartParticipant extends defaultClasses_1.TimeStamps {
|
|
23
24
|
cart;
|
|
24
25
|
user;
|
|
@@ -28,6 +29,7 @@ let CartParticipant = class CartParticipant extends defaultClasses_1.TimeStamps
|
|
|
28
29
|
spentAmount;
|
|
29
30
|
secondarySpentAmount;
|
|
30
31
|
paymentInformation;
|
|
32
|
+
card;
|
|
31
33
|
paymentRecords;
|
|
32
34
|
isCreator;
|
|
33
35
|
name;
|
|
@@ -70,6 +72,10 @@ __decorate([
|
|
|
70
72
|
(0, typegoose_1.prop)({ type: () => payment_infromation_model_1.PaymentInformation, _id: false }),
|
|
71
73
|
__metadata("design:type", payment_infromation_model_1.PaymentInformation)
|
|
72
74
|
], CartParticipant.prototype, "paymentInformation", void 0);
|
|
75
|
+
__decorate([
|
|
76
|
+
(0, typegoose_1.prop)({ ref: () => card_model_1.Card }),
|
|
77
|
+
__metadata("design:type", Object)
|
|
78
|
+
], CartParticipant.prototype, "card", void 0);
|
|
73
79
|
__decorate([
|
|
74
80
|
(0, typegoose_1.prop)({ type: () => [payment_record_model_1.PaymentRecord], _id: false, default: [] }),
|
|
75
81
|
__metadata("design:type", Array)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cart-participant.model.js","sourceRoot":"/","sources":["libraries/mongo/models/cart-participant.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAgF;AAChF,4EAAqE;AACrE,6CAAoC;AACpC,oFAA0E;AAC1E,6CAAoC;AACpC,wEAAqE;AACrE,kDAAqD;AACrD,6CAAoC;AACpC,0EAAgE;
|
|
1
|
+
{"version":3,"file":"cart-participant.model.js","sourceRoot":"/","sources":["libraries/mongo/models/cart-participant.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAgF;AAChF,4EAAqE;AACrE,6CAAoC;AACpC,oFAA0E;AAC1E,6CAAoC;AACpC,wEAAqE;AACrE,kDAAqD;AACrD,6CAAoC;AACpC,0EAAgE;AAChE,6CAAoC;AAiB7B,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,2BAAU;IAEvC,IAAI,CAAa;IAGjB,IAAI,CAAa;IAGjB,QAAQ,CAAQ;IAGhB,OAAO,CAAW;IAGlB,OAAO,CAAQ;IAGf,WAAW,CAAU;IAGrB,oBAAoB,CAAU;IAG9B,kBAAkB,CAAsB;I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IAAI,EAAE,CAAC;IAC7C,IAAA,iBAAK,EAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;GACN,eAAe,CAwD3B","sourcesContent":["import { prop, Ref, index, modelOptions, Severity } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { Cart } from './cart.model';\nimport { PaymentInformation } from './embedded/payment-infromation.model';\nimport { User } from './user.model';\nimport { RegularOrderPricing } from './embedded/order-pricing.model';\nimport { CartStatus } from '../../../utilities/enum';\nimport { Shop } from './shop.model';\nimport { PaymentRecord } from './embedded/payment-record.model';\nimport { Card } from './card.model';\n\n/**\n * CartParticipant model - Tracks users participating in a group cart\n */\n@modelOptions({\n\tschemaOptions: {\n\t\tcollection: 'cartParticipants',\n\t\ttoJSON: { virtuals: true },\n\t\ttoObject: { virtuals: true },\n\t},\n\toptions: {\n\t\tallowMixed: Severity.ALLOW,\n\t},\n})\n@index({ cart: 1, user: 1 }, { unique: true })\n@index({ cart: 1 })\nexport class CartParticipant extends TimeStamps {\n\t@prop({ required: true, ref: () => Cart })\n\tpublic cart!: Ref<Cart>;\n\n\t@prop({ required: true, ref: () => User })\n\tpublic user!: Ref<User>;\n\n\t@prop({ type: Date, default: () => new Date() })\n\tpublic joinedAt!: Date;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isReady!: boolean;\n\n\t@prop({ type: Date })\n\tpublic readyAt?: Date;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic spentAmount!: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic secondarySpentAmount!: number;\n\n\t@prop({ type: () => PaymentInformation, _id: false }) // Todo: Remove this after paymentRecords is fully implemented\n\tpublic paymentInformation?: PaymentInformation;\n\n\t@prop({ ref: () => Card })\n\tpublic card?: Ref<Card>;\n\n\t@prop({ type: () => [PaymentRecord], _id: false, default: [] })\n\tpublic paymentRecords?: PaymentRecord[];\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isCreator!: boolean;\n\n\t@prop({ required: true, type: String })\n\tpublic name!: string;\n\n\t@prop({ type: String })\n\tpublic profilePhoto?: string;\n\n\t@prop({ type: String })\n\tpublic phoneNumber?: string;\n\n\t@prop({ type: () => RegularOrderPricing })\n\tpublic pricing?: RegularOrderPricing;\n\n\t@prop({\n\t\tenum: CartStatus,\n\t\ttype: String,\n\t\tdefault: CartStatus.ACTIVE,\n\t\trequired: true,\n\t})\n\tpublic cartStatus!: CartStatus;\n\n\t@prop({ required: true, ref: () => Shop })\n\tpublic shop!: Ref<Shop>;\n}\n"]}
|
package/dist/types/README.md
CHANGED
package/dist/types/package.json
CHANGED