@lyxa.ai/core 1.0.192 → 1.0.194
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/base/base-review.model.d.ts +2 -2
- package/dist/libraries/mongo/models/base/base-review.model.js +2 -2
- package/dist/libraries/mongo/models/base/base-review.model.js.map +1 -1
- package/dist/libraries/mongo/models/index.d.ts +15 -9
- package/dist/libraries/mongo/models/index.js +16 -10
- package/dist/libraries/mongo/models/index.js.map +1 -1
- package/dist/libraries/mongo/models/{team-member-review.model.d.ts → professional-review.model.d.ts} +3 -3
- package/dist/libraries/mongo/models/{team-member-review.model.js → professional-review.model.js} +17 -17
- package/dist/libraries/mongo/models/professional-review.model.js.map +1 -0
- package/dist/libraries/mongo/models/professional-schedule.d.ts +17 -0
- package/dist/libraries/mongo/models/professional-schedule.js +79 -0
- package/dist/libraries/mongo/models/professional-schedule.js.map +1 -0
- package/dist/libraries/mongo/models/{team-member.model.d.ts → professional.model.d.ts} +1 -2
- package/dist/libraries/mongo/models/{team-member.model.js → professional.model.js} +17 -22
- package/dist/libraries/mongo/models/professional.model.js.map +1 -0
- package/dist/libraries/mongo/models/service-cart.model.d.ts +14 -0
- package/dist/libraries/mongo/models/service-cart.model.js +79 -0
- package/dist/libraries/mongo/models/service-cart.model.js.map +1 -0
- package/dist/libraries/mongo/models/service-line-item.model.d.ts +13 -0
- package/dist/libraries/mongo/models/service-line-item.model.js +63 -0
- package/dist/libraries/mongo/models/service-line-item.model.js.map +1 -0
- package/dist/libraries/mongo/models/service-order.model.d.ts +2 -2
- package/dist/libraries/mongo/models/service-order.model.js +2 -2
- package/dist/libraries/mongo/models/service-order.model.js.map +1 -1
- package/dist/libraries/mongo/models/service-package.model.js.map +1 -1
- package/dist/libraries/mongo/models/service.model.d.ts +1 -0
- package/dist/libraries/mongo/models/service.model.js +5 -0
- package/dist/libraries/mongo/models/service.model.js.map +1 -1
- package/dist/types/README.md +1 -1
- package/dist/types/package.json +1 -1
- package/dist/types/utilities/enum.d.ts +7 -2
- package/dist/types/utilities/enum.js +19 -13
- package/dist/types/utilities/enum.js.map +1 -1
- package/dist/utilities/enum.d.ts +7 -2
- package/dist/utilities/enum.js +19 -13
- package/dist/utilities/enum.js.map +1 -1
- package/package.json +1 -1
- package/dist/libraries/mongo/models/team-member-blocked-time.d.ts +0 -13
- package/dist/libraries/mongo/models/team-member-blocked-time.js +0 -67
- package/dist/libraries/mongo/models/team-member-blocked-time.js.map +0 -1
- package/dist/libraries/mongo/models/team-member-review.model.js.map +0 -1
- package/dist/libraries/mongo/models/team-member.model.js.map +0 -1
|
@@ -9,12 +9,12 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
12
|
+
exports.Professional = void 0;
|
|
13
13
|
const typegoose_1 = require("@typegoose/typegoose");
|
|
14
14
|
const vendor_model_1 = require("./vendor.model");
|
|
15
15
|
const service_package_model_1 = require("./service-package.model");
|
|
16
16
|
const enum_1 = require("../../../utilities/enum");
|
|
17
|
-
let
|
|
17
|
+
let Professional = class Professional {
|
|
18
18
|
name;
|
|
19
19
|
image;
|
|
20
20
|
phoneNumber;
|
|
@@ -22,52 +22,47 @@ let TeamMember = class TeamMember {
|
|
|
22
22
|
nationality;
|
|
23
23
|
vendor;
|
|
24
24
|
worksOn;
|
|
25
|
-
isResponsible;
|
|
26
25
|
averageRating;
|
|
27
26
|
status;
|
|
28
27
|
};
|
|
29
|
-
exports.
|
|
28
|
+
exports.Professional = Professional;
|
|
30
29
|
__decorate([
|
|
31
30
|
(0, typegoose_1.prop)({ required: true, trim: true }),
|
|
32
31
|
__metadata("design:type", String)
|
|
33
|
-
],
|
|
32
|
+
], Professional.prototype, "name", void 0);
|
|
34
33
|
__decorate([
|
|
35
34
|
(0, typegoose_1.prop)({ required: true }),
|
|
36
35
|
__metadata("design:type", String)
|
|
37
|
-
],
|
|
36
|
+
], Professional.prototype, "image", void 0);
|
|
38
37
|
__decorate([
|
|
39
38
|
(0, typegoose_1.prop)({ required: true, unique: false }),
|
|
40
39
|
__metadata("design:type", String)
|
|
41
|
-
],
|
|
40
|
+
], Professional.prototype, "phoneNumber", void 0);
|
|
42
41
|
__decorate([
|
|
43
42
|
(0, typegoose_1.prop)({ required: true }),
|
|
44
43
|
__metadata("design:type", String)
|
|
45
|
-
],
|
|
44
|
+
], Professional.prototype, "email", void 0);
|
|
46
45
|
__decorate([
|
|
47
46
|
(0, typegoose_1.prop)(),
|
|
48
47
|
__metadata("design:type", String)
|
|
49
|
-
],
|
|
48
|
+
], Professional.prototype, "nationality", void 0);
|
|
50
49
|
__decorate([
|
|
51
50
|
(0, typegoose_1.prop)({ ref: () => vendor_model_1.Vendor, required: true }),
|
|
52
51
|
__metadata("design:type", Object)
|
|
53
|
-
],
|
|
52
|
+
], Professional.prototype, "vendor", void 0);
|
|
54
53
|
__decorate([
|
|
55
54
|
(0, typegoose_1.prop)({ ref: () => service_package_model_1.ServicePackage, default: [], type: [String] }),
|
|
56
55
|
__metadata("design:type", Array)
|
|
57
|
-
],
|
|
58
|
-
__decorate([
|
|
59
|
-
(0, typegoose_1.prop)({ default: false }),
|
|
60
|
-
__metadata("design:type", Boolean)
|
|
61
|
-
], TeamMember.prototype, "isResponsible", void 0);
|
|
56
|
+
], Professional.prototype, "worksOn", void 0);
|
|
62
57
|
__decorate([
|
|
63
58
|
(0, typegoose_1.prop)({ default: 0 }),
|
|
64
59
|
__metadata("design:type", Number)
|
|
65
|
-
],
|
|
60
|
+
], Professional.prototype, "averageRating", void 0);
|
|
66
61
|
__decorate([
|
|
67
|
-
(0, typegoose_1.prop)({ enum: enum_1.
|
|
62
|
+
(0, typegoose_1.prop)({ enum: enum_1.ProfessionalStatus, default: enum_1.ProfessionalStatus.AVAILABLE }),
|
|
68
63
|
__metadata("design:type", String)
|
|
69
|
-
],
|
|
70
|
-
exports.
|
|
71
|
-
(0, typegoose_1.modelOptions)({ schemaOptions: { collection: '
|
|
72
|
-
],
|
|
73
|
-
//# sourceMappingURL=
|
|
64
|
+
], Professional.prototype, "status", void 0);
|
|
65
|
+
exports.Professional = Professional = __decorate([
|
|
66
|
+
(0, typegoose_1.modelOptions)({ schemaOptions: { collection: 'professionals', timestamps: true } })
|
|
67
|
+
], Professional);
|
|
68
|
+
//# sourceMappingURL=professional.model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"professional.model.js","sourceRoot":"/","sources":["libraries/mongo/models/professional.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA+D;AAC/D,iDAAwC;AACxC,mEAAyD;AACzD,kDAA4D;AAIrD,IAAM,YAAY,GAAlB,MAAM,YAAY;IAEhB,IAAI,CAAU;IAGd,KAAK,CAAU;IAGf,WAAW,CAAU;IAGrB,KAAK,CAAU;IAGf,WAAW,CAAU;IAGrB,MAAM,CAAe;IAGrB,OAAO,CAAyB;IAGhC,aAAa,CAAU;IAGvB,MAAM,CAAS;CACvB,CAAA;AA3BY,oCAAY;AAEhB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;0CAChB;AAGd;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2CACH;AAGf;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;;iDACZ;AAGrB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2CACH;AAGf;IADN,IAAA,gBAAI,GAAE;;iDACqB;AAGrB;IADN,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,qBAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CAChB;AAGrB;IADN,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,sCAAc,EAAE,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC;;6CAC1B;AAGhC;IADN,IAAA,gBAAI,EAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;mDACS;AAGvB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,yBAAkB,EAAE,OAAO,EAAE,yBAAkB,CAAC,SAAS,EAAE,CAAC;;4CACpD;uBA1BX,YAAY;IADxB,IAAA,wBAAY,EAAC,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,eAAe,EAAE,UAAU,EAAE,IAAI,EAAE,EAAE,CAAC;GACtE,YAAY,CA2BxB","sourcesContent":["import { prop, Ref, modelOptions } from '@typegoose/typegoose';\nimport { Vendor } from './vendor.model';\nimport { ServicePackage } from './service-package.model';\nimport { ProfessionalStatus} from '../../../utilities/enum';\n\n\n@modelOptions({ schemaOptions: { collection: 'professionals', timestamps: true } })\nexport class Professional {\n @prop({ required: true, trim: true })\n public name!: string;\n\n @prop({ required: true })\n public image!: string;\n\n @prop({ required: true, unique: false })\n public phoneNumber!: string;\n\n @prop({ required: true })\n public email!: string;\n\n @prop()\n public nationality?: string;\n\n @prop({ ref: () => Vendor, required: true })\n public vendor!: Ref<Vendor>;\n\n @prop({ ref: () => ServicePackage, default: [], type: [String] })\n public worksOn!: Ref<ServicePackage>[];\n\n @prop({ default: 0 })\n public averageRating?: number;\n\n @prop({ enum: ProfessionalStatus, default: ProfessionalStatus.AVAILABLE })\n public status?: string\n}\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Ref } from '@typegoose/typegoose';
|
|
2
|
+
import { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';
|
|
3
|
+
import { User } from './user.model';
|
|
4
|
+
import { Vendor } from './vendor.model';
|
|
5
|
+
import { ServiceCartStatus } from '../../../utilities/enum';
|
|
6
|
+
import { ServiceLineItem } from './service-line-item.model';
|
|
7
|
+
import { UserAddress } from './shared/address.model';
|
|
8
|
+
export declare class ServiceCart extends TimeStamps {
|
|
9
|
+
user: Ref<User>;
|
|
10
|
+
vendor: Ref<Vendor>;
|
|
11
|
+
deliveryAddress?: UserAddress;
|
|
12
|
+
status: ServiceCartStatus;
|
|
13
|
+
serviceLineItems: Ref<ServiceLineItem>[];
|
|
14
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
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.ServiceCart = void 0;
|
|
13
|
+
const typegoose_1 = require("@typegoose/typegoose");
|
|
14
|
+
const defaultClasses_1 = require("@typegoose/typegoose/lib/defaultClasses");
|
|
15
|
+
const user_model_1 = require("./user.model");
|
|
16
|
+
const vendor_model_1 = require("./vendor.model");
|
|
17
|
+
const enum_1 = require("../../../utilities/enum");
|
|
18
|
+
const service_line_item_model_1 = require("./service-line-item.model");
|
|
19
|
+
const address_model_1 = require("./shared/address.model");
|
|
20
|
+
let ServiceCart = class ServiceCart extends defaultClasses_1.TimeStamps {
|
|
21
|
+
user;
|
|
22
|
+
vendor;
|
|
23
|
+
deliveryAddress;
|
|
24
|
+
status;
|
|
25
|
+
serviceLineItems;
|
|
26
|
+
};
|
|
27
|
+
exports.ServiceCart = ServiceCart;
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, typegoose_1.prop)({ required: true, ref: () => user_model_1.User }),
|
|
30
|
+
__metadata("design:type", Object)
|
|
31
|
+
], ServiceCart.prototype, "user", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, typegoose_1.prop)({ required: true, ref: () => vendor_model_1.Vendor }),
|
|
34
|
+
__metadata("design:type", Object)
|
|
35
|
+
], ServiceCart.prototype, "vendor", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, typegoose_1.prop)({ required: false, type: address_model_1.UserAddress }),
|
|
38
|
+
__metadata("design:type", address_model_1.UserAddress)
|
|
39
|
+
], ServiceCart.prototype, "deliveryAddress", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, typegoose_1.prop)({
|
|
42
|
+
enum: enum_1.ServiceCartStatus,
|
|
43
|
+
type: String,
|
|
44
|
+
default: enum_1.ServiceCartStatus.ACTIVE,
|
|
45
|
+
required: true,
|
|
46
|
+
}),
|
|
47
|
+
__metadata("design:type", String)
|
|
48
|
+
], ServiceCart.prototype, "status", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, typegoose_1.prop)({
|
|
51
|
+
ref: () => service_line_item_model_1.ServiceLineItem,
|
|
52
|
+
foreignField: 'cart',
|
|
53
|
+
localField: '_id',
|
|
54
|
+
}),
|
|
55
|
+
__metadata("design:type", Array)
|
|
56
|
+
], ServiceCart.prototype, "serviceLineItems", void 0);
|
|
57
|
+
exports.ServiceCart = ServiceCart = __decorate([
|
|
58
|
+
(0, typegoose_1.modelOptions)({
|
|
59
|
+
schemaOptions: {
|
|
60
|
+
collection: 'serviceCarts',
|
|
61
|
+
toJSON: { virtuals: true },
|
|
62
|
+
toObject: { virtuals: true },
|
|
63
|
+
},
|
|
64
|
+
options: {
|
|
65
|
+
allowMixed: typegoose_1.Severity.ALLOW,
|
|
66
|
+
},
|
|
67
|
+
}),
|
|
68
|
+
(0, typegoose_1.Index)({ user: 1 }),
|
|
69
|
+
(0, typegoose_1.Index)({ vendor: 1 }),
|
|
70
|
+
(0, typegoose_1.Index)({ status: 1 }),
|
|
71
|
+
(0, typegoose_1.Index)({ user: 1, vendor: 1 }, {
|
|
72
|
+
unique: true,
|
|
73
|
+
partialFilterExpression: {
|
|
74
|
+
status: { $in: [] },
|
|
75
|
+
deletedAt: null,
|
|
76
|
+
},
|
|
77
|
+
})
|
|
78
|
+
], ServiceCart);
|
|
79
|
+
//# sourceMappingURL=service-cart.model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service-cart.model.js","sourceRoot":"/","sources":["libraries/mongo/models/service-cart.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAgF;AAChF,4EAAqE;AACrE,6CAAoC;AACpC,iDAAwC;AACxC,kDAA4D;AAC5D,uEAA4D;AAC5D,0DAAqD;AAyB9C,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,2BAAU;IAEnC,IAAI,CAAa;IAGjB,MAAM,CAAe;IAGrB,eAAe,CAAe;IAQ9B,MAAM,CAAqB;IAO3B,gBAAgB,CAAyB;CAChD,CAAA;AAxBY,kCAAW;AAEhB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,iBAAI,EAAE,CAAC;;yCAClB;AAGjB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,qBAAM,EAAE,CAAC;;2CAChB;AAGrB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,2BAAW,EAAE,CAAC;8BACpB,2BAAW;oDAAC;AAQ9B;IANN,IAAA,gBAAI,EAAC;QACL,IAAI,EAAE,wBAAiB;QACvB,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,wBAAiB,CAAC,MAAM;QACjC,QAAQ,EAAE,IAAI;KACd,CAAC;;2CACgC;AAO3B;IALN,IAAA,gBAAI,EAAC;QACL,GAAG,EAAE,GAAG,EAAE,CAAC,yCAAe;QAC1B,YAAY,EAAE,MAAM;QACpB,UAAU,EAAE,KAAK;KACjB,CAAC;;qDAC8C;sBAvBpC,WAAW;IAvBvB,IAAA,wBAAY,EAAC;QACb,aAAa,EAAE;YACd,UAAU,EAAE,cAAc;YAC1B,MAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;YAC1B,QAAQ,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;SAC5B;QACD,OAAO,EAAE;YACR,UAAU,EAAE,oBAAQ,CAAC,KAAK;SAC1B;KACD,CAAC;IACD,IAAA,iBAAK,EAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;IAClB,IAAA,iBAAK,EAAC,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC;IACpB,IAAA,iBAAK,EAAC,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC;IACpB,IAAA,iBAAK,EACL,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,EACtB;QACC,MAAM,EAAE,IAAI;QACZ,uBAAuB,EAAE;YACxB,MAAM,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE;YACnB,SAAS,EAAE,IAAI;SACf;KACD,CACD;GACY,WAAW,CAwBvB","sourcesContent":["import { Index, modelOptions, prop, Ref, Severity } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { User } from './user.model';\nimport { Vendor } from './vendor.model';\nimport { ServiceCartStatus } from '../../../utilities/enum';\nimport { ServiceLineItem } from './service-line-item.model';\nimport { UserAddress } from './shared/address.model';\n\n@modelOptions({\n\tschemaOptions: {\n\t\tcollection: 'serviceCarts',\n\t\ttoJSON: { virtuals: true },\n\t\ttoObject: { virtuals: true },\n\t},\n\toptions: {\n\t\tallowMixed: Severity.ALLOW,\n\t},\n})\n@Index({ user: 1 })\n@Index({ vendor: 1 })\n@Index({ status: 1 })\n@Index(\n\t{ user: 1, vendor: 1 },\n\t{\n\t\tunique: true,\n\t\tpartialFilterExpression: {\n\t\t\tstatus: { $in: [] },\n\t\t\tdeletedAt: null,\n\t\t},\n\t}\n)\nexport class ServiceCart extends TimeStamps {\n\t@prop({ required: true, ref: () => User })\n\tpublic user!: Ref<User>;\n\n\t@prop({ required: true, ref: () => Vendor })\n\tpublic vendor!: Ref<Vendor>;\n\n\t@prop({ required: false, type: UserAddress })\n\tpublic deliveryAddress?: UserAddress;\n\n\t@prop({\n\t\tenum: ServiceCartStatus,\n\t\ttype: String,\n\t\tdefault: ServiceCartStatus.ACTIVE,\n\t\trequired: true,\n\t})\n\tpublic status!: ServiceCartStatus;\n\n\t@prop({\n\t\tref: () => ServiceLineItem,\n\t\tforeignField: 'cart',\n\t\tlocalField: '_id',\n\t})\n\tpublic serviceLineItems: Ref<ServiceLineItem>[];\n}\n"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Ref } from '@typegoose/typegoose';
|
|
2
|
+
import { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';
|
|
3
|
+
import { ServiceCart } from './service-cart.model';
|
|
4
|
+
import { User } from './user.model';
|
|
5
|
+
import { Vendor } from './vendor.model';
|
|
6
|
+
import { ServicePackage } from './service-package.model';
|
|
7
|
+
export declare class ServiceLineItem extends TimeStamps {
|
|
8
|
+
cart: Ref<ServiceCart>;
|
|
9
|
+
user: Ref<User>;
|
|
10
|
+
vendor: Ref<Vendor>;
|
|
11
|
+
package: Ref<ServicePackage>;
|
|
12
|
+
quantity?: number;
|
|
13
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
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.ServiceLineItem = void 0;
|
|
13
|
+
const typegoose_1 = require("@typegoose/typegoose");
|
|
14
|
+
const defaultClasses_1 = require("@typegoose/typegoose/lib/defaultClasses");
|
|
15
|
+
const service_cart_model_1 = require("./service-cart.model");
|
|
16
|
+
const user_model_1 = require("./user.model");
|
|
17
|
+
const vendor_model_1 = require("./vendor.model");
|
|
18
|
+
const service_package_model_1 = require("./service-package.model");
|
|
19
|
+
let ServiceLineItem = class ServiceLineItem extends defaultClasses_1.TimeStamps {
|
|
20
|
+
cart;
|
|
21
|
+
user;
|
|
22
|
+
vendor;
|
|
23
|
+
package;
|
|
24
|
+
quantity;
|
|
25
|
+
};
|
|
26
|
+
exports.ServiceLineItem = ServiceLineItem;
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typegoose_1.prop)({ require: true, ref: () => service_cart_model_1.ServiceCart }),
|
|
29
|
+
__metadata("design:type", Object)
|
|
30
|
+
], ServiceLineItem.prototype, "cart", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, typegoose_1.prop)({ required: true, ref: () => user_model_1.User }),
|
|
33
|
+
__metadata("design:type", Object)
|
|
34
|
+
], ServiceLineItem.prototype, "user", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, typegoose_1.prop)({ required: true, ref: () => vendor_model_1.Vendor }),
|
|
37
|
+
__metadata("design:type", Object)
|
|
38
|
+
], ServiceLineItem.prototype, "vendor", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, typegoose_1.prop)({ require: true, ref: () => service_package_model_1.ServicePackage }),
|
|
41
|
+
__metadata("design:type", Object)
|
|
42
|
+
], ServiceLineItem.prototype, "package", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, typegoose_1.prop)({ min: 1, default: 1 }),
|
|
45
|
+
__metadata("design:type", Number)
|
|
46
|
+
], ServiceLineItem.prototype, "quantity", void 0);
|
|
47
|
+
exports.ServiceLineItem = ServiceLineItem = __decorate([
|
|
48
|
+
(0, typegoose_1.modelOptions)({
|
|
49
|
+
schemaOptions: {
|
|
50
|
+
collection: 'serviceLineItems',
|
|
51
|
+
toJSON: { virtuals: true },
|
|
52
|
+
toObject: { virtuals: true },
|
|
53
|
+
},
|
|
54
|
+
options: {
|
|
55
|
+
allowMixed: typegoose_1.Severity.ALLOW,
|
|
56
|
+
},
|
|
57
|
+
}),
|
|
58
|
+
(0, typegoose_1.Index)({ cart: 1 }),
|
|
59
|
+
(0, typegoose_1.Index)({ cart: 1, user: 1 }),
|
|
60
|
+
(0, typegoose_1.Index)({ package: 1 }),
|
|
61
|
+
(0, typegoose_1.Index)({ vendor: 1 })
|
|
62
|
+
], ServiceLineItem);
|
|
63
|
+
//# sourceMappingURL=service-line-item.model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service-line-item.model.js","sourceRoot":"/","sources":["libraries/mongo/models/service-line-item.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAgF;AAChF,4EAAqE;AACrE,6DAAmD;AACnD,6CAAoC;AACpC,iDAAwC;AACxC,mEAAyD;AAoBlD,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ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EAAE,CAAC;GACR,eAAe,CAe3B","sourcesContent":["import { Index, modelOptions, prop, Ref, Severity } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { ServiceCart } from './service-cart.model';\nimport { User } from './user.model';\nimport { Vendor } from './vendor.model';\nimport { ServicePackage } from './service-package.model';\n\n/**\n * ServiceLineItem model - Represents individual items in a cart\n */\n\n@modelOptions({\n\tschemaOptions: {\n\t\tcollection: 'serviceLineItems',\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 })\n@Index({ cart: 1, user: 1 })\n@Index({ package: 1 })\n@Index({ vendor: 1 })\nexport class ServiceLineItem extends TimeStamps {\n\t@prop({ require: true, ref: () => ServiceCart })\n\tpublic cart!: Ref<ServiceCart>;\n\n\t@prop({ required: true, ref: () => User })\n\tpublic user!: Ref<User>;\n\n\t@prop({ required: true, ref: () => Vendor })\n\tpublic vendor!: Ref<Vendor>;\n\n\t@prop({ require: true, ref: () => ServicePackage })\n\tpublic package!: Ref<ServicePackage>;\n\n\t@prop({ min: 1, default: 1 })\n\tpublic quantity?: number;\n}\n"]}
|
|
@@ -3,7 +3,7 @@ import { User } from "./user.model";
|
|
|
3
3
|
import { Vendor } from "./vendor.model";
|
|
4
4
|
import { ServicePackage } from "./service-package.model";
|
|
5
5
|
import { ServiceOrderPriority, ServiceOrderStatus } from "../../../utilities/enum";
|
|
6
|
-
import {
|
|
6
|
+
import { Professional } from "./professional.model";
|
|
7
7
|
import { ServiceTimer } from "./embedded/service-timer.model";
|
|
8
8
|
import { ServiceOrderFlag } from "./embedded/service-order-flag.model";
|
|
9
9
|
export declare class ServiceOrder {
|
|
@@ -17,7 +17,7 @@ export declare class ServiceOrder {
|
|
|
17
17
|
hoursRequired?: number;
|
|
18
18
|
userNotes?: string;
|
|
19
19
|
vendorNotes?: string;
|
|
20
|
-
assignedProfessional?: Ref<
|
|
20
|
+
assignedProfessional?: Ref<Professional>[];
|
|
21
21
|
serviceTimer?: ServiceTimer;
|
|
22
22
|
flag?: ServiceOrderFlag;
|
|
23
23
|
confirmedAt?: Date;
|
|
@@ -15,7 +15,7 @@ const user_model_1 = require("./user.model");
|
|
|
15
15
|
const vendor_model_1 = require("./vendor.model");
|
|
16
16
|
const service_package_model_1 = require("./service-package.model");
|
|
17
17
|
const enum_1 = require("../../../utilities/enum");
|
|
18
|
-
const
|
|
18
|
+
const professional_model_1 = require("./professional.model");
|
|
19
19
|
const service_timer_model_1 = require("./embedded/service-timer.model");
|
|
20
20
|
const service_order_flag_model_1 = require("./embedded/service-order-flag.model");
|
|
21
21
|
let ServiceOrder = class ServiceOrder {
|
|
@@ -81,7 +81,7 @@ __decorate([
|
|
|
81
81
|
__metadata("design:type", String)
|
|
82
82
|
], ServiceOrder.prototype, "vendorNotes", void 0);
|
|
83
83
|
__decorate([
|
|
84
|
-
(0, typegoose_1.prop)({ ref: () =>
|
|
84
|
+
(0, typegoose_1.prop)({ ref: () => professional_model_1.Professional, default: [] }),
|
|
85
85
|
__metadata("design:type", Array)
|
|
86
86
|
], ServiceOrder.prototype, "assignedProfessional", void 0);
|
|
87
87
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service-order.model.js","sourceRoot":"/","sources":["libraries/mongo/models/service-order.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA+D;AAC/D,6CAAoC;AACpC,iDAAwC;AACxC,mEAAyD;AACzD,kDAAmF;AACnF,
|
|
1
|
+
{"version":3,"file":"service-order.model.js","sourceRoot":"/","sources":["libraries/mongo/models/service-order.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA+D;AAC/D,6CAAoC;AACpC,iDAAwC;AACxC,mEAAyD;AACzD,kDAAmF;AACnF,6DAAoD;AACpD,wEAA8D;AAC9D,kFAAuE;AAOhE,IAAM,YAAY,GAAlB,MAA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xB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;mDACO;AAGvB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;+CACG;AAGnB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;iDACK;AAGrB;IADN,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,iCAAY,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;0DACE;AAG1C;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,kCAAY,EAAE,CAAC;8BACb,kCAAY;kDAAA;AAG3B;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,2CAAgB,EAAE,CAAC;8BACzB,2CAAgB;0CAAA;AAGvB;IADN,IAAA,gBAAI,GAAE;8BACc,IAAI;iDAAC;AAGnB;IADN,IAAA,gBAAI,GAAE;8BACkB,IAAI;qDAAC;AAGvB;IADN,IAAA,gBAAI,EAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;8CACC;AAGnB;IADN,IAAA,gBAAI,GAAE;8BACW,IAAI;8CAAC;AAGhB;IADN,IAAA,gBAAI,EAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;+CACE;AAGpB;IADN,IAAA,gBAAI,GAAE;8BACY,IAAI;+CAAC;uBAxDf,YAAY;IALxB,IAAA,wBAAY,EAAC;QACV,aAAa,EAAE;YACX,UAAU,EAAE,cAAc;SAC7B;KACJ,CAAC;GACW,YAAY,CAyDxB","sourcesContent":["import { modelOptions, prop, Ref } from \"@typegoose/typegoose\";\nimport { User } from \"./user.model\";\nimport { Vendor } from \"./vendor.model\";\nimport { ServicePackage } from \"./service-package.model\";\nimport { ServiceOrderPriority, ServiceOrderStatus } from \"../../../utilities/enum\";\nimport { Professional } from \"./professional.model\";\nimport { ServiceTimer } from \"./embedded/service-timer.model\";\nimport { ServiceOrderFlag } from \"./embedded/service-order-flag.model\";\n\n@modelOptions({\n schemaOptions: {\n collection: \"serviceOrder\"\n }\n})\nexport class ServiceOrder {\n @prop({ type: String, required: true, unique: true })\n public orderId!: string\n\n @prop({ ref: () => User, required: true })\n public user!: Ref<User>\n\n @prop({ ref: () => Vendor, required: true })\n public vendor!: Ref<Vendor>\n\n @prop({ ref: () => ServicePackage, required: true })\n public package!: Ref<ServicePackage>\n\n @prop({ enum: ServiceOrderStatus, default: ServiceOrderStatus.PENDING })\n status!: ServiceOrderStatus\n\n @prop({ enum: ServiceOrderPriority, default: ServiceOrderPriority.NORMAL })\n public priority!: ServiceOrderPriority\n\n @prop({ required: true })\n public scheduledDateTime!: Date\n\n @prop({ type: Number })\n public hoursRequired?: number;\n\n @prop({ type: String })\n public userNotes?: string;\n\n @prop({ type: String })\n public vendorNotes?: string;\n\n @prop({ ref: () => Professional, default: [] })\n public assignedProfessional?: Ref<Professional>[]\n\n @prop({ type: () => ServiceTimer })\n public serviceTimer?: ServiceTimer\n\n @prop({ type: () => ServiceOrderFlag })\n public flag?: ServiceOrderFlag\n\n @prop()\n public confirmedAt?: Date;\n\n @prop()\n public autoConfirmedAt?: Date;\n\n @prop({ default: false })\n public isUrgent!: boolean;\n\n @prop()\n public urgentAt?: Date;\n\n @prop({ default: false })\n public isOverdue!: boolean;\n\n @prop()\n public overdueAt?: Date;\n}"]}
|
|
@@ -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;AAOpD,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,2BAAU;IAEnC,IAAI,CAAU;IAGd,MAAM,CAAe;IAGrB,QAAQ,CAAwB;IAGhC,KAAK,CAAU;IAGf,cAAc,C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EAAE,CAAC;;6CACD;AAGf;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;yBAtCrB,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,CAuC1B","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';\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: () => 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
|
|
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;AAOpD,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,2BAAU;IAEnC,IAAI,CAAU;IAGd,MAAM,CAAe;IAGrB,QAAQ,CAAwB;IAGhC,KAAK,CAAU;IAGf,cAAc,CAAU;IAGxB,QAAQ,CAAU;IAGlB,qBAAqB,CAAU;IAG/B,WAAW,CAAU;IAGrB,KAAK,CAAU;IAGf,MAAM,CAAyB;IAG/B,MAAM,CAAU;IAGhB,gBAAgB,CAAW;IAG3B,aAAa,CAAU;CACjC,CAAA;AAvCY,wCAAc;AAEhB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC;;4CAC7C;AAGd;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,qBAAM,EAAE,CAAC;;8CAChB;AAGrB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,wCAAe,EAAE,CAAC;;gDACd;AAGhC;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC;;6CACzB;AAGf;IADN,IAAA,gBAAI,EAA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AAE,EACtB,EAAE,MAAM,EAAE,IAAI,EAAE,uBAAuB,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,CACjE;GACY,cAAc,CAuC1B","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';\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: () => 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({ 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"]}
|
|
@@ -15,6 +15,7 @@ const defaultClasses_1 = require("@typegoose/typegoose/lib/defaultClasses");
|
|
|
15
15
|
let Service = class Service extends defaultClasses_1.TimeStamps {
|
|
16
16
|
name;
|
|
17
17
|
parentService;
|
|
18
|
+
image;
|
|
18
19
|
};
|
|
19
20
|
exports.Service = Service;
|
|
20
21
|
__decorate([
|
|
@@ -25,6 +26,10 @@ __decorate([
|
|
|
25
26
|
(0, typegoose_1.prop)({ ref: () => Service }),
|
|
26
27
|
__metadata("design:type", Object)
|
|
27
28
|
], Service.prototype, "parentService", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, typegoose_1.prop)({ type: String }),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], Service.prototype, "image", void 0);
|
|
28
33
|
exports.Service = Service = __decorate([
|
|
29
34
|
(0, typegoose_1.Index)({ name: 1 }, { unique: true, partialFilterExpression: { deletedAt: null } }),
|
|
30
35
|
(0, typegoose_1.modelOptions)({ schemaOptions: { collection: 'services' } })
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.model.js","sourceRoot":"/","sources":["libraries/mongo/models/service.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAsE;AACtE,4EAAqE;AAK9D,IAAM,OAAO,GAAb,MAAM,OAAQ,SAAQ,2BAAU;IAE5B,IAAI,CAAU;IAGd,aAAa,CAAe;
|
|
1
|
+
{"version":3,"file":"service.model.js","sourceRoot":"/","sources":["libraries/mongo/models/service.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAsE;AACtE,4EAAqE;AAK9D,IAAM,OAAO,GAAb,MAAM,OAAQ,SAAQ,2BAAU;IAE5B,IAAI,CAAU;IAGd,aAAa,CAAe;IAG5B,KAAK,CAAU;CACzB,CAAA;AATY,0BAAO;AAET;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;qCAClB;AAGd;IADN,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC;;8CACM;AAG5B;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;sCACD;kBARb,OAAO;IAFnB,IAAA,iBAAK,EAAC,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,uBAAuB,EAAG,EAAE,SAAS,EAAE,IAAI,EAAE,EAAC,CAAC;IAClF,IAAA,wBAAY,EAAC,EAAE,aAAa,EAAE,EAAE,UAAU,EAAG,UAAU,EAAE,EAAC,CAAC;GAC/C,OAAO,CASnB","sourcesContent":["import { Index, modelOptions, prop, Ref } from \"@typegoose/typegoose\";\nimport { TimeStamps } from \"@typegoose/typegoose/lib/defaultClasses\";\n\n\n@Index({ name: 1 }, { unique: true, partialFilterExpression : { deletedAt: null }})\n@modelOptions({ schemaOptions: { collection : 'services' }})\nexport class Service extends TimeStamps {\n @prop({ required: true, type: String })\n public name!: string;\n\n @prop({ ref: () => Service })\n public parentService?: Ref<Service>\n\n @prop({ type: String })\n public image?: string;\n}"]}
|
package/dist/types/README.md
CHANGED
package/dist/types/package.json
CHANGED
|
@@ -603,13 +603,18 @@ export declare enum SocketEventType {
|
|
|
603
603
|
MESSAGE_RECEIVED = "message.received",
|
|
604
604
|
TICKET_NOTIFICATION = "ticket.notification"
|
|
605
605
|
}
|
|
606
|
+
export declare enum ServiceCartStatus {
|
|
607
|
+
ACTIVE = "active",
|
|
608
|
+
LOCKED = "locked",
|
|
609
|
+
SUBMITTED = "submitted"
|
|
610
|
+
}
|
|
606
611
|
export declare enum Service {
|
|
607
612
|
CLEANING = "cleaning",
|
|
608
613
|
LAUNDRY = "laundry",
|
|
609
614
|
PEST_CONTROL = "pest_control",
|
|
610
615
|
SALON = "salon"
|
|
611
616
|
}
|
|
612
|
-
export declare enum
|
|
617
|
+
export declare enum ProfessionalStatus {
|
|
613
618
|
AVAILABLE = "available",
|
|
614
619
|
BUSY = "busy",
|
|
615
620
|
FULLY_BOOKED = "fully_booked"
|
|
@@ -627,7 +632,7 @@ export declare enum ServiceOrderPriority {
|
|
|
627
632
|
URGENT = "urgent",
|
|
628
633
|
FLAGGED = "flagged"
|
|
629
634
|
}
|
|
630
|
-
export declare enum
|
|
635
|
+
export declare enum ProfessionalRecurrencePattern {
|
|
631
636
|
DAILY = "daily",
|
|
632
637
|
WEEKLY = "weekly",
|
|
633
638
|
MONTHLY = "monthly"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PaymentPreference = exports.CartStatus = exports.AdminRole = exports.MarketingStatus = exports.MarketingType = exports.FavouriteType = exports.CouponExpirationReason = exports.CouponType = exports.BobType = exports.BobModel = exports.BobSettlementStatus = exports.BobSettlementType = exports.BobAccountType = exports.ZoneStatus = exports.FaqAccountType = exports.CounterType = exports.BannerUserType = exports.BannerLinkType = exports.BannerClickType = exports.VendorRole = exports.ShopRole = exports.OnlineStatus = exports.ShopOnlineStatus = exports.ChargeType = exports.ClickType = exports.NotificationAccountType = exports.DishCategory = exports.ProductDietaryType = exports.PriceOption = exports.ProductType = exports.CoreAuthIdentityType = exports.UserAppSectionItemType = exports.UserAppSectionType = exports.AdminLogsUpdatedFieldsType = exports.UpdatedField = exports.GeoLocationType = exports.RatingAccountType = exports.SubscriptionStatus = exports.SubscriptionPackage = exports.PaidCurrency = exports.PaymentStatus = exports.PaymentMethod = exports.ValueType = exports.HolidayWorkStatus = exports.WorkStatus = exports.WeekDay = exports.GlobalItemType = exports.ItemType = exports.Status = exports.AccountType = void 0;
|
|
4
|
-
exports.
|
|
4
|
+
exports.ProfessionalRecurrencePattern = exports.ServiceOrderPriority = exports.ServiceOrderStatus = exports.ProfessionalStatus = exports.Service = exports.ServiceCartStatus = exports.SocketEventType = exports.ChatroomType = exports.UserRef = exports.TicketStatus = exports.TicketType = exports.RewardedToTypeEnum = exports.ReplacementType = exports.ReplacementReason = exports.UrgentOrderReason = exports.LateOrderReason = exports.OrderCanceledBy = exports.LogUser = exports.PayoutStatus = exports.PayoutType = exports.AddRemoveCreditAccountType = exports.SettingsReasonStatus = exports.CancellationReasonTypeEnum = exports.SupportReasonTypeEnum = exports.PlusSettingsPackageType = exports.AddRemoveCreditSettlementType = exports.SettlementType = exports.MediaType = exports.WorkingHourSettingsType = exports.ZoneGeometryType = exports.RiderAssignmentStatus = exports.CourierServiceType = exports.DeliveryStatus = exports.CourierOrderPaymentFrom = exports.CourierOrderStatus = exports.RegularOrderStatus = exports.OrderType = exports.Language = exports.RiderBagSize = exports.RiderType = exports.ShiftType = exports.CreatedBy = exports.LiveStatus = exports.AreebaCardStatus = exports.CardUserType = exports.CardType = void 0;
|
|
5
5
|
var AccountType;
|
|
6
6
|
(function (AccountType) {
|
|
7
7
|
AccountType["USER"] = "user";
|
|
@@ -697,6 +697,12 @@ var SocketEventType;
|
|
|
697
697
|
SocketEventType["MESSAGE_RECEIVED"] = "message.received";
|
|
698
698
|
SocketEventType["TICKET_NOTIFICATION"] = "ticket.notification";
|
|
699
699
|
})(SocketEventType || (exports.SocketEventType = SocketEventType = {}));
|
|
700
|
+
var ServiceCartStatus;
|
|
701
|
+
(function (ServiceCartStatus) {
|
|
702
|
+
ServiceCartStatus["ACTIVE"] = "active";
|
|
703
|
+
ServiceCartStatus["LOCKED"] = "locked";
|
|
704
|
+
ServiceCartStatus["SUBMITTED"] = "submitted";
|
|
705
|
+
})(ServiceCartStatus || (exports.ServiceCartStatus = ServiceCartStatus = {}));
|
|
700
706
|
var Service;
|
|
701
707
|
(function (Service) {
|
|
702
708
|
Service["CLEANING"] = "cleaning";
|
|
@@ -704,12 +710,12 @@ var Service;
|
|
|
704
710
|
Service["PEST_CONTROL"] = "pest_control";
|
|
705
711
|
Service["SALON"] = "salon";
|
|
706
712
|
})(Service || (exports.Service = Service = {}));
|
|
707
|
-
var
|
|
708
|
-
(function (
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
})(
|
|
713
|
+
var ProfessionalStatus;
|
|
714
|
+
(function (ProfessionalStatus) {
|
|
715
|
+
ProfessionalStatus["AVAILABLE"] = "available";
|
|
716
|
+
ProfessionalStatus["BUSY"] = "busy";
|
|
717
|
+
ProfessionalStatus["FULLY_BOOKED"] = "fully_booked";
|
|
718
|
+
})(ProfessionalStatus || (exports.ProfessionalStatus = ProfessionalStatus = {}));
|
|
713
719
|
var ServiceOrderStatus;
|
|
714
720
|
(function (ServiceOrderStatus) {
|
|
715
721
|
ServiceOrderStatus["PENDING"] = "pending";
|
|
@@ -725,10 +731,10 @@ var ServiceOrderPriority;
|
|
|
725
731
|
ServiceOrderPriority["URGENT"] = "urgent";
|
|
726
732
|
ServiceOrderPriority["FLAGGED"] = "flagged";
|
|
727
733
|
})(ServiceOrderPriority || (exports.ServiceOrderPriority = ServiceOrderPriority = {}));
|
|
728
|
-
var
|
|
729
|
-
(function (
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
})(
|
|
734
|
+
var ProfessionalRecurrencePattern;
|
|
735
|
+
(function (ProfessionalRecurrencePattern) {
|
|
736
|
+
ProfessionalRecurrencePattern["DAILY"] = "daily";
|
|
737
|
+
ProfessionalRecurrencePattern["WEEKLY"] = "weekly";
|
|
738
|
+
ProfessionalRecurrencePattern["MONTHLY"] = "monthly";
|
|
739
|
+
})(ProfessionalRecurrencePattern || (exports.ProfessionalRecurrencePattern = ProfessionalRecurrencePattern = {}));
|
|
734
740
|
//# sourceMappingURL=enum.js.map
|