@lyxa.ai/core 1.0.385 → 1.0.389
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/bullmq/bull-mq-service.d.ts +1 -1
- package/dist/libraries/bullmq/bull-mq-service.js.map +1 -1
- package/dist/libraries/mongo/models/embedded/capacity-settings.model.d.ts +5 -0
- package/dist/libraries/mongo/models/embedded/capacity-settings.model.js +17 -0
- package/dist/libraries/mongo/models/embedded/capacity-settings.model.js.map +1 -1
- package/dist/libraries/mongo/models/review.model.js.map +1 -1
- package/dist/libraries/mongo/models/ticket.model.d.ts +0 -2
- package/dist/libraries/mongo/models/ticket.model.js +0 -10
- package/dist/libraries/mongo/models/ticket.model.js.map +1 -1
- package/dist/libraries/mongo/models/user.model.d.ts +1 -1
- package/dist/libraries/socket/events/index.d.ts +1 -0
- package/dist/libraries/socket/events/index.js +1 -0
- package/dist/libraries/socket/events/index.js.map +1 -1
- package/dist/libraries/trpc/context.d.ts +7 -0
- package/dist/libraries/trpc/context.js +13 -0
- package/dist/libraries/trpc/context.js.map +1 -1
- package/dist/libraries/trpc/middlewares/createSocketSubscriptionProcedure.d.ts +2 -2
- package/dist/types/README.md +1 -1
- package/dist/types/package.json +1 -1
- package/dist/types/utilities/validation/common-validation.d.ts +2 -78
- package/dist/types/utilities/validation/global-validation.d.ts +14 -38
- package/dist/utilities/validation/common-validation.d.ts +2 -78
- package/dist/utilities/validation/global-validation.d.ts +14 -38
- package/package.json +63 -63
|
@@ -5,5 +5,5 @@ export declare class BullMQService {
|
|
|
5
5
|
private connection;
|
|
6
6
|
constructor(redisService: RedisService);
|
|
7
7
|
createQueue(queueName: string): Queue;
|
|
8
|
-
createWorker<T>(queueName: string, processor: (job: Job<T>) => Promise<
|
|
8
|
+
createWorker<T = any, R = void>(queueName: string, processor: (job: Job<T>) => Promise<R>, options?: WorkerOptions): Worker<T, R>;
|
|
9
9
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bull-mq-service.js","sourceRoot":"/","sources":["libraries/bullmq/bull-mq-service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAEA,mCAAyC;AACzC,mCAAyE;AACzE,0CAA8C;AAGvC,IAAM,aAAa,GAAnB,MAAM,aAAa;IAGuB;IAFxC,UAAU,CAAe;IAEjC,YAAgD,YAA0B;QAA1B,iBAAY,GAAZ,YAAY,CAAc;QACzE,IAAI,CAAC,UAAU,GAAG,EAAE,UAAU,EAAE,IAAI,CAAC,YAAY,CAAC,WAAW,EAAE,CAAC;IACjE,CAAC;IAKM,WAAW,CAAC,SAAiB;QACnC,OAAO,IAAI,cAAK,CAAC,SAAS,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;IAC9C,CAAC;IAKM,YAAY,CAClB,SAAiB,EACjB,
|
|
1
|
+
{"version":3,"file":"bull-mq-service.js","sourceRoot":"/","sources":["libraries/bullmq/bull-mq-service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAEA,mCAAyC;AACzC,mCAAyE;AACzE,0CAA8C;AAGvC,IAAM,aAAa,GAAnB,MAAM,aAAa;IAGuB;IAFxC,UAAU,CAAe;IAEjC,YAAgD,YAA0B;QAA1B,iBAAY,GAAZ,YAAY,CAAc;QACzE,IAAI,CAAC,UAAU,GAAG,EAAE,UAAU,EAAE,IAAI,CAAC,YAAY,CAAC,WAAW,EAAE,CAAC;IACjE,CAAC;IAKM,WAAW,CAAC,SAAiB;QACnC,OAAO,IAAI,cAAK,CAAC,SAAS,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;IAC9C,CAAC;IAKM,YAAY,CAClB,SAAiB,EACjB,SAAsC,EACtC,OAAuB;QAEvB,OAAO,IAAI,eAAM,CAAO,SAAS,EAAE,SAAS,EAAE;YAC7C,GAAG,IAAI,CAAC,UAAU;YAClB,GAAG,OAAO;SACV,CAAC,CAAC;IACJ,CAAC;CACD,CAAA;AA3BY,sCAAa;wBAAb,aAAa;IADzB,IAAA,gBAAO,GAAE;IAII,WAAA,IAAA,eAAM,EAAC,GAAG,EAAE,CAAC,oBAAY,CAAC,CAAA;qCAAuB,oBAAY;GAH9D,aAAa,CA2BzB","sourcesContent":["// lyxa-core/libraries/bullmq/BullMQService.ts\n\nimport { Service, Inject } from 'typedi';\nimport { Queue, Worker, Job, QueueOptions, WorkerOptions } from 'bullmq';\nimport { RedisService } from '../redis/index';\n\n@Service()\nexport class BullMQService {\n\tprivate connection: QueueOptions;\n\n\tconstructor(@Inject(() => RedisService) private redisService: RedisService) {\n\t\tthis.connection = { connection: this.redisService.redisClient };\n\t}\n\n\t/**\n\t * Creates a new queue.\n\t */\n\tpublic createQueue(queueName: string): Queue {\n\t\treturn new Queue(queueName, this.connection);\n\t}\n\n\t/**\n\t * Creates a worker to process jobs from a given queue.\n\t */\n\tpublic createWorker<T = any, R = void>(\n\t\tqueueName: string,\n\t\tprocessor: (job: Job<T>) => Promise<R>,\n\t\toptions?: WorkerOptions\n\t): Worker<T, R> {\n\t\treturn new Worker<T, R>(queueName, processor, {\n\t\t\t...this.connection,\n\t\t\t...options,\n\t\t});\n\t}\n}\n"]}
|
|
@@ -9,9 +9,14 @@ declare class Capacity {
|
|
|
9
9
|
day: WeekDay;
|
|
10
10
|
services: Services[];
|
|
11
11
|
}
|
|
12
|
+
declare class FurnitureCleaningConfiguration {
|
|
13
|
+
numberOfPackages: number;
|
|
14
|
+
numberOfProfessionals: number;
|
|
15
|
+
}
|
|
12
16
|
export declare class CapacitySettings {
|
|
13
17
|
slotBufferTime: number;
|
|
14
18
|
slotInterval: number;
|
|
15
19
|
capacity: Capacity[];
|
|
20
|
+
furnitureCleaningConfig?: FurnitureCleaningConfiguration;
|
|
16
21
|
}
|
|
17
22
|
export {};
|
|
@@ -39,10 +39,23 @@ __decorate([
|
|
|
39
39
|
(0, typegoose_1.prop)({ type: () => [Services] }),
|
|
40
40
|
__metadata("design:type", Array)
|
|
41
41
|
], Capacity.prototype, "services", void 0);
|
|
42
|
+
class FurnitureCleaningConfiguration {
|
|
43
|
+
numberOfPackages;
|
|
44
|
+
numberOfProfessionals;
|
|
45
|
+
}
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, typegoose_1.prop)({ required: true }),
|
|
48
|
+
__metadata("design:type", Number)
|
|
49
|
+
], FurnitureCleaningConfiguration.prototype, "numberOfPackages", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, typegoose_1.prop)({ required: true }),
|
|
52
|
+
__metadata("design:type", Number)
|
|
53
|
+
], FurnitureCleaningConfiguration.prototype, "numberOfProfessionals", void 0);
|
|
42
54
|
let CapacitySettings = class CapacitySettings {
|
|
43
55
|
slotBufferTime;
|
|
44
56
|
slotInterval;
|
|
45
57
|
capacity;
|
|
58
|
+
furnitureCleaningConfig;
|
|
46
59
|
};
|
|
47
60
|
exports.CapacitySettings = CapacitySettings;
|
|
48
61
|
__decorate([
|
|
@@ -65,6 +78,10 @@ __decorate([
|
|
|
65
78
|
(0, typegoose_1.prop)({ type: () => [Capacity] }),
|
|
66
79
|
__metadata("design:type", Array)
|
|
67
80
|
], CapacitySettings.prototype, "capacity", void 0);
|
|
81
|
+
__decorate([
|
|
82
|
+
(0, typegoose_1.prop)({ type: () => FurnitureCleaningConfiguration }),
|
|
83
|
+
__metadata("design:type", FurnitureCleaningConfiguration)
|
|
84
|
+
], CapacitySettings.prototype, "furnitureCleaningConfig", void 0);
|
|
68
85
|
exports.CapacitySettings = CapacitySettings = __decorate([
|
|
69
86
|
(0, typegoose_1.modelOptions)({ schemaOptions: { collection: 'capacitySettings' } })
|
|
70
87
|
], CapacitySettings);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capacity-settings.model.js","sourceRoot":"/","sources":["libraries/mongo/models/embedded/capacity-settings.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA+D;AAC/D,qDAAqD;AAIrD,MAAM,QAAQ;IAEH,OAAO,CAAe;IAMtB,qBAAqB,CAAU;CACzC;AAPU;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yCACI;AAMtB;IAJN,IAAA,gBAAI,EAAC;QACF,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE,MAAM;KACf,CAAC;;uDACoC;AAG1C,MAAM,QAAQ;IAEH,GAAG,CAAW;IAGd,QAAQ,CAAa;CAC/B;AAJU;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,cAAO,EAAE,CAAC;;qCACjC;AAGd;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC;;0CACL;
|
|
1
|
+
{"version":3,"file":"capacity-settings.model.js","sourceRoot":"/","sources":["libraries/mongo/models/embedded/capacity-settings.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA+D;AAC/D,qDAAqD;AAIrD,MAAM,QAAQ;IAEH,OAAO,CAAe;IAMtB,qBAAqB,CAAU;CACzC;AAPU;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yCACI;AAMtB;IAJN,IAAA,gBAAI,EAAC;QACF,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE,MAAM;KACf,CAAC;;uDACoC;AAG1C,MAAM,QAAQ;IAEH,GAAG,CAAW;IAGd,QAAQ,CAAa;CAC/B;AAJU;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,cAAO,EAAE,CAAC;;qCACjC;AAGd;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC;;0CACL;AAGhC,MAAM,8BAA8B;IAEzB,gBAAgB,CAAU;IAG1B,qBAAqB,CAAU;CACzC;AAJU;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wEACQ;AAG1B;IADN,IAAA,gBAAI,EAAC,EAAC,QAAQ,EAAE,IAAI,EAAE,CAAC;;6EACc;AAInC,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IAMlB,cAAc,CAAS;IAOvB,YAAY,CAAS;IAGrB,QAAQ,CAAY;IAGpB,uBAAuB,CAAiC;CAClE,CAAA;AApBY,4CAAgB;AAMlB;IALN,IAAA,gBAAI,EAAC;QACF,GAAG,EAAE,CAAC;QACN,GAAG,EAAE,EAAE;QACP,OAAO,EAAE,CAAC;KACb,CAAC;;wDAC4B;AAOvB;IALN,IAAA,gBAAI,EAAC;QACF,GAAG,EAAE,EAAE;QACP,GAAG,EAAE,GAAG;QACR,OAAO,EAAE,EAAE;KACd,CAAC;;sDAC0B;AAGrB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC;;kDACN;AAGpB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,8BAA8B,EAAE,CAAC;8BACpB,8BAA8B;iEAAA;2BAnBtD,gBAAgB;IAD5B,IAAA,wBAAY,EAAC,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,kBAAkB,EAAE,EAAE,CAAC;GACvD,gBAAgB,CAoB5B","sourcesContent":["import { modelOptions, prop, Ref } from '@typegoose/typegoose';\nimport { WeekDay } from '../../../../utilities/enum';\nimport { Service } from '../service.model';\n\n\nclass Services {\n @prop({ required: true })\n public service!: Ref<Service>\n\n @prop({\n required: true,\n type: Number,\n })\n public numberOfProfessionals!: number;\n}\n\nclass Capacity {\n @prop({ required: true, type: Number, enum: WeekDay })\n public day!: WeekDay;\n\n @prop({ type: () => [Services] })\n public services!: Services[]\n}\n\nclass FurnitureCleaningConfiguration {\n @prop({ required: true })\n public numberOfPackages!: number;\n\n @prop({required: true })\n public numberOfProfessionals!: number;\n}\n\n@modelOptions({ schemaOptions: { collection: 'capacitySettings' } })\nexport class CapacitySettings {\n @prop({\n min: 5,\n max: 60,\n default: 5,\n })\n public slotBufferTime: number; // minutes\n\n @prop({\n min: 30,\n max: 120,\n default: 30,\n })\n public slotInterval: number; // minutes\n\n @prop({ type: () => [Capacity] })\n public capacity: Capacity[]\n\n @prop({ type: () => FurnitureCleaningConfiguration })\n public furnitureCleaningConfig?: FurnitureCleaningConfiguration\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"review.model.js","sourceRoot":"/","sources":["libraries/mongo/models/review.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAsE;AACtE,4EAAqE;AACrE,6CAAoC;AACpC,kDAAqD;AACrD,+CAAsC;AAS/B,IAAM,MAAM,GAAZ,MAAM,MAAO,SAAQ,2BAAU;
|
|
1
|
+
{"version":3,"file":"review.model.js","sourceRoot":"/","sources":["libraries/mongo/models/review.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAsE;AACtE,4EAAqE;AACrE,6CAAoC;AACpC,kDAAqD;AACrD,+CAAsC;AAS/B,IAAM,MAAM,GAAZ,MAAM,MAAO,SAAQ,2BAAU;IAE9B,UAAU,CAAc;IAGxB,IAAI,CAAa;IAGjB,MAAM,CAAU;IAGhB,WAAW,CAAU;IAGrB,IAAI,CAAY;IAGhB,SAAS,CAAW;IAGpB,SAAS,CAAc;CAC9B,CAAA;AArBY,wBAAM;AAEX;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,iBAAU,EAAE,CAAC;;0CAC1B;AAGxB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,iBAAI,EAAE,CAAC;;oCAClB;AAGjB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC;;sCAChC;AAGhB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;2CACK;AAGrB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;oCACrB;AAGhB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;yCACZ;AAGpB;IADN,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,mBAAK,EAAE,CAAC;;yCACG;iBApBlB,MAAM;IAPlB,IAAA,wBAAY,EAAC;QACb,aAAa,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,gBAAgB,EAAE,YAAY,EAAE;KACxE,CAAC;IACD,IAAA,iBAAK,EACL,EAAE,KAAK,EAAE,CAAC,EAAE,YAAY,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,EAC5C,EAAE,MAAM,EAAE,IAAI,EAAE,uBAAuB,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,CAC9D;GACY,MAAM,CAqBlB","sourcesContent":["import { index, modelOptions, prop, Ref } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { User } from './user.model';\nimport { ReviewType } from '../../../utilities/enum';\nimport { Admin } from './admin.model';\n\n@modelOptions({\n\tschemaOptions: { collection: 'reviews', discriminatorKey: 'reviewType' },\n})\n@index(\n\t{ order: 1, serviceOrder: 1, reviewType: 1 },\n\t{ unique: true, partialFilterExpression: { deletedAt: null } }\n)\nexport class Review extends TimeStamps {\n\t@prop({ required: true, type: String, enum: ReviewType })\n\tpublic reviewType!: ReviewType;\n\n\t@prop({ required: true, ref: () => User })\n\tpublic user!: Ref<User>;\n\n\t@prop({ required: true, type: Number, min: 1, max: 5 })\n\tpublic rating!: number;\n\n\t@prop({ type: String })\n\tpublic description?: string;\n\n\t@prop({ type: () => [String], default: [] })\n\tpublic tags?: string[];\n\n\t@prop({ type: Boolean, default: true })\n\tpublic isVisible?: boolean;\n\n\t@prop({ ref: () => Admin })\n\tpublic deletedBy?: Ref<Admin>;\n}\n"]}
|
|
@@ -16,8 +16,6 @@ export declare class Ticket extends TimeStamps {
|
|
|
16
16
|
supportReason?: Ref<SupportReason>;
|
|
17
17
|
client: Ref<User | Shop>;
|
|
18
18
|
clientType: UserRef;
|
|
19
|
-
clientName: string;
|
|
20
|
-
clientPhoto: string;
|
|
21
19
|
order?: Ref<Order>;
|
|
22
20
|
assignedAgent?: Ref<Admin>;
|
|
23
21
|
assignedAt?: Date;
|
|
@@ -26,8 +26,6 @@ let Ticket = class Ticket extends defaultClasses_1.TimeStamps {
|
|
|
26
26
|
supportReason;
|
|
27
27
|
client;
|
|
28
28
|
clientType;
|
|
29
|
-
clientName;
|
|
30
|
-
clientPhoto;
|
|
31
29
|
order;
|
|
32
30
|
assignedAgent;
|
|
33
31
|
assignedAt;
|
|
@@ -69,14 +67,6 @@ __decorate([
|
|
|
69
67
|
(0, typegoose_1.prop)({ required: true, type: String, enum: enum_1.UserRef }),
|
|
70
68
|
__metadata("design:type", String)
|
|
71
69
|
], Ticket.prototype, "clientType", void 0);
|
|
72
|
-
__decorate([
|
|
73
|
-
(0, typegoose_1.prop)({ required: true, type: String }),
|
|
74
|
-
__metadata("design:type", String)
|
|
75
|
-
], Ticket.prototype, "clientName", void 0);
|
|
76
|
-
__decorate([
|
|
77
|
-
(0, typegoose_1.prop)({ required: true, type: String }),
|
|
78
|
-
__metadata("design:type", String)
|
|
79
|
-
], Ticket.prototype, "clientPhoto", void 0);
|
|
80
70
|
__decorate([
|
|
81
71
|
(0, typegoose_1.prop)({ ref: () => order_model_1.Order }),
|
|
82
72
|
__metadata("design:type", Object)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ticket.model.js","sourceRoot":"/","sources":["libraries/mongo/models/ticket.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAsE;AACtE,4EAAqE;AAGrE,+CAAsC;AACtC,+CAAsC;AACtC,kDAA4E;AAC5E,uDAA6C;AAE7C,+DAAqD;AACrD,iEAAuD;AAahD,IAAM,MAAM,GAAZ,MAAM,MAAO,SAAQ,2BAAU;IAE9B,QAAQ,CAAU;IAGlB,IAAI,CAAc;IAGlB,MAAM,CAAgB;IAGtB,KAAK,CAAU;IAGf,aAAa,CAAsB;IAGnC,MAAM,CAAoB;IAG1B,UAAU,CAAW;IAGrB,
|
|
1
|
+
{"version":3,"file":"ticket.model.js","sourceRoot":"/","sources":["libraries/mongo/models/ticket.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAsE;AACtE,4EAAqE;AAGrE,+CAAsC;AACtC,+CAAsC;AACtC,kDAA4E;AAC5E,uDAA6C;AAE7C,+DAAqD;AACrD,iEAAuD;AAahD,IAAM,MAAM,GAAZ,MAAM,MAAO,SAAQ,2BAAU;IAE9B,QAAQ,CAAU;IAGlB,IAAI,CAAc;IAGlB,MAAM,CAAgB;IAGtB,KAAK,CAAU;IAGf,aAAa,CAAsB;IAGnC,MAAM,CAAoB;IAG1B,UAAU,CAAW;IAGrB,KAAK,CAAc;IAGnB,aAAa,CAAc;IAG3B,UAAU,CAAQ;IAGlB,kBAAkB,CAAU;IAG5B,QAAQ,CAAiB;IAGzB,UAAU,CAAQ;IAGlB,QAAQ,CAAQ;IAGhB,qBAAqB,CAAU;IAG/B,cAAc,CAAU;IAGxB,UAAU,CAAU;IAGpB,MAAM,CAAqB;CAClC,CAAA;AAtDY,wBAAM;AAEX;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;;wCAC5B;AAGlB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,iBAAU,EAAE,CAAC;;oCAChC;AAGlB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,mBAAY,EAAE,OAAO,EAAE,mBAAY,CAAC,OAAO,EAAE,CAAC;;sCAC7D;AAGtB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qCACjB;AAGf;IADN,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,oCAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;6CACV;AAGnC;IADN,IAAA,gBAAI,EAAC,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sCACf;AAG1B;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,cAAO,EAAE,CAAC;;0CAC1B;AAGrB;IADN,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,mBAAK,EAAE,CAAC;;qCACD;AAGnB;IADN,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,mBAAK,EAAE,CAAC;;6CACO;AAG3B;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;8BACD,IAAI;0CAAC;AAGlB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;kDACA;AAG5B;IADN,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,0BAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wCACd;AAGzB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;8BACD,IAAI;0CAAC;AAGlB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;8BACH,IAAI;wCAAC;AAGhB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;qDACe;AAG/B;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC;;8CACR;AAGxB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;0CACI;AAGpB;IADN,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,kCAAY,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;sCACjB;iBArDtB,MAAM;IAXlB,IAAA,wBAAY,EAAC;QACb,aAAa,EAAE;YACd,UAAU,EAAE,SAAS;YACrB,UAAU,EAAE,IAAI;SAChB;KACD,CAAC;IACD,IAAA,iBAAK,EAAC,EAAE,aAAa,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC;IACtC,IAAA,iBAAK,EAAC,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC;IAC1C,IAAA,iBAAK,EAAC,EAAE,MAAM,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC;IAC9C,IAAA,iBAAK,EAAC,EAAE,SAAS,EAAE,CAAC,CAAC,EAAE,CAAC;IACxB,IAAA,iBAAK,EAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC;GACV,MAAM,CAsDlB","sourcesContent":["import { prop, Ref, index, modelOptions } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { User } from './user.model';\nimport { Shop } from './shop.model';\nimport { Order } from './order.model';\nimport { Admin } from './admin.model';\nimport { TicketType, TicketStatus, UserRef } from '../../../utilities/enum';\nimport { Chatroom } from './chat-room.model';\nimport { DefaultChat } from './default-chat.model';\nimport { TicketAction } from './ticket-action.model';\nimport { SupportReason } from './support-reason.model';\n\n@modelOptions({\n\tschemaOptions: {\n\t\tcollection: 'tickets',\n\t\ttimestamps: true,\n\t},\n})\n@index({ assignedAgent: 1, status: 1 })\n@index({ type: 1, status: 1, priority: 1 })\n@index({ client: 1, clientType: 1, status: 1 })\n@index({ createdAt: -1 })\n@index({ chatroom: 1 })\nexport class Ticket extends TimeStamps {\n\t@prop({ required: true, type: String, unique: true })\n\tpublic ticketId!: string;\n\n\t@prop({ required: true, type: String, enum: TicketType })\n\tpublic type!: TicketType;\n\n\t@prop({ required: true, type: String, enum: TicketStatus, default: TicketStatus.PENDING })\n\tpublic status!: TicketStatus;\n\n\t@prop({ type: String, required: true })\n\tpublic title!: string;\n\n\t@prop({ ref: () => SupportReason, required: false })\n\tpublic supportReason?: Ref<SupportReason>;\n\n\t@prop({ refPath: 'clientType', required: true })\n\tpublic client!: Ref<User | Shop>;\n\n\t@prop({ required: true, type: String, enum: UserRef })\n\tpublic clientType!: UserRef;\n\n\t@prop({ ref: () => Order })\n\tpublic order?: Ref<Order>;\n\n\t@prop({ ref: () => Admin })\n\tpublic assignedAgent?: Ref<Admin>;\n\n\t@prop({ type: Date })\n\tpublic assignedAt?: Date;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic assignmentAttempts?: number;\n\n\t@prop({ ref: () => Chatroom, required: true })\n\tpublic chatroom!: Ref<Chatroom>;\n\n\t@prop({ type: Date })\n\tpublic resolvedAt?: Date;\n\n\t@prop({ type: Date })\n\tpublic closedAt?: Date;\n\n\t@prop({ type: Number })\n\tpublic resolutionTimeMinutes?: number;\n\n\t@prop({ type: Number, min: 1, max: 5 })\n\tpublic customerRating?: number;\n\n\t@prop({ type: Number })\n\tpublic agentScore?: number;\n\n\t@prop({ ref: () => TicketAction, required: false })\n\tpublic action?: Ref<TicketAction>;\n}\n"]}
|
|
@@ -31,7 +31,7 @@ export declare class User extends TimeStamps {
|
|
|
31
31
|
isPhoneVerified?: boolean;
|
|
32
32
|
onlineStatus?: OnlineStatus;
|
|
33
33
|
fcmTokens?: string[];
|
|
34
|
-
static updateWallet(this: ReturnModelType<typeof User>, userId: string, amount: number): Promise<(import("mongoose").Document<unknown, import("@typegoose/typegoose/lib/types").BeAnObject, User, import("@typegoose/typegoose/lib/types").BeAnyObject> & Omit<User & {
|
|
34
|
+
static updateWallet(this: ReturnModelType<typeof User>, userId: string, amount: number): Promise<(import("mongoose").Document<unknown, import("@typegoose/typegoose/lib/types").BeAnObject, User, import("@typegoose/typegoose/lib/types").BeAnyObject, {}> & Omit<User & {
|
|
35
35
|
_id: import("mongoose").Types.ObjectId;
|
|
36
36
|
} & {
|
|
37
37
|
__v: number;
|
|
@@ -15,4 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./chatroom-message-send.socket.event"), exports);
|
|
18
|
+
__exportStar(require("./chatlist-message-send.socket.event"), exports);
|
|
18
19
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"/","sources":["libraries/socket/events/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uEAAqD","sourcesContent":["export * from './chatroom-message-send.socket.event';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"/","sources":["libraries/socket/events/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uEAAqD;AACrD,uEAAqD","sourcesContent":["export * from './chatroom-message-send.socket.event';\nexport * from './chatlist-message-send.socket.event';\n"]}
|
|
@@ -5,6 +5,8 @@ import { AuthEntityType } from '../auth';
|
|
|
5
5
|
import jwt from 'jsonwebtoken';
|
|
6
6
|
import { TokenType } from '../auth';
|
|
7
7
|
import type { IncomingMessage, ServerResponse } from 'http';
|
|
8
|
+
import { Types } from 'mongoose';
|
|
9
|
+
import { UserRef } from '../../utilities/enum';
|
|
8
10
|
export interface EntityContext extends jwt.JwtPayload {
|
|
9
11
|
id: string;
|
|
10
12
|
type: AuthEntityType;
|
|
@@ -27,4 +29,9 @@ export interface LyxaWSContext extends LyxaContextParams {
|
|
|
27
29
|
}
|
|
28
30
|
export declare const createLyxaContext: (opts: CreateHTTPContextOptions | NodeHTTPCreateContextFnOptions<IncomingMessage, ServerResponse>) => Promise<LyxaHTTPContext>;
|
|
29
31
|
export declare const createLyxaWsContext: (opts: CreateWSSContextFnOptions) => Promise<LyxaWSContext>;
|
|
32
|
+
export type UserInfo = {
|
|
33
|
+
user: Types.ObjectId;
|
|
34
|
+
userType: UserRef;
|
|
35
|
+
};
|
|
36
|
+
export declare function withUserContext<T extends object>(input: T, ctx: LyxaContext): T & UserInfo;
|
|
30
37
|
export type LyxaContext = Awaited<ReturnType<typeof createLyxaContext>>;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createLyxaWsContext = exports.createLyxaContext = void 0;
|
|
4
|
+
exports.withUserContext = withUserContext;
|
|
5
|
+
const mongoose_1 = require("mongoose");
|
|
6
|
+
const auth_ref_mapper_1 = require("../../utilities/auth-ref.mapper");
|
|
4
7
|
const createLyxaContext = async (opts) => {
|
|
5
8
|
return {
|
|
6
9
|
entity: undefined,
|
|
@@ -25,4 +28,14 @@ const createLyxaWsContext = async (opts) => {
|
|
|
25
28
|
};
|
|
26
29
|
};
|
|
27
30
|
exports.createLyxaWsContext = createLyxaWsContext;
|
|
31
|
+
function withUserContext(input, ctx) {
|
|
32
|
+
const entity = ctx.entity;
|
|
33
|
+
if (!entity)
|
|
34
|
+
throw new Error('No entity in context');
|
|
35
|
+
return {
|
|
36
|
+
...input,
|
|
37
|
+
user: new mongoose_1.Types.ObjectId(entity.id),
|
|
38
|
+
userType: auth_ref_mapper_1.AuthEntityToUserRefMap[entity.type],
|
|
39
|
+
};
|
|
40
|
+
}
|
|
28
41
|
//# sourceMappingURL=context.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","sourceRoot":"/","sources":["libraries/trpc/context.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"/","sources":["libraries/trpc/context.ts"],"names":[],"mappings":";;;AA2EA,0CASC;AA7ED,uCAAiC;AACjC,qEAAyE;AA2BlE,MAAM,iBAAiB,GAAG,KAAK,EACrC,IAAgG,EACrE,EAAE;IAC7B,OAAO;QACN,MAAM,EAAE,SAAS;QACjB,SAAS,EAAE,SAAS;QACpB,SAAS,EAAE,SAAS;QACpB,gBAAgB,EAAE,KAAK;QACvB,YAAY,EAAE,KAAK;QACnB,GAAG,EAAE,IAAI,CAAC,GAAG;QACb,GAAG,EAAE,IAAI,CAAC,GAAG;KACb,CAAC;AACH,CAAC,CAAC;AAZW,QAAA,iBAAiB,qBAY5B;AAEK,MAAM,mBAAmB,GAAG,KAAK,EAAE,IAA+B,EAA0B,EAAE;IACpG,OAAO;QACN,MAAM,EAAE,SAAS;QACjB,SAAS,EAAE,SAAS;QACpB,SAAS,EAAE,SAAS;QACpB,gBAAgB,EAAE,KAAK;QACvB,YAAY,EAAE,KAAK;QACnB,GAAG,EAAE,IAAI,CAAC,GAAG;QACb,GAAG,EAAE,IAAI,CAAC,GAAG;KACb,CAAC;AACH,CAAC,CAAC;AAVW,QAAA,mBAAmB,uBAU9B;AAgBF,SAAgB,eAAe,CAAmB,KAAQ,EAAE,GAAgB;IAC3E,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC;IAC1B,IAAI,CAAC,MAAM;QAAE,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;IAErD,OAAO;QACN,GAAG,KAAK;QACR,IAAI,EAAE,IAAI,gBAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QACnC,QAAQ,EAAE,wCAAsB,CAAC,MAAM,CAAC,IAAI,CAAC;KAC7C,CAAC;AACH,CAAC","sourcesContent":["import { CreateHTTPContextOptions } from '@trpc/server/adapters/standalone';\nimport type { NodeHTTPCreateContextFnOptions } from '@trpc/server/adapters/node-http';\nimport type { CreateWSSContextFnOptions } from '@trpc/server/adapters/ws';\nimport { AuthEntityType } from '../auth';\nimport jwt from 'jsonwebtoken';\nimport { TokenType } from '../auth';\nimport type { IncomingMessage, ServerResponse } from 'http';\nimport { Types } from 'mongoose';\nimport { AuthEntityToUserRefMap } from '../../utilities/auth-ref.mapper';\nimport { UserRef } from '../../utilities/enum';\n\nexport interface EntityContext extends jwt.JwtPayload {\n\tid: string;\n\ttype: AuthEntityType;\n\tparameters: Record<string, unknown>;\n}\n\nexport interface LyxaContextParams {\n\tentity?: EntityContext;\n\trequestId?: string;\n\ttokenType?: TokenType;\n\tusedRefreshToken?: boolean;\n\ttokenRenewed?: boolean;\n}\n\nexport interface LyxaHTTPContext extends LyxaContextParams {\n\treq: IncomingMessage;\n\tres: ServerResponse;\n}\n\nexport interface LyxaWSContext extends LyxaContextParams {\n\treq: any;\n\tres: any;\n}\n\nexport const createLyxaContext = async (\n\topts: CreateHTTPContextOptions | NodeHTTPCreateContextFnOptions<IncomingMessage, ServerResponse>\n): Promise<LyxaHTTPContext> => {\n\treturn {\n\t\tentity: undefined,\n\t\trequestId: undefined,\n\t\ttokenType: undefined,\n\t\tusedRefreshToken: false,\n\t\ttokenRenewed: false,\n\t\treq: opts.req,\n\t\tres: opts.res,\n\t};\n};\n\nexport const createLyxaWsContext = async (opts: CreateWSSContextFnOptions): Promise<LyxaWSContext> => {\n\treturn {\n\t\tentity: undefined,\n\t\trequestId: undefined,\n\t\ttokenType: undefined,\n\t\tusedRefreshToken: false,\n\t\ttokenRenewed: false,\n\t\treq: opts.req,\n\t\tres: opts.res,\n\t};\n};\n\nexport type UserInfo = {\n\tuser: Types.ObjectId;\n\tuserType: UserRef;\n};\n\n/**\n *\n * Enriches the input object with user context information from the LyxaContext.\n *\n * @param input\n * @param ctx\n *\n * @example const inp: SendMessageDTO = withUserContext(input, ctx);\n */\nexport function withUserContext<T extends object>(input: T, ctx: LyxaContext): T & UserInfo {\n\tconst entity = ctx.entity;\n\tif (!entity) throw new Error('No entity in context');\n\n\treturn {\n\t\t...input,\n\t\tuser: new Types.ObjectId(entity.id),\n\t\tuserType: AuthEntityToUserRefMap[entity.type],\n\t};\n}\n\nexport type LyxaContext = Awaited<ReturnType<typeof createLyxaContext>>;\n"]}
|
|
@@ -8,7 +8,7 @@ export declare function createSocketSubscriptionProcedure<I extends ZodTypeAny,
|
|
|
8
8
|
outputSchema: O;
|
|
9
9
|
getId: (out: z.infer<O>) => string;
|
|
10
10
|
}): import("@trpc/server").TRPCSubscriptionProcedure<{
|
|
11
|
-
input: import("@trpc/server/dist/unstable-core-do-not-import.d-
|
|
12
|
-
output: AsyncIterable<import("@trpc/server/dist/unstable-core-do-not-import.d-
|
|
11
|
+
input: import("@trpc/server/dist/unstable-core-do-not-import.d-C8vB_hCN.cjs").inferParser<I>["in"] extends infer T ? T extends import("@trpc/server/dist/unstable-core-do-not-import.d-C8vB_hCN.cjs").inferParser<I>["in"] ? T extends import("@trpc/server").TRPCUnsetMarker ? void : T : never : never;
|
|
12
|
+
output: AsyncIterable<import("@trpc/server/dist/unstable-core-do-not-import.d-C8vB_hCN.cjs").TrackedData<any>, void, unknown>;
|
|
13
13
|
meta: object;
|
|
14
14
|
}>;
|
package/dist/types/README.md
CHANGED
package/dist/types/package.json
CHANGED
|
@@ -587,7 +587,7 @@ export declare const createResponseSchema: <T>(schema: z.ZodSchema<T>) => z.ZodO
|
|
|
587
587
|
totalPages: number;
|
|
588
588
|
} | undefined;
|
|
589
589
|
}>, z.ZodType<T, z.ZodTypeDef, T>]>>;
|
|
590
|
-
}>, any> extends infer T_1 ? { [k in keyof T_1]: z.
|
|
590
|
+
}>, any> extends infer T_1 ? { [k in keyof T_1]: T_1[k]; } : never, z.baseObjectInputType<{
|
|
591
591
|
success: z.ZodBoolean;
|
|
592
592
|
message: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
593
593
|
data: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
@@ -625,83 +625,7 @@ export declare const createResponseSchema: <T>(schema: z.ZodSchema<T>) => z.ZodO
|
|
|
625
625
|
totalPages: number;
|
|
626
626
|
} | undefined;
|
|
627
627
|
}>, z.ZodType<T, z.ZodTypeDef, T>]>>;
|
|
628
|
-
}
|
|
629
|
-
success: z.ZodBoolean;
|
|
630
|
-
message: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
631
|
-
data: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
632
|
-
metadata: z.ZodOptional<z.ZodObject<{
|
|
633
|
-
page: z.ZodNumber;
|
|
634
|
-
size: z.ZodNumber;
|
|
635
|
-
totalElements: z.ZodNumber;
|
|
636
|
-
totalPages: z.ZodNumber;
|
|
637
|
-
}, "strip", z.ZodTypeAny, {
|
|
638
|
-
size: number;
|
|
639
|
-
page: number;
|
|
640
|
-
totalElements: number;
|
|
641
|
-
totalPages: number;
|
|
642
|
-
}, {
|
|
643
|
-
size: number;
|
|
644
|
-
page: number;
|
|
645
|
-
totalElements: number;
|
|
646
|
-
totalPages: number;
|
|
647
|
-
}>>;
|
|
648
|
-
documents: z.ZodArray<z.ZodType<T, z.ZodTypeDef, T>, "many">;
|
|
649
|
-
}, "strip", z.ZodTypeAny, {
|
|
650
|
-
documents: T[];
|
|
651
|
-
metadata?: {
|
|
652
|
-
size: number;
|
|
653
|
-
page: number;
|
|
654
|
-
totalElements: number;
|
|
655
|
-
totalPages: number;
|
|
656
|
-
} | undefined;
|
|
657
|
-
}, {
|
|
658
|
-
documents: T[];
|
|
659
|
-
metadata?: {
|
|
660
|
-
size: number;
|
|
661
|
-
page: number;
|
|
662
|
-
totalElements: number;
|
|
663
|
-
totalPages: number;
|
|
664
|
-
} | undefined;
|
|
665
|
-
}>, z.ZodType<T, z.ZodTypeDef, T>]>>;
|
|
666
|
-
}> extends infer T_2 ? { [k_1 in keyof T_2]: z.baseObjectInputType<{
|
|
667
|
-
success: z.ZodBoolean;
|
|
668
|
-
message: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
669
|
-
data: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
670
|
-
metadata: z.ZodOptional<z.ZodObject<{
|
|
671
|
-
page: z.ZodNumber;
|
|
672
|
-
size: z.ZodNumber;
|
|
673
|
-
totalElements: z.ZodNumber;
|
|
674
|
-
totalPages: z.ZodNumber;
|
|
675
|
-
}, "strip", z.ZodTypeAny, {
|
|
676
|
-
size: number;
|
|
677
|
-
page: number;
|
|
678
|
-
totalElements: number;
|
|
679
|
-
totalPages: number;
|
|
680
|
-
}, {
|
|
681
|
-
size: number;
|
|
682
|
-
page: number;
|
|
683
|
-
totalElements: number;
|
|
684
|
-
totalPages: number;
|
|
685
|
-
}>>;
|
|
686
|
-
documents: z.ZodArray<z.ZodType<T, z.ZodTypeDef, T>, "many">;
|
|
687
|
-
}, "strip", z.ZodTypeAny, {
|
|
688
|
-
documents: T[];
|
|
689
|
-
metadata?: {
|
|
690
|
-
size: number;
|
|
691
|
-
page: number;
|
|
692
|
-
totalElements: number;
|
|
693
|
-
totalPages: number;
|
|
694
|
-
} | undefined;
|
|
695
|
-
}, {
|
|
696
|
-
documents: T[];
|
|
697
|
-
metadata?: {
|
|
698
|
-
size: number;
|
|
699
|
-
page: number;
|
|
700
|
-
totalElements: number;
|
|
701
|
-
totalPages: number;
|
|
702
|
-
} | undefined;
|
|
703
|
-
}>, z.ZodType<T, z.ZodTypeDef, T>]>>;
|
|
704
|
-
}>[k_1]; } : never>;
|
|
628
|
+
}> extends infer T_2 ? { [k_1 in keyof T_2]: T_2[k_1]; } : never>;
|
|
705
629
|
export type PaginatedDTO<T> = {
|
|
706
630
|
metadata: DTO<typeof metadataSchema>;
|
|
707
631
|
documents: T[];
|
|
@@ -76,34 +76,22 @@ export declare class SchemaBuilder<T extends z.ZodRawShape> {
|
|
|
76
76
|
private baseSchema;
|
|
77
77
|
constructor(baseFields: T, includeTimestamps?: boolean, includeTracking?: boolean);
|
|
78
78
|
private createBaseSchema;
|
|
79
|
-
getBaseSchema(): z.ZodObject<T, "strict", z.ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<T>, any> extends infer T_1 ? { [k in keyof T_1]:
|
|
79
|
+
getBaseSchema(): z.ZodObject<T, "strict", z.ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<T>, any> extends infer T_1 ? { [k in keyof T_1]: T_1[k]; } : never, z.baseObjectInputType<T> extends infer T_2 ? { [k_1 in keyof T_2]: T_2[k_1]; } : never>;
|
|
80
80
|
getEntitySchema(): z.ZodObject<z.objectUtil.extendShape<T, {
|
|
81
81
|
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
82
|
-
}> extends infer T_1 extends z.ZodRawShape ? { [k in keyof T_1]: z.ZodOptional<z.objectUtil.extendShape<T, {
|
|
82
|
+
}> extends infer T_1 extends z.ZodRawShape ? { [k in keyof T_1]: z.ZodOptional<T_1[k]>; } : never, "passthrough", z.ZodTypeAny, z.objectOutputType<z.objectUtil.extendShape<T, {
|
|
83
83
|
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
84
|
-
}>[k]>; } : never,
|
|
84
|
+
}> extends infer T_2 extends z.ZodRawShape ? { [k in keyof T_2]: z.ZodOptional<T_2[k]>; } : never, z.ZodTypeAny, "passthrough">, z.objectInputType<z.objectUtil.extendShape<T, {
|
|
85
85
|
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
86
|
-
}> extends infer
|
|
87
|
-
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
88
|
-
}>[k]>; } : never, z.ZodTypeAny, "passthrough">, z.objectInputType<z.objectUtil.extendShape<T, {
|
|
89
|
-
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
90
|
-
}> extends infer T_3 extends z.ZodRawShape ? { [k in keyof T_3]: z.ZodOptional<z.objectUtil.extendShape<T, {
|
|
91
|
-
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
92
|
-
}>[k]>; } : never, z.ZodTypeAny, "passthrough">>;
|
|
86
|
+
}> extends infer T_3 extends z.ZodRawShape ? { [k in keyof T_3]: z.ZodOptional<T_3[k]>; } : never, z.ZodTypeAny, "passthrough">>;
|
|
93
87
|
getIdSchema(): z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
94
88
|
getUpdateSchema(excludeFields?: ExcludeFromUpdate): z.ZodObject<z.objectUtil.extendShape<T, {
|
|
95
89
|
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
96
|
-
}> extends infer T_1 extends z.ZodRawShape ? { [k in keyof T_1]: z.ZodOptional<z.objectUtil.extendShape<T, {
|
|
97
|
-
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
98
|
-
}>[k]>; } : never, "passthrough", z.ZodTypeAny, z.objectOutputType<z.objectUtil.extendShape<T, {
|
|
99
|
-
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
100
|
-
}> extends infer T_2 extends z.ZodRawShape ? { [k in keyof T_2]: z.ZodOptional<z.objectUtil.extendShape<T, {
|
|
101
|
-
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
102
|
-
}>[k]>; } : never, z.ZodTypeAny, "passthrough">, z.objectInputType<z.objectUtil.extendShape<T, {
|
|
90
|
+
}> extends infer T_1 extends z.ZodRawShape ? { [k in keyof T_1]: z.ZodOptional<T_1[k]>; } : never, "passthrough", z.ZodTypeAny, z.objectOutputType<z.objectUtil.extendShape<T, {
|
|
103
91
|
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
104
|
-
}> extends infer
|
|
92
|
+
}> extends infer T_2 extends z.ZodRawShape ? { [k in keyof T_2]: z.ZodOptional<T_2[k]>; } : never, z.ZodTypeAny, "passthrough">, z.objectInputType<z.objectUtil.extendShape<T, {
|
|
105
93
|
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
106
|
-
}>[k]>; } : never, z.ZodTypeAny, "passthrough">> | z.ZodObject<{
|
|
94
|
+
}> extends infer T_3 extends z.ZodRawShape ? { [k in keyof T_3]: z.ZodOptional<T_3[k]>; } : never, z.ZodTypeAny, "passthrough">> | z.ZodObject<{
|
|
107
95
|
[x: string]: z.ZodOptional<z.ZodTypeAny>;
|
|
108
96
|
}, "strict", z.ZodTypeAny, {
|
|
109
97
|
[x: string]: any;
|
|
@@ -126,34 +114,22 @@ export declare class SchemaBuilder<T extends z.ZodRawShape> {
|
|
|
126
114
|
[x: string]: any;
|
|
127
115
|
}>;
|
|
128
116
|
getAllSchemas(excludeFromUpdate?: ExcludeFromUpdate): {
|
|
129
|
-
BaseSchema: z.ZodObject<T, "strict", z.ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<T>, any> extends infer T_1 ? { [k in keyof T_1]:
|
|
117
|
+
BaseSchema: z.ZodObject<T, "strict", z.ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<T>, any> extends infer T_1 ? { [k in keyof T_1]: T_1[k]; } : never, z.baseObjectInputType<T> extends infer T_2 ? { [k_1 in keyof T_2]: T_2[k_1]; } : never>;
|
|
130
118
|
EntitySchema: z.ZodObject<z.objectUtil.extendShape<T, {
|
|
131
119
|
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
132
|
-
}> extends infer T_3 extends z.ZodRawShape ? { [k_2 in keyof T_3]: z.ZodOptional<z.objectUtil.extendShape<T, {
|
|
120
|
+
}> extends infer T_3 extends z.ZodRawShape ? { [k_2 in keyof T_3]: z.ZodOptional<T_3[k_2]>; } : never, "passthrough", z.ZodTypeAny, z.objectOutputType<z.objectUtil.extendShape<T, {
|
|
133
121
|
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
134
|
-
}>[k_2]>; } : never,
|
|
122
|
+
}> extends infer T_4 extends z.ZodRawShape ? { [k_2 in keyof T_4]: z.ZodOptional<T_4[k_2]>; } : never, z.ZodTypeAny, "passthrough">, z.objectInputType<z.objectUtil.extendShape<T, {
|
|
135
123
|
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
136
|
-
}> extends infer
|
|
137
|
-
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
138
|
-
}>[k_2]>; } : never, z.ZodTypeAny, "passthrough">, z.objectInputType<z.objectUtil.extendShape<T, {
|
|
139
|
-
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
140
|
-
}> extends infer T_5 extends z.ZodRawShape ? { [k_2 in keyof T_5]: z.ZodOptional<z.objectUtil.extendShape<T, {
|
|
141
|
-
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
142
|
-
}>[k_2]>; } : never, z.ZodTypeAny, "passthrough">>;
|
|
124
|
+
}> extends infer T_5 extends z.ZodRawShape ? { [k_2 in keyof T_5]: z.ZodOptional<T_5[k_2]>; } : never, z.ZodTypeAny, "passthrough">>;
|
|
143
125
|
IdSchema: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
144
126
|
UpdateSchema: z.ZodObject<z.objectUtil.extendShape<T, {
|
|
145
127
|
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
146
|
-
}> extends infer T_6 extends z.ZodRawShape ? { [k_2 in keyof T_6]: z.ZodOptional<z.objectUtil.extendShape<T, {
|
|
147
|
-
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
148
|
-
}>[k_2]>; } : never, "passthrough", z.ZodTypeAny, z.objectOutputType<z.objectUtil.extendShape<T, {
|
|
149
|
-
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
150
|
-
}> extends infer T_7 extends z.ZodRawShape ? { [k_2 in keyof T_7]: z.ZodOptional<z.objectUtil.extendShape<T, {
|
|
151
|
-
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
152
|
-
}>[k_2]>; } : never, z.ZodTypeAny, "passthrough">, z.objectInputType<z.objectUtil.extendShape<T, {
|
|
128
|
+
}> extends infer T_6 extends z.ZodRawShape ? { [k_2 in keyof T_6]: z.ZodOptional<T_6[k_2]>; } : never, "passthrough", z.ZodTypeAny, z.objectOutputType<z.objectUtil.extendShape<T, {
|
|
153
129
|
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
154
|
-
}> extends infer
|
|
130
|
+
}> extends infer T_7 extends z.ZodRawShape ? { [k_2 in keyof T_7]: z.ZodOptional<T_7[k_2]>; } : never, z.ZodTypeAny, "passthrough">, z.objectInputType<z.objectUtil.extendShape<T, {
|
|
155
131
|
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
156
|
-
}>[k_2]>; } : never, z.ZodTypeAny, "passthrough">> | z.ZodObject<{
|
|
132
|
+
}> extends infer T_8 extends z.ZodRawShape ? { [k_2 in keyof T_8]: z.ZodOptional<T_8[k_2]>; } : never, z.ZodTypeAny, "passthrough">> | z.ZodObject<{
|
|
157
133
|
[x: string]: z.ZodOptional<z.ZodTypeAny>;
|
|
158
134
|
}, "strict", z.ZodTypeAny, {
|
|
159
135
|
[x: string]: any;
|
|
@@ -587,7 +587,7 @@ export declare const createResponseSchema: <T>(schema: z.ZodSchema<T>) => z.ZodO
|
|
|
587
587
|
totalPages: number;
|
|
588
588
|
} | undefined;
|
|
589
589
|
}>, z.ZodType<T, z.ZodTypeDef, T>]>>;
|
|
590
|
-
}>, any> extends infer T_1 ? { [k in keyof T_1]: z.
|
|
590
|
+
}>, any> extends infer T_1 ? { [k in keyof T_1]: T_1[k]; } : never, z.baseObjectInputType<{
|
|
591
591
|
success: z.ZodBoolean;
|
|
592
592
|
message: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
593
593
|
data: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
@@ -625,83 +625,7 @@ export declare const createResponseSchema: <T>(schema: z.ZodSchema<T>) => z.ZodO
|
|
|
625
625
|
totalPages: number;
|
|
626
626
|
} | undefined;
|
|
627
627
|
}>, z.ZodType<T, z.ZodTypeDef, T>]>>;
|
|
628
|
-
}
|
|
629
|
-
success: z.ZodBoolean;
|
|
630
|
-
message: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
631
|
-
data: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
632
|
-
metadata: z.ZodOptional<z.ZodObject<{
|
|
633
|
-
page: z.ZodNumber;
|
|
634
|
-
size: z.ZodNumber;
|
|
635
|
-
totalElements: z.ZodNumber;
|
|
636
|
-
totalPages: z.ZodNumber;
|
|
637
|
-
}, "strip", z.ZodTypeAny, {
|
|
638
|
-
page: number;
|
|
639
|
-
size: number;
|
|
640
|
-
totalElements: number;
|
|
641
|
-
totalPages: number;
|
|
642
|
-
}, {
|
|
643
|
-
page: number;
|
|
644
|
-
size: number;
|
|
645
|
-
totalElements: number;
|
|
646
|
-
totalPages: number;
|
|
647
|
-
}>>;
|
|
648
|
-
documents: z.ZodArray<z.ZodType<T, z.ZodTypeDef, T>, "many">;
|
|
649
|
-
}, "strip", z.ZodTypeAny, {
|
|
650
|
-
documents: T[];
|
|
651
|
-
metadata?: {
|
|
652
|
-
page: number;
|
|
653
|
-
size: number;
|
|
654
|
-
totalElements: number;
|
|
655
|
-
totalPages: number;
|
|
656
|
-
} | undefined;
|
|
657
|
-
}, {
|
|
658
|
-
documents: T[];
|
|
659
|
-
metadata?: {
|
|
660
|
-
page: number;
|
|
661
|
-
size: number;
|
|
662
|
-
totalElements: number;
|
|
663
|
-
totalPages: number;
|
|
664
|
-
} | undefined;
|
|
665
|
-
}>, z.ZodType<T, z.ZodTypeDef, T>]>>;
|
|
666
|
-
}> extends infer T_2 ? { [k_1 in keyof T_2]: z.baseObjectInputType<{
|
|
667
|
-
success: z.ZodBoolean;
|
|
668
|
-
message: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
669
|
-
data: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
670
|
-
metadata: z.ZodOptional<z.ZodObject<{
|
|
671
|
-
page: z.ZodNumber;
|
|
672
|
-
size: z.ZodNumber;
|
|
673
|
-
totalElements: z.ZodNumber;
|
|
674
|
-
totalPages: z.ZodNumber;
|
|
675
|
-
}, "strip", z.ZodTypeAny, {
|
|
676
|
-
page: number;
|
|
677
|
-
size: number;
|
|
678
|
-
totalElements: number;
|
|
679
|
-
totalPages: number;
|
|
680
|
-
}, {
|
|
681
|
-
page: number;
|
|
682
|
-
size: number;
|
|
683
|
-
totalElements: number;
|
|
684
|
-
totalPages: number;
|
|
685
|
-
}>>;
|
|
686
|
-
documents: z.ZodArray<z.ZodType<T, z.ZodTypeDef, T>, "many">;
|
|
687
|
-
}, "strip", z.ZodTypeAny, {
|
|
688
|
-
documents: T[];
|
|
689
|
-
metadata?: {
|
|
690
|
-
page: number;
|
|
691
|
-
size: number;
|
|
692
|
-
totalElements: number;
|
|
693
|
-
totalPages: number;
|
|
694
|
-
} | undefined;
|
|
695
|
-
}, {
|
|
696
|
-
documents: T[];
|
|
697
|
-
metadata?: {
|
|
698
|
-
page: number;
|
|
699
|
-
size: number;
|
|
700
|
-
totalElements: number;
|
|
701
|
-
totalPages: number;
|
|
702
|
-
} | undefined;
|
|
703
|
-
}>, z.ZodType<T, z.ZodTypeDef, T>]>>;
|
|
704
|
-
}>[k_1]; } : never>;
|
|
628
|
+
}> extends infer T_2 ? { [k_1 in keyof T_2]: T_2[k_1]; } : never>;
|
|
705
629
|
export type PaginatedDTO<T> = {
|
|
706
630
|
metadata: DTO<typeof metadataSchema>;
|
|
707
631
|
documents: T[];
|
|
@@ -76,34 +76,22 @@ export declare class SchemaBuilder<T extends z.ZodRawShape> {
|
|
|
76
76
|
private baseSchema;
|
|
77
77
|
constructor(baseFields: T, includeTimestamps?: boolean, includeTracking?: boolean);
|
|
78
78
|
private createBaseSchema;
|
|
79
|
-
getBaseSchema(): z.ZodObject<T, "strict", z.ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<T>, any> extends infer T_1 ? { [k in keyof T_1]:
|
|
79
|
+
getBaseSchema(): z.ZodObject<T, "strict", z.ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<T>, any> extends infer T_1 ? { [k in keyof T_1]: T_1[k]; } : never, z.baseObjectInputType<T> extends infer T_2 ? { [k_1 in keyof T_2]: T_2[k_1]; } : never>;
|
|
80
80
|
getEntitySchema(): z.ZodObject<z.objectUtil.extendShape<T, {
|
|
81
81
|
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
82
|
-
}> extends infer T_1 extends z.ZodRawShape ? { [k in keyof T_1]: z.ZodOptional<z.objectUtil.extendShape<T, {
|
|
82
|
+
}> extends infer T_1 extends z.ZodRawShape ? { [k in keyof T_1]: z.ZodOptional<T_1[k]>; } : never, "passthrough", z.ZodTypeAny, z.objectOutputType<z.objectUtil.extendShape<T, {
|
|
83
83
|
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
84
|
-
}>[k]>; } : never,
|
|
84
|
+
}> extends infer T_2 extends z.ZodRawShape ? { [k in keyof T_2]: z.ZodOptional<T_2[k]>; } : never, z.ZodTypeAny, "passthrough">, z.objectInputType<z.objectUtil.extendShape<T, {
|
|
85
85
|
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
86
|
-
}> extends infer
|
|
87
|
-
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
88
|
-
}>[k]>; } : never, z.ZodTypeAny, "passthrough">, z.objectInputType<z.objectUtil.extendShape<T, {
|
|
89
|
-
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
90
|
-
}> extends infer T_3 extends z.ZodRawShape ? { [k in keyof T_3]: z.ZodOptional<z.objectUtil.extendShape<T, {
|
|
91
|
-
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
92
|
-
}>[k]>; } : never, z.ZodTypeAny, "passthrough">>;
|
|
86
|
+
}> extends infer T_3 extends z.ZodRawShape ? { [k in keyof T_3]: z.ZodOptional<T_3[k]>; } : never, z.ZodTypeAny, "passthrough">>;
|
|
93
87
|
getIdSchema(): z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
94
88
|
getUpdateSchema(excludeFields?: ExcludeFromUpdate): z.ZodObject<z.objectUtil.extendShape<T, {
|
|
95
89
|
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
96
|
-
}> extends infer T_1 extends z.ZodRawShape ? { [k in keyof T_1]: z.ZodOptional<z.objectUtil.extendShape<T, {
|
|
97
|
-
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
98
|
-
}>[k]>; } : never, "passthrough", z.ZodTypeAny, z.objectOutputType<z.objectUtil.extendShape<T, {
|
|
99
|
-
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
100
|
-
}> extends infer T_2 extends z.ZodRawShape ? { [k in keyof T_2]: z.ZodOptional<z.objectUtil.extendShape<T, {
|
|
101
|
-
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
102
|
-
}>[k]>; } : never, z.ZodTypeAny, "passthrough">, z.objectInputType<z.objectUtil.extendShape<T, {
|
|
90
|
+
}> extends infer T_1 extends z.ZodRawShape ? { [k in keyof T_1]: z.ZodOptional<T_1[k]>; } : never, "passthrough", z.ZodTypeAny, z.objectOutputType<z.objectUtil.extendShape<T, {
|
|
103
91
|
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
104
|
-
}> extends infer
|
|
92
|
+
}> extends infer T_2 extends z.ZodRawShape ? { [k in keyof T_2]: z.ZodOptional<T_2[k]>; } : never, z.ZodTypeAny, "passthrough">, z.objectInputType<z.objectUtil.extendShape<T, {
|
|
105
93
|
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
106
|
-
}>[k]>; } : never, z.ZodTypeAny, "passthrough">> | z.ZodObject<{
|
|
94
|
+
}> extends infer T_3 extends z.ZodRawShape ? { [k in keyof T_3]: z.ZodOptional<T_3[k]>; } : never, z.ZodTypeAny, "passthrough">> | z.ZodObject<{
|
|
107
95
|
[x: string]: z.ZodOptional<z.ZodTypeAny>;
|
|
108
96
|
}, "strict", z.ZodTypeAny, {
|
|
109
97
|
[x: string]: any;
|
|
@@ -126,34 +114,22 @@ export declare class SchemaBuilder<T extends z.ZodRawShape> {
|
|
|
126
114
|
[x: string]: any;
|
|
127
115
|
}>;
|
|
128
116
|
getAllSchemas(excludeFromUpdate?: ExcludeFromUpdate): {
|
|
129
|
-
BaseSchema: z.ZodObject<T, "strict", z.ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<T>, any> extends infer T_1 ? { [k in keyof T_1]:
|
|
117
|
+
BaseSchema: z.ZodObject<T, "strict", z.ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<T>, any> extends infer T_1 ? { [k in keyof T_1]: T_1[k]; } : never, z.baseObjectInputType<T> extends infer T_2 ? { [k_1 in keyof T_2]: T_2[k_1]; } : never>;
|
|
130
118
|
EntitySchema: z.ZodObject<z.objectUtil.extendShape<T, {
|
|
131
119
|
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
132
|
-
}> extends infer T_3 extends z.ZodRawShape ? { [k_2 in keyof T_3]: z.ZodOptional<z.objectUtil.extendShape<T, {
|
|
120
|
+
}> extends infer T_3 extends z.ZodRawShape ? { [k_2 in keyof T_3]: z.ZodOptional<T_3[k_2]>; } : never, "passthrough", z.ZodTypeAny, z.objectOutputType<z.objectUtil.extendShape<T, {
|
|
133
121
|
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
134
|
-
}>[k_2]>; } : never,
|
|
122
|
+
}> extends infer T_4 extends z.ZodRawShape ? { [k_2 in keyof T_4]: z.ZodOptional<T_4[k_2]>; } : never, z.ZodTypeAny, "passthrough">, z.objectInputType<z.objectUtil.extendShape<T, {
|
|
135
123
|
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
136
|
-
}> extends infer
|
|
137
|
-
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
138
|
-
}>[k_2]>; } : never, z.ZodTypeAny, "passthrough">, z.objectInputType<z.objectUtil.extendShape<T, {
|
|
139
|
-
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
140
|
-
}> extends infer T_5 extends z.ZodRawShape ? { [k_2 in keyof T_5]: z.ZodOptional<z.objectUtil.extendShape<T, {
|
|
141
|
-
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
142
|
-
}>[k_2]>; } : never, z.ZodTypeAny, "passthrough">>;
|
|
124
|
+
}> extends infer T_5 extends z.ZodRawShape ? { [k_2 in keyof T_5]: z.ZodOptional<T_5[k_2]>; } : never, z.ZodTypeAny, "passthrough">>;
|
|
143
125
|
IdSchema: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
144
126
|
UpdateSchema: z.ZodObject<z.objectUtil.extendShape<T, {
|
|
145
127
|
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
146
|
-
}> extends infer T_6 extends z.ZodRawShape ? { [k_2 in keyof T_6]: z.ZodOptional<z.objectUtil.extendShape<T, {
|
|
147
|
-
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
148
|
-
}>[k_2]>; } : never, "passthrough", z.ZodTypeAny, z.objectOutputType<z.objectUtil.extendShape<T, {
|
|
149
|
-
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
150
|
-
}> extends infer T_7 extends z.ZodRawShape ? { [k_2 in keyof T_7]: z.ZodOptional<z.objectUtil.extendShape<T, {
|
|
151
|
-
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
152
|
-
}>[k_2]>; } : never, z.ZodTypeAny, "passthrough">, z.objectInputType<z.objectUtil.extendShape<T, {
|
|
128
|
+
}> extends infer T_6 extends z.ZodRawShape ? { [k_2 in keyof T_6]: z.ZodOptional<T_6[k_2]>; } : never, "passthrough", z.ZodTypeAny, z.objectOutputType<z.objectUtil.extendShape<T, {
|
|
153
129
|
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
154
|
-
}> extends infer
|
|
130
|
+
}> extends infer T_7 extends z.ZodRawShape ? { [k_2 in keyof T_7]: z.ZodOptional<T_7[k_2]>; } : never, z.ZodTypeAny, "passthrough">, z.objectInputType<z.objectUtil.extendShape<T, {
|
|
155
131
|
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
156
|
-
}>[k_2]>; } : never, z.ZodTypeAny, "passthrough">> | z.ZodObject<{
|
|
132
|
+
}> extends infer T_8 extends z.ZodRawShape ? { [k_2 in keyof T_8]: z.ZodOptional<T_8[k_2]>; } : never, z.ZodTypeAny, "passthrough">> | z.ZodObject<{
|
|
157
133
|
[x: string]: z.ZodOptional<z.ZodTypeAny>;
|
|
158
134
|
}, "strict", z.ZodTypeAny, {
|
|
159
135
|
[x: string]: any;
|
package/package.json
CHANGED
|
@@ -1,65 +1,65 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
2
|
+
"name": "@lyxa.ai/core",
|
|
3
|
+
"version": "1.0.389",
|
|
4
|
+
"description": "The Core system of the Lyxa services.",
|
|
5
|
+
"author": "elie <42282499+Internalizable@users.noreply.github.com>",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist/**/*"
|
|
9
|
+
],
|
|
10
|
+
"main": "dist/index.js",
|
|
11
|
+
"types": "dist/index.d.ts",
|
|
12
|
+
"scripts": {
|
|
13
|
+
"build": "node build.js",
|
|
14
|
+
"clean": "rimraf dist",
|
|
15
|
+
"start": "npx ts-node src/index.ts",
|
|
16
|
+
"publish:types": "cd dist/types && npm publish",
|
|
17
|
+
"publish:core": "npm publish --ignore-scripts",
|
|
18
|
+
"release": "npm run build && npm run publish:types && npm run publish:core"
|
|
19
|
+
},
|
|
20
|
+
"peerDependencies": {
|
|
21
|
+
"@trpc/client": "^11.4.3",
|
|
22
|
+
"@trpc/server": "^11.4.3"
|
|
23
|
+
},
|
|
24
|
+
"dependencies": {
|
|
25
|
+
"@google-cloud/secret-manager": "^5.6.0",
|
|
26
|
+
"@mapbox/polyline": "^1.2.1",
|
|
27
|
+
"@typegoose/typegoose": "^12.10.1",
|
|
28
|
+
"@types/amqplib": "^0.10.7",
|
|
29
|
+
"@types/node": "^22.10.2",
|
|
30
|
+
"@types/twilio": "^3.19.3",
|
|
31
|
+
"amqplib": "^0.10.5",
|
|
32
|
+
"bcryptjs": "^3.0.2",
|
|
33
|
+
"bullmq": "^5.56.0",
|
|
34
|
+
"dayjs": "^1.11.13",
|
|
35
|
+
"firebase": "^11.1.0",
|
|
36
|
+
"firebase-admin": "^13.0.1",
|
|
37
|
+
"ioredis": "^5.4.1",
|
|
38
|
+
"jsonwebtoken": "^9.0.2",
|
|
39
|
+
"libphonenumber-js": "^1.12.8",
|
|
40
|
+
"mime-types": "^3.0.1",
|
|
41
|
+
"moment": "^2.30.1",
|
|
42
|
+
"mongoose": "^8.13.0",
|
|
43
|
+
"nanoid": "^5.1.5",
|
|
44
|
+
"pino": "9.5.0",
|
|
45
|
+
"pino-mongodb": "4.3.0",
|
|
46
|
+
"pino-pretty": "13.0.0",
|
|
47
|
+
"sharp": "^0.33.5",
|
|
48
|
+
"shortid": "^2.2.16",
|
|
49
|
+
"slugify": "^1.6.6",
|
|
50
|
+
"twilio": "^5.4.0",
|
|
51
|
+
"typedi": "^0.10.0",
|
|
52
|
+
"typescript": "^5.7.2",
|
|
53
|
+
"ws": "^8.18.3",
|
|
54
|
+
"zod": "^3.24.1"
|
|
55
|
+
},
|
|
56
|
+
"devDependencies": {
|
|
57
|
+
"@trpc/client": "^11.4.3",
|
|
58
|
+
"@trpc/server": "^11.4.3",
|
|
59
|
+
"@types/mapbox__polyline": "^1.0.5",
|
|
60
|
+
"@types/mime-types": "^2.1.4",
|
|
61
|
+
"@types/shortid": "^2.2.0",
|
|
62
|
+
"@types/ws": "^8.18.1",
|
|
63
|
+
"prettier": "3.5.3"
|
|
64
|
+
}
|
|
65
65
|
}
|