@lyxa.ai/core 1.0.289 → 1.0.291
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/embedded/chat-participant.model.d.ts +1 -0
- package/dist/libraries/mongo/models/embedded/chat-participant.model.js +5 -0
- package/dist/libraries/mongo/models/embedded/chat-participant.model.js.map +1 -1
- package/dist/libraries/mongo/models/service-package.model.d.ts +2 -0
- package/dist/libraries/mongo/models/service-package.model.js +6 -0
- package/dist/libraries/mongo/models/service-package.model.js.map +1 -1
- package/dist/libraries/mongo/models/user.model.d.ts +1 -1
- package/dist/types/README.md +1 -1
- package/dist/types/package.json +1 -1
- package/package.json +1 -1
|
@@ -21,6 +21,7 @@ class ChatParticipant {
|
|
|
21
21
|
isActive;
|
|
22
22
|
lastReadMessage;
|
|
23
23
|
lastReadMessageAt;
|
|
24
|
+
unreadCount;
|
|
24
25
|
leftAt;
|
|
25
26
|
}
|
|
26
27
|
exports.ChatParticipant = ChatParticipant;
|
|
@@ -52,6 +53,10 @@ __decorate([
|
|
|
52
53
|
(0, typegoose_1.prop)({ type: Date }),
|
|
53
54
|
__metadata("design:type", Date)
|
|
54
55
|
], ChatParticipant.prototype, "lastReadMessageAt", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, typegoose_1.prop)({ type: Number, default: 0 }),
|
|
58
|
+
__metadata("design:type", Number)
|
|
59
|
+
], ChatParticipant.prototype, "unreadCount", void 0);
|
|
55
60
|
__decorate([
|
|
56
61
|
(0, typegoose_1.prop)({ type: Date }),
|
|
57
62
|
__metadata("design:type", Date)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat-participant.model.js","sourceRoot":"/","sources":["libraries/mongo/models/embedded/chat-participant.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAiD;AAKjD,qDAAqD;AACrD,oDAA2C;AAE3C,MAAa,eAAe;IAE3B,GAAG,CAAoC;IAGvC,I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GzB;IADC,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;oDACd;AAGrB;IADC,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;8BACZ,IAAI;+CAAC","sourcesContent":["import { prop, Ref } from '@typegoose/typegoose';\nimport { User } from '../user.model';\nimport { Admin } from '../admin.model';\nimport { Shop } from '../shop.model';\nimport { Rider } from '../rider.model';\nimport { UserRef } from '../../../../utilities/enum';\nimport { Message } from '../message.model';\n\nexport class ChatParticipant {\n\t@prop({ required: true, refPath: 'type' })\n\tref!: Ref<User | Admin | Shop | Rider>;\n\n\t@prop({ required: true, enum: UserRef })\n\ttype!: UserRef;\n\n\t@prop({ type: Date, default: () => new Date() })\n\tjoinedAt?: Date;\n\n\t@prop({ type: Date })\n\tlastReadAt?: Date;\n\n\t@prop({ type: Boolean, default: true })\n\tisActive?: boolean;\n\n\t@prop({ ref: () => Message })\n\tlastReadMessage?: Ref<Message>;\n\n\t@prop({ type: Date })\n\tlastReadMessageAt?: Date;\n\n\t@prop({ type: Number, default: 0 })\n\tunreadCount?: number;\n\n\t@prop({ type: Date })\n\tleftAt?: Date;\n}\n"]}
|
|
@@ -3,9 +3,11 @@ import { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';
|
|
|
3
3
|
import { Status } from '../../../utilities/enum';
|
|
4
4
|
import { Vendor } from './vendor.model';
|
|
5
5
|
import { ServiceCategory } from './service-category.model';
|
|
6
|
+
import { Service } from "./service.model";
|
|
6
7
|
export declare class ServicePackage extends TimeStamps {
|
|
7
8
|
name: string;
|
|
8
9
|
vendor: Ref<Vendor>;
|
|
10
|
+
service: Ref<Service>;
|
|
9
11
|
category: Ref<ServiceCategory>;
|
|
10
12
|
price: number;
|
|
11
13
|
secondaryPrice: number;
|
|
@@ -15,9 +15,11 @@ const defaultClasses_1 = require("@typegoose/typegoose/lib/defaultClasses");
|
|
|
15
15
|
const enum_1 = require("../../../utilities/enum");
|
|
16
16
|
const vendor_model_1 = require("./vendor.model");
|
|
17
17
|
const service_category_model_1 = require("./service-category.model");
|
|
18
|
+
const service_model_1 = require("./service.model");
|
|
18
19
|
let ServicePackage = class ServicePackage extends defaultClasses_1.TimeStamps {
|
|
19
20
|
name;
|
|
20
21
|
vendor;
|
|
22
|
+
service;
|
|
21
23
|
category;
|
|
22
24
|
price;
|
|
23
25
|
secondaryPrice;
|
|
@@ -40,6 +42,10 @@ __decorate([
|
|
|
40
42
|
(0, typegoose_1.prop)({ required: true, ref: () => vendor_model_1.Vendor }),
|
|
41
43
|
__metadata("design:type", Object)
|
|
42
44
|
], ServicePackage.prototype, "vendor", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, typegoose_1.prop)({ required: true, ref: () => service_model_1.Service }),
|
|
47
|
+
__metadata("design:type", Object)
|
|
48
|
+
], ServicePackage.prototype, "service", void 0);
|
|
43
49
|
__decorate([
|
|
44
50
|
(0, typegoose_1.prop)({ required: true, ref: () => service_category_model_1.ServiceCategory }),
|
|
45
51
|
__metadata("design:type", Object)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service-package.model.js","sourceRoot":"/","sources":["libraries/mongo/models/service-package.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAsE;AACtE,4EAAqE;AACrE,kDAAiD;AACjD,iDAAwC;AACxC,qEAA2D;
|
|
1
|
+
{"version":3,"file":"service-package.model.js","sourceRoot":"/","sources":["libraries/mongo/models/service-package.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAsE;AACtE,4EAAqE;AACrE,kDAAiD;AACjD,iDAAwC;AACxC,qEAA2D;AAC3D,mDAA0C;AAOnC,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,2BAAU;IAEnC,IAAI,CAAU;IAGd,MAAM,CAAe;IAGrB,OAAO,CAAc;IAGrB,QAAQ,CAAwB;IAGhC,KAAK,CAAU;IAGf,cAAc,CA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A,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;mDACP;AAGrB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;6CACD;AAGf;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,EAAC,CAAC;;mDACV;AAGrB;IADN,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,cAAc,EAAE,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC;;8CAC3B;AAG/B;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,aAAM,EAAE,OAAO,EAAE,aAAM,CAAC,MAAM,EAAE,CAAC;;8CACtC;AAGhB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;wDACN;AAG3B;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC;;qDACb;yBA5CrB,cAAc;IAL1B,IAAA,wBAAY,EAAC,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,iBAAiB,EAAE,UAAU,EAAE,IAAI,EAAE,EAAE,CAAC;IACpF,IAAA,iBAAK,EACF,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,EACtB,EAAE,MAAM,EAAE,IAAI,EAAE,uBAAuB,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,CACjE;GACY,cAAc,CA6C1B","sourcesContent":["import { Index, modelOptions, prop, Ref } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { Status } from '../../../utilities/enum';\nimport { Vendor } from './vendor.model';\nimport { ServiceCategory } from './service-category.model';\nimport { Service } from \"./service.model\";\n\n@modelOptions({ schemaOptions: { collection: 'servicePackages', timestamps: true } })\n@Index(\n { name: 1, vendor: 1 },\n { unique: true, partialFilterExpression: { deletedAt: null } }\n)\nexport class ServicePackage extends TimeStamps {\n @prop({ required: true, type: String, trim: true, maxlength: 20 })\n public name!: string;\n\n @prop({ required: true, ref: () => Vendor })\n public vendor!: Ref<Vendor>;\n\n @prop({ required: true, ref: () => Service })\n public service: Ref<Service>\n\n @prop({ required: true, ref: () => ServiceCategory })\n public category!: Ref<ServiceCategory>;\n\n @prop({ required: true, type: Number, min: 1 })\n public price!: number;\n\n @prop({ required: true, type: Number, min: 1 })\n public secondaryPrice!: number;\n\n @prop({ required: true, type: Number, min: 0 })\n public duration!: number; // in hours\n\n @prop({ required: true, type: Number, min: 1 })\n public numberOfProfessionals!: number;\n\n @prop({ type: String, trim: true })\n public description?: string;\n\n @prop({ type: String })\n public image!: string;\n\n @prop({ type: String, maxlength: 250})\n public vendorNotes?: string;\n\n @prop({ ref: () => ServicePackage, default: [], type: [String] })\n public addons?: Ref<ServicePackage>[];\n\n @prop({ type: String, enum: Status, default: Status.ACTIVE })\n public status?: Status;\n\n @prop({ type: Boolean, default: false })\n public includeMaterials!: boolean;\n\n @prop({ type: Number, default: 0, min: 0 })\n public materialsCost?: number;\n}\n\n"]}
|
|
@@ -31,7 +31,7 @@ export declare class User extends TimeStamps {
|
|
|
31
31
|
isPhoneVerified?: boolean;
|
|
32
32
|
onlineStatus?: OnlineStatus;
|
|
33
33
|
fcmTokens?: string[];
|
|
34
|
-
static updateWallet(this: ReturnModelType<typeof User>, userId: string, amount: number): Promise<(import("mongoose").Document<unknown, import("@typegoose/typegoose/lib/types").BeAnObject, User, import("@typegoose/typegoose/lib/types").BeAnyObject> & Omit<User & {
|
|
34
|
+
static updateWallet(this: ReturnModelType<typeof User>, userId: string, amount: number): Promise<(import("mongoose").Document<unknown, import("@typegoose/typegoose/lib/types").BeAnObject, User, import("@typegoose/typegoose/lib/types").BeAnyObject, {}> & Omit<User & {
|
|
35
35
|
_id: import("mongoose").Types.ObjectId;
|
|
36
36
|
} & {
|
|
37
37
|
__v: number;
|
package/dist/types/README.md
CHANGED
package/dist/types/package.json
CHANGED