@lyxa.ai/core 1.0.25 → 1.0.27
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/dispatcher/index.d.ts +1 -1
- package/dist/libraries/dispatcher/index.js +5 -3
- package/dist/libraries/dispatcher/index.js.map +1 -1
- package/dist/libraries/mongo/models/core-user.model.d.ts +0 -1
- package/dist/libraries/mongo/models/core-user.model.js +0 -5
- package/dist/libraries/mongo/models/core-user.model.js.map +1 -1
- package/dist/libraries/mongo/models/embedded/otp-fields.model.d.ts +2 -0
- package/dist/libraries/mongo/models/embedded/otp-fields.model.js +10 -0
- package/dist/libraries/mongo/models/embedded/otp-fields.model.js.map +1 -1
- package/dist/libraries/mongo/models/gallery.model.d.ts +9 -0
- package/dist/libraries/mongo/models/gallery.model.js +47 -0
- package/dist/libraries/mongo/models/gallery.model.js.map +1 -0
- package/dist/libraries/mongo/models/index.d.ts +12 -0
- package/dist/libraries/mongo/models/index.js +13 -1
- package/dist/libraries/mongo/models/index.js.map +1 -1
- package/dist/libraries/mongo/models/product.model.js +1 -1
- package/dist/libraries/mongo/models/product.model.js.map +1 -1
- package/dist/libraries/mongo/models/providers/core-email-auth-identity.model.d.ts +1 -1
- package/dist/libraries/mongo/models/providers/core-email-auth-identity.model.js +29 -5
- package/dist/libraries/mongo/models/providers/core-email-auth-identity.model.js.map +1 -1
- package/dist/libraries/secrets/index.js.map +1 -1
- package/dist/libraries/trpc/index.js +1 -0
- package/dist/libraries/trpc/index.js.map +1 -1
- package/dist/utilities/enum.d.ts +3 -0
- package/dist/utilities/enum.js +5 -1
- package/dist/utilities/enum.js.map +1 -1
- package/dist/utilities/validation/common-validation.d.ts +54 -0
- package/dist/utilities/validation/common-validation.js +5 -1
- package/dist/utilities/validation/common-validation.js.map +1 -1
- package/package.json +1 -1
|
@@ -3,5 +3,5 @@ import { SecretManagerService } from '../secrets';
|
|
|
3
3
|
export declare class MicroServiceDispatcher {
|
|
4
4
|
private _secretService;
|
|
5
5
|
constructor(secretService: SecretManagerService);
|
|
6
|
-
getMicroService<T extends AnyRouter>(serviceName: string): Promise<import("@trpc/client").CreateTRPCProxyClient<T>>;
|
|
6
|
+
getMicroService<T extends AnyRouter>(serviceName: string, customURL?: string): Promise<import("@trpc/client").CreateTRPCProxyClient<T>>;
|
|
7
7
|
}
|
|
@@ -18,10 +18,12 @@ let MicroServiceDispatcher = class MicroServiceDispatcher {
|
|
|
18
18
|
constructor(secretService) {
|
|
19
19
|
this._secretService = secretService;
|
|
20
20
|
}
|
|
21
|
-
async getMicroService(serviceName) {
|
|
22
|
-
const deploymentURL =
|
|
21
|
+
async getMicroService(serviceName, customURL) {
|
|
22
|
+
const deploymentURL = customURL ??
|
|
23
|
+
(await this._secretService.getKey('DEPLOYMENTS_MICROSERVICE_' + serviceName.toUpperCase() + '_ENDPOINT'));
|
|
24
|
+
console.log(deploymentURL, 'deploymentURL--');
|
|
23
25
|
if (!deploymentURL) {
|
|
24
|
-
throw new Error('The
|
|
26
|
+
throw new Error('The requested service does not have a configured secret URL');
|
|
25
27
|
}
|
|
26
28
|
return (0, client_1.createTRPCProxyClient)({
|
|
27
29
|
links: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"/","sources":["libraries/dispatcher/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mCAAiC;AACjC,yCAAoE;AAEpE,wCAAkD;AAG3C,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IAC1B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"/","sources":["libraries/dispatcher/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mCAAiC;AACjC,yCAAoE;AAEpE,wCAAkD;AAG3C,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IAC1B,cAAc,CAAuB;IAE7C,YAAY,aAAmC;QAC9C,IAAI,CAAC,cAAc,GAAG,aAAa,CAAC;IACrC,CAAC;IAEM,KAAK,CAAC,eAAe,CAAsB,WAAmB,EAAE,SAAkB;QACxF,MAAM,aAAa,GAClB,SAAS;YACT,CAAC,MAAM,IAAI,CAAC,cAAc,CAAC,MAAM,CAChC,2BAA2B,GAAG,WAAW,CAAC,WAAW,EAAE,GAAG,WAAW,CACrE,CAAC,CAAC;QAEJ,OAAO,CAAC,GAAG,CAAC,aAAa,EAAE,iBAAiB,CAAC,CAAC;QAE9C,IAAI,CAAC,aAAa,EAAE,CAAC;YACpB,MAAM,IAAI,KAAK,CAAC,6DAA6D,CAAC,CAAC;QAChF,CAAC;QAGD,OAAO,IAAA,8BAAqB,EAAI;YAC/B,KAAK,EAAE;gBACN,IAAA,sBAAa,EAAC;oBACb,GAAG,EAAE,aAAa;iBAClB,CAAC;aACF;SACD,CAAC,CAAC;IACJ,CAAC;CACD,CAAA;AA7BY,wDAAsB;iCAAtB,sBAAsB;IADlC,IAAA,gBAAO,GAAE;qCAIkB,8BAAoB;GAHnC,sBAAsB,CA6BlC","sourcesContent":["import { Service } from 'typedi';\r\nimport { createTRPCProxyClient, httpBatchLink } from '@trpc/client';\r\nimport { AnyRouter } from '@trpc/server';\r\nimport { SecretManagerService } from '../secrets';\r\n\r\n@Service()\r\nexport class MicroServiceDispatcher {\r\n\tprivate _secretService: SecretManagerService;\r\n\r\n\tconstructor(secretService: SecretManagerService) {\r\n\t\tthis._secretService = secretService;\r\n\t}\r\n\r\n\tpublic async getMicroService<T extends AnyRouter>(serviceName: string, customURL?: string) {\r\n\t\tconst deploymentURL =\r\n\t\t\tcustomURL ??\r\n\t\t\t(await this._secretService.getKey(\r\n\t\t\t\t'DEPLOYMENTS_MICROSERVICE_' + serviceName.toUpperCase() + '_ENDPOINT'\r\n\t\t\t));\r\n\r\n\t\tconsole.log(deploymentURL, 'deploymentURL--');\r\n\r\n\t\tif (!deploymentURL) {\r\n\t\t\tthrow new Error('The requested service does not have a configured secret URL');\r\n\t\t}\r\n\r\n\t\t// @ts-ignore\r\n\t\treturn createTRPCProxyClient<T>({\r\n\t\t\tlinks: [\r\n\t\t\t\thttpBatchLink({\r\n\t\t\t\t\turl: deploymentURL,\r\n\t\t\t\t}),\r\n\t\t\t],\r\n\t\t});\r\n\t}\r\n}\r\n"]}
|
|
@@ -23,7 +23,6 @@ let CoreUser = class CoreUser extends defaultClasses_1.TimeStamps {
|
|
|
23
23
|
profilePhoto;
|
|
24
24
|
status;
|
|
25
25
|
deviceIds;
|
|
26
|
-
referral;
|
|
27
26
|
};
|
|
28
27
|
exports.CoreUser = CoreUser;
|
|
29
28
|
__decorate([
|
|
@@ -62,10 +61,6 @@ __decorate([
|
|
|
62
61
|
(0, typegoose_1.prop)({ required: true, type: () => [String] }),
|
|
63
62
|
__metadata("design:type", Array)
|
|
64
63
|
], CoreUser.prototype, "deviceIds", void 0);
|
|
65
|
-
__decorate([
|
|
66
|
-
(0, typegoose_1.prop)({ required: true, type: String }),
|
|
67
|
-
__metadata("design:type", String)
|
|
68
|
-
], CoreUser.prototype, "referral", void 0);
|
|
69
64
|
exports.CoreUser = CoreUser = __decorate([
|
|
70
65
|
(0, typegoose_1.modelOptions)({ schemaOptions: { collection: 'coreUsers' } })
|
|
71
66
|
], CoreUser);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core-user.model.js","sourceRoot":"/","sources":["libraries/mongo/models/core-user.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA0D;AAC1D,4EAAqE;AACrE,kDAAiD;AAG1C,IAAM,QAAQ,GAAd,MAAM,QAAS,SAAQ,2BAAU;IAEhC,IAAI,CAAU;IAGd,KAAK,CAAU;IAGf,MAAM,CAAU;IAGhB,GAAG,CAAQ;IAGX,WAAW,CAAU;IAGrB,SAAS,CAAY;IAGrB,YAAY,CAAU;IAGtB,MAAM,CAAU;IAGhB,SAAS,CAAY;
|
|
1
|
+
{"version":3,"file":"core-user.model.js","sourceRoot":"/","sources":["libraries/mongo/models/core-user.model.ts"],"names":[],"mappings":";;;;;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,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;;2CACnB;mBA1BhB,QAAQ;IADpB,IAAA,wBAAY,EAAC,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,WAAW,EAAE,EAAE,CAAC;GAChD,QAAQ,CA2BpB","sourcesContent":["import { modelOptions, prop } from '@typegoose/typegoose';\r\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\r\nimport { Status } from '../../../utilities/enum';\r\n\r\n@modelOptions({ schemaOptions: { collection: 'coreUsers' } })\r\nexport class CoreUser extends TimeStamps {\r\n\t@prop({ required: true, type: String })\r\n\tpublic name!: string;\r\n\r\n\t@prop({ required: true, type: String })\r\n\tpublic email!: string;\r\n\r\n\t@prop({ required: true, type: String })\r\n\tpublic gender!: string;\r\n\r\n\t@prop({ required: true, type: Date })\r\n\tpublic dob!: Date;\r\n\r\n\t@prop({ required: true, type: String })\r\n\tpublic countryISO2!: string;\r\n\r\n\t@prop({ type: () => [String], default: [] })\r\n\tpublic fcmTokens?: string[];\r\n\r\n\t@prop({ required: true, type: String })\r\n\tpublic profilePhoto!: string;\r\n\r\n\t@prop({ type: String, enum: Status, default: Status.ACTIVE })\r\n\tpublic status?: Status;\r\n\r\n\t@prop({ required: true, type: () => [String] })\r\n\tpublic deviceIds!: string[];\r\n}\r\n"]}
|
|
@@ -12,11 +12,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.OTPFields = void 0;
|
|
13
13
|
const typegoose_1 = require("@typegoose/typegoose");
|
|
14
14
|
class OTPFields {
|
|
15
|
+
type;
|
|
15
16
|
otp;
|
|
16
17
|
otpExpirationDate;
|
|
17
18
|
lastSentOtpDate;
|
|
19
|
+
isVerified;
|
|
18
20
|
}
|
|
19
21
|
exports.OTPFields = OTPFields;
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, typegoose_1.prop)({ required: true, type: String, enum: ['email_verification', 'reset_password'] }),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], OTPFields.prototype, "type", void 0);
|
|
20
26
|
__decorate([
|
|
21
27
|
(0, typegoose_1.prop)({ required: false, type: String }),
|
|
22
28
|
__metadata("design:type", String)
|
|
@@ -29,4 +35,8 @@ __decorate([
|
|
|
29
35
|
(0, typegoose_1.prop)({ required: false, type: Date }),
|
|
30
36
|
__metadata("design:type", Date)
|
|
31
37
|
], OTPFields.prototype, "lastSentOtpDate", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, typegoose_1.prop)({ required: false, type: Boolean, default: false }),
|
|
40
|
+
__metadata("design:type", Boolean)
|
|
41
|
+
], OTPFields.prototype, "isVerified", void 0);
|
|
32
42
|
//# sourceMappingURL=otp-fields.model.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"otp-fields.model.js","sourceRoot":"/","sources":["libraries/mongo/models/embedded/otp-fields.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA4C;AAE5C,MAAa,SAAS;IAEd,GAAG,CAAU;IAGb,iBAAiB,CAAQ;IAGzB,eAAe,CAAQ;
|
|
1
|
+
{"version":3,"file":"otp-fields.model.js","sourceRoot":"/","sources":["libraries/mongo/models/embedded/otp-fields.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA4C;AAE5C,MAAa,SAAS;IAEd,IAAI,CAA2C;IAG/C,GAAG,CAAU;IAGb,iBAAiB,CAAQ;IAGzB,eAAe,CAAQ;IAGvB,UAAU,CAAW;CAC5B;AAfD,8BAeC;AAbO;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,oBAAoB,EAAE,gBAAgB,CAAC,EAAE,CAAC;;uCACjC;AAG/C;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;sCACpB;AAGb;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;8BACX,IAAI;oDAAC;AAGzB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;8BACb,IAAI;kDAAC;AAGvB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;6CAC7B","sourcesContent":["import { prop } from '@typegoose/typegoose';\r\n\r\nexport class OTPFields {\r\n\t@prop({ required: true, type: String, enum: ['email_verification', 'reset_password'] })\r\n\tpublic type!: 'email_verification' | 'reset_password';\r\n\r\n\t@prop({ required: false, type: String })\r\n\tpublic otp?: string;\r\n\r\n\t@prop({ required: false, type: Date })\r\n\tpublic otpExpirationDate?: Date;\r\n\r\n\t@prop({ required: false, type: Date })\r\n\tpublic lastSentOtpDate?: Date;\r\n\r\n\t@prop({ required: false, type: Boolean, default: false })\r\n\tpublic isVerified?: boolean;\r\n}\r\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';
|
|
2
|
+
import { MediaType } from '../../../utilities/enum';
|
|
3
|
+
export declare class Gallery extends TimeStamps {
|
|
4
|
+
title: string;
|
|
5
|
+
mediaType?: MediaType;
|
|
6
|
+
mediaUrl: string;
|
|
7
|
+
tags?: string[];
|
|
8
|
+
brands?: string[];
|
|
9
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
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.Gallery = void 0;
|
|
13
|
+
const typegoose_1 = require("@typegoose/typegoose");
|
|
14
|
+
const defaultClasses_1 = require("@typegoose/typegoose/lib/defaultClasses");
|
|
15
|
+
const enum_1 = require("../../../utilities/enum");
|
|
16
|
+
let Gallery = class Gallery extends defaultClasses_1.TimeStamps {
|
|
17
|
+
title;
|
|
18
|
+
mediaType;
|
|
19
|
+
mediaUrl;
|
|
20
|
+
tags;
|
|
21
|
+
brands;
|
|
22
|
+
};
|
|
23
|
+
exports.Gallery = Gallery;
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, typegoose_1.prop)({ required: true, unique: true, type: String, maxlength: 50 }),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], Gallery.prototype, "title", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, typegoose_1.prop)({ type: String, enum: enum_1.MediaType, default: enum_1.MediaType.IMAGE }),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], Gallery.prototype, "mediaType", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, typegoose_1.prop)({ required: true, type: String }),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], Gallery.prototype, "mediaUrl", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, typegoose_1.prop)({ type: [String], default: [] }),
|
|
38
|
+
__metadata("design:type", Array)
|
|
39
|
+
], Gallery.prototype, "tags", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, typegoose_1.prop)({ type: [String], default: [] }),
|
|
42
|
+
__metadata("design:type", Array)
|
|
43
|
+
], Gallery.prototype, "brands", void 0);
|
|
44
|
+
exports.Gallery = Gallery = __decorate([
|
|
45
|
+
(0, typegoose_1.modelOptions)({ schemaOptions: { collection: 'galleries' } })
|
|
46
|
+
], Gallery);
|
|
47
|
+
//# sourceMappingURL=gallery.model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gallery.model.js","sourceRoot":"/","sources":["libraries/mongo/models/gallery.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA0D;AAC1D,4EAAqE;AACrE,kDAAoD;AAG7C,IAAM,OAAO,GAAb,MAAM,OAAQ,SAAQ,2BAAU;IAE/B,KAAK,CAAU;IAGf,SAAS,CAAa;IAGtB,QAAQ,CAAU;IAGlB,IAAI,CAAY;IAGhB,MAAM,CAAY;CACzB,CAAA;AAfY,0BAAO;AAEZ;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC;;sCAC9C;AAGf;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,gBAAS,EAAE,OAAO,EAAE,gBAAS,CAAC,KAAK,EAAE,CAAC;;0CACrC;AAGtB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;yCACd;AAGlB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;qCACf;AAGhB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;uCACb;kBAdb,OAAO;IADnB,IAAA,wBAAY,EAAC,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,WAAW,EAAE,EAAE,CAAC;GAChD,OAAO,CAenB","sourcesContent":["import { modelOptions, prop } from '@typegoose/typegoose';\r\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\r\nimport { MediaType } from '../../../utilities/enum';\r\n\r\n@modelOptions({ schemaOptions: { collection: 'galleries' } })\r\nexport class Gallery extends TimeStamps {\r\n\t@prop({ required: true, unique: true, type: String, maxlength: 50 })\r\n\tpublic title!: string;\r\n\r\n\t@prop({ type: String, enum: MediaType, default: MediaType.IMAGE })\r\n\tpublic mediaType?: MediaType;\r\n\r\n\t@prop({ required: true, type: String })\r\n\tpublic mediaUrl!: string;\r\n\r\n\t@prop({ type: [String], default: [] })\r\n\tpublic tags?: string[];\r\n\r\n\t@prop({ type: [String], default: [] })\r\n\tpublic brands?: string[];\r\n}\r\n"]}
|
|
@@ -69,6 +69,10 @@ import { User } from './user.model';
|
|
|
69
69
|
import { Cart } from './cart.model';
|
|
70
70
|
import { LineItem } from './line-item.model';
|
|
71
71
|
import { CartParticipant } from './cart-participant.model';
|
|
72
|
+
import { Gallery } from './gallery.model';
|
|
73
|
+
import { Order } from './order.model';
|
|
74
|
+
import { RegularOrder } from './providers/regular-order.model';
|
|
75
|
+
import { CourierOrder } from './providers/courier-order.model';
|
|
72
76
|
export declare const ActivityLogModel: ReturnModelType<typeof ActivityLog>;
|
|
73
77
|
export * from './activity-log.model';
|
|
74
78
|
export declare const AdminAccessControlModel: ReturnModelType<typeof AdminAccessControl>;
|
|
@@ -209,3 +213,11 @@ export declare const LineItemModel: ReturnModelType<typeof LineItem>;
|
|
|
209
213
|
export * from './line-item.model';
|
|
210
214
|
export declare const CartParticipantModel: ReturnModelType<typeof CartParticipant>;
|
|
211
215
|
export * from './cart-participant.model';
|
|
216
|
+
export declare const OrderModel: ReturnModelType<typeof Order>;
|
|
217
|
+
export declare const RegularOrderModel: ReturnModelType<typeof RegularOrder>;
|
|
218
|
+
export declare const CourierOrderModel: ReturnModelType<typeof CourierOrder>;
|
|
219
|
+
export * from './order.model';
|
|
220
|
+
export * from './providers/regular-order.model';
|
|
221
|
+
export * from './providers/courier-order.model';
|
|
222
|
+
export declare const GalleryModel: ReturnModelType<typeof Gallery>;
|
|
223
|
+
export * from './gallery.model';
|
|
@@ -15,7 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.ReferralSettingModel = exports.RatingSettingModel = exports.PunchMarketingHistoryModel = exports.ProductModel = exports.ProductMarketingModel = exports.ParentModel = exports.NutritionModel = exports.NotificationModel = exports.MealPlanModel = exports.PunchMarketingModel = exports.LoyaltyPointMarketingModel = exports.FreeDeliveryMarketingModel = exports.FeaturedMarketingModel = exports.DiscountMarketingModel = exports.Buy1Get1MarketingModel = exports.MarketingModel = exports.LoyaltyPointSettingModel = exports.LoyaltyPointCategoryModel = exports.ListContainerModel = exports.FilterContainerModel = exports.FeaturedSettingModel = exports.FavouriteModel = exports.FaqModel = exports.DishModel = exports.DealSettingModel = exports.ReferralRewardCouponModel = exports.ReferralCodeCouponModel = exports.IndividualUserCouponModel = exports.IndividualStoreCouponModel = exports.GlobalCouponModel = exports.CustomCouponModel = exports.CouponModel = exports.CounterModel = exports.CoreUserModel = exports.CoreAppleAuthIdentityModel = exports.CoreGoogleAuthIdentityModel = exports.CorePhoneAuthIdentityModel = exports.CoreEmailAuthIdentityModel = exports.CoreAuthIdentityModel = exports.CategoryModel = exports.AreebaCardModel = exports.CardModel = exports.BrandModel = exports.BOBFinanceModel = exports.BannerModel = exports.AttributeModel = exports.AppScreenSettingModel = exports.AdminModel = exports.AdminAccessControlModel = exports.ActivityLogModel = void 0;
|
|
18
|
-
exports.CartParticipantModel = exports.LineItemModel = exports.CartModel = exports.ZoneModel = exports.UserModel = exports.TagModel = exports.SubscriptionModel = exports.SubscriptionSettingModel = exports.ShopModel = exports.ShopReviewModel = exports.ShopMealPlanModel = exports.ShopCategoryModel = exports.ShopAccessControlModel = exports.SettingModel = exports.RoleModel = exports.RiderModel = exports.RiderTrackingModel = exports.RiderTimeoutModel = exports.RiderReviewModel = exports.RequestAreaModel = void 0;
|
|
18
|
+
exports.GalleryModel = exports.CourierOrderModel = exports.RegularOrderModel = exports.OrderModel = exports.CartParticipantModel = exports.LineItemModel = exports.CartModel = exports.ZoneModel = exports.UserModel = exports.TagModel = exports.SubscriptionModel = exports.SubscriptionSettingModel = exports.ShopModel = exports.ShopReviewModel = exports.ShopMealPlanModel = exports.ShopCategoryModel = exports.ShopAccessControlModel = exports.SettingModel = exports.RoleModel = exports.RiderModel = exports.RiderTrackingModel = exports.RiderTimeoutModel = exports.RiderReviewModel = exports.RequestAreaModel = void 0;
|
|
19
19
|
const typegoose_1 = require("@typegoose/typegoose");
|
|
20
20
|
const admin_model_1 = require("./admin.model");
|
|
21
21
|
const admin_access_control_model_1 = require("./admin-access-control.model");
|
|
@@ -89,6 +89,10 @@ const user_model_1 = require("./user.model");
|
|
|
89
89
|
const cart_model_1 = require("./cart.model");
|
|
90
90
|
const line_item_model_1 = require("./line-item.model");
|
|
91
91
|
const cart_participant_model_1 = require("./cart-participant.model");
|
|
92
|
+
const gallery_model_1 = require("./gallery.model");
|
|
93
|
+
const order_model_1 = require("./order.model");
|
|
94
|
+
const regular_order_model_1 = require("./providers/regular-order.model");
|
|
95
|
+
const courier_order_model_1 = require("./providers/courier-order.model");
|
|
92
96
|
exports.ActivityLogModel = (0, typegoose_1.getModelForClass)(activity_log_model_1.ActivityLog);
|
|
93
97
|
__exportStar(require("./activity-log.model"), exports);
|
|
94
98
|
exports.AdminAccessControlModel = (0, typegoose_1.getModelForClass)(admin_access_control_model_1.AdminAccessControl);
|
|
@@ -229,4 +233,12 @@ exports.LineItemModel = (0, typegoose_1.getModelForClass)(line_item_model_1.Line
|
|
|
229
233
|
__exportStar(require("./line-item.model"), exports);
|
|
230
234
|
exports.CartParticipantModel = (0, typegoose_1.getModelForClass)(cart_participant_model_1.CartParticipant);
|
|
231
235
|
__exportStar(require("./cart-participant.model"), exports);
|
|
236
|
+
exports.OrderModel = (0, typegoose_1.getModelForClass)(order_model_1.Order);
|
|
237
|
+
exports.RegularOrderModel = (0, typegoose_1.getDiscriminatorModelForClass)(exports.OrderModel, regular_order_model_1.RegularOrder, enum_1.OrderType.REGULAR);
|
|
238
|
+
exports.CourierOrderModel = (0, typegoose_1.getDiscriminatorModelForClass)(exports.OrderModel, courier_order_model_1.CourierOrder, enum_1.OrderType.COURIER);
|
|
239
|
+
__exportStar(require("./order.model"), exports);
|
|
240
|
+
__exportStar(require("./providers/regular-order.model"), exports);
|
|
241
|
+
__exportStar(require("./providers/courier-order.model"), exports);
|
|
242
|
+
exports.GalleryModel = (0, typegoose_1.getModelForClass)(gallery_model_1.Gallery);
|
|
243
|
+
__exportStar(require("./gallery.model"), exports);
|
|
232
244
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"/","sources":["libraries/mongo/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,oDAAwG;AACxG,+CAAsC;AACtC,6EAAkE;AAClE,6DAAmD;AACnD,yEAA8D;AAC9D,uDAA8C;AAC9C,iDAAwC;AACxC,2DAAiD;AACjD,+CAAsC;AACtC,qDAA4C;AAC5C,mDAA0C;AAC1C,iDAAwC;AACxC,6DAAmD;AACnD,6CAAoC;AACpC,2CAAkC;AAClC,uDAA8C;AAC9C,qEAA2D;AAC3D,qEAA2D;AAC3D,iEAAuD;AACvD,iFAAsE;AACtE,+EAAoE;AACpE,uDAA8C;AAC9C,uDAA6C;AAC7C,uDAA8C;AAC9C,iDAAwC;AACxC,uEAA6D;AAC7D,mDAA0C;AAC1C,mFAAwE;AACxE,iEAAuD;AACvD,qEAA2D;AAC3D,6DAAmD;AACnD,6DAAmD;AACnD,6CAAoC;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DAAuC;AAE1B,QAAA,eAAe,GAAuC,IAAA,4BAAgB,EAAC,8BAAU,CAAC,CAAC;AAChG,sDAAoC;AAEvB,QAAA,SAAS,GAAiC,IAAA,4BAAgB,EAAC,iBAAI,CAAC,CAAC;AAC9E,+CAA6B;AAEhB,QAAA,wBAAwB,GACpC,IAAA,4BAAgB,EAAC,gDAAmB,CAAC,CAAC;AACvC,+DAA6C;AAEhC,QAAA,iBAAiB,GAAyC,IAAA,4BAAgB,EAAC,iCAAY,CAAC,CAAC;AACtG,uDAAqC;AAExB,QAAA,QAAQ,GAAgC,IAAA,4BAAgB,EAAC,eAAG,CAAC,CAAC;AAC3E,8CAA4B;AAEf,QAAA,SAAS,GAAiC,IAAA,4BAAgB,EAAC,iBAAI,CAAC,CAAC;AAC9E,+CAA6B;AAEhB,QAAA,SAAS,GAAiC,IAAA,4BAAgB,EAAC,iBAAI,CAAC,CAAC;AAC9E,+CAA6B;AAEhB,QAAA,SAAS,GAAiC,IAAA,4BAAgB,EAAC,iBAAI,CAAC,CAAC;AAC9E,+CAA6B;AAEhB,QAAA,aAAa,GAAqC,IAAA,4BAAgB,EAAC,0BAAQ,CAAC,CAAC;AAC1F,oDAAkC;AAErB,QAAA,oBAAoB,GAChC,IAAA,4BAAgB,EAAC,wCAAe,CAAC,CAAC;AACnC,2DAAyC","sourcesContent":["import { getDiscriminatorModelForClass, getModelForClass, ReturnModelType } from '@typegoose/typegoose';\r\nimport { Admin } from './admin.model';\r\nimport { AdminAccessControl } from './admin-access-control.model';\r\nimport { ActivityLog } from './activity-log.model';\r\nimport { AppScreenSetting } from './app-screen-setting.model';\r\nimport { Attribute } from './attribute.model';\r\nimport { Banner } from './banner.model';\r\nimport { BOBFinance } from './bob-finance.model';\r\nimport { Brand } from './brand.model';\r\nimport { Category } from './category.model';\r\nimport { Counter } from './counter.model';\r\nimport { Coupon } from './coupon.model';\r\nimport { DealSetting } from './deal-setting.model';\r\nimport { Dish } from './dish.model';\r\nimport { Faq } from './faq.model';\r\nimport { Favourite } from './favourite.model';\r\nimport { FeaturedSetting } from './featured-setting.model';\r\nimport { FilterContainer } from './filter-container.model';\r\nimport { ListContainer } from './list-container.model';\r\nimport { LoyaltyPointCategory } from './loyalty-point-category.model';\r\nimport { LoyaltyPointSetting } from './loyalty-point-setting.model';\r\nimport { Marketing } from './marketing.model';\r\nimport { MealPlan } from './meal-plan.model';\r\nimport { Nutrition } from './nutrition.model';\r\nimport { Parent } from './parent.model';\r\nimport { ProductMarketing } from './product-marketing.model';\r\nimport { Product } from './product.model';\r\nimport { PunchMarketingHistory } from './punch-marketing-history.model';\r\nimport { RatingSetting } from './rating-setting.model';\r\nimport { ReferralSetting } from './referral-setting.model';\r\nimport { RequestArea } from './request-area.model';\r\nimport { RiderReview } from './rider-review.model';\r\nimport { Role } from './role.model';\r\nimport { createGlobalDiscriminatorModel, createGlobalModel } from '../../mongo';\r\nimport { Setting } from './setting.model';\r\nimport { ShopAccessControl } from './shop-access-control.model';\r\nimport { ShopCategory } from './shop-category.model';\r\nimport { ShopMealPlan } from './shop-meal-plan.model';\r\nimport { ShopReview } from './shop-review.model';\r\nimport { Shop } from './shop.model';\r\nimport { SubscriptionSetting } from './subscription-setting.model';\r\nimport { Subscription } from './subscription.model';\r\nimport { Tag } from './tag.model';\r\nimport { Zone } from './zone.model';\r\nimport { Buy1Get1Marketing } from './providers/buy1-get1-marketing.model';\r\nimport { CardType, CoreAuthIdentityType, CouponType, MarketingType } from '../../../utilities/enum';\r\nimport { CustomCoupon } from './providers/custom-coupon.model';\r\nimport { DiscountMarketing } from './providers/discount-marketing.model';\r\nimport { FeaturedMarketing } from './providers/featured-marketing.model';\r\nimport { FreeDeliveryMarketing } from './providers/free-delivery-marketing.model';\r\nimport { GlobalCoupon } from './providers/global-coupon.model';\r\nimport { IndividualStoreCoupon } from './providers/individual-store-coupon.model';\r\nimport { IndividualUserCoupon } from './providers/individual-user-coupon.model';\r\nimport { LoyaltyPointMarketing } from './providers/loyalty-point-marketing.model';\r\nimport { PunchMarketing } from './providers/punch-marketing.model';\r\nimport { ReferralCodeCoupon } from './providers/referral-code-coupon.model';\r\nimport { ReferralRewardCoupon } from './providers/referral-reward-coupon.model';\r\nimport { Notification } from './notification.model';\r\nimport { CoreAuthIdentity } from './core-auth-identity.model';\r\nimport { CoreEmailAuthIdentity } from './providers/core-email-auth-identity.model';\r\nimport { CorePhoneAuthIdentity } from './providers/core-phone-auth-identity.model';\r\nimport { CoreGoogleAuthIdentity } from './providers/core-google-auth-identity.model';\r\nimport { CoreAppleAuthIdentity } from './providers/core-apple-auth-identity.model';\r\nimport { CoreUser } from './core-user.model';\r\nimport { Card } from './card.model';\r\nimport { AreebaCard } from './providers/areeba-card.model';\r\nimport { RiderTracking } from './rider-tracking.model';\r\nimport { Rider } from './rider.model';\r\nimport { RiderTimeout } from './rider-timeout.model';\r\nimport { User } from './user.model';\r\nimport { Cart } from './cart.model';\r\nimport { LineItem } from './line-item.model';\r\nimport { CartParticipant } from './cart-participant.model';\r\n\r\nexport const ActivityLogModel: ReturnModelType<typeof ActivityLog> = getModelForClass(ActivityLog);\r\nexport * from './activity-log.model';\r\n\r\nexport const AdminAccessControlModel: ReturnModelType<typeof AdminAccessControl> =\r\n\tgetModelForClass(AdminAccessControl);\r\nexport * from './admin-access-control.model';\r\n\r\nexport const AdminModel: ReturnModelType<typeof Admin> = getModelForClass(Admin);\r\nexport * from './admin.model';\r\n\r\nexport const AppScreenSettingModel: ReturnModelType<typeof AppScreenSetting> =\r\n\tgetModelForClass(AppScreenSetting);\r\nexport * from './app-screen-setting.model';\r\n\r\nexport const AttributeModel: ReturnModelType<typeof Attribute> = getModelForClass(Attribute);\r\nexport * from './attribute.model';\r\n\r\nexport const BannerModel: ReturnModelType<typeof Banner> = getModelForClass(Banner);\r\nexport * from './banner.model';\r\n\r\nexport const BOBFinanceModel: ReturnModelType<typeof BOBFinance> = getModelForClass(BOBFinance);\r\nexport * from './bob-finance.model';\r\n\r\nexport const BrandModel: ReturnModelType<typeof Brand> = getModelForClass(Brand);\r\nexport * from './brand.model';\r\n\r\nexport const CardModel: ReturnModelType<typeof Card> = createGlobalModel(Card);\r\nexport const AreebaCardModel: ReturnModelType<typeof AreebaCard> = createGlobalDiscriminatorModel(\r\n\tCardModel,\r\n\tAreebaCard,\r\n\tCardType.AREEBA\r\n);\r\nexport * from './card.model';\r\nexport * from './providers/areeba-card.model';\r\n\r\nexport const CategoryModel: ReturnModelType<typeof Category> = getModelForClass(Category);\r\nexport * from './category.model';\r\n\r\nexport const CoreAuthIdentityModel: ReturnModelType<typeof CoreAuthIdentity> =\r\ncreateGlobalModel(CoreAuthIdentity);\r\nexport const CoreEmailAuthIdentityModel: ReturnModelType<typeof CoreEmailAuthIdentity> =\r\ncreateGlobalDiscriminatorModel(CoreAuthIdentityModel, CoreEmailAuthIdentity, CoreAuthIdentityType.EMAIL);\r\nexport const CorePhoneAuthIdentityModel: ReturnModelType<typeof CorePhoneAuthIdentity> =\r\ncreateGlobalDiscriminatorModel(CoreAuthIdentityModel, CorePhoneAuthIdentity, CoreAuthIdentityType.PHONE);\r\nexport const CoreGoogleAuthIdentityModel: ReturnModelType<typeof CoreGoogleAuthIdentity> =\r\ncreateGlobalDiscriminatorModel(CoreAuthIdentityModel, CoreGoogleAuthIdentity, CoreAuthIdentityType.GOOGLE);\r\nexport const CoreAppleAuthIdentityModel: ReturnModelType<typeof CoreAppleAuthIdentity> =\r\ncreateGlobalDiscriminatorModel(CoreAuthIdentityModel, CoreAppleAuthIdentity, CoreAuthIdentityType.APPLE);\r\nexport * from './core-auth-identity.model';\r\nexport * from './providers/core-apple-auth-identity.model';\r\nexport * from './providers/core-email-auth-identity.model';\r\nexport * from './providers/core-google-auth-identity.model';\r\nexport * from './providers/core-phone-auth-identity.model';\r\n\r\nexport const CoreUserModel: ReturnModelType<typeof CoreUser> = createGlobalModel(CoreUser);\r\nexport * from './core-user.model';\r\n\r\nexport const CounterModel: ReturnModelType<typeof Counter> = getModelForClass(Counter);\r\nexport * from './counter.model';\r\n\r\nexport const CouponModel: ReturnModelType<typeof Coupon> = getModelForClass(Coupon);\r\nexport const CustomCouponModel: ReturnModelType<typeof CustomCoupon> = getDiscriminatorModelForClass(\r\n\tCouponModel,\r\n\tCustomCoupon,\r\n\tCouponType.CUSTOM_COUPON\r\n);\r\nexport const GlobalCouponModel: ReturnModelType<typeof GlobalCoupon> = getDiscriminatorModelForClass(\r\n\tCouponModel,\r\n\tGlobalCoupon,\r\n\tCouponType.GLOBAL\r\n);\r\nexport const IndividualStoreCouponModel: ReturnModelType<typeof IndividualStoreCoupon> =\r\n\tgetDiscriminatorModelForClass(CouponModel, IndividualStoreCoupon, CouponType.INDIVIDUAL_STORE);\r\nexport const IndividualUserCouponModel: ReturnModelType<typeof IndividualUserCoupon> =\r\n\tgetDiscriminatorModelForClass(CouponModel, IndividualUserCoupon, CouponType.INDIVIDUAL_USER);\r\nexport const ReferralCodeCouponModel: ReturnModelType<typeof ReferralCodeCoupon> =\r\n\tgetDiscriminatorModelForClass(CouponModel, ReferralCodeCoupon, CouponType.REFERRAL_CODE);\r\nexport const ReferralRewardCouponModel: ReturnModelType<typeof ReferralRewardCoupon> =\r\n\tgetDiscriminatorModelForClass(CouponModel, ReferralRewardCoupon, CouponType.REFERRAL_REWARD);\r\nexport * from './coupon.model';\r\nexport * from './providers/custom-coupon.model';\r\nexport * from './providers/global-coupon.model';\r\nexport * from './providers/individual-store-coupon.model';\r\nexport * from './providers/individual-user-coupon.model';\r\nexport * from './providers/referral-code-coupon.model';\r\nexport * from './providers/referral-reward-coupon.model';\r\n\r\nexport const DealSettingModel: ReturnModelType<typeof DealSetting> = getModelForClass(DealSetting);\r\nexport * from './deal-setting.model';\r\n\r\nexport const DishModel: ReturnModelType<typeof Dish> = getModelForClass(Dish);\r\nexport * from './dish.model';\r\n\r\nexport const FaqModel: ReturnModelType<typeof Faq> = getModelForClass(Faq);\r\nexport * from './faq.model';\r\n\r\nexport const FavouriteModel: ReturnModelType<typeof Favourite> = getModelForClass(Favourite);\r\nexport * from './favourite.model';\r\n\r\nexport const FeaturedSettingModel: ReturnModelType<typeof FeaturedSetting> =\r\n\tgetModelForClass(FeaturedSetting);\r\nexport * from './featured-setting.model';\r\n\r\nexport const FilterContainerModel: ReturnModelType<typeof FilterContainer> =\r\n\tgetModelForClass(FilterContainer);\r\nexport * from './filter-container.model';\r\n\r\nexport const ListContainerModel: ReturnModelType<typeof ListContainer> = getModelForClass(ListContainer);\r\nexport * from './list-container.model';\r\n\r\nexport const LoyaltyPointCategoryModel: ReturnModelType<typeof LoyaltyPointCategory> =\r\n\tgetModelForClass(LoyaltyPointCategory);\r\nexport * from './loyalty-point-category.model';\r\n\r\nexport const LoyaltyPointSettingModel: ReturnModelType<typeof LoyaltyPointSetting> =\r\n\tgetModelForClass(LoyaltyPointSetting);\r\nexport * from './loyalty-point-setting.model';\r\n\r\nexport const MarketingModel: ReturnModelType<typeof Marketing> = getModelForClass(Marketing);\r\nexport const Buy1Get1MarketingModel: ReturnModelType<typeof Buy1Get1Marketing> =\r\n\tgetDiscriminatorModelForClass(MarketingModel, Buy1Get1Marketing, MarketingType.BUY1GET1);\r\nexport const DiscountMarketingModel: ReturnModelType<typeof DiscountMarketing> =\r\n\tgetDiscriminatorModelForClass(MarketingModel, DiscountMarketing, MarketingType.DISCOUNT);\r\nexport const FeaturedMarketingModel: ReturnModelType<typeof FeaturedMarketing> =\r\n\tgetDiscriminatorModelForClass(MarketingModel, FeaturedMarketing, MarketingType.FEATURED);\r\nexport const FreeDeliveryMarketingModel: ReturnModelType<typeof FreeDeliveryMarketing> =\r\n\tgetDiscriminatorModelForClass(MarketingModel, FreeDeliveryMarketing, MarketingType.FREE_DELIVERY);\r\nexport const LoyaltyPointMarketingModel: ReturnModelType<typeof LoyaltyPointMarketing> =\r\n\tgetDiscriminatorModelForClass(MarketingModel, LoyaltyPointMarketing, MarketingType.LOYALTY_POINT);\r\nexport const PunchMarketingModel: ReturnModelType<typeof PunchMarketing> = getDiscriminatorModelForClass(\r\n\tMarketingModel,\r\n\tPunchMarketing,\r\n\tMarketingType.PUNCH_MARKETING\r\n);\r\nexport * from './marketing.model';\r\nexport * from './providers/buy1-get1-marketing.model';\r\nexport * from './providers/discount-marketing.model';\r\nexport * from './providers/featured-marketing.model';\r\nexport * from './providers/free-delivery-marketing.model';\r\nexport * from './providers/loyalty-point-marketing.model';\r\nexport * from './providers/punch-marketing.model';\r\n\r\nexport const MealPlanModel: ReturnModelType<typeof MealPlan> = getModelForClass(MealPlan);\r\nexport * from './meal-plan.model';\r\n\r\nexport const NotificationModel: ReturnModelType<typeof Notification> = getModelForClass(Notification);\r\nexport * from './notification.model';\r\n\r\nexport const NutritionModel: ReturnModelType<typeof Nutrition> = getModelForClass(Nutrition);\r\nexport * from './nutrition.model';\r\n\r\nexport const ParentModel: ReturnModelType<typeof Parent> = getModelForClass(Parent);\r\nexport * from './parent.model';\r\n\r\nexport const ProductMarketingModel: ReturnModelType<typeof ProductMarketing> =\r\n\tgetModelForClass(ProductMarketing);\r\nexport * from './product-marketing.model';\r\n\r\nexport const ProductModel: ReturnModelType<typeof Product> = getModelForClass(Product);\r\nexport * from './product.model';\r\n\r\nexport const PunchMarketingHistoryModel: ReturnModelType<typeof PunchMarketingHistory> =\r\n\tgetModelForClass(PunchMarketingHistory);\r\nexport * from './punch-marketing-history.model';\r\n\r\nexport const RatingSettingModel: ReturnModelType<typeof RatingSetting> = getModelForClass(RatingSetting);\r\nexport * from './rating-setting.model';\r\n\r\nexport const ReferralSettingModel: ReturnModelType<typeof ReferralSetting> =\r\n\tgetModelForClass(ReferralSetting);\r\nexport * from './referral-setting.model';\r\n\r\nexport const RequestAreaModel: ReturnModelType<typeof RequestArea> = getModelForClass(RequestArea);\r\nexport * from './request-area.model';\r\n\r\nexport const RiderReviewModel: ReturnModelType<typeof RiderReview> = getModelForClass(RiderReview);\r\nexport * from './rider-review.model';\r\n\r\nexport const RiderTimeoutModel: ReturnModelType<typeof RiderTimeout> = getModelForClass(RiderTimeout);\r\nexport * from './rider-timeout.model';\r\n\r\nexport const RiderTrackingModel: ReturnModelType<typeof RiderTracking> = getModelForClass(RiderTracking);\r\nexport * from './rider-tracking.model';\r\n\r\nexport const RiderModel: ReturnModelType<typeof Rider> = getModelForClass(Rider);\r\nexport * from './rider.model';\r\n\r\nexport const RoleModel: ReturnModelType<typeof Role> = createGlobalModel(Role);\r\nexport * from './role.model';\r\n\r\nexport const SettingModel: ReturnModelType<typeof Setting> = getModelForClass(Setting);\r\nexport * from './setting.model';\r\n\r\nexport const ShopAccessControlModel: ReturnModelType<typeof ShopAccessControl> =\r\n\tgetModelForClass(ShopAccessControl);\r\nexport * from './shop-access-control.model';\r\n\r\nexport const ShopCategoryModel: ReturnModelType<typeof ShopCategory> = getModelForClass(ShopCategory);\r\nexport * from './shop-category.model';\r\n\r\nexport const ShopMealPlanModel: ReturnModelType<typeof ShopMealPlan> = getModelForClass(ShopMealPlan);\r\nexport * from './shop-meal-plan.model';\r\n\r\nexport const ShopReviewModel: ReturnModelType<typeof ShopReview> = getModelForClass(ShopReview);\r\nexport * from './shop-review.model';\r\n\r\nexport const ShopModel: ReturnModelType<typeof Shop> = getModelForClass(Shop);\r\nexport * from './shop.model';\r\n\r\nexport const SubscriptionSettingModel: ReturnModelType<typeof SubscriptionSetting> =\r\n\tgetModelForClass(SubscriptionSetting);\r\nexport * from './subscription-setting.model';\r\n\r\nexport const SubscriptionModel: ReturnModelType<typeof Subscription> = getModelForClass(Subscription);\r\nexport * from './subscription.model';\r\n\r\nexport const TagModel: ReturnModelType<typeof Tag> = getModelForClass(Tag);\r\nexport * from './tag.model';\r\n\r\nexport const UserModel: ReturnModelType<typeof User> = getModelForClass(User);\r\nexport * from './user.model';\r\n\r\nexport const ZoneModel: ReturnModelType<typeof Zone> = getModelForClass(Zone);\r\nexport * from './zone.model';\r\n\r\nexport const CartModel: ReturnModelType<typeof Cart> = getModelForClass(Cart);\r\nexport * from './cart.model';\r\n\r\nexport const LineItemModel: ReturnModelType<typeof LineItem> = getModelForClass(LineItem);\r\nexport * from './line-item.model';\r\n\r\nexport const CartParticipantModel: ReturnModelType<typeof CartParticipant> =\r\n\tgetModelForClass(CartParticipant);\r\nexport * from './cart-participant.model';\r\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"/","sources":["libraries/mongo/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,oDAAwG;AACxG,+CAAsC;AACtC,6EAAkE;AAClE,6DAAmD;AACnD,yEAA8D;AAC9D,uDAA8C;AAC9C,iDAAwC;AACxC,2DAAiD;AACjD,+CAAsC;AACtC,qDAA4C;AAC5C,mDAA0C;AAC1C,iDAAwC;AACxC,6DAAmD;AACnD,6CAAoC;AACpC,2CAAkC;AAClC,uDAA8C;AAC9C,qEAA2D;AAC3D,qEAA2D;AAC3D,iEAAuD;AACvD,iFAAsE;AACtE,+EAAoE;AACpE,uDAA8C;AAC9C,uDAA6C;AAC7C,uDAA8C;AAC9C,iDAAwC;AACxC,uEAA6D;AAC7D,mDAA0C;AAC1C,mFAAwE;AACxE,iEAAuD;AACvD,qEAA2D;AAC3D,6DAAmD;AACnD,6DAAmD;AACnD,6CAAoC;AACpC,uCAAgF;AAChF,mDAA0C;AAC1C,2EAAgE;AAChE,+DAAqD;AACrD,iEAAsD;AACtD,2DAAiD;AACjD,6CAAoC;AACpC,6EAAmE;AACnE,6DAAoD;AACpD,2CAAkC;AAClC,6CAAoC;AACpC,qFAA0E;AAC1E,kDAMiC;AACjC,yEAA+D;AAC/D,mFAAyE;AACzE,mFAAyE;AACzE,6FAAkF;AAClF,yEAA+D;AAC/D,6FAAkF;AAClF,2FAAgF;AAChF,6FAAkF;AAClF,6EAAmE;AACnE,uFAA4E;AAC5E,2FAAgF;AAChF,6DAAoD;AACpD,yEAA8D;AAC9D,+FAAmF;AACnF,+FAAmF;AACnF,iGAAqF;AACrF,+FAAmF;AACnF,uDAA6C;AAC7C,6CAAoC;AACpC,qEAA2D;A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AA,SAAS,GAAiC,IAAA,4BAAgB,EAAC,iBAAI,CAAC,CAAC;AAC9E,+CAA6B;AAEhB,QAAA,SAAS,GAAiC,IAAA,4BAAgB,EAAC,iBAAI,CAAC,CAAC;AAC9E,+CAA6B;AAEhB,QAAA,SAAS,GAAiC,IAAA,4BAAgB,EAAC,iBAAI,CAAC,CAAC;AAC9E,+CAA6B;AAEhB,QAAA,aAAa,GAAqC,IAAA,4BAAgB,EAAC,0BAAQ,CAAC,CAAC;AAC1F,oDAAkC;AAErB,QAAA,oBAAoB,GAChC,IAAA,4BAAgB,EAAC,wCAAe,CAAC,CAAC;AACnC,2DAAyC;AAE5B,QAAA,UAAU,GAAkC,IAAA,4BAAgB,EAAC,mBAAK,CAAC,CAAC;AACpE,QAAA,iBAAiB,GAAyC,IAAA,yCAA6B,EACnG,kBAAU,EACV,kCAAY,EACZ,gBAAS,CAAC,OAAO,CACjB,CAAC;AACW,QAAA,iBAAiB,GAAyC,IAAA,yCAA6B,EACnG,kBAAU,EACV,kCAAY,EACZ,gBAAS,CAAC,OAAO,CACjB,CAAC;AACF,gDAA8B;AAC9B,kEAAgD;AAChD,kEAAgD;AAEnC,QAAA,YAAY,GAAoC,IAAA,4BAAgB,EAAC,uBAAO,CAAC,CAAC;AACvF,kDAAgC","sourcesContent":["import { getDiscriminatorModelForClass, getModelForClass, ReturnModelType } from '@typegoose/typegoose';\r\nimport { Admin } from './admin.model';\r\nimport { AdminAccessControl } from './admin-access-control.model';\r\nimport { ActivityLog } from './activity-log.model';\r\nimport { AppScreenSetting } from './app-screen-setting.model';\r\nimport { Attribute } from './attribute.model';\r\nimport { Banner } from './banner.model';\r\nimport { BOBFinance } from './bob-finance.model';\r\nimport { Brand } from './brand.model';\r\nimport { Category } from './category.model';\r\nimport { Counter } from './counter.model';\r\nimport { Coupon } from './coupon.model';\r\nimport { DealSetting } from './deal-setting.model';\r\nimport { Dish } from './dish.model';\r\nimport { Faq } from './faq.model';\r\nimport { Favourite } from './favourite.model';\r\nimport { FeaturedSetting } from './featured-setting.model';\r\nimport { FilterContainer } from './filter-container.model';\r\nimport { ListContainer } from './list-container.model';\r\nimport { LoyaltyPointCategory } from './loyalty-point-category.model';\r\nimport { LoyaltyPointSetting } from './loyalty-point-setting.model';\r\nimport { Marketing } from './marketing.model';\r\nimport { MealPlan } from './meal-plan.model';\r\nimport { Nutrition } from './nutrition.model';\r\nimport { Parent } from './parent.model';\r\nimport { ProductMarketing } from './product-marketing.model';\r\nimport { Product } from './product.model';\r\nimport { PunchMarketingHistory } from './punch-marketing-history.model';\r\nimport { RatingSetting } from './rating-setting.model';\r\nimport { ReferralSetting } from './referral-setting.model';\r\nimport { RequestArea } from './request-area.model';\r\nimport { RiderReview } from './rider-review.model';\r\nimport { Role } from './role.model';\r\nimport { createGlobalDiscriminatorModel, createGlobalModel } from '../../mongo';\r\nimport { Setting } from './setting.model';\r\nimport { ShopAccessControl } from './shop-access-control.model';\r\nimport { ShopCategory } from './shop-category.model';\r\nimport { ShopMealPlan } from './shop-meal-plan.model';\r\nimport { ShopReview } from './shop-review.model';\r\nimport { Shop } from './shop.model';\r\nimport { SubscriptionSetting } from './subscription-setting.model';\r\nimport { Subscription } from './subscription.model';\r\nimport { Tag } from './tag.model';\r\nimport { Zone } from './zone.model';\r\nimport { Buy1Get1Marketing } from './providers/buy1-get1-marketing.model';\r\nimport {\r\n\tCardType,\r\n\tCoreAuthIdentityType,\r\n\tCouponType,\r\n\tMarketingType,\r\n\tOrderType,\r\n} from '../../../utilities/enum';\r\nimport { CustomCoupon } from './providers/custom-coupon.model';\r\nimport { DiscountMarketing } from './providers/discount-marketing.model';\r\nimport { FeaturedMarketing } from './providers/featured-marketing.model';\r\nimport { FreeDeliveryMarketing } from './providers/free-delivery-marketing.model';\r\nimport { GlobalCoupon } from './providers/global-coupon.model';\r\nimport { IndividualStoreCoupon } from './providers/individual-store-coupon.model';\r\nimport { IndividualUserCoupon } from './providers/individual-user-coupon.model';\r\nimport { LoyaltyPointMarketing } from './providers/loyalty-point-marketing.model';\r\nimport { PunchMarketing } from './providers/punch-marketing.model';\r\nimport { ReferralCodeCoupon } from './providers/referral-code-coupon.model';\r\nimport { ReferralRewardCoupon } from './providers/referral-reward-coupon.model';\r\nimport { Notification } from './notification.model';\r\nimport { CoreAuthIdentity } from './core-auth-identity.model';\r\nimport { CoreEmailAuthIdentity } from './providers/core-email-auth-identity.model';\r\nimport { CorePhoneAuthIdentity } from './providers/core-phone-auth-identity.model';\r\nimport { CoreGoogleAuthIdentity } from './providers/core-google-auth-identity.model';\r\nimport { CoreAppleAuthIdentity } from './providers/core-apple-auth-identity.model';\r\nimport { CoreUser } from './core-user.model';\r\nimport { Card } from './card.model';\r\nimport { AreebaCard } from './providers/areeba-card.model';\r\nimport { RiderTracking } from './rider-tracking.model';\r\nimport { Rider } from './rider.model';\r\nimport { RiderTimeout } from './rider-timeout.model';\r\nimport { User } from './user.model';\r\nimport { Cart } from './cart.model';\r\nimport { LineItem } from './line-item.model';\r\nimport { CartParticipant } from './cart-participant.model';\r\nimport { Gallery } from './gallery.model';\r\nimport { Order } from './order.model';\r\nimport { RegularOrder } from './providers/regular-order.model';\r\nimport { CourierOrder } from './providers/courier-order.model';\r\n\r\nexport const ActivityLogModel: ReturnModelType<typeof ActivityLog> = getModelForClass(ActivityLog);\r\nexport * from './activity-log.model';\r\n\r\nexport const AdminAccessControlModel: ReturnModelType<typeof AdminAccessControl> =\r\n\tgetModelForClass(AdminAccessControl);\r\nexport * from './admin-access-control.model';\r\n\r\nexport const AdminModel: ReturnModelType<typeof Admin> = getModelForClass(Admin);\r\nexport * from './admin.model';\r\n\r\nexport const AppScreenSettingModel: ReturnModelType<typeof AppScreenSetting> =\r\n\tgetModelForClass(AppScreenSetting);\r\nexport * from './app-screen-setting.model';\r\n\r\nexport const AttributeModel: ReturnModelType<typeof Attribute> = getModelForClass(Attribute);\r\nexport * from './attribute.model';\r\n\r\nexport const BannerModel: ReturnModelType<typeof Banner> = getModelForClass(Banner);\r\nexport * from './banner.model';\r\n\r\nexport const BOBFinanceModel: ReturnModelType<typeof BOBFinance> = getModelForClass(BOBFinance);\r\nexport * from './bob-finance.model';\r\n\r\nexport const BrandModel: ReturnModelType<typeof Brand> = getModelForClass(Brand);\r\nexport * from './brand.model';\r\n\r\nexport const CardModel: ReturnModelType<typeof Card> = createGlobalModel(Card);\r\nexport const AreebaCardModel: ReturnModelType<typeof AreebaCard> = createGlobalDiscriminatorModel(\r\n\tCardModel,\r\n\tAreebaCard,\r\n\tCardType.AREEBA\r\n);\r\nexport * from './card.model';\r\nexport * from './providers/areeba-card.model';\r\n\r\nexport const CategoryModel: ReturnModelType<typeof Category> = getModelForClass(Category);\r\nexport * from './category.model';\r\n\r\nexport const CoreAuthIdentityModel: ReturnModelType<typeof CoreAuthIdentity> =\r\n\tcreateGlobalModel(CoreAuthIdentity);\r\nexport const CoreEmailAuthIdentityModel: ReturnModelType<typeof CoreEmailAuthIdentity> =\r\n\tcreateGlobalDiscriminatorModel(CoreAuthIdentityModel, CoreEmailAuthIdentity, CoreAuthIdentityType.EMAIL);\r\nexport const CorePhoneAuthIdentityModel: ReturnModelType<typeof CorePhoneAuthIdentity> =\r\n\tcreateGlobalDiscriminatorModel(CoreAuthIdentityModel, CorePhoneAuthIdentity, CoreAuthIdentityType.PHONE);\r\nexport const CoreGoogleAuthIdentityModel: ReturnModelType<typeof CoreGoogleAuthIdentity> =\r\n\tcreateGlobalDiscriminatorModel(CoreAuthIdentityModel, CoreGoogleAuthIdentity, CoreAuthIdentityType.GOOGLE);\r\nexport const CoreAppleAuthIdentityModel: ReturnModelType<typeof CoreAppleAuthIdentity> =\r\n\tcreateGlobalDiscriminatorModel(CoreAuthIdentityModel, CoreAppleAuthIdentity, CoreAuthIdentityType.APPLE);\r\nexport * from './core-auth-identity.model';\r\nexport * from './providers/core-apple-auth-identity.model';\r\nexport * from './providers/core-email-auth-identity.model';\r\nexport * from './providers/core-google-auth-identity.model';\r\nexport * from './providers/core-phone-auth-identity.model';\r\n\r\nexport const CoreUserModel: ReturnModelType<typeof CoreUser> = createGlobalModel(CoreUser);\r\nexport * from './core-user.model';\r\n\r\nexport const CounterModel: ReturnModelType<typeof Counter> = getModelForClass(Counter);\r\nexport * from './counter.model';\r\n\r\nexport const CouponModel: ReturnModelType<typeof Coupon> = getModelForClass(Coupon);\r\nexport const CustomCouponModel: ReturnModelType<typeof CustomCoupon> = getDiscriminatorModelForClass(\r\n\tCouponModel,\r\n\tCustomCoupon,\r\n\tCouponType.CUSTOM_COUPON\r\n);\r\nexport const GlobalCouponModel: ReturnModelType<typeof GlobalCoupon> = getDiscriminatorModelForClass(\r\n\tCouponModel,\r\n\tGlobalCoupon,\r\n\tCouponType.GLOBAL\r\n);\r\nexport const IndividualStoreCouponModel: ReturnModelType<typeof IndividualStoreCoupon> =\r\n\tgetDiscriminatorModelForClass(CouponModel, IndividualStoreCoupon, CouponType.INDIVIDUAL_STORE);\r\nexport const IndividualUserCouponModel: ReturnModelType<typeof IndividualUserCoupon> =\r\n\tgetDiscriminatorModelForClass(CouponModel, IndividualUserCoupon, CouponType.INDIVIDUAL_USER);\r\nexport const ReferralCodeCouponModel: ReturnModelType<typeof ReferralCodeCoupon> =\r\n\tgetDiscriminatorModelForClass(CouponModel, ReferralCodeCoupon, CouponType.REFERRAL_CODE);\r\nexport const ReferralRewardCouponModel: ReturnModelType<typeof ReferralRewardCoupon> =\r\n\tgetDiscriminatorModelForClass(CouponModel, ReferralRewardCoupon, CouponType.REFERRAL_REWARD);\r\nexport * from './coupon.model';\r\nexport * from './providers/custom-coupon.model';\r\nexport * from './providers/global-coupon.model';\r\nexport * from './providers/individual-store-coupon.model';\r\nexport * from './providers/individual-user-coupon.model';\r\nexport * from './providers/referral-code-coupon.model';\r\nexport * from './providers/referral-reward-coupon.model';\r\n\r\nexport const DealSettingModel: ReturnModelType<typeof DealSetting> = getModelForClass(DealSetting);\r\nexport * from './deal-setting.model';\r\n\r\nexport const DishModel: ReturnModelType<typeof Dish> = getModelForClass(Dish);\r\nexport * from './dish.model';\r\n\r\nexport const FaqModel: ReturnModelType<typeof Faq> = getModelForClass(Faq);\r\nexport * from './faq.model';\r\n\r\nexport const FavouriteModel: ReturnModelType<typeof Favourite> = getModelForClass(Favourite);\r\nexport * from './favourite.model';\r\n\r\nexport const FeaturedSettingModel: ReturnModelType<typeof FeaturedSetting> =\r\n\tgetModelForClass(FeaturedSetting);\r\nexport * from './featured-setting.model';\r\n\r\nexport const FilterContainerModel: ReturnModelType<typeof FilterContainer> =\r\n\tgetModelForClass(FilterContainer);\r\nexport * from './filter-container.model';\r\n\r\nexport const ListContainerModel: ReturnModelType<typeof ListContainer> = getModelForClass(ListContainer);\r\nexport * from './list-container.model';\r\n\r\nexport const LoyaltyPointCategoryModel: ReturnModelType<typeof LoyaltyPointCategory> =\r\n\tgetModelForClass(LoyaltyPointCategory);\r\nexport * from './loyalty-point-category.model';\r\n\r\nexport const LoyaltyPointSettingModel: ReturnModelType<typeof LoyaltyPointSetting> =\r\n\tgetModelForClass(LoyaltyPointSetting);\r\nexport * from './loyalty-point-setting.model';\r\n\r\nexport const MarketingModel: ReturnModelType<typeof Marketing> = getModelForClass(Marketing);\r\nexport const Buy1Get1MarketingModel: ReturnModelType<typeof Buy1Get1Marketing> =\r\n\tgetDiscriminatorModelForClass(MarketingModel, Buy1Get1Marketing, MarketingType.BUY1GET1);\r\nexport const DiscountMarketingModel: ReturnModelType<typeof DiscountMarketing> =\r\n\tgetDiscriminatorModelForClass(MarketingModel, DiscountMarketing, MarketingType.DISCOUNT);\r\nexport const FeaturedMarketingModel: ReturnModelType<typeof FeaturedMarketing> =\r\n\tgetDiscriminatorModelForClass(MarketingModel, FeaturedMarketing, MarketingType.FEATURED);\r\nexport const FreeDeliveryMarketingModel: ReturnModelType<typeof FreeDeliveryMarketing> =\r\n\tgetDiscriminatorModelForClass(MarketingModel, FreeDeliveryMarketing, MarketingType.FREE_DELIVERY);\r\nexport const LoyaltyPointMarketingModel: ReturnModelType<typeof LoyaltyPointMarketing> =\r\n\tgetDiscriminatorModelForClass(MarketingModel, LoyaltyPointMarketing, MarketingType.LOYALTY_POINT);\r\nexport const PunchMarketingModel: ReturnModelType<typeof PunchMarketing> = getDiscriminatorModelForClass(\r\n\tMarketingModel,\r\n\tPunchMarketing,\r\n\tMarketingType.PUNCH_MARKETING\r\n);\r\nexport * from './marketing.model';\r\nexport * from './providers/buy1-get1-marketing.model';\r\nexport * from './providers/discount-marketing.model';\r\nexport * from './providers/featured-marketing.model';\r\nexport * from './providers/free-delivery-marketing.model';\r\nexport * from './providers/loyalty-point-marketing.model';\r\nexport * from './providers/punch-marketing.model';\r\n\r\nexport const MealPlanModel: ReturnModelType<typeof MealPlan> = getModelForClass(MealPlan);\r\nexport * from './meal-plan.model';\r\n\r\nexport const NotificationModel: ReturnModelType<typeof Notification> = getModelForClass(Notification);\r\nexport * from './notification.model';\r\n\r\nexport const NutritionModel: ReturnModelType<typeof Nutrition> = getModelForClass(Nutrition);\r\nexport * from './nutrition.model';\r\n\r\nexport const ParentModel: ReturnModelType<typeof Parent> = getModelForClass(Parent);\r\nexport * from './parent.model';\r\n\r\nexport const ProductMarketingModel: ReturnModelType<typeof ProductMarketing> =\r\n\tgetModelForClass(ProductMarketing);\r\nexport * from './product-marketing.model';\r\n\r\nexport const ProductModel: ReturnModelType<typeof Product> = getModelForClass(Product);\r\nexport * from './product.model';\r\n\r\nexport const PunchMarketingHistoryModel: ReturnModelType<typeof PunchMarketingHistory> =\r\n\tgetModelForClass(PunchMarketingHistory);\r\nexport * from './punch-marketing-history.model';\r\n\r\nexport const RatingSettingModel: ReturnModelType<typeof RatingSetting> = getModelForClass(RatingSetting);\r\nexport * from './rating-setting.model';\r\n\r\nexport const ReferralSettingModel: ReturnModelType<typeof ReferralSetting> =\r\n\tgetModelForClass(ReferralSetting);\r\nexport * from './referral-setting.model';\r\n\r\nexport const RequestAreaModel: ReturnModelType<typeof RequestArea> = getModelForClass(RequestArea);\r\nexport * from './request-area.model';\r\n\r\nexport const RiderReviewModel: ReturnModelType<typeof RiderReview> = getModelForClass(RiderReview);\r\nexport * from './rider-review.model';\r\n\r\nexport const RiderTimeoutModel: ReturnModelType<typeof RiderTimeout> = getModelForClass(RiderTimeout);\r\nexport * from './rider-timeout.model';\r\n\r\nexport const RiderTrackingModel: ReturnModelType<typeof RiderTracking> = getModelForClass(RiderTracking);\r\nexport * from './rider-tracking.model';\r\n\r\nexport const RiderModel: ReturnModelType<typeof Rider> = getModelForClass(Rider);\r\nexport * from './rider.model';\r\n\r\nexport const RoleModel: ReturnModelType<typeof Role> = createGlobalModel(Role);\r\nexport * from './role.model';\r\n\r\nexport const SettingModel: ReturnModelType<typeof Setting> = getModelForClass(Setting);\r\nexport * from './setting.model';\r\n\r\nexport const ShopAccessControlModel: ReturnModelType<typeof ShopAccessControl> =\r\n\tgetModelForClass(ShopAccessControl);\r\nexport * from './shop-access-control.model';\r\n\r\nexport const ShopCategoryModel: ReturnModelType<typeof ShopCategory> = getModelForClass(ShopCategory);\r\nexport * from './shop-category.model';\r\n\r\nexport const ShopMealPlanModel: ReturnModelType<typeof ShopMealPlan> = getModelForClass(ShopMealPlan);\r\nexport * from './shop-meal-plan.model';\r\n\r\nexport const ShopReviewModel: ReturnModelType<typeof ShopReview> = getModelForClass(ShopReview);\r\nexport * from './shop-review.model';\r\n\r\nexport const ShopModel: ReturnModelType<typeof Shop> = getModelForClass(Shop);\r\nexport * from './shop.model';\r\n\r\nexport const SubscriptionSettingModel: ReturnModelType<typeof SubscriptionSetting> =\r\n\tgetModelForClass(SubscriptionSetting);\r\nexport * from './subscription-setting.model';\r\n\r\nexport const SubscriptionModel: ReturnModelType<typeof Subscription> = getModelForClass(Subscription);\r\nexport * from './subscription.model';\r\n\r\nexport const TagModel: ReturnModelType<typeof Tag> = getModelForClass(Tag);\r\nexport * from './tag.model';\r\n\r\nexport const UserModel: ReturnModelType<typeof User> = getModelForClass(User);\r\nexport * from './user.model';\r\n\r\nexport const ZoneModel: ReturnModelType<typeof Zone> = getModelForClass(Zone);\r\nexport * from './zone.model';\r\n\r\nexport const CartModel: ReturnModelType<typeof Cart> = getModelForClass(Cart);\r\nexport * from './cart.model';\r\n\r\nexport const LineItemModel: ReturnModelType<typeof LineItem> = getModelForClass(LineItem);\r\nexport * from './line-item.model';\r\n\r\nexport const CartParticipantModel: ReturnModelType<typeof CartParticipant> =\r\n\tgetModelForClass(CartParticipant);\r\nexport * from './cart-participant.model';\r\n\r\nexport const OrderModel: ReturnModelType<typeof Order> = getModelForClass(Order);\r\nexport const RegularOrderModel: ReturnModelType<typeof RegularOrder> = getDiscriminatorModelForClass(\r\n\tOrderModel,\r\n\tRegularOrder,\r\n\tOrderType.REGULAR\r\n);\r\nexport const CourierOrderModel: ReturnModelType<typeof CourierOrder> = getDiscriminatorModelForClass(\r\n\tOrderModel,\r\n\tCourierOrder,\r\n\tOrderType.COURIER\r\n);\r\nexport * from './order.model';\r\nexport * from './providers/regular-order.model';\r\nexport * from './providers/courier-order.model';\r\n\r\nexport const GalleryModel: ReturnModelType<typeof Gallery> = getModelForClass(Gallery);\r\nexport * from './gallery.model';\r\n"]}
|
|
@@ -136,7 +136,7 @@ __decorate([
|
|
|
136
136
|
__metadata("design:type", Boolean)
|
|
137
137
|
], Product.prototype, "isDrinkIncluded", void 0);
|
|
138
138
|
__decorate([
|
|
139
|
-
(0, typegoose_1.prop)({ type: Number, default:
|
|
139
|
+
(0, typegoose_1.prop)({ type: Number, default: Infinity, min: 0, max: 999999999 }),
|
|
140
140
|
__metadata("design:type", Number)
|
|
141
141
|
], Product.prototype, "orderQuantityLimit", void 0);
|
|
142
142
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product.model.js","sourceRoot":"/","sources":["libraries/mongo/models/product.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAsE;AACtE,4EAAqE;AACrE,kDAAyG;AACzG,gFAAsE;AACtE,6CAAoC;AACpC,4EAAkE;AAClE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GACY,OAAO,CA8EnB","sourcesContent":["import { Index, modelOptions, prop, Ref } from '@typegoose/typegoose';\r\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\r\nimport { ProductType, ItemType, ProductDietaryType, Status, PriceOption } from '../../../utilities/enum';\r\nimport { ProductNutrition } from './embedded/product-nutrition.model';\r\nimport { Shop } from './shop.model';\r\nimport { PriceBreakdown } from './embedded/price-breakdown.model';\r\nimport { AttributeMap } from './embedded/attribute-map.model';\r\nimport { ShopCategory } from './shop-category.model';\r\n\r\n@modelOptions({ schemaOptions: { collection: 'products' } })\r\n@Index({ name: 1, shop: 1 }, { unique: true, partialFilterExpression: { deletedAt: null } })\r\n@Index(\r\n\t{ barcode: 1, shop: 1 },\r\n\t{\r\n\t\tunique: true,\r\n\t\tpartialFilterExpression: { barcode: { $exists: true, $nin: [null, '0000000'] }, deletedAt: null },\r\n\t}\r\n)\r\nexport class Product extends TimeStamps {\r\n\t@prop({ required: true, ref: () => Shop })\r\n\tpublic shop!: Ref<Shop>;\r\n\r\n\t@prop({ required: true, type: String, maxlength: 50 })\r\n\tpublic name!: string;\r\n\r\n\t@prop({ type: String, default: '0000000' })\r\n\tpublic barcode?: string;\r\n\r\n\t@prop({ required: true, ref: () => ShopCategory })\r\n\tpublic shopCategory!: Ref<ShopCategory>;\r\n\r\n\t@prop({ required: true, type: String, enum: ItemType })\r\n\tpublic itemType!: ItemType;\r\n\r\n\t@prop({ type: String, enum: ProductType, default: ProductType.OTHER })\r\n\tpublic productType?: ProductType;\r\n\r\n\t@prop({ required: true, type: [String] })\r\n\tpublic images!: string[];\r\n\r\n\t@prop({ type: String, enum: PriceOption, default: PriceOption.SINGLE_PRICE })\r\n\tpublic priceOption?: PriceOption;\r\n\r\n\t@prop({ required: true, type: [PriceBreakdown], min: 1 })\r\n\tpublic priceBreakdowns?: PriceBreakdown[];\r\n\r\n\t@prop({ type: String, maxlength: 250 })\r\n\tpublic description?: string;\r\n\r\n\t@prop({ type: [AttributeMap], default: [] })\r\n\tpublic attributeMaps?: AttributeMap[];\r\n\r\n\t@prop({ ref: () => Product, default: [] })\r\n\tpublic addons?: Ref<Product>[];\r\n\r\n\t@prop({ type: Number, min: 0 })\r\n\tpublic nutritionPackSize?: number;\r\n\r\n\t@prop({ type: String })\r\n\tpublic nutritionPackSizeUnit?: string;\r\n\r\n\t@prop({ type: Number, min: 0 })\r\n\tpublic nutritionServingSize?: number;\r\n\r\n\t@prop({ type: Number, min: 0 })\r\n\tpublic nutritionCalories?: number;\r\n\r\n\t@prop({ type: [ProductNutrition], default: [] })\r\n\tpublic nutritions?: ProductNutrition[];\r\n\r\n\t@prop({ type: [String], enum: ProductDietaryType, default: [] })\r\n\tpublic dietaryTypes?: ProductDietaryType[];\r\n\r\n\t@prop({ type: Number, max: 999999999 })\r\n\tpublic storedTemperature?: number;\r\n\r\n\t@prop({ type: Boolean, default: false })\r\n\tpublic isStockEnabled?: boolean;\r\n\r\n\t@prop({ type: Number })\r\n\tpublic stockQuantity?: number;\r\n\r\n\t@prop({ type: Boolean, default: false })\r\n\tpublic isDrinkIncluded?: boolean;\r\n\r\n\t@prop({ type: Number, default: Infinity, min: 0, max: 999999999 })\r\n\tpublic orderQuantityLimit?: number;\r\n\r\n\t@prop({ type: String })\r\n\tpublic note?: string;\r\n\r\n\t@prop({ type: String, enum: Status, default: Status.ACTIVE })\r\n\tpublic status?: Status;\r\n\r\n\t@prop({ type: Number, default: 0 })\r\n\tpublic sortingOrder?: number;\r\n}\r\n"]}
|
|
@@ -8,16 +8,24 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
8
|
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
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
11
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
15
|
exports.CoreEmailAuthIdentity = void 0;
|
|
13
16
|
const typegoose_1 = require("@typegoose/typegoose");
|
|
14
17
|
const core_auth_identity_model_1 = require("../core-auth-identity.model");
|
|
15
18
|
const otp_fields_model_1 = require("../embedded/otp-fields.model");
|
|
16
|
-
|
|
19
|
+
const bcryptjs_1 = __importDefault(require("bcryptjs"));
|
|
20
|
+
async function hashPassword(password) {
|
|
21
|
+
const salt = await bcryptjs_1.default.genSalt(10);
|
|
22
|
+
return bcryptjs_1.default.hash(password, salt);
|
|
23
|
+
}
|
|
24
|
+
let CoreEmailAuthIdentity = class CoreEmailAuthIdentity extends core_auth_identity_model_1.CoreAuthIdentity {
|
|
17
25
|
email;
|
|
18
26
|
password;
|
|
19
|
-
|
|
20
|
-
}
|
|
27
|
+
otps;
|
|
28
|
+
};
|
|
21
29
|
exports.CoreEmailAuthIdentity = CoreEmailAuthIdentity;
|
|
22
30
|
__decorate([
|
|
23
31
|
(0, typegoose_1.prop)({ required: true, type: String }),
|
|
@@ -29,6 +37,22 @@ __decorate([
|
|
|
29
37
|
], CoreEmailAuthIdentity.prototype, "password", void 0);
|
|
30
38
|
__decorate([
|
|
31
39
|
(0, typegoose_1.prop)({ required: true, type: otp_fields_model_1.OTPFields }),
|
|
32
|
-
__metadata("design:type",
|
|
33
|
-
], CoreEmailAuthIdentity.prototype, "
|
|
40
|
+
__metadata("design:type", Array)
|
|
41
|
+
], CoreEmailAuthIdentity.prototype, "otps", void 0);
|
|
42
|
+
exports.CoreEmailAuthIdentity = CoreEmailAuthIdentity = __decorate([
|
|
43
|
+
(0, typegoose_1.pre)('save', async function (next) {
|
|
44
|
+
if (this.isModified('password')) {
|
|
45
|
+
this.password = await hashPassword(this.password);
|
|
46
|
+
}
|
|
47
|
+
next();
|
|
48
|
+
}),
|
|
49
|
+
(0, typegoose_1.pre)('findOneAndUpdate', async function (next) {
|
|
50
|
+
const update = this.getUpdate();
|
|
51
|
+
if (update?.password) {
|
|
52
|
+
update.password = await hashPassword(update.password);
|
|
53
|
+
this.setUpdate(update);
|
|
54
|
+
}
|
|
55
|
+
next();
|
|
56
|
+
})
|
|
57
|
+
], CoreEmailAuthIdentity);
|
|
34
58
|
//# sourceMappingURL=core-email-auth-identity.model.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core-email-auth-identity.model.js","sourceRoot":"/","sources":["libraries/mongo/models/providers/core-email-auth-identity.model.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"core-email-auth-identity.model.js","sourceRoot":"/","sources":["libraries/mongo/models/providers/core-email-auth-identity.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,oDAAoE;AACpE,0EAA+D;AAC/D,mEAAyD;AACzD,wDAA8B;AAG9B,KAAK,UAAU,YAAY,CAAC,QAAgB;IAC3C,MAAM,IAAI,GAAG,MAAM,kBAAM,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IACtC,OAAO,kBAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;AACpC,CAAC;AAeM,IAAM,qBAAqB,GAA3B,MAAM,qBAAsB,SAAQ,2CAAgB;IAEnD,KAAK,CAAU;IAGf,QAAQ,CAAU;IAGlB,IAAI,CAAe;CAC1B,CAAA;AATY,sDAAqB;AAE1B;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;oDACjB;AAGf;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;uDACd;AAGlB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,4BAAS,EAAE,CAAC;;mDAChB;gCARd,qBAAqB;IAdjC,IAAA,eAAG,EAAwB,MAAM,EAAE,KAAK,WAAW,IAAI;QACvD,IAAI,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;YACjC,IAAI,CAAC,QAAQ,GAAG,MAAM,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACnD,CAAC;QACD,IAAI,EAAE,CAAC;IACR,CAAC,CAAC;IACD,IAAA,eAAG,EAAoC,kBAAkB,EAAE,KAAK,WAAW,IAAI;QAC/E,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,EAAyB,CAAC;QACvD,IAAI,MAAM,EAAE,QAAQ,EAAE,CAAC;YACtB,MAAM,CAAC,QAAQ,GAAG,MAAM,YAAY,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;YACtD,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QACxB,CAAC;QACD,IAAI,EAAE,CAAC;IACR,CAAC,CAAC;GACW,qBAAqB,CASjC","sourcesContent":["import { modelOptions, prop, pre, Ref } from '@typegoose/typegoose';\r\nimport { CoreAuthIdentity } from '../core-auth-identity.model';\r\nimport { OTPFields } from '../embedded/otp-fields.model';\r\nimport bcrypt from 'bcryptjs';\r\nimport { Query } from 'mongoose';\r\n\r\nasync function hashPassword(password: string): Promise<string> {\r\n\tconst salt = await bcrypt.genSalt(10);\r\n\treturn bcrypt.hash(password, salt);\r\n}\r\n@pre<CoreEmailAuthIdentity>('save', async function (next) {\r\n\tif (this.isModified('password')) {\r\n\t\tthis.password = await hashPassword(this.password);\r\n\t}\r\n\tnext();\r\n})\r\n@pre<Query<any, CoreEmailAuthIdentity>>('findOneAndUpdate', async function (next) {\r\n\tconst update = this.getUpdate() as Record<string, any>;\r\n\tif (update?.password) {\r\n\t\tupdate.password = await hashPassword(update.password);\r\n\t\tthis.setUpdate(update);\r\n\t}\r\n\tnext();\r\n})\r\nexport class CoreEmailAuthIdentity extends CoreAuthIdentity {\r\n\t@prop({ required: true, type: String })\r\n\tpublic email!: string;\r\n\r\n\t@prop({ required: true, type: String })\r\n\tpublic password!: string;\r\n\r\n\t@prop({ required: true, type: OTPFields })\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GAAG,CACH,CAAC;YAEF,IAAI,IAAI,IAAI,SAAS,EAAE,CAAC;gBACvB,OAAO,IAAI,CAAC;YACb,CAAC;YAED,MAAM,CAAC,cAAc,CAAC,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,mBAAmB,CAAC;gBAC/D,IAAI,EAAE,gCAAgC,GAAG,yBAAyB,GAAG,kBAAkB;aACvF,CAAC,CAAC;YAEH,MAAM,GAAG,GAAG,cAAc,CAAC,OAAQ,CAAC,IAAK,CAAC,QAAQ,EAAE,CAAC;YAErD,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;YAE5B,OAAO,GAAG,CAAC;QACZ,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACZ,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACF,CAAC;IAEM,KAAK,CAAC,MAAM,CAAC,GAAW,EAAE,KAAa;QAC7C,MAAM,IAAI,CAAC,aAAa,CAAC,sBAAsB,CAC9C,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,WAAW,GAAG,OAAO,EACxD,GAAG,EACH,KAAK,CACL,CAAC;QACF,OAAO,KAAK,CAAC;IACd,CAAC;CACD,CAAA;AA3DY,oDAAoB;+BAApB,oBAAoB;IADhC,IAAA,gBAAO,GAAE;qCAMyB,oCAAoB,EAAgB,oBAAY;GALtE,oBAAoB,CA2DhC","sourcesContent":["import { SecretManagerServiceClient } from '@google-cloud/secret-manager';\r\nimport { Service } from 'typedi';\r\nimport { RedisService } from '../redis';\r\nimport { ConfigurationService } from '../configuration';\r\n\r\n@Service()\r\nexport class SecretManagerService {\r\n\tprivate _configurationService!: ConfigurationService;\r\n\tprivate _redisManager!: RedisService;\r\n\tprivate _client!: SecretManagerServiceClient;\r\n\r\n\tconstructor(configurationService: ConfigurationService, redisManager: RedisService) {\r\n\t\tthis._configurationService = configurationService;\r\n\t\tthis._redisManager = redisManager;\r\n\t\tthis._client = new SecretManagerServiceClient({\r\n\t\t\tcredentials: {\r\n\t\t\t\tclient_id: '107840895824406590900',\r\n\t\t\t\tprivate_key_id: 'ece1ebdfde57414700f23f1f4014f5e83d4f7644',\r\n\t\t\t\ttype: 'service_account',\r\n\t\t\t\tuniverse_domain: 'googleapis.com',\r\n\t\t\t\tprojectId: 'for-poc-325210',\r\n\t\t\t\tprivate_key:\r\n\t\t\t\t\t'-----BEGIN PRIVATE KEY-----\\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDPTk9M5nCDYJhC\\nLuyP+gqBXIHPrXegygco5tB50Y7Q9s/f4hm+xp/usYy5UCYyFVNjZ2mdjWQcr3Ta\\nT3GZV9OiHej8ejveY0iyFBi0IlfGNm9blYlOIyQT4i6MoevNul7u4EQL8bid/sp/\\nJ/XPNC+Jnk8Ke2G9FdfDYs+1O6Nf37HuPUmMwLAzcyl+k1v9UzInrgNPj+nactY7\\nEPCVSM6XcZI3UL86n574iQBvUXsMpUt3csYVOxPap1Vd1TBEo1k85jZepMvaXHoK\\nJUwQT7p1F1D0weVKJ1BjwQgmADZWfUKdwRyS8zFPbUGeptlA2XlxyVMasGzCCMi4\\n6jzJGC81AgMBAAECggEAXoaLnDn7Fbym0I7K6T+PKLtAqaykPpnAOAM/DjzijR/t\\nW12idZ3l8RXeX+VO9UlKE6pkuyVsf7P1aVIOL2ifpG1U/kLSJ65HyINnXEPImCXc\\nEvuVdx6I5dQde5ydg9o2TV/PR0756njyZpaW+9sEzhB0ZAgsYeai0oGsyiuebCkm\\nqlOnf5DO/kWlNvf8yZ7GMEa0WBYyan4O7YcVF13c7oM19XZfvw+lliU/geOwVNW5\\nEfSn91UWIEMB60Q5XKHg11LAvbq8mvcHD+6ujeoPMfoZJrHZj5ucBP5auyRNFCUM\\nWE2IILLpgdhDfE5I323xHIyMblMSc1OOkZzjhuNYRQKBgQDuEa/jMqEDu7ZpDo/g\\nf+M4Qmmyh1WIjnORwqbf8INi5oN1NoIv6tcJ++COAWcBpyerW9aknLRMX9FXrNH5\\nAPyRvHQt2IpRCqjdcEr2b3VwZmcjRVbpsISwqE0RBvXSXOnvbDzZ53bC70anL5OY\\n7UYwOotbQXpcEGC57wy8G+VVlwKBgQDe63bcubV1W2+WPbdtzb7tzIS5PPz19U5i\\n5PjVQ4E34FH0ZBnk2v1fjtVxR72mrzCg2xz72rWgdsHJ/1QZAfw+4troJV9LI9SG\\nYRMeh86NSfNObdkY+LmCSH4eiFe83kFLUUzhnYE6DU/17i6T4V+ofawToasu3wag\\nf7LzT2BzEwKBgQDlVD5lktDOQtWtj+yC607bVAZzhrCbUfX8FFEh6ZL3A2zgzXhN\\nZmBtaqfew3URf47UICy894MrCyYi2gSOZCfoz2vu+egLt0QBw/lCOQ4dD1gM/u+B\\nP5wifI14eIb2dLCZBV/83F5n24zo4gjBSNfS/6Jcbs/KvbAfjCptTkX10wKBgDxb\\nwy5WtlRVcqxaf50ilWzr8I/7fH7YceYDG4EbKxTHD0m+BOjbhrlmAlMO2sIUM3WK\\nfpmPCZiuLyCTmuC+kd8xK5ap79h3libgh/2/ReUpvdBhm+PQDOLC4CtCPYdtIn7T\\nP57jN8dRLXJokIIIBw+nH32dS62AQ9oXWYvZ1UKzAoGBAOWOSphZMnPlLeLN54/4\\nwKPI+D6G1JhzqQrUf8Z99J7m3r3ya+0ug5gRGQCoSRfqz9o87+fLCdSdc38L+j4T\\nBnuwIcY6n4LF+3yAPIF1rnrIBFRqzPta7epYPXHtUTvWOkEkKzNmsFVCZKF7nQjS\\ns/ucyyfUssPsTznYW3gXf3To\\n-----END PRIVATE KEY-----\\n',\r\n\t\t\t\tclient_email: 'lyxa-core@for-poc-325210.iam.gserviceaccount.com',\r\n\t\t\t},\r\n\t\t});\r\n\t}\r\n\r\n\tpublic async getKey(key: string): Promise<string | undefined> {\r\n\t\tconst environmentTransformedKey = this._configurationService.options.environment + '_' + key;\r\n\r\n\t\tconsole.log('Attempting to fetch the following secret key: ' + environmentTransformedKey);\r\n\r\n\t\ttry {\r\n\t\t\tconst data = await this._redisManager.getCachedObjectByGroup<string>(\r\n\t\t\t\tthis._configurationService.options.environment + '_KEYS',\r\n\t\t\t\tkey\r\n\t\t\t);\r\n\r\n\t\t\tif (data != undefined) {\r\n\t\t\t\treturn data;\r\n\t\t\t}\r\n\r\n\t\t\tconst [accessResponse] = await this._client.accessSecretVersion({\r\n\t\t\t\tname: 'projects/899369746265/secrets/' + environmentTransformedKey + '/versions/latest',\r\n\t\t\t});\r\n\r\n\t\t\tconst val = accessResponse.payload!.data!.toString();\r\n\r\n\t\t\tawait this.setKey(key, val);\r\n\r\n\t\t\treturn val;\r\n\t\t} catch (e) {\r\n\t\t\tconsole.error(e);\r\n\t\t}\r\n\t}\r\n\r\n\tpublic async setKey(key: string, value: string): Promise<string> {\r\n\t\tawait this._redisManager.setCachedObjectByGroup<string>(\r\n\t\t\tthis._configurationService.options.environment + '_KEYS',\r\n\t\t\tkey,\r\n\t\t\tvalue\r\n\t\t);\r\n\t\treturn value;\r\n\t}\r\n}\r\n"]}
|
|
@@ -10,6 +10,7 @@ exports.t = server_1.initTRPC.context().create({
|
|
|
10
10
|
const flattened = error.cause.flatten();
|
|
11
11
|
zodErrors = flattened.fieldErrors;
|
|
12
12
|
}
|
|
13
|
+
console.log('Error:', error, shape, 'error log', zodErrors);
|
|
13
14
|
return {
|
|
14
15
|
...shape,
|
|
15
16
|
message: zodErrors && typeof zodErrors === 'object'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"/","sources":["libraries/trpc/index.ts"],"names":[],"mappings":";;;AAAA,yCAAwC;AACxC,6BAA+B;AAGlB,QAAA,CAAC,GAAG,iBAAQ,CAAC,OAAO,EAAe,CAAC,MAAM,CAAC;IACvD,cAAc,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE;QAC9B,IAAI,SAAS,GAAG,IAAI,CAAC;QAErB,IAAI,KAAK,CAAC,IAAI,KAAK,aAAa,IAAI,KAAK,CAAC,KAAK,YAAY,cAAQ,EAAE,CAAC;YACrE,MAAM,SAAS,GAAG,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;YACxC,SAAS,GAAG,SAAS,CAAC,WAAW,CAAC;QACnC,CAAC;QAED,OAAO;YACN,GAAG,KAAK;YACR,OAAO,EACN,SAAS,IAAI,OAAO,SAAS,KAAK,QAAQ;gBACzC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,OAAO;gBACnD,CAAC,CAAC,KAAK,CAAC,OAAO;YACjB,IAAI,EAAE;gBACL,GAAG,KAAK,CAAC,IAAI;gBAEb,KAAK,EAAE,SAAS;gBAChB,IAAI,EAAE,SAAS;aACf;YAED,KAAK,EAAE,SAAS;SAChB,CAAC;IACH,CAAC;CACD,CAAC,CAAC;AAEU,QAAA,eAAe,GAAG,SAAC,CAAC,SAAS,CAAC;AAC9B,QAAA,gBAAgB,GAAG,SAAC,CAAC,MAAM,CAAC;AAC5B,QAAA,mBAAmB,GAAG,SAAC,CAAC,mBAAmB,CAAC","sourcesContent":["import { initTRPC } from '@trpc/server';\r\nimport { ZodError } from 'zod';\r\nimport { LyxaContext } from './context';\r\n\r\nexport const t = initTRPC.context<LyxaContext>().create({\r\n\terrorFormatter({ shape, error }) {\r\n\t\tlet zodErrors = null;\r\n\r\n\t\tif (error.code === 'BAD_REQUEST' && error.cause instanceof ZodError) {\r\n\t\t\tconst flattened = error.cause.flatten();\r\n\t\t\tzodErrors = flattened.fieldErrors;\r\n\t\t}\r\n\r\n\t\treturn {\r\n\t\t\t...shape,\r\n\t\t\tmessage:\r\n\t\t\t\tzodErrors && typeof zodErrors === 'object'\r\n\t\t\t\t\t? Object.values(zodErrors)[0]?.[0] || shape.message\r\n\t\t\t\t\t: shape.message,\r\n\t\t\tdata: {\r\n\t\t\t\t...shape.data,\r\n\r\n\t\t\t\tstack: undefined,\r\n\t\t\t\tpath: undefined,\r\n\t\t\t},\r\n\t\t\t// Prevent stack trace from being returned in the response\r\n\t\t\tstack: undefined,\r\n\t\t};\r\n\t},\r\n});\r\n\r\nexport const publicProcedure = t.procedure;\r\nexport const createTRPCRouter = t.router;\r\nexport const createCallerFactory = t.createCallerFactory;\r\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"/","sources":["libraries/trpc/index.ts"],"names":[],"mappings":";;;AAAA,yCAAwC;AACxC,6BAA+B;AAGlB,QAAA,CAAC,GAAG,iBAAQ,CAAC,OAAO,EAAe,CAAC,MAAM,CAAC;IACvD,cAAc,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE;QAC9B,IAAI,SAAS,GAAG,IAAI,CAAC;QAErB,IAAI,KAAK,CAAC,IAAI,KAAK,aAAa,IAAI,KAAK,CAAC,KAAK,YAAY,cAAQ,EAAE,CAAC;YACrE,MAAM,SAAS,GAAG,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;YACxC,SAAS,GAAG,SAAS,CAAC,WAAW,CAAC;QACnC,CAAC;QAED,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,SAAS,CAAC,CAAC;QAE5D,OAAO;YACN,GAAG,KAAK;YACR,OAAO,EACN,SAAS,IAAI,OAAO,SAAS,KAAK,QAAQ;gBACzC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,OAAO;gBACnD,CAAC,CAAC,KAAK,CAAC,OAAO;YACjB,IAAI,EAAE;gBACL,GAAG,KAAK,CAAC,IAAI;gBAEb,KAAK,EAAE,SAAS;gBAChB,IAAI,EAAE,SAAS;aACf;YAED,KAAK,EAAE,SAAS;SAChB,CAAC;IACH,CAAC;CACD,CAAC,CAAC;AAEU,QAAA,eAAe,GAAG,SAAC,CAAC,SAAS,CAAC;AAC9B,QAAA,gBAAgB,GAAG,SAAC,CAAC,MAAM,CAAC;AAC5B,QAAA,mBAAmB,GAAG,SAAC,CAAC,mBAAmB,CAAC","sourcesContent":["import { initTRPC } from '@trpc/server';\r\nimport { ZodError } from 'zod';\r\nimport { LyxaContext } from './context';\r\n\r\nexport const t = initTRPC.context<LyxaContext>().create({\r\n\terrorFormatter({ shape, error }) {\r\n\t\tlet zodErrors = null;\r\n\r\n\t\tif (error.code === 'BAD_REQUEST' && error.cause instanceof ZodError) {\r\n\t\t\tconst flattened = error.cause.flatten();\r\n\t\t\tzodErrors = flattened.fieldErrors;\r\n\t\t}\r\n\r\n\t\tconsole.log('Error:', error, shape, 'error log', zodErrors);\r\n\r\n\t\treturn {\r\n\t\t\t...shape,\r\n\t\t\tmessage:\r\n\t\t\t\tzodErrors && typeof zodErrors === 'object'\r\n\t\t\t\t\t? Object.values(zodErrors)[0]?.[0] || shape.message\r\n\t\t\t\t\t: shape.message,\r\n\t\t\tdata: {\r\n\t\t\t\t...shape.data,\r\n\r\n\t\t\t\tstack: undefined,\r\n\t\t\t\tpath: undefined,\r\n\t\t\t},\r\n\t\t\t// Prevent stack trace from being returned in the response\r\n\t\t\tstack: undefined,\r\n\t\t};\r\n\t},\r\n});\r\n\r\nexport const publicProcedure = t.procedure;\r\nexport const createTRPCRouter = t.router;\r\nexport const createCallerFactory = t.createCallerFactory;\r\n"]}
|
package/dist/utilities/enum.d.ts
CHANGED
package/dist/utilities/enum.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CreatedBy = exports.LiveStatus = exports.AreebaCardStatus = exports.CardUserType = exports.CardType = 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.ShopRole = exports.ShopOnlineStatus = exports.ChargeType = exports.ClickType = exports.NotificationAccountType = exports.DishCategory = exports.ProductDietaryType = exports.AttributeItemSelectionType = exports.PriceOption = exports.ProductType = exports.CoreAuthIdentityType = exports.SectionType = 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.ItemType = exports.Status = void 0;
|
|
4
|
-
exports.WorkingHourSettingsType = exports.ZoneGeometryType = exports.RiderAssignmentStatus = exports.CourierServiceType = exports.OrderCancelBy = exports.DeliveryStatus = exports.CourierOrderStatus = exports.RegularOrderStatus = exports.OrderType = exports.Language = exports.RiderType = exports.ShiftType = void 0;
|
|
4
|
+
exports.MediaType = exports.WorkingHourSettingsType = exports.ZoneGeometryType = exports.RiderAssignmentStatus = exports.CourierServiceType = exports.OrderCancelBy = exports.DeliveryStatus = exports.CourierOrderStatus = exports.RegularOrderStatus = exports.OrderType = exports.Language = exports.RiderType = exports.ShiftType = void 0;
|
|
5
5
|
var Status;
|
|
6
6
|
(function (Status) {
|
|
7
7
|
Status["ACTIVE"] = "active";
|
|
@@ -428,4 +428,8 @@ var WorkingHourSettingsType;
|
|
|
428
428
|
WorkingHourSettingsType["GLOBAL"] = "Global";
|
|
429
429
|
WorkingHourSettingsType["SHOP"] = "Shop";
|
|
430
430
|
})(WorkingHourSettingsType || (exports.WorkingHourSettingsType = WorkingHourSettingsType = {}));
|
|
431
|
+
var MediaType;
|
|
432
|
+
(function (MediaType) {
|
|
433
|
+
MediaType["IMAGE"] = "image";
|
|
434
|
+
})(MediaType || (exports.MediaType = MediaType = {}));
|
|
431
435
|
//# sourceMappingURL=enum.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-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B;AAED,IAAY,uBAGX;AAHD,WAAY,uBAAuB;IAClC,4CAAiB,CAAA;IACjB,wCAAa,CAAA;AACd,CAAC,EAHW,uBAAuB,uCAAvB,uBAAuB,QAGlC","sourcesContent":["export enum Status {\r\n\tACTIVE = 'active',\r\n\tINACTIVE = 'inactive',\r\n}\r\n\r\nexport enum ItemType {\r\n\tFOOD = 'food',\r\n\tGROCERY = 'grocery',\r\n\tPHARMACY = 'pharmacy',\r\n\tCOFFEE = 'coffee',\r\n\tFLOWER = 'flower',\r\n\tPET = 'pet',\r\n\tHEALTHY_CORNER = 'healthy_corner',\r\n}\r\n\r\nexport enum WeekDay {\r\n\tSunday = 0,\r\n\tMonday = 1,\r\n\tTuesday = 2,\r\n\tWednesday = 3,\r\n\tThursday = 4,\r\n\tFriday = 5,\r\n\tSaturday = 6,\r\n}\r\n\r\nexport enum WorkStatus {\r\n\tOPEN = 'open',\r\n\tCLOSED = 'closed',\r\n\tFULL_DAY = 'full_day',\r\n}\r\n\r\nexport enum HolidayWorkStatus {\r\n\tCLOSED = WorkStatus.CLOSED,\r\n\tFULL_DAY = WorkStatus.FULL_DAY,\r\n}\r\n\r\nexport enum ValueType {\r\n\tPERCENTAGE = 'percentage',\r\n\tFIXED = 'fixed',\r\n}\r\n\r\nexport enum PaymentMethod {\r\n\tCASH = 'cash',\r\n\tCARD = 'card',\r\n}\r\n\r\nexport enum PaymentStatus {\r\n\tPAID = 'paid',\r\n\tPENDING = 'pending',\r\n\tFAILED = 'failed',\r\n\tREFUNDED = 'refunded',\r\n\tPARTIALLY_REFUNDED = 'partially_refunded',\r\n}\r\n\r\nexport enum PaidCurrency {\r\n\tBASE = 'base',\r\n\tSECONDARY = 'secondary',\r\n\tMIXED = 'mixed',\r\n}\r\n\r\nexport enum SubscriptionPackage {\r\n\tMONTHLY = 'monthly',\r\n\tYEARLY = 'yearly',\r\n}\r\n\r\nexport enum SubscriptionStatus {\r\n\tONGOING = 'ongoing',\r\n\tEXPIRED = 'expired',\r\n}\r\n\r\nexport enum RatingAccountType {\r\n\tSHOP = 'shop',\r\n\tRIDER = 'rider',\r\n}\r\n\r\nexport enum GeoLocationType {\r\n\tPOINT = 'point',\r\n\tPOLYGON = 'polygon',\r\n}\r\n\r\nexport enum UpdatedField {\r\n\tMAX_TOTAL_EST_ITEMS_PRICE = 'max_total_est_items_price',\r\n\tMAX_DISTANCE = 'max_distance',\r\n\tDAILY_WORKING_HOURS = 'daily_working_hours',\r\n\tBOB_CASH_SETTLEMENT_LIMIT = 'bob_cash_settlement_limit',\r\n\tTIPS = 'tips',\r\n\tEQUIPMENTS = 'equipments',\r\n\tMONTHLY_SHOP_TARGET = 'monthly_shop_target',\r\n\tMONTHLY_REWARD_PRIZE = 'monthly_reward_prize',\r\n\tBASE_CURRENCY = 'base_currency',\r\n\tSECONDARY_CURRENCY = 'secondary_currency',\r\n\tIS_DUAL_CURRENCY_ENABLED = 'is_dual_currency_enabled',\r\n\tEXCHANGE_RATE = 'exchange_rate',\r\n\tISSUANCE_DAY = 'issuance_day',\r\n\tOVER_DUE_PERIODS = 'over_due_periods',\r\n\tPAY_LIMIT_FOR_USER = 'pay_limit_for_user',\r\n\tVAT_PERCENTAGE = 'vat_percentage',\r\n\tRIDER_SEARCH_RANGES = 'rider_search_ranges',\r\n\tNEAR_BY_SHOP_DISTANCE = 'near_by_shop_distance',\r\n\tNEAR_BY_SHOP_DISTANCE_IN_HOME_SCREEN = 'near_by_shop_distance_in_home_screen',\r\n\tUNITS = 'units',\r\n\tCURRENCY_SETTING = 'currency_setting',\r\n\tPAYMENT_METHODS = 'payment_methods',\r\n\tIS_GROUND_ORDER_ENABLED = 'is_ground_order_enabled',\r\n\tCUSTOMER_SUPPORT_PHONE_NUMBER = 'customer_support_phone_number',\r\n}\r\n\r\nexport enum SectionType {\r\n\tSTORE_PUNCHES = 'store_punches',\r\n\tNEARBY_RESTAURANT = 'nearby_restaurant',\r\n\tNEARBY_GROCERY = 'nearby_grocery',\r\n\tNEARBY_PHARMACY = 'nearby_pharmacy',\r\n\tDISCOUNT = 'discount',\r\n\tFREE_DELIVERY = 'free_delivery',\r\n\tCRAZY_OFFER_SHOPS = 'crazy_offer_shops',\r\n\tORDER_AGAIN = 'order_again',\r\n\tFEATURED = 'featured',\r\n\tLOVE = 'love',\r\n\tAUTHENTIC_BEIRUT = 'authentic_beirut',\r\n\tNEAR_ME = 'near_me',\r\n}\r\n\r\nexport enum CoreAuthIdentityType {\r\n\tEMAIL = 'email',\r\n\tPHONE = 'phone',\r\n\tGOOGLE = 'google',\r\n\tAPPLE = 'apple',\r\n}\r\n\r\nexport enum ProductType {\r\n\tMEAT = 'meat',\r\n\tCHICKEN = 'chicken',\r\n\tFISH = 'fish',\r\n\tVEGETARIAN = 'vegetarian',\r\n\tOTHER = 'other',\r\n}\r\n\r\nexport enum PriceOption {\r\n\tSINGLE_PRICE = 'single_price',\r\n\tPRICE_PER_UNIT = 'price_per_unit',\r\n\tPRICE_PER_PORTION = 'price_per_portion',\r\n}\r\n\r\nexport enum AttributeItemSelectionType {\r\n\tSINGLE = 'single',\r\n\tMULTIPLE = 'multiple',\r\n}\r\n\r\nexport enum ProductDietaryType {\r\n\tGLUTEN_FREE = 'gluten_free',\r\n\tLOW_CAL = 'low_cal',\r\n\tVEGETARIAN = 'vegetarian',\r\n\tVEGAN = 'vegan',\r\n\tKETO = 'keto',\r\n\tLACTOSE_FREE = 'lactose_free',\r\n\tHIGH_PROTEIN = 'high_protein',\r\n}\r\n\r\nexport enum DishCategory {\r\n\tBREAKFAST = 'breakfast',\r\n\tLUNCH = 'lunch',\r\n\tDINNER = 'dinner',\r\n\tSNACKS = 'snacks',\r\n}\r\n\r\nexport enum NotificationAccountType {\r\n\tUSER = 'user',\r\n\tPARENT = 'parent',\r\n\tSHOP = 'shop',\r\n\tRIDER = 'rider',\r\n\tADMIN = 'admin',\r\n\tCUSTOMER_SERVICE = 'customer_service',\r\n}\r\n\r\nexport enum ClickType {\r\n\tCLICKABLE_URL = 'clickable_url',\r\n\tCLICKABLE_ORDER = 'clickable_order',\r\n\tCLICKABLE_SHOP = 'clickable_shop',\r\n\tCLICKABLE_PRODUCT = 'clickable_product',\r\n\tCLICKABLE_LIST_CONTAINER = 'clickable_list_container',\r\n\tCLICKABLE_PAYOUT = 'clickable_payout',\r\n\tCLICKABLE_BOB_FINANCE = 'clickable_bob_finance',\r\n\tCLICKABLE_REQUEST_AREA = 'clickable_request_area',\r\n}\r\n\r\nexport enum ChargeType {\r\n\tGLOBAL = 'global',\r\n\tCUSTOM = 'custom',\r\n}\r\n\r\nexport enum ShopOnlineStatus {\r\n\tONLINE = 'online',\r\n\tOFFLINE = 'offline',\r\n\tBUSY = 'busy',\r\n}\r\n\r\nexport enum ShopRole {\r\n\tPARENT = 'parent',\r\n\tPARENT_ORDER_MANAGER = 'parent_order_manager',\r\n\tSHOP = 'shop',\r\n\tSHOP_ORDER_MANAGER = 'shop_order_manager',\r\n}\r\n\r\nexport enum BannerClickType {\r\n\tLINK = 'link',\r\n\tSHOP = 'shop',\r\n\tPRODUCT = 'product',\r\n\tLIST_CONTAINER = 'list_container',\r\n\tPLUS = 'plus',\r\n}\r\n\r\nexport enum BannerLinkType {\r\n\tURL = 'url',\r\n\tAPP_ROUTE = 'app-route',\r\n}\r\n\r\nexport enum BannerUserType {\r\n\tALL = 'all',\r\n\tPLUS = 'plus',\r\n\tNORMAL = 'normal',\r\n}\r\n\r\nexport enum CounterType {\r\n\tORDER = 'order',\r\n\tCRM_NUMBER = 'crm_number',\r\n\tshop = 'shop',\r\n}\r\n\r\nexport enum FaqAccountType {\r\n\tUSER = 'user',\r\n\tSHOP = 'shop',\r\n\tRIDER = 'rider',\r\n}\r\n\r\nexport enum ZoneStatus {\r\n\tACTIVE = 'active',\r\n\tINACTIVE = 'inactive',\r\n\tBUSY = 'busy',\r\n}\r\n\r\nexport enum BobAccountType {\r\n\tRIDER = 'rider',\r\n\tSHOP = 'shop',\r\n}\r\n\r\nexport enum BobSettlementType {\r\n\tSETTLE_CASH = 'settle_cash',\r\n\tSETTLE_PAYOUT = 'settle_Payout',\r\n}\r\n\r\nexport enum BobSettlementStatus {\r\n\tNOT_PAID = 'not_paid',\r\n\tPAID = 'paid',\r\n\tREVOKED = 'revoked',\r\n}\r\n\r\nexport enum BobModel {\r\n\tC2B = 'C2B',\r\n\tB2C = 'B2C',\r\n}\r\n\r\nexport enum BobType {\r\n\tINWARD = 'inward',\r\n\tOUTWARD = 'outward',\r\n}\r\n\r\nexport enum CouponType {\r\n\tGLOBAL = 'global',\r\n\tINDIVIDUAL_STORE = 'individual_store',\r\n\tINDIVIDUAL_USER = 'individual_user',\r\n\tCUSTOM_COUPON = 'custom_coupon',\r\n\tREFERRAL_CODE = 'referral_code',\r\n\tREFERRAL_REWARD = 'referral_reward',\r\n}\r\n\r\nexport enum CouponExpirationReason {\r\n\tDURATION = 'duration',\r\n\tSPEND_LIMIT = 'spendLimit',\r\n\tTOTAL_ORDER_LIMIT = 'totalOrderLimit',\r\n}\r\n\r\nexport enum FavouriteType {\r\n\tPRODUCT = 'product',\r\n\tSHOP = 'shop',\r\n}\r\n\r\nexport enum MarketingType {\r\n\tDISCOUNT = 'discount',\r\n\tBUY1GET1 = 'buy1get1',\r\n\tFREE_DELIVERY = 'free_delivery',\r\n\tFEATURED = 'featured',\r\n\tLOYALTY_POINT = 'loyalty_point',\r\n\tPUNCH_MARKETING = 'punch_marketing',\r\n}\r\n\r\nexport enum MarketingStatus {\r\n\tACTIVE = 'active',\r\n\tPAUSED = 'paused',\r\n\tEXPIRED = 'expired',\r\n\tDELETED = 'deleted',\r\n}\r\n\r\nexport enum AdminRole {\r\n\tSUPER_ADMIN = 'super_admin',\r\n\tGENERAL_MANAGER = 'general_manager',\r\n\tORDER_MANAGEMENT_MANAGER = 'order_management_lead',\r\n\tORDER_MANAGEMENT_AGENT = 'order_management_agent',\r\n\tACCOUNT_MANAGER = 'account_manager',\r\n\tBUSINESS_DEVELOPMENT_EXECUTIVE = 'business_development_executive',\r\n\tACCOUNTING = 'accounting',\r\n\tMARKETING_MANAGER = 'marketing_manager',\r\n}\r\n\r\nexport enum CartStatus {\r\n\tACTIVE = 'active',\r\n\tLOCKED = 'locked',\r\n\tSUBMITTED = 'submitted',\r\n}\r\n\r\nexport enum PaymentPreference {\r\n\tPAY_FOR_EVERYONE = 'pay_for_everyone',\r\n\tPAY_FOR_THEMSELVES = 'pay_for_themselves',\r\n}\r\n\r\nexport enum CardType {\r\n\tAREEBA = 'areeba',\r\n}\r\n\r\nexport enum CardUserType {\r\n\tPARENT = 'parent',\r\n\tADMIN = 'admin',\r\n\tUSER = 'user',\r\n}\r\n\r\nexport enum AreebaCardStatus {\r\n\tPENDING = 'pending',\r\n\tACTIVE = 'active',\r\n}\r\n\r\nexport enum LiveStatus {\r\n\tONLINE = 'online',\r\n\tOFFLINE = 'offline',\r\n}\r\n\r\nexport enum CreatedBy {\r\n\tADMIN = 'admin',\r\n\tRIDER = 'rider',\r\n\tSHOP = 'shop',\r\n}\r\n\r\nexport enum ShiftType {\r\n\tDAY = 'day',\r\n\tNIGHT = 'night',\r\n}\r\n\r\nexport enum RiderType {\r\n\tSHOP_RIDER = 'shop_rider',\r\n\tLYXA_RIDER = 'lyxa_rider',\r\n}\r\n\r\nexport enum Language {\r\n\tEN = 'en',\r\n\tAR = 'ar',\r\n}\r\n\r\nexport enum OrderType {\r\n\tREGULAR = 'regular',\r\n\tCOURIER = 'courier',\r\n}\r\n\r\nexport enum RegularOrderStatus {\r\n\tSCHEDULED = 'schedule',\r\n\tPLACED = 'placed',\r\n\tACCEPTED_BY_RIDER = 'accepted_by_rider',\r\n\tPREPARING = 'preparing',\r\n\tREADY_FOR_PICKUP = 'ready_to_pickup',\r\n\tON_THE_WAY = 'on_the_way',\r\n\tDELIVERED = 'delivered',\r\n\tCANCELLED = 'cancelled',\r\n}\r\n\r\nexport enum CourierOrderStatus {\r\n\tSCHEDULED = 'schedule',\r\n\tPLACED = 'placed',\r\n\tACCEPTED_BY_RIDER = 'accepted_by_rider',\r\n\tON_THE_WAY = 'on_the_way',\r\n\tDELIVERED = 'delivered',\r\n\tCANCELLED = 'cancelled',\r\n}\r\n\r\nexport enum DeliveryStatus {\r\n\tPENDING = 'pending',\r\n\tACCEPTED_BY_RIDER = 'accepted_by_rider',\r\n\tREADY_FOR_PICKUP = 'ready_to_pickup',\r\n\tON_THE_WAY = 'on_the_way',\r\n\tDELIVERED = 'delivered',\r\n\tCANCELLED = 'cancelled',\r\n}\r\n\r\nexport enum OrderCancelBy {\r\n\tUSER = 'user',\r\n\tADMIN = 'admin',\r\n\tSHOP = 'shop',\r\n}\r\n\r\nexport enum CourierServiceType {\r\n\tDELIVERY_ONLY = 'delivery_only',\r\n\tPURCHASE_AND_DELIVER = 'purchase_and_deliver',\r\n}\r\n\r\nexport enum RiderAssignmentStatus {\r\n\tREQUESTED = 'requested',\r\n\tASSIGNED = 'assigned',\r\n\tREJECTED = 'rejected',\r\n\tCANCELED = 'canceled',\r\n}\r\n\r\nexport enum ZoneGeometryType {\r\n\tPOLYGON = 'Polygon',\r\n}\r\n\r\nexport enum WorkingHourSettingsType {\r\n\tGLOBAL = \"Global\",\r\n\tSHOP = \"Shop\"\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"enum.js","sourceRoot":"/","sources":["utilities/enum.ts"],"names":[],"mappings":";;;;AAAA,IAAY,MAGX;AAHD,WAAY,MAAM;IACjB,2BAAiB,CAAA;IACjB,+BAAqB,CAAA;AACtB,CAAC,EAHW,MAAM,sBAAN,MAAM,QAGjB;AAED,IAAY,QAQX;AARD,WAAY,QAAQ;IACnB,yBAAa,CAAA;IACb,+BAAmB,CAAA;IACnB,iCAAqB,CAAA;IACrB,6BAAiB,CAAA;IACjB,6BAAiB,CAAA;IACjB,uBAAW,CAAA;IACX,6CAAiC,CAAA;AAClC,CAAC,EARW,QAAQ,wBAAR,QAAQ,QAQnB;AAED,IAAY,OAQX;AARD,WAAY,OAAO;IAClB,yCAAU,CAAA;IACV,yCAA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B,kBAAkB,QAO7B;AAED,IAAY,cAOX;AAPD,WAAY,cAAc;IACzB,qCAAmB,CAAA;IACnB,yDAAuC,CAAA;IACvC,sDAAoC,CAAA;IACpC,2CAAyB,CAAA;IACzB,yCAAuB,CAAA;IACvB,yCAAuB,CAAA;AACxB,CAAC,EAPW,cAAc,8BAAd,cAAc,QAOzB;AAED,IAAY,aAIX;AAJD,WAAY,aAAa;IACxB,8BAAa,CAAA;IACb,gCAAe,CAAA;IACf,8BAAa,CAAA;AACd,CAAC,EAJW,aAAa,6BAAb,aAAa,QAIxB;AAED,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC7B,qDAA+B,CAAA;IAC/B,mEAA6C,CAAA;AAC9C,CAAC,EAHW,kBAAkB,kCAAlB,kBAAkB,QAG7B;AAED,IAAY,qBAKX;AALD,WAAY,qBAAqB;IAChC,gDAAuB,CAAA;IACvB,8CAAqB,CAAA;IACrB,8CAAqB,CAAA;IACrB,8CAAqB,CAAA;AACtB,CAAC,EALW,qBAAqB,qCAArB,qBAAqB,QAKhC;AAED,IAAY,gBAEX;AAFD,WAAY,gBAAgB;IAC3B,uCAAmB,CAAA;AACpB,CAAC,EAFW,gBAAgB,gCAAhB,gBAAgB,QAE3B;AAED,IAAY,uBAGX;AAHD,WAAY,uBAAuB;IAClC,4CAAiB,CAAA;IACjB,wCAAa,CAAA;AACd,CAAC,EAHW,uBAAuB,uCAAvB,uBAAuB,QAGlC;AAED,IAAY,SAEX;AAFD,WAAY,SAAS;IACpB,4BAAe,CAAA;AAChB,CAAC,EAFW,SAAS,yBAAT,SAAS,QAEpB","sourcesContent":["export enum Status {\r\n\tACTIVE = 'active',\r\n\tINACTIVE = 'inactive',\r\n}\r\n\r\nexport enum ItemType {\r\n\tFOOD = 'food',\r\n\tGROCERY = 'grocery',\r\n\tPHARMACY = 'pharmacy',\r\n\tCOFFEE = 'coffee',\r\n\tFLOWER = 'flower',\r\n\tPET = 'pet',\r\n\tHEALTHY_CORNER = 'healthy_corner',\r\n}\r\n\r\nexport enum WeekDay {\r\n\tSunday = 0,\r\n\tMonday = 1,\r\n\tTuesday = 2,\r\n\tWednesday = 3,\r\n\tThursday = 4,\r\n\tFriday = 5,\r\n\tSaturday = 6,\r\n}\r\n\r\nexport enum WorkStatus {\r\n\tOPEN = 'open',\r\n\tCLOSED = 'closed',\r\n\tFULL_DAY = 'full_day',\r\n}\r\n\r\nexport enum HolidayWorkStatus {\r\n\tCLOSED = WorkStatus.CLOSED,\r\n\tFULL_DAY = WorkStatus.FULL_DAY,\r\n}\r\n\r\nexport enum ValueType {\r\n\tPERCENTAGE = 'percentage',\r\n\tFIXED = 'fixed',\r\n}\r\n\r\nexport enum PaymentMethod {\r\n\tCASH = 'cash',\r\n\tCARD = 'card',\r\n}\r\n\r\nexport enum PaymentStatus {\r\n\tPAID = 'paid',\r\n\tPENDING = 'pending',\r\n\tFAILED = 'failed',\r\n\tREFUNDED = 'refunded',\r\n\tPARTIALLY_REFUNDED = 'partially_refunded',\r\n}\r\n\r\nexport enum PaidCurrency {\r\n\tBASE = 'base',\r\n\tSECONDARY = 'secondary',\r\n\tMIXED = 'mixed',\r\n}\r\n\r\nexport enum SubscriptionPackage {\r\n\tMONTHLY = 'monthly',\r\n\tYEARLY = 'yearly',\r\n}\r\n\r\nexport enum SubscriptionStatus {\r\n\tONGOING = 'ongoing',\r\n\tEXPIRED = 'expired',\r\n}\r\n\r\nexport enum RatingAccountType {\r\n\tSHOP = 'shop',\r\n\tRIDER = 'rider',\r\n}\r\n\r\nexport enum GeoLocationType {\r\n\tPOINT = 'point',\r\n\tPOLYGON = 'polygon',\r\n}\r\n\r\nexport enum UpdatedField {\r\n\tMAX_TOTAL_EST_ITEMS_PRICE = 'max_total_est_items_price',\r\n\tMAX_DISTANCE = 'max_distance',\r\n\tDAILY_WORKING_HOURS = 'daily_working_hours',\r\n\tBOB_CASH_SETTLEMENT_LIMIT = 'bob_cash_settlement_limit',\r\n\tTIPS = 'tips',\r\n\tEQUIPMENTS = 'equipments',\r\n\tMONTHLY_SHOP_TARGET = 'monthly_shop_target',\r\n\tMONTHLY_REWARD_PRIZE = 'monthly_reward_prize',\r\n\tBASE_CURRENCY = 'base_currency',\r\n\tSECONDARY_CURRENCY = 'secondary_currency',\r\n\tIS_DUAL_CURRENCY_ENABLED = 'is_dual_currency_enabled',\r\n\tEXCHANGE_RATE = 'exchange_rate',\r\n\tISSUANCE_DAY = 'issuance_day',\r\n\tOVER_DUE_PERIODS = 'over_due_periods',\r\n\tPAY_LIMIT_FOR_USER = 'pay_limit_for_user',\r\n\tVAT_PERCENTAGE = 'vat_percentage',\r\n\tRIDER_SEARCH_RANGES = 'rider_search_ranges',\r\n\tNEAR_BY_SHOP_DISTANCE = 'near_by_shop_distance',\r\n\tNEAR_BY_SHOP_DISTANCE_IN_HOME_SCREEN = 'near_by_shop_distance_in_home_screen',\r\n\tUNITS = 'units',\r\n\tCURRENCY_SETTING = 'currency_setting',\r\n\tPAYMENT_METHODS = 'payment_methods',\r\n\tIS_GROUND_ORDER_ENABLED = 'is_ground_order_enabled',\r\n\tCUSTOMER_SUPPORT_PHONE_NUMBER = 'customer_support_phone_number',\r\n}\r\n\r\nexport enum SectionType {\r\n\tSTORE_PUNCHES = 'store_punches',\r\n\tNEARBY_RESTAURANT = 'nearby_restaurant',\r\n\tNEARBY_GROCERY = 'nearby_grocery',\r\n\tNEARBY_PHARMACY = 'nearby_pharmacy',\r\n\tDISCOUNT = 'discount',\r\n\tFREE_DELIVERY = 'free_delivery',\r\n\tCRAZY_OFFER_SHOPS = 'crazy_offer_shops',\r\n\tORDER_AGAIN = 'order_again',\r\n\tFEATURED = 'featured',\r\n\tLOVE = 'love',\r\n\tAUTHENTIC_BEIRUT = 'authentic_beirut',\r\n\tNEAR_ME = 'near_me',\r\n}\r\n\r\nexport enum CoreAuthIdentityType {\r\n\tEMAIL = 'email',\r\n\tPHONE = 'phone',\r\n\tGOOGLE = 'google',\r\n\tAPPLE = 'apple',\r\n}\r\n\r\nexport enum ProductType {\r\n\tMEAT = 'meat',\r\n\tCHICKEN = 'chicken',\r\n\tFISH = 'fish',\r\n\tVEGETARIAN = 'vegetarian',\r\n\tOTHER = 'other',\r\n}\r\n\r\nexport enum PriceOption {\r\n\tSINGLE_PRICE = 'single_price',\r\n\tPRICE_PER_UNIT = 'price_per_unit',\r\n\tPRICE_PER_PORTION = 'price_per_portion',\r\n}\r\n\r\nexport enum AttributeItemSelectionType {\r\n\tSINGLE = 'single',\r\n\tMULTIPLE = 'multiple',\r\n}\r\n\r\nexport enum ProductDietaryType {\r\n\tGLUTEN_FREE = 'gluten_free',\r\n\tLOW_CAL = 'low_cal',\r\n\tVEGETARIAN = 'vegetarian',\r\n\tVEGAN = 'vegan',\r\n\tKETO = 'keto',\r\n\tLACTOSE_FREE = 'lactose_free',\r\n\tHIGH_PROTEIN = 'high_protein',\r\n}\r\n\r\nexport enum DishCategory {\r\n\tBREAKFAST = 'breakfast',\r\n\tLUNCH = 'lunch',\r\n\tDINNER = 'dinner',\r\n\tSNACKS = 'snacks',\r\n}\r\n\r\nexport enum NotificationAccountType {\r\n\tUSER = 'user',\r\n\tPARENT = 'parent',\r\n\tSHOP = 'shop',\r\n\tRIDER = 'rider',\r\n\tADMIN = 'admin',\r\n\tCUSTOMER_SERVICE = 'customer_service',\r\n}\r\n\r\nexport enum ClickType {\r\n\tCLICKABLE_URL = 'clickable_url',\r\n\tCLICKABLE_ORDER = 'clickable_order',\r\n\tCLICKABLE_SHOP = 'clickable_shop',\r\n\tCLICKABLE_PRODUCT = 'clickable_product',\r\n\tCLICKABLE_LIST_CONTAINER = 'clickable_list_container',\r\n\tCLICKABLE_PAYOUT = 'clickable_payout',\r\n\tCLICKABLE_BOB_FINANCE = 'clickable_bob_finance',\r\n\tCLICKABLE_REQUEST_AREA = 'clickable_request_area',\r\n}\r\n\r\nexport enum ChargeType {\r\n\tGLOBAL = 'global',\r\n\tCUSTOM = 'custom',\r\n}\r\n\r\nexport enum ShopOnlineStatus {\r\n\tONLINE = 'online',\r\n\tOFFLINE = 'offline',\r\n\tBUSY = 'busy',\r\n}\r\n\r\nexport enum ShopRole {\r\n\tPARENT = 'parent',\r\n\tPARENT_ORDER_MANAGER = 'parent_order_manager',\r\n\tSHOP = 'shop',\r\n\tSHOP_ORDER_MANAGER = 'shop_order_manager',\r\n}\r\n\r\nexport enum BannerClickType {\r\n\tLINK = 'link',\r\n\tSHOP = 'shop',\r\n\tPRODUCT = 'product',\r\n\tLIST_CONTAINER = 'list_container',\r\n\tPLUS = 'plus',\r\n}\r\n\r\nexport enum BannerLinkType {\r\n\tURL = 'url',\r\n\tAPP_ROUTE = 'app-route',\r\n}\r\n\r\nexport enum BannerUserType {\r\n\tALL = 'all',\r\n\tPLUS = 'plus',\r\n\tNORMAL = 'normal',\r\n}\r\n\r\nexport enum CounterType {\r\n\tORDER = 'order',\r\n\tCRM_NUMBER = 'crm_number',\r\n\tshop = 'shop',\r\n}\r\n\r\nexport enum FaqAccountType {\r\n\tUSER = 'user',\r\n\tSHOP = 'shop',\r\n\tRIDER = 'rider',\r\n}\r\n\r\nexport enum ZoneStatus {\r\n\tACTIVE = 'active',\r\n\tINACTIVE = 'inactive',\r\n\tBUSY = 'busy',\r\n}\r\n\r\nexport enum BobAccountType {\r\n\tRIDER = 'rider',\r\n\tSHOP = 'shop',\r\n}\r\n\r\nexport enum BobSettlementType {\r\n\tSETTLE_CASH = 'settle_cash',\r\n\tSETTLE_PAYOUT = 'settle_Payout',\r\n}\r\n\r\nexport enum BobSettlementStatus {\r\n\tNOT_PAID = 'not_paid',\r\n\tPAID = 'paid',\r\n\tREVOKED = 'revoked',\r\n}\r\n\r\nexport enum BobModel {\r\n\tC2B = 'C2B',\r\n\tB2C = 'B2C',\r\n}\r\n\r\nexport enum BobType {\r\n\tINWARD = 'inward',\r\n\tOUTWARD = 'outward',\r\n}\r\n\r\nexport enum CouponType {\r\n\tGLOBAL = 'global',\r\n\tINDIVIDUAL_STORE = 'individual_store',\r\n\tINDIVIDUAL_USER = 'individual_user',\r\n\tCUSTOM_COUPON = 'custom_coupon',\r\n\tREFERRAL_CODE = 'referral_code',\r\n\tREFERRAL_REWARD = 'referral_reward',\r\n}\r\n\r\nexport enum CouponExpirationReason {\r\n\tDURATION = 'duration',\r\n\tSPEND_LIMIT = 'spendLimit',\r\n\tTOTAL_ORDER_LIMIT = 'totalOrderLimit',\r\n}\r\n\r\nexport enum FavouriteType {\r\n\tPRODUCT = 'product',\r\n\tSHOP = 'shop',\r\n}\r\n\r\nexport enum MarketingType {\r\n\tDISCOUNT = 'discount',\r\n\tBUY1GET1 = 'buy1get1',\r\n\tFREE_DELIVERY = 'free_delivery',\r\n\tFEATURED = 'featured',\r\n\tLOYALTY_POINT = 'loyalty_point',\r\n\tPUNCH_MARKETING = 'punch_marketing',\r\n}\r\n\r\nexport enum MarketingStatus {\r\n\tACTIVE = 'active',\r\n\tPAUSED = 'paused',\r\n\tEXPIRED = 'expired',\r\n\tDELETED = 'deleted',\r\n}\r\n\r\nexport enum AdminRole {\r\n\tSUPER_ADMIN = 'super_admin',\r\n\tGENERAL_MANAGER = 'general_manager',\r\n\tORDER_MANAGEMENT_MANAGER = 'order_management_lead',\r\n\tORDER_MANAGEMENT_AGENT = 'order_management_agent',\r\n\tACCOUNT_MANAGER = 'account_manager',\r\n\tBUSINESS_DEVELOPMENT_EXECUTIVE = 'business_development_executive',\r\n\tACCOUNTING = 'accounting',\r\n\tMARKETING_MANAGER = 'marketing_manager',\r\n}\r\n\r\nexport enum CartStatus {\r\n\tACTIVE = 'active',\r\n\tLOCKED = 'locked',\r\n\tSUBMITTED = 'submitted',\r\n}\r\n\r\nexport enum PaymentPreference {\r\n\tPAY_FOR_EVERYONE = 'pay_for_everyone',\r\n\tPAY_FOR_THEMSELVES = 'pay_for_themselves',\r\n}\r\n\r\nexport enum CardType {\r\n\tAREEBA = 'areeba',\r\n}\r\n\r\nexport enum CardUserType {\r\n\tPARENT = 'parent',\r\n\tADMIN = 'admin',\r\n\tUSER = 'user',\r\n}\r\n\r\nexport enum AreebaCardStatus {\r\n\tPENDING = 'pending',\r\n\tACTIVE = 'active',\r\n}\r\n\r\nexport enum LiveStatus {\r\n\tONLINE = 'online',\r\n\tOFFLINE = 'offline',\r\n}\r\n\r\nexport enum CreatedBy {\r\n\tADMIN = 'admin',\r\n\tRIDER = 'rider',\r\n\tSHOP = 'shop',\r\n}\r\n\r\nexport enum ShiftType {\r\n\tDAY = 'day',\r\n\tNIGHT = 'night',\r\n}\r\n\r\nexport enum RiderType {\r\n\tSHOP_RIDER = 'shop_rider',\r\n\tLYXA_RIDER = 'lyxa_rider',\r\n}\r\n\r\nexport enum Language {\r\n\tEN = 'en',\r\n\tAR = 'ar',\r\n}\r\n\r\nexport enum OrderType {\r\n\tREGULAR = 'regular',\r\n\tCOURIER = 'courier',\r\n}\r\n\r\nexport enum RegularOrderStatus {\r\n\tSCHEDULED = 'schedule',\r\n\tPLACED = 'placed',\r\n\tACCEPTED_BY_RIDER = 'accepted_by_rider',\r\n\tPREPARING = 'preparing',\r\n\tREADY_FOR_PICKUP = 'ready_to_pickup',\r\n\tON_THE_WAY = 'on_the_way',\r\n\tDELIVERED = 'delivered',\r\n\tCANCELLED = 'cancelled',\r\n}\r\n\r\nexport enum CourierOrderStatus {\r\n\tSCHEDULED = 'schedule',\r\n\tPLACED = 'placed',\r\n\tACCEPTED_BY_RIDER = 'accepted_by_rider',\r\n\tON_THE_WAY = 'on_the_way',\r\n\tDELIVERED = 'delivered',\r\n\tCANCELLED = 'cancelled',\r\n}\r\n\r\nexport enum DeliveryStatus {\r\n\tPENDING = 'pending',\r\n\tACCEPTED_BY_RIDER = 'accepted_by_rider',\r\n\tREADY_FOR_PICKUP = 'ready_to_pickup',\r\n\tON_THE_WAY = 'on_the_way',\r\n\tDELIVERED = 'delivered',\r\n\tCANCELLED = 'cancelled',\r\n}\r\n\r\nexport enum OrderCancelBy {\r\n\tUSER = 'user',\r\n\tADMIN = 'admin',\r\n\tSHOP = 'shop',\r\n}\r\n\r\nexport enum CourierServiceType {\r\n\tDELIVERY_ONLY = 'delivery_only',\r\n\tPURCHASE_AND_DELIVER = 'purchase_and_deliver',\r\n}\r\n\r\nexport enum RiderAssignmentStatus {\r\n\tREQUESTED = 'requested',\r\n\tASSIGNED = 'assigned',\r\n\tREJECTED = 'rejected',\r\n\tCANCELED = 'canceled',\r\n}\r\n\r\nexport enum ZoneGeometryType {\r\n\tPOLYGON = 'Polygon',\r\n}\r\n\r\nexport enum WorkingHourSettingsType {\r\n\tGLOBAL = 'Global',\r\n\tSHOP = 'Shop',\r\n}\r\n\r\nexport enum MediaType {\r\n\tIMAGE = 'image',\r\n}\r\n"]}
|
|
@@ -209,6 +209,60 @@ export declare const UserAddressSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
209
209
|
instructions?: string | null | undefined;
|
|
210
210
|
geoLocationType?: GeoLocationType | undefined;
|
|
211
211
|
}>;
|
|
212
|
+
export declare const CourierAddressSchema: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
213
|
+
address: z.ZodString | z.ZodOptional<z.ZodString> | z.ZodNullable<z.ZodString> | z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
214
|
+
description: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodNullable<z.ZodString>> | z.ZodOptional<z.ZodOptional<z.ZodString>> | z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
215
|
+
city: z.ZodString | z.ZodOptional<z.ZodString> | z.ZodNullable<z.ZodString> | z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
216
|
+
state: z.ZodString | z.ZodOptional<z.ZodString> | z.ZodNullable<z.ZodString> | z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
217
|
+
country: z.ZodString | z.ZodOptional<z.ZodString> | z.ZodNullable<z.ZodString> | z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
218
|
+
geoLocationType: z.ZodDefault<z.ZodNativeEnum<typeof GeoLocationType>>;
|
|
219
|
+
coordinates: z.ZodArray<z.ZodNumber, "many">;
|
|
220
|
+
latitude: z.ZodNumber;
|
|
221
|
+
longitude: z.ZodNumber;
|
|
222
|
+
}, {
|
|
223
|
+
addressLabel: z.ZodString | z.ZodOptional<z.ZodString> | z.ZodNullable<z.ZodString> | z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
224
|
+
apartment: z.ZodString | z.ZodOptional<z.ZodString> | z.ZodNullable<z.ZodString> | z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
225
|
+
buildingName: z.ZodString | z.ZodOptional<z.ZodString> | z.ZodNullable<z.ZodString> | z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
226
|
+
deliveryOption: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodNullable<z.ZodString>> | z.ZodOptional<z.ZodOptional<z.ZodString>> | z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
227
|
+
instructions: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodNullable<z.ZodString>> | z.ZodOptional<z.ZodOptional<z.ZodString>> | z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
228
|
+
}>, {
|
|
229
|
+
name: z.ZodString | z.ZodOptional<z.ZodString> | z.ZodNullable<z.ZodString> | z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
230
|
+
phonenumber: z.ZodString | z.ZodOptional<z.ZodString> | z.ZodNullable<z.ZodString> | z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
231
|
+
}>, "strip", z.ZodTypeAny, {
|
|
232
|
+
coordinates: number[];
|
|
233
|
+
latitude: number;
|
|
234
|
+
longitude: number;
|
|
235
|
+
geoLocationType: GeoLocationType;
|
|
236
|
+
name?: string | null | undefined;
|
|
237
|
+
state?: string | null | undefined;
|
|
238
|
+
address?: string | null | undefined;
|
|
239
|
+
country?: string | null | undefined;
|
|
240
|
+
description?: string | null | undefined;
|
|
241
|
+
city?: string | null | undefined;
|
|
242
|
+
addressLabel?: string | null | undefined;
|
|
243
|
+
apartment?: string | null | undefined;
|
|
244
|
+
buildingName?: string | null | undefined;
|
|
245
|
+
deliveryOption?: string | null | undefined;
|
|
246
|
+
instructions?: string | null | undefined;
|
|
247
|
+
phonenumber?: string | null | undefined;
|
|
248
|
+
}, {
|
|
249
|
+
coordinates: number[];
|
|
250
|
+
latitude: number;
|
|
251
|
+
longitude: number;
|
|
252
|
+
name?: string | null | undefined;
|
|
253
|
+
state?: string | null | undefined;
|
|
254
|
+
address?: string | null | undefined;
|
|
255
|
+
country?: string | null | undefined;
|
|
256
|
+
description?: string | null | undefined;
|
|
257
|
+
city?: string | null | undefined;
|
|
258
|
+
addressLabel?: string | null | undefined;
|
|
259
|
+
apartment?: string | null | undefined;
|
|
260
|
+
buildingName?: string | null | undefined;
|
|
261
|
+
deliveryOption?: string | null | undefined;
|
|
262
|
+
instructions?: string | null | undefined;
|
|
263
|
+
phonenumber?: string | null | undefined;
|
|
264
|
+
geoLocationType?: GeoLocationType | undefined;
|
|
265
|
+
}>;
|
|
212
266
|
export declare const DurationSchema: z.ZodObject<{
|
|
213
267
|
start: z.ZodEffects<z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, Date, string>, z.ZodDate]>, Date, string | Date>, Date, string | Date>;
|
|
214
268
|
end: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, Date, string>, z.ZodDate]>, Date, string | Date>, Date, string | Date>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.IdSchema = exports.DeleteSchema = exports.UpdateSortingOrderSchema = exports.TokenSchema = exports.createResponseSchema = exports.createPaginatedSchema = exports.LoginSchema = exports.WorkHourSettingSchema = exports.HolidayHourSchema = exports.NormalHourSchema = exports.DurationSchema = exports.UserAddressSchema = exports.AddressSchema = exports.StringSchema = exports.FilterSchema = void 0;
|
|
3
|
+
exports.IdSchema = exports.DeleteSchema = exports.UpdateSortingOrderSchema = exports.TokenSchema = exports.createResponseSchema = exports.createPaginatedSchema = exports.LoginSchema = exports.WorkHourSettingSchema = exports.HolidayHourSchema = exports.NormalHourSchema = exports.DurationSchema = exports.CourierAddressSchema = exports.UserAddressSchema = exports.AddressSchema = exports.StringSchema = exports.FilterSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const global_validation_1 = require("./global-validation");
|
|
6
6
|
const enum_1 = require("../enum");
|
|
@@ -68,6 +68,10 @@ exports.UserAddressSchema = exports.AddressSchema.extend({
|
|
|
68
68
|
deliveryOption: global_validation_1.ZodValidation.string('Delivery Option').optional(),
|
|
69
69
|
instructions: global_validation_1.ZodValidation.string('Instructions').optional(),
|
|
70
70
|
});
|
|
71
|
+
exports.CourierAddressSchema = exports.UserAddressSchema.extend({
|
|
72
|
+
name: global_validation_1.ZodValidation.string('Name'),
|
|
73
|
+
phonenumber: global_validation_1.ZodValidation.string('Phonenumber'),
|
|
74
|
+
});
|
|
71
75
|
exports.DurationSchema = zod_1.z.object({
|
|
72
76
|
start: global_validation_1.ZodValidation.date('Start'),
|
|
73
77
|
end: global_validation_1.ZodValidation.date('End').optional(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common-validation.js","sourceRoot":"/","sources":["utilities/validation/common-validation.ts"],"names":[],"mappings":";;;AAAA,6BAAmC;AACnC,2DAAyD;AACzD,kCAAkF;AAKlF,MAAM,gBAAgB,GAAmC,OAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CACpE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,KAAK,CAAC,CAAC,OAAC,CAAC,GAAG,EAAE,EAAE,oBAAoB,CAAC,CAAC,CAAC,CAClD,CAAC;AAKF,MAAM,oBAAoB,GAAG,OAAC,CAAC,MAAM,CAAC;IACrC,GAAG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AAM,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,QAAQ,EAAE;CACjE,CAAC,CAAC;AALS,QAAA,oBAAoB,wBAK7B;AAcS,QAAA,WAAW,GAAG,OAAC,CAAC,MAAM,CAAC;IACnC,WAAW,EAAE,iCAAa,CAAC,MAAM,CAAC,aAAa,CAAC;IAChD,YAAY,EAAE,iCAAa,CAAC,MAAM,CAAC,cAAc,CAAC;CAClD,CAAC,CAAC;AAKU,QAAA,wBAAwB,GAAG,OAAC,CAAC,MAAM,CAAC;IAChD,UAAU,EAAE,iCAAa,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;IACzD,IAAI,EAAE,iCAAa,CAAC,KAAK,CAAC,iCAAa,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC;CACnE,CAAC,CAAC;AAMU,QAAA,YAAY,GAAG,OAAC,CAAC,MAAM,CAAC;IACpC,GAAG,EAAE,iCAAa,CAAC,QAAQ,CAAC,KAAK,CAAC;IAClC,UAAU,EAAE,iCAAa,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC;CAC9D,CAAC,CAAC;AAMU,QAAA,QAAQ,GAAG,iCAAa,CAAC,QAAQ,EAAE,CAAC","sourcesContent":["import { z, ZodSchema } from 'zod';\r\nimport { DTO, ZodValidation } from './global-validation';\r\nimport { GeoLocationType, HolidayWorkStatus, WeekDay, WorkStatus } from '../enum';\r\n\r\n/**\r\n * Define MongoDB query schema (fields + operators) using lazy evaluation to avoid circular dependency\r\n */\r\nconst MongoQuerySchema: z.ZodType<Record<string, any>> = z.lazy(() =>\r\n\tz.record(z.union([z.any(), MongoOperatorsSchema]))\r\n);\r\n\r\n/**\r\n * Define allowed MongoDB query operators\r\n */\r\nconst MongoOperatorsSchema = z.object({\r\n\t$eq: z.any().optional(),\r\n\t$ne: z.any().optional(),\r\n\t$gt: z.any().optional(),\r\n\t$gte: z.any().optional(),\r\n\t$lt: z.any().optional(),\r\n\t$lte: z.any().optional(),\r\n\t$in: z.array(z.any()).optional(),\r\n\t$nin: z.array(z.any()).optional(),\r\n\t$exists: z.boolean().optional(),\r\n\t$regex: z.string().optional(),\r\n\t$and: z.array(MongoQuerySchema).optional(),\r\n\t$or: z.array(MongoQuerySchema).optional(),\r\n\t$not: MongoQuerySchema.optional(),\r\n\t$nor: z.array(MongoQuerySchema).optional(),\r\n});\r\n\r\nconst sortSchema = z.record(z.string(), z.union([z.literal(1), z.literal(-1)]));\r\n\r\nconst populateSchema = z.object({\r\n\tpath: z.string(), // required\r\n\tselect: z.record(z.string(), z.union([z.literal(0), z.literal(1)])).optional(),\r\n\tmatch: z.record(z.string(), z.any()).optional(),\r\n\toptions: z\r\n\t\t.object({\r\n\t\t\tsort: sortSchema.optional(),\r\n\t\t\tlimit: z.number().optional(),\r\n\t\t\tskip: z.number().optional(),\r\n\t\t})\r\n\t\t.optional(),\r\n});\r\n\r\n/**\r\n * Define the filter schema using MongoQuerySchema\r\n */\r\nexport const FilterSchema = z\r\n\t.object({\r\n\t\tsize: z\r\n\t\t\t.number()\r\n\t\t\t.min(1, { message: 'Size must be greater than 0.' })\r\n\t\t\t.max(100, { message: 'Size cannot exceed 100.' })\r\n\t\t\t.optional()\r\n\t\t\t.default(10),\r\n\t\tpage: z.number().min(1, { message: 'Page number must be at least 1.' }).optional().default(1),\r\n\t\tsort: sortSchema.optional(),\r\n\t\tquery: MongoQuerySchema.optional(),\r\n\t\tselect: z.record(z.string(), z.union([z.literal(0), z.literal(1)])).optional(),\r\n\t\tpopulate: z.union([populateSchema, z.array(populateSchema)]).optional(),\r\n\t})\r\n\t.optional();\r\n\r\n/**\r\n * Infer TypeScript type from Zod schema\r\n */\r\nexport type FilterDTO = z.infer<typeof FilterSchema>;\r\n\r\n/**\r\n * Define String schema\r\n */\r\nexport const StringSchema = z.string().min(1, 'String cannot be empty').max(255, 'String is too long');\r\n\r\n/**\r\n * Common address validation schema that can be reused across models.\r\n * Provides validation for address-related fields.\r\n *\r\n * @example\r\n * ```typescript\r\n * const userSchema = z.object({\r\n * name: z.string(),\r\n * address: AddressSchema\r\n * });\r\n * ```\r\n */\r\nexport const AddressSchema = z.object({\r\n\taddress: ZodValidation.string('Address'),\r\n\tdescription: ZodValidation.string('Description').optional(),\r\n\tcity: ZodValidation.string('City'),\r\n\tstate: ZodValidation.string('State'),\r\n\tcountry: ZodValidation.string('Country'),\r\n\tgeoLocationType: ZodValidation.enumType(GeoLocationType, 'GeoLocationType').default(GeoLocationType.POINT),\r\n\tcoordinates: ZodValidation.array(ZodValidation.number('Coordinate'), 'Coordinates', 2, 2),\r\n\tlatitude: ZodValidation.number('Latitude'),\r\n\tlongitude: ZodValidation.number('Longitude'),\r\n});\r\n\r\n/**\r\n * Common user address validation schema that can be reused across models.\r\n * Provides validation for address-related fields.\r\n *\r\n * @example\r\n * ```typescript\r\n * const userSchema = z.object({\r\n * name: z.string(),\r\n * address: UserAddressSchema\r\n * });\r\n * ```\r\n */\r\nexport const UserAddressSchema = AddressSchema.extend({\r\n\taddressLabel: ZodValidation.string('Address Label'),\r\n\tapartment: ZodValidation.string('Apartment'),\r\n\tbuildingName: ZodValidation.string('Building Name'),\r\n\tdeliveryOption: ZodValidation.string('Delivery Option').optional(),\r\n\tinstructions: ZodValidation.string('Instructions').optional(),\r\n});\r\n\r\n/**\r\n * Common duration validation schema that can be reused across models.\r\n * Provides validation for duration fields.\r\n *\r\n * @example\r\n * ```typescript\r\n * const subscriptionSchema = z.object({\r\n * fee: z.number(),\r\n * duration: DurationSchema\r\n * });\r\n * ```\r\n */\r\nexport const DurationSchema = z.object({\r\n\tstart: ZodValidation.date('Start'),\r\n\tend: ZodValidation.date('End').optional(),\r\n});\r\n\r\n/**\r\n * Common Work Hour validation schema that can be reused across models.\r\n * Provides validation for workHourSetting fields.\r\n *\r\n * @example\r\n * ```typescript\r\n * const settingSchema = z.object({\r\n * vat: z.number(),\r\n * workHourSetting: WorkHourSettingSchema\r\n * });\r\n * ```\r\n */\r\nconst StartEndTimeSchema = z.object({\r\n\tstart: ZodValidation.string('Start'),\r\n\tend: ZodValidation.string('End'),\r\n});\r\n\r\nexport const NormalHourSchema = z.object({\r\n\tday: ZodValidation.enumType(WeekDay, 'Day'),\r\n\tstatus: ZodValidation.enumType(WorkStatus, 'Status'),\r\n\topeningHours: ZodValidation.array(StartEndTimeSchema).default([]),\r\n});\r\n\r\nexport const HolidayHourSchema = z.object({\r\n\tdate: ZodValidation.date('Date'),\r\n\tstatus: ZodValidation.enumType(HolidayWorkStatus, 'Status'),\r\n\tclosingHour: StartEndTimeSchema,\r\n});\r\n\r\nexport const WorkHourSettingSchema = z.object({\r\n\tnormalHours: ZodValidation.array(NormalHourSchema).default([]),\r\n\tholidayHours: ZodValidation.array(HolidayHourSchema).default([]),\r\n});\r\n\r\n/**\r\n * Schema for validating user login credentials.\r\n * This schema ensures that the provided email and password meet the required validation rules.\r\n *\r\n * @example\r\n * ```typescript\r\n * const credentials = {\r\n * email: 'user@example.com',\r\n * password: 'securePassword123',\r\n * };\r\n * ```\r\n */\r\nexport const LoginSchema = z.object({\r\n\temail: ZodValidation.email('Email', {\r\n\t\trequiredMessage: 'Please enter a valid email address.',\r\n\t\tinvalidMessage: 'Please enter a valid email address.',\r\n\t}),\r\n\tpassword: ZodValidation.string('Password', { requiredMessage: 'Please enter password' }),\r\n});\r\nconst metadataSchema = z.object({\r\n\tpage: ZodValidation.number(),\r\n\tsize: ZodValidation.number(),\r\n\ttotalElements: ZodValidation.number(),\r\n\ttotalPages: ZodValidation.number(),\r\n});\r\n\r\nexport const createPaginatedSchema = <T>(documentSchema: z.ZodSchema<T>) =>\r\n\tz.object({\r\n\t\tmetadata: metadataSchema.optional(),\r\n\t\tdocuments: ZodValidation.array(documentSchema),\r\n\t});\r\n\r\nexport const createResponseSchema = <T>(schema: z.ZodSchema<T>) =>\r\n\tz.object({\r\n\t\tsuccess: ZodValidation.boolean(),\r\n\t\tmessage: ZodValidation.string(),\r\n\t\tdata: z.union([createPaginatedSchema(schema), schema]).optional(),\r\n\t});\r\n\r\n/**\r\n * Schema for validating token data, typically used for authentication.\r\n * This schema ensures that the provided access token and refresh token are valid strings.\r\n *\r\n * @example\r\n * ```typescript\r\n * const tokens = {\r\n * accessToken: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...',\r\n * refreshToken: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...',\r\n * };\r\n * ```\r\n */\r\nexport const TokenSchema = z.object({\r\n\taccessToken: ZodValidation.string('AccessToken'),\r\n\trefreshToken: ZodValidation.string('RefreshToken'),\r\n});\r\n\r\n/**\r\n * Schema validation for sorting order\r\n */\r\nexport const UpdateSortingOrderSchema = z.object({\r\n\tstartIndex: ZodValidation.number('StartIndex').default(1),\r\n\tlist: ZodValidation.array(ZodValidation.objectId('_id'), 'List', 1),\r\n});\r\nexport type UpdateSortingOrderDTO = DTO<typeof UpdateSortingOrderSchema>;\r\n\r\n/**\r\n * Schema validation for delete\r\n */\r\nexport const DeleteSchema = z.object({\r\n\t_id: ZodValidation.objectId('_id'),\r\n\tsoftDelete: ZodValidation.boolean('Soft Delete').default(true),\r\n});\r\nexport type DeleteDTO = DTO<typeof DeleteSchema>;\r\n\r\n/**\r\n * Schema validation for Id\r\n */\r\nexport const IdSchema = ZodValidation.objectId();\r\n"]}
|
|
1
|
+
{"version":3,"file":"common-validation.js","sourceRoot":"/","sources":["utilities/validation/common-validation.ts"],"names":[],"mappings":";;;AAAA,6BAAmC;AACnC,2DAAyD;AACzD,kCAAkF;AAKlF,MAAM,gBAAgB,GAAmC,OAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CACpE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,KAAK,CAAC,CAAC,OAAC,CAAC,GAAG,EAAE,EAAE,oBAAoB,CAAC,CAAC,CAAC,CAClD,CAAC;AAKF,MAAM,oBAAoB,GAAG,OAAC,CAAC,MAAM,C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EAAE,EAAE,CACjE,OAAC,CAAC,MAAM,CAAC;IACR,OAAO,EAAE,iCAAa,CAAC,OAAO,EAAE;IAChC,OAAO,EAAE,iCAAa,CAAC,MAAM,EAAE;IAC/B,IAAI,EAAE,OAAC,CAAC,KAAK,CAAC,CAAC,IAAA,6BAAqB,EAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,QAAQ,EAAE;CACjE,CAAC,CAAC;AALS,QAAA,oBAAoB,wBAK7B;AAcS,QAAA,WAAW,GAAG,OAAC,CAAC,MAAM,CAAC;IACnC,WAAW,EAAE,iCAAa,CAAC,MAAM,CAAC,aAAa,CAAC;IAChD,YAAY,EAAE,iCAAa,CAAC,MAAM,CAAC,cAAc,CAAC;CAClD,CAAC,CAAC;AAKU,QAAA,wBAAwB,GAAG,OAAC,CAAC,MAAM,CAAC;IAChD,UAAU,EAAE,iCAAa,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;IACzD,IAAI,EAAE,iCAAa,CAAC,KAAK,CAAC,iCAAa,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC;CACnE,CAAC,CAAC;AAMU,QAAA,YAAY,GAAG,OAAC,CAAC,MAAM,CAAC;IACpC,GAAG,EAAE,iCAAa,CAAC,QAAQ,CAAC,KAAK,CAAC;IAClC,UAAU,EAAE,iCAAa,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC;CAC9D,CAAC,CAAC;AAMU,QAAA,QAAQ,GAAG,iCAAa,CAAC,QAAQ,EAAE,CAAC","sourcesContent":["import { z, ZodSchema } from 'zod';\r\nimport { DTO, ZodValidation } from './global-validation';\r\nimport { GeoLocationType, HolidayWorkStatus, WeekDay, WorkStatus } from '../enum';\r\n\r\n/**\r\n * Define MongoDB query schema (fields + operators) using lazy evaluation to avoid circular dependency\r\n */\r\nconst MongoQuerySchema: z.ZodType<Record<string, any>> = z.lazy(() =>\r\n\tz.record(z.union([z.any(), MongoOperatorsSchema]))\r\n);\r\n\r\n/**\r\n * Define allowed MongoDB query operators\r\n */\r\nconst MongoOperatorsSchema = z.object({\r\n\t$eq: z.any().optional(),\r\n\t$ne: z.any().optional(),\r\n\t$gt: z.any().optional(),\r\n\t$gte: z.any().optional(),\r\n\t$lt: z.any().optional(),\r\n\t$lte: z.any().optional(),\r\n\t$in: z.array(z.any()).optional(),\r\n\t$nin: z.array(z.any()).optional(),\r\n\t$exists: z.boolean().optional(),\r\n\t$regex: z.string().optional(),\r\n\t$and: z.array(MongoQuerySchema).optional(),\r\n\t$or: z.array(MongoQuerySchema).optional(),\r\n\t$not: MongoQuerySchema.optional(),\r\n\t$nor: z.array(MongoQuerySchema).optional(),\r\n});\r\n\r\nconst sortSchema = z.record(z.string(), z.union([z.literal(1), z.literal(-1)]));\r\n\r\nconst populateSchema = z.object({\r\n\tpath: z.string(), // required\r\n\tselect: z.record(z.string(), z.union([z.literal(0), z.literal(1)])).optional(),\r\n\tmatch: z.record(z.string(), z.any()).optional(),\r\n\toptions: z\r\n\t\t.object({\r\n\t\t\tsort: sortSchema.optional(),\r\n\t\t\tlimit: z.number().optional(),\r\n\t\t\tskip: z.number().optional(),\r\n\t\t})\r\n\t\t.optional(),\r\n});\r\n\r\n/**\r\n * Define the filter schema using MongoQuerySchema\r\n */\r\nexport const FilterSchema = z\r\n\t.object({\r\n\t\tsize: z\r\n\t\t\t.number()\r\n\t\t\t.min(1, { message: 'Size must be greater than 0.' })\r\n\t\t\t.max(100, { message: 'Size cannot exceed 100.' })\r\n\t\t\t.optional()\r\n\t\t\t.default(10),\r\n\t\tpage: z.number().min(1, { message: 'Page number must be at least 1.' }).optional().default(1),\r\n\t\tsort: sortSchema.optional(),\r\n\t\tquery: MongoQuerySchema.optional(),\r\n\t\tselect: z.record(z.string(), z.union([z.literal(0), z.literal(1)])).optional(),\r\n\t\tpopulate: z.union([populateSchema, z.array(populateSchema)]).optional(),\r\n\t})\r\n\t.optional();\r\n\r\n/**\r\n * Infer TypeScript type from Zod schema\r\n */\r\nexport type FilterDTO = z.infer<typeof FilterSchema>;\r\n\r\n/**\r\n * Define String schema\r\n */\r\nexport const StringSchema = z.string().min(1, 'String cannot be empty').max(255, 'String is too long');\r\n\r\n/**\r\n * Common address validation schema that can be reused across models.\r\n * Provides validation for address-related fields.\r\n *\r\n * @example\r\n * ```typescript\r\n * const userSchema = z.object({\r\n * name: z.string(),\r\n * address: AddressSchema\r\n * });\r\n * ```\r\n */\r\nexport const AddressSchema = z.object({\r\n\taddress: ZodValidation.string('Address'),\r\n\tdescription: ZodValidation.string('Description').optional(),\r\n\tcity: ZodValidation.string('City'),\r\n\tstate: ZodValidation.string('State'),\r\n\tcountry: ZodValidation.string('Country'),\r\n\tgeoLocationType: ZodValidation.enumType(GeoLocationType, 'GeoLocationType').default(GeoLocationType.POINT),\r\n\tcoordinates: ZodValidation.array(ZodValidation.number('Coordinate'), 'Coordinates', 2, 2),\r\n\tlatitude: ZodValidation.number('Latitude'),\r\n\tlongitude: ZodValidation.number('Longitude'),\r\n});\r\n\r\n/**\r\n * Common user address validation schema that can be reused across models.\r\n * Provides validation for address-related fields.\r\n *\r\n * @example\r\n * ```typescript\r\n * const userSchema = z.object({\r\n * name: z.string(),\r\n * address: UserAddressSchema\r\n * });\r\n * ```\r\n */\r\nexport const UserAddressSchema = AddressSchema.extend({\r\n\taddressLabel: ZodValidation.string('Address Label'),\r\n\tapartment: ZodValidation.string('Apartment'),\r\n\tbuildingName: ZodValidation.string('Building Name'),\r\n\tdeliveryOption: ZodValidation.string('Delivery Option').optional(),\r\n\tinstructions: ZodValidation.string('Instructions').optional(),\r\n});\r\n\r\n/**\r\n * Common courier address validation schema that can be reused across models.\r\n * Provides validation for address-related fields.\r\n *\r\n * @example\r\n * ```typescript\r\n * const courierAddressSchema = z.object({\r\n * name: z.string(),\r\n * address: courierAddressSchema\r\n * });\r\n * ```\r\n */\r\nexport const CourierAddressSchema = UserAddressSchema.extend({\r\n\tname: ZodValidation.string('Name'),\r\n\tphonenumber: ZodValidation.string('Phonenumber'),\r\n});\r\n\r\n/**\r\n * Common duration validation schema that can be reused across models.\r\n * Provides validation for duration fields.\r\n *\r\n * @example\r\n * ```typescript\r\n * const subscriptionSchema = z.object({\r\n * fee: z.number(),\r\n * duration: DurationSchema\r\n * });\r\n * ```\r\n */\r\nexport const DurationSchema = z.object({\r\n\tstart: ZodValidation.date('Start'),\r\n\tend: ZodValidation.date('End').optional(),\r\n});\r\n\r\n/**\r\n * Common Work Hour validation schema that can be reused across models.\r\n * Provides validation for workHourSetting fields.\r\n *\r\n * @example\r\n * ```typescript\r\n * const settingSchema = z.object({\r\n * vat: z.number(),\r\n * workHourSetting: WorkHourSettingSchema\r\n * });\r\n * ```\r\n */\r\nconst StartEndTimeSchema = z.object({\r\n\tstart: ZodValidation.string('Start'),\r\n\tend: ZodValidation.string('End'),\r\n});\r\n\r\nexport const NormalHourSchema = z.object({\r\n\tday: ZodValidation.enumType(WeekDay, 'Day'),\r\n\tstatus: ZodValidation.enumType(WorkStatus, 'Status'),\r\n\topeningHours: ZodValidation.array(StartEndTimeSchema).default([]),\r\n});\r\n\r\nexport const HolidayHourSchema = z.object({\r\n\tdate: ZodValidation.date('Date'),\r\n\tstatus: ZodValidation.enumType(HolidayWorkStatus, 'Status'),\r\n\tclosingHour: StartEndTimeSchema,\r\n});\r\n\r\nexport const WorkHourSettingSchema = z.object({\r\n\tnormalHours: ZodValidation.array(NormalHourSchema).default([]),\r\n\tholidayHours: ZodValidation.array(HolidayHourSchema).default([]),\r\n});\r\n\r\n/**\r\n * Schema for validating user login credentials.\r\n * This schema ensures that the provided email and password meet the required validation rules.\r\n *\r\n * @example\r\n * ```typescript\r\n * const credentials = {\r\n * email: 'user@example.com',\r\n * password: 'securePassword123',\r\n * };\r\n * ```\r\n */\r\nexport const LoginSchema = z.object({\r\n\temail: ZodValidation.email('Email', {\r\n\t\trequiredMessage: 'Please enter a valid email address.',\r\n\t\tinvalidMessage: 'Please enter a valid email address.',\r\n\t}),\r\n\tpassword: ZodValidation.string('Password', { requiredMessage: 'Please enter password' }),\r\n});\r\nconst metadataSchema = z.object({\r\n\tpage: ZodValidation.number(),\r\n\tsize: ZodValidation.number(),\r\n\ttotalElements: ZodValidation.number(),\r\n\ttotalPages: ZodValidation.number(),\r\n});\r\n\r\nexport const createPaginatedSchema = <T>(documentSchema: z.ZodSchema<T>) =>\r\n\tz.object({\r\n\t\tmetadata: metadataSchema.optional(),\r\n\t\tdocuments: ZodValidation.array(documentSchema),\r\n\t});\r\n\r\nexport const createResponseSchema = <T>(schema: z.ZodSchema<T>) =>\r\n\tz.object({\r\n\t\tsuccess: ZodValidation.boolean(),\r\n\t\tmessage: ZodValidation.string(),\r\n\t\tdata: z.union([createPaginatedSchema(schema), schema]).optional(),\r\n\t});\r\n\r\n/**\r\n * Schema for validating token data, typically used for authentication.\r\n * This schema ensures that the provided access token and refresh token are valid strings.\r\n *\r\n * @example\r\n * ```typescript\r\n * const tokens = {\r\n * accessToken: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...',\r\n * refreshToken: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...',\r\n * };\r\n * ```\r\n */\r\nexport const TokenSchema = z.object({\r\n\taccessToken: ZodValidation.string('AccessToken'),\r\n\trefreshToken: ZodValidation.string('RefreshToken'),\r\n});\r\n\r\n/**\r\n * Schema validation for sorting order\r\n */\r\nexport const UpdateSortingOrderSchema = z.object({\r\n\tstartIndex: ZodValidation.number('StartIndex').default(1),\r\n\tlist: ZodValidation.array(ZodValidation.objectId('_id'), 'List', 1),\r\n});\r\nexport type UpdateSortingOrderDTO = DTO<typeof UpdateSortingOrderSchema>;\r\n\r\n/**\r\n * Schema validation for delete\r\n */\r\nexport const DeleteSchema = z.object({\r\n\t_id: ZodValidation.objectId('_id'),\r\n\tsoftDelete: ZodValidation.boolean('Soft Delete').default(true),\r\n});\r\nexport type DeleteDTO = DTO<typeof DeleteSchema>;\r\n\r\n/**\r\n * Schema validation for Id\r\n */\r\nexport const IdSchema = ZodValidation.objectId();\r\n"]}
|