@lyxa.ai/core 1.0.277 → 1.0.278

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.
@@ -1,7 +1,7 @@
1
- import { BaseEvent } from './BaseEvent';
1
+ import { BaseEvent } from '../event/BaseEvent';
2
2
  export type SocketEventParams<TData = any> = {
3
3
  eventType: string;
4
- socketIds: string[];
4
+ userIds: string[];
5
5
  data: TData;
6
6
  };
7
7
  export declare class SocketEmitEvent<TPayload = any> extends BaseEvent<SocketEventParams<TPayload>> {
@@ -10,8 +10,8 @@ var __metadata = (this && this.__metadata) || function (k, v) {
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.SocketEmitEvent = void 0;
13
- const BaseEvent_1 = require("./BaseEvent");
14
- const metadata_1 = require("./decorators/metadata");
13
+ const BaseEvent_1 = require("../event/BaseEvent");
14
+ const metadata_1 = require("../event/decorators/metadata");
15
15
  let SocketEmitEvent = class SocketEmitEvent extends BaseEvent_1.BaseEvent {
16
16
  constructor(instanceId, parameters) {
17
17
  super(`socket.emit.${instanceId}`, parameters);
@@ -21,7 +21,7 @@ exports.SocketEmitEvent = SocketEmitEvent;
21
21
  exports.SocketEmitEvent = SocketEmitEvent = __decorate([
22
22
  (0, metadata_1.EventMetadata)('socket.emit', [
23
23
  { name: 'eventType', type: 'string' },
24
- { name: 'socketIds', type: 'array' },
24
+ { name: 'userIds', type: 'array' },
25
25
  { name: 'data', type: 'object' },
26
26
  ]),
27
27
  __metadata("design:paramtypes", [String, Object])
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SocketEmitEvent.js","sourceRoot":"/","sources":["libraries/socket/SocketEmitEvent.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAA+C;AAC/C,2DAA6D;AAatD,IAAM,eAAe,GAArB,MAAM,eAAgC,SAAQ,qBAAsC;IAC1F,YAAY,UAAkB,EAAE,UAAuC;QACtE,KAAK,CAAC,eAAe,UAAU,EAAE,EAAE,UAAU,CAAC,CAAC;IAChD,CAAC;CACD,CAAA;AAJY,0CAAe;0BAAf,eAAe;IAL3B,IAAA,wBAAa,EAAC,aAAa,EAAE;QAC7B,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,QAAQ,EAAE;QACrC,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE;QAClC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE;KAChC,CAAC;;GACW,eAAe,CAI3B","sourcesContent":["import { BaseEvent } from '../event/BaseEvent';\nimport { EventMetadata } from '../event/decorators/metadata';\n\nexport type SocketEventParams<TData = any> = {\n\teventType: string;\n\tuserIds: string[];\n\tdata: TData;\n};\n\n@EventMetadata('socket.emit', [\n\t{ name: 'eventType', type: 'string' },\n\t{ name: 'userIds', type: 'array' },\n\t{ name: 'data', type: 'object' },\n])\nexport class SocketEmitEvent<TPayload = any> extends BaseEvent<SocketEventParams<TPayload>> {\n\tconstructor(instanceId: string, parameters: SocketEventParams<TPayload>) {\n\t\tsuper(`socket.emit.${instanceId}`, parameters);\n\t}\n}\n"]}
@@ -0,0 +1,11 @@
1
+ import { RedisService } from "../redis";
2
+ export interface InstanceRecipients {
3
+ instanceId: string;
4
+ usersId: string[];
5
+ }
6
+ export declare function getInstanceRecipientsMap(redis: RedisService, userIds: string[]): Promise<InstanceRecipients[]>;
7
+ export declare function publishToRecipients({ recipientIds, eventType, data, }: {
8
+ recipientIds: string[];
9
+ eventType: string;
10
+ data: any;
11
+ }): Promise<void>;
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getInstanceRecipientsMap = getInstanceRecipientsMap;
4
+ exports.publishToRecipients = publishToRecipients;
5
+ const __1 = require("../..");
6
+ const event_1 = require("../event");
7
+ const SocketEmitEvent_1 = require("./SocketEmitEvent");
8
+ async function getInstanceRecipientsMap(redis, userIds) {
9
+ const instanceMap = {};
10
+ for (const userId of userIds) {
11
+ const instanceIds = await redis.redisClient.smembers(`user:${userId}:instances`);
12
+ for (const instanceId of instanceIds) {
13
+ if (!instanceMap[instanceId]) {
14
+ instanceMap[instanceId] = [];
15
+ }
16
+ instanceMap[instanceId].push(userId);
17
+ }
18
+ }
19
+ return Object.entries(instanceMap).map(([instanceId, usersId]) => ({ instanceId, usersId }));
20
+ }
21
+ async function publishToRecipients({ recipientIds, eventType, data, }) {
22
+ if (!recipientIds.length)
23
+ return;
24
+ const redisService = (0, __1.getLibraries)().getRedisService();
25
+ const instanceRecipientsArr = await getInstanceRecipientsMap(redisService, recipientIds);
26
+ const timestamp = new Date().toISOString();
27
+ await Promise.all(instanceRecipientsArr.map(({ instanceId, usersId }) => {
28
+ const event = new SocketEmitEvent_1.SocketEmitEvent(instanceId, {
29
+ eventType,
30
+ userIds: usersId,
31
+ data: { ...data, timestamp },
32
+ });
33
+ return (0, event_1.publishEvent)(event);
34
+ }));
35
+ }
36
+ //# sourceMappingURL=socket-publisher.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"socket-publisher.js","sourceRoot":"/","sources":["libraries/socket/socket-publisher.ts"],"names":[],"mappings":";;AAWA,4DAeC;AAED,kDAyBC;AArDD,6BAAqC;AACrC,oCAAwC;AACxC,uDAAoD;AAS7C,KAAK,UAAU,wBAAwB,CAC7C,KAAmB,EACnB,OAAiB;IAEjB,MAAM,WAAW,GAA6B,EAAE,CAAC;IACjD,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;QAC9B,MAAM,WAAW,GAAG,MAAM,KAAK,CAAC,WAAW,CAAC,QAAQ,CAAC,QAAQ,MAAM,YAAY,CAAC,CAAC;QACjF,KAAK,MAAM,UAAU,IAAI,WAAW,EAAE,CAAC;YACtC,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,EAAE,CAAC;gBAC9B,WAAW,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC;YAC9B,CAAC;YACD,WAAW,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACtC,CAAC;IACF,CAAC;IACD,OAAO,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,UAAU,EAAE,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,UAAU,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC;AAC9F,CAAC;AAEM,KAAK,UAAU,mBAAmB,CAAC,EACzC,YAAY,EACZ,SAAS,EACT,IAAI,GAKJ;IACA,IAAI,CAAC,YAAY,CAAC,MAAM;QAAE,OAAO;IAEjC,MAAM,YAAY,GAAG,IAAA,gBAAY,GAAE,CAAC,eAAe,EAAE,CAAC;IACtD,MAAM,qBAAqB,GAAG,MAAM,wBAAwB,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC;IACzF,MAAM,SAAS,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IAE3C,MAAM,OAAO,CAAC,GAAG,CAChB,qBAAqB,CAAC,GAAG,CAAC,CAAC,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE,EAAE;QACrD,MAAM,KAAK,GAAG,IAAI,iCAAe,CAAC,UAAU,EAAE;YAC7C,SAAS;YACT,OAAO,EAAE,OAAO;YAChB,IAAI,EAAE,EAAE,GAAG,IAAI,EAAE,SAAS,EAAE;SAC5B,CAAC,CAAC;QACH,OAAO,IAAA,oBAAY,EAAC,KAAK,CAAC,CAAC;IAC5B,CAAC,CAAC,CACF,CAAC;AACH,CAAC","sourcesContent":["import { getLibraries } from \"../..\";\nimport { publishEvent } from \"../event\";\nimport { SocketEmitEvent } from \"./SocketEmitEvent\";\nimport { RedisService } from \"../redis\";\n\nexport interface InstanceRecipients {\n\tinstanceId: string;\n\tusersId: string[];\n}\n\n \nexport async function getInstanceRecipientsMap(\n\tredis: RedisService,\n\tuserIds: string[]\n): Promise<InstanceRecipients[]> {\n\tconst instanceMap: Record<string, string[]> = {};\n\tfor (const userId of userIds) {\n\t\tconst instanceIds = await redis.redisClient.smembers(`user:${userId}:instances`);\n\t\tfor (const instanceId of instanceIds) {\n\t\t\tif (!instanceMap[instanceId]) {\n\t\t\t\tinstanceMap[instanceId] = [];\n\t\t\t}\n\t\t\tinstanceMap[instanceId].push(userId);\n\t\t}\n\t}\n\treturn Object.entries(instanceMap).map(([instanceId, usersId]) => ({ instanceId, usersId }));\n}\n\nexport async function publishToRecipients({\n\trecipientIds,\n\teventType,\n\tdata,\n}: {\n\trecipientIds: string[];\n\teventType: string;\n\tdata: any;\n}) {\n\tif (!recipientIds.length) return;\n\n\tconst redisService = getLibraries().getRedisService();\n\tconst instanceRecipientsArr = await getInstanceRecipientsMap(redisService, recipientIds);\n\tconst timestamp = new Date().toISOString();\n\n\tawait Promise.all(\n\t\tinstanceRecipientsArr.map(({ instanceId, usersId }) => {\n\t\t\tconst event = new SocketEmitEvent(instanceId, {\n\t\t\t\teventType,\n\t\t\t\tuserIds: usersId,\n\t\t\t\tdata: { ...data, timestamp },\n\t\t\t});\n\t\t\treturn publishEvent(event);\n\t\t})\n\t);\n}\n"]}
@@ -22,7 +22,7 @@ Perfect for sharing types between frontend and backend applications.
22
22
 
23
23
  ## Version
24
24
 
25
- Version: 1.0.277
25
+ Version: 1.0.278
26
26
 
27
27
  ## Dependencies
28
28
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lyxa.ai/types",
3
- "version": "1.0.277",
3
+ "version": "1.0.278",
4
4
  "description": "Lyxa type definitions and validation schemas for both frontend and backend",
5
5
  "author": "elie <42282499+Internalizable@users.noreply.github.com>",
6
6
  "license": "MIT",
@@ -504,7 +504,7 @@ export declare const createResponseSchema: <T>(schema: z.ZodSchema<T>) => z.ZodO
504
504
  totalPages: number;
505
505
  } | undefined;
506
506
  }>, z.ZodType<T, z.ZodTypeDef, T>]>>;
507
- }>, any> extends infer T_1 ? { [k in keyof T_1]: z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
507
+ }>, any> extends infer T_1 ? { [k in keyof T_1]: T_1[k]; } : never, z.baseObjectInputType<{
508
508
  success: z.ZodBoolean;
509
509
  message: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
510
510
  data: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
@@ -542,83 +542,7 @@ export declare const createResponseSchema: <T>(schema: z.ZodSchema<T>) => z.ZodO
542
542
  totalPages: number;
543
543
  } | undefined;
544
544
  }>, z.ZodType<T, z.ZodTypeDef, T>]>>;
545
- }>, any>[k]; } : never, z.baseObjectInputType<{
546
- success: z.ZodBoolean;
547
- message: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
548
- data: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
549
- metadata: z.ZodOptional<z.ZodObject<{
550
- page: z.ZodNumber;
551
- size: z.ZodNumber;
552
- totalElements: z.ZodNumber;
553
- totalPages: z.ZodNumber;
554
- }, "strip", z.ZodTypeAny, {
555
- size: number;
556
- page: number;
557
- totalElements: number;
558
- totalPages: number;
559
- }, {
560
- size: number;
561
- page: number;
562
- totalElements: number;
563
- totalPages: number;
564
- }>>;
565
- documents: z.ZodArray<z.ZodType<T, z.ZodTypeDef, T>, "many">;
566
- }, "strip", z.ZodTypeAny, {
567
- documents: T[];
568
- metadata?: {
569
- size: number;
570
- page: number;
571
- totalElements: number;
572
- totalPages: number;
573
- } | undefined;
574
- }, {
575
- documents: T[];
576
- metadata?: {
577
- size: number;
578
- page: number;
579
- totalElements: number;
580
- totalPages: number;
581
- } | undefined;
582
- }>, z.ZodType<T, z.ZodTypeDef, T>]>>;
583
- }> extends infer T_2 ? { [k_1 in keyof T_2]: z.baseObjectInputType<{
584
- success: z.ZodBoolean;
585
- message: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
586
- data: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
587
- metadata: z.ZodOptional<z.ZodObject<{
588
- page: z.ZodNumber;
589
- size: z.ZodNumber;
590
- totalElements: z.ZodNumber;
591
- totalPages: z.ZodNumber;
592
- }, "strip", z.ZodTypeAny, {
593
- size: number;
594
- page: number;
595
- totalElements: number;
596
- totalPages: number;
597
- }, {
598
- size: number;
599
- page: number;
600
- totalElements: number;
601
- totalPages: number;
602
- }>>;
603
- documents: z.ZodArray<z.ZodType<T, z.ZodTypeDef, T>, "many">;
604
- }, "strip", z.ZodTypeAny, {
605
- documents: T[];
606
- metadata?: {
607
- size: number;
608
- page: number;
609
- totalElements: number;
610
- totalPages: number;
611
- } | undefined;
612
- }, {
613
- documents: T[];
614
- metadata?: {
615
- size: number;
616
- page: number;
617
- totalElements: number;
618
- totalPages: number;
619
- } | undefined;
620
- }>, z.ZodType<T, z.ZodTypeDef, T>]>>;
621
- }>[k_1]; } : never>;
545
+ }> extends infer T_2 ? { [k_1 in keyof T_2]: T_2[k_1]; } : never>;
622
546
  export declare const TokenSchema: z.ZodObject<{
623
547
  accessToken: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
624
548
  refreshToken: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
@@ -61,34 +61,22 @@ export declare class SchemaBuilder<T extends z.ZodRawShape> {
61
61
  private baseSchema;
62
62
  constructor(baseFields: T, includeTimestamps?: boolean, includeTracking?: boolean);
63
63
  private createBaseSchema;
64
- getBaseSchema(): z.ZodObject<T, "strict", z.ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<T>, any> extends infer T_1 ? { [k in keyof T_1]: z.objectUtil.addQuestionMarks<z.baseObjectOutputType<T>, any>[k]; } : never, z.baseObjectInputType<T> extends infer T_2 ? { [k_1 in keyof T_2]: z.baseObjectInputType<T>[k_1]; } : never>;
64
+ 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>;
65
65
  getEntitySchema(): z.ZodObject<z.objectUtil.extendShape<T, {
66
66
  _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>]>;
67
- }> extends infer T_1 extends z.ZodRawShape ? { [k in keyof T_1]: z.ZodOptional<z.objectUtil.extendShape<T, {
67
+ }> 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, {
68
68
  _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>]>;
69
- }>[k]>; } : never, "passthrough", z.ZodTypeAny, z.objectOutputType<z.objectUtil.extendShape<T, {
69
+ }> 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, {
70
70
  _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>]>;
71
- }> extends infer T_2 extends z.ZodRawShape ? { [k in keyof T_2]: z.ZodOptional<z.objectUtil.extendShape<T, {
72
- _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>]>;
73
- }>[k]>; } : never, z.ZodTypeAny, "passthrough">, z.objectInputType<z.objectUtil.extendShape<T, {
74
- _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>]>;
75
- }> extends infer T_3 extends z.ZodRawShape ? { [k in keyof T_3]: z.ZodOptional<z.objectUtil.extendShape<T, {
76
- _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>]>;
77
- }>[k]>; } : never, z.ZodTypeAny, "passthrough">>;
71
+ }> extends infer T_3 extends z.ZodRawShape ? { [k in keyof T_3]: z.ZodOptional<T_3[k]>; } : never, z.ZodTypeAny, "passthrough">>;
78
72
  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>]>;
79
73
  getUpdateSchema(excludeFields?: ExcludeFromUpdate): z.ZodObject<z.objectUtil.extendShape<T, {
80
74
  _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>]>;
81
- }> extends infer T_1 extends z.ZodRawShape ? { [k in keyof T_1]: z.ZodOptional<z.objectUtil.extendShape<T, {
82
- _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>]>;
83
- }>[k]>; } : never, "passthrough", z.ZodTypeAny, z.objectOutputType<z.objectUtil.extendShape<T, {
84
- _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>]>;
85
- }> extends infer T_2 extends z.ZodRawShape ? { [k in keyof T_2]: z.ZodOptional<z.objectUtil.extendShape<T, {
86
- _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>]>;
87
- }>[k]>; } : never, z.ZodTypeAny, "passthrough">, z.objectInputType<z.objectUtil.extendShape<T, {
75
+ }> 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, {
88
76
  _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>]>;
89
- }> extends infer T_3 extends z.ZodRawShape ? { [k in keyof T_3]: z.ZodOptional<z.objectUtil.extendShape<T, {
77
+ }> 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, {
90
78
  _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>]>;
91
- }>[k]>; } : never, z.ZodTypeAny, "passthrough">> | z.ZodObject<{
79
+ }> extends infer T_3 extends z.ZodRawShape ? { [k in keyof T_3]: z.ZodOptional<T_3[k]>; } : never, z.ZodTypeAny, "passthrough">> | z.ZodObject<{
92
80
  [x: string]: z.ZodOptional<z.ZodTypeAny>;
93
81
  }, "strict", z.ZodTypeAny, {
94
82
  [x: string]: any;
@@ -111,34 +99,22 @@ export declare class SchemaBuilder<T extends z.ZodRawShape> {
111
99
  [x: string]: any;
112
100
  }>;
113
101
  getAllSchemas(excludeFromUpdate?: ExcludeFromUpdate): {
114
- BaseSchema: z.ZodObject<T, "strict", z.ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<T>, any> extends infer T_1 ? { [k in keyof T_1]: z.objectUtil.addQuestionMarks<z.baseObjectOutputType<T>, any>[k]; } : never, z.baseObjectInputType<T> extends infer T_2 ? { [k_1 in keyof T_2]: z.baseObjectInputType<T>[k_1]; } : never>;
102
+ 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>;
115
103
  EntitySchema: z.ZodObject<z.objectUtil.extendShape<T, {
116
104
  _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>]>;
117
- }> extends infer T_3 extends z.ZodRawShape ? { [k_2 in keyof T_3]: z.ZodOptional<z.objectUtil.extendShape<T, {
105
+ }> 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, {
118
106
  _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>]>;
119
- }>[k_2]>; } : never, "passthrough", z.ZodTypeAny, z.objectOutputType<z.objectUtil.extendShape<T, {
107
+ }> 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, {
120
108
  _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>]>;
121
- }> extends infer T_4 extends z.ZodRawShape ? { [k_2 in keyof T_4]: z.ZodOptional<z.objectUtil.extendShape<T, {
122
- _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>]>;
123
- }>[k_2]>; } : never, z.ZodTypeAny, "passthrough">, z.objectInputType<z.objectUtil.extendShape<T, {
124
- _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>]>;
125
- }> extends infer T_5 extends z.ZodRawShape ? { [k_2 in keyof T_5]: z.ZodOptional<z.objectUtil.extendShape<T, {
126
- _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>]>;
127
- }>[k_2]>; } : never, z.ZodTypeAny, "passthrough">>;
109
+ }> extends infer T_5 extends z.ZodRawShape ? { [k_2 in keyof T_5]: z.ZodOptional<T_5[k_2]>; } : never, z.ZodTypeAny, "passthrough">>;
128
110
  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>]>;
129
111
  UpdateSchema: z.ZodObject<z.objectUtil.extendShape<T, {
130
112
  _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>]>;
131
- }> extends infer T_6 extends z.ZodRawShape ? { [k_2 in keyof T_6]: z.ZodOptional<z.objectUtil.extendShape<T, {
132
- _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>]>;
133
- }>[k_2]>; } : never, "passthrough", z.ZodTypeAny, z.objectOutputType<z.objectUtil.extendShape<T, {
134
- _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>]>;
135
- }> extends infer T_7 extends z.ZodRawShape ? { [k_2 in keyof T_7]: z.ZodOptional<z.objectUtil.extendShape<T, {
136
- _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>]>;
137
- }>[k_2]>; } : never, z.ZodTypeAny, "passthrough">, z.objectInputType<z.objectUtil.extendShape<T, {
113
+ }> 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, {
138
114
  _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>]>;
139
- }> extends infer T_8 extends z.ZodRawShape ? { [k_2 in keyof T_8]: z.ZodOptional<z.objectUtil.extendShape<T, {
115
+ }> 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, {
140
116
  _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>]>;
141
- }>[k_2]>; } : never, z.ZodTypeAny, "passthrough">> | z.ZodObject<{
117
+ }> 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<{
142
118
  [x: string]: z.ZodOptional<z.ZodTypeAny>;
143
119
  }, "strict", z.ZodTypeAny, {
144
120
  [x: string]: any;
@@ -504,7 +504,7 @@ export declare const createResponseSchema: <T>(schema: z.ZodSchema<T>) => z.ZodO
504
504
  totalPages: number;
505
505
  } | undefined;
506
506
  }>, z.ZodType<T, z.ZodTypeDef, T>]>>;
507
- }>, any> extends infer T_1 ? { [k in keyof T_1]: z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
507
+ }>, any> extends infer T_1 ? { [k in keyof T_1]: T_1[k]; } : never, z.baseObjectInputType<{
508
508
  success: z.ZodBoolean;
509
509
  message: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
510
510
  data: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
@@ -542,83 +542,7 @@ export declare const createResponseSchema: <T>(schema: z.ZodSchema<T>) => z.ZodO
542
542
  totalPages: number;
543
543
  } | undefined;
544
544
  }>, z.ZodType<T, z.ZodTypeDef, T>]>>;
545
- }>, any>[k]; } : never, z.baseObjectInputType<{
546
- success: z.ZodBoolean;
547
- message: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
548
- data: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
549
- metadata: z.ZodOptional<z.ZodObject<{
550
- page: z.ZodNumber;
551
- size: z.ZodNumber;
552
- totalElements: z.ZodNumber;
553
- totalPages: z.ZodNumber;
554
- }, "strip", z.ZodTypeAny, {
555
- page: number;
556
- size: number;
557
- totalElements: number;
558
- totalPages: number;
559
- }, {
560
- page: number;
561
- size: number;
562
- totalElements: number;
563
- totalPages: number;
564
- }>>;
565
- documents: z.ZodArray<z.ZodType<T, z.ZodTypeDef, T>, "many">;
566
- }, "strip", z.ZodTypeAny, {
567
- documents: T[];
568
- metadata?: {
569
- page: number;
570
- size: number;
571
- totalElements: number;
572
- totalPages: number;
573
- } | undefined;
574
- }, {
575
- documents: T[];
576
- metadata?: {
577
- page: number;
578
- size: number;
579
- totalElements: number;
580
- totalPages: number;
581
- } | undefined;
582
- }>, z.ZodType<T, z.ZodTypeDef, T>]>>;
583
- }> extends infer T_2 ? { [k_1 in keyof T_2]: z.baseObjectInputType<{
584
- success: z.ZodBoolean;
585
- message: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
586
- data: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
587
- metadata: z.ZodOptional<z.ZodObject<{
588
- page: z.ZodNumber;
589
- size: z.ZodNumber;
590
- totalElements: z.ZodNumber;
591
- totalPages: z.ZodNumber;
592
- }, "strip", z.ZodTypeAny, {
593
- page: number;
594
- size: number;
595
- totalElements: number;
596
- totalPages: number;
597
- }, {
598
- page: number;
599
- size: number;
600
- totalElements: number;
601
- totalPages: number;
602
- }>>;
603
- documents: z.ZodArray<z.ZodType<T, z.ZodTypeDef, T>, "many">;
604
- }, "strip", z.ZodTypeAny, {
605
- documents: T[];
606
- metadata?: {
607
- page: number;
608
- size: number;
609
- totalElements: number;
610
- totalPages: number;
611
- } | undefined;
612
- }, {
613
- documents: T[];
614
- metadata?: {
615
- page: number;
616
- size: number;
617
- totalElements: number;
618
- totalPages: number;
619
- } | undefined;
620
- }>, z.ZodType<T, z.ZodTypeDef, T>]>>;
621
- }>[k_1]; } : never>;
545
+ }> extends infer T_2 ? { [k_1 in keyof T_2]: T_2[k_1]; } : never>;
622
546
  export declare const TokenSchema: z.ZodObject<{
623
547
  accessToken: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
624
548
  refreshToken: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
@@ -61,34 +61,22 @@ export declare class SchemaBuilder<T extends z.ZodRawShape> {
61
61
  private baseSchema;
62
62
  constructor(baseFields: T, includeTimestamps?: boolean, includeTracking?: boolean);
63
63
  private createBaseSchema;
64
- getBaseSchema(): z.ZodObject<T, "strict", z.ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<T>, any> extends infer T_1 ? { [k in keyof T_1]: z.objectUtil.addQuestionMarks<z.baseObjectOutputType<T>, any>[k]; } : never, z.baseObjectInputType<T> extends infer T_2 ? { [k_1 in keyof T_2]: z.baseObjectInputType<T>[k_1]; } : never>;
64
+ 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>;
65
65
  getEntitySchema(): z.ZodObject<z.objectUtil.extendShape<T, {
66
66
  _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>]>;
67
- }> extends infer T_1 extends z.ZodRawShape ? { [k in keyof T_1]: z.ZodOptional<z.objectUtil.extendShape<T, {
67
+ }> 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, {
68
68
  _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>]>;
69
- }>[k]>; } : never, "passthrough", z.ZodTypeAny, z.objectOutputType<z.objectUtil.extendShape<T, {
69
+ }> 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, {
70
70
  _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>]>;
71
- }> extends infer T_2 extends z.ZodRawShape ? { [k in keyof T_2]: z.ZodOptional<z.objectUtil.extendShape<T, {
72
- _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>]>;
73
- }>[k]>; } : never, z.ZodTypeAny, "passthrough">, z.objectInputType<z.objectUtil.extendShape<T, {
74
- _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>]>;
75
- }> extends infer T_3 extends z.ZodRawShape ? { [k in keyof T_3]: z.ZodOptional<z.objectUtil.extendShape<T, {
76
- _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>]>;
77
- }>[k]>; } : never, z.ZodTypeAny, "passthrough">>;
71
+ }> extends infer T_3 extends z.ZodRawShape ? { [k in keyof T_3]: z.ZodOptional<T_3[k]>; } : never, z.ZodTypeAny, "passthrough">>;
78
72
  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>]>;
79
73
  getUpdateSchema(excludeFields?: ExcludeFromUpdate): z.ZodObject<z.objectUtil.extendShape<T, {
80
74
  _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>]>;
81
- }> extends infer T_1 extends z.ZodRawShape ? { [k in keyof T_1]: z.ZodOptional<z.objectUtil.extendShape<T, {
82
- _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>]>;
83
- }>[k]>; } : never, "passthrough", z.ZodTypeAny, z.objectOutputType<z.objectUtil.extendShape<T, {
84
- _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>]>;
85
- }> extends infer T_2 extends z.ZodRawShape ? { [k in keyof T_2]: z.ZodOptional<z.objectUtil.extendShape<T, {
86
- _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>]>;
87
- }>[k]>; } : never, z.ZodTypeAny, "passthrough">, z.objectInputType<z.objectUtil.extendShape<T, {
75
+ }> 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, {
88
76
  _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>]>;
89
- }> extends infer T_3 extends z.ZodRawShape ? { [k in keyof T_3]: z.ZodOptional<z.objectUtil.extendShape<T, {
77
+ }> 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, {
90
78
  _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>]>;
91
- }>[k]>; } : never, z.ZodTypeAny, "passthrough">> | z.ZodObject<{
79
+ }> extends infer T_3 extends z.ZodRawShape ? { [k in keyof T_3]: z.ZodOptional<T_3[k]>; } : never, z.ZodTypeAny, "passthrough">> | z.ZodObject<{
92
80
  [x: string]: z.ZodOptional<z.ZodTypeAny>;
93
81
  }, "strict", z.ZodTypeAny, {
94
82
  [x: string]: any;
@@ -111,34 +99,22 @@ export declare class SchemaBuilder<T extends z.ZodRawShape> {
111
99
  [x: string]: any;
112
100
  }>;
113
101
  getAllSchemas(excludeFromUpdate?: ExcludeFromUpdate): {
114
- BaseSchema: z.ZodObject<T, "strict", z.ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<T>, any> extends infer T_1 ? { [k in keyof T_1]: z.objectUtil.addQuestionMarks<z.baseObjectOutputType<T>, any>[k]; } : never, z.baseObjectInputType<T> extends infer T_2 ? { [k_1 in keyof T_2]: z.baseObjectInputType<T>[k_1]; } : never>;
102
+ 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>;
115
103
  EntitySchema: z.ZodObject<z.objectUtil.extendShape<T, {
116
104
  _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>]>;
117
- }> extends infer T_3 extends z.ZodRawShape ? { [k_2 in keyof T_3]: z.ZodOptional<z.objectUtil.extendShape<T, {
105
+ }> 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, {
118
106
  _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>]>;
119
- }>[k_2]>; } : never, "passthrough", z.ZodTypeAny, z.objectOutputType<z.objectUtil.extendShape<T, {
107
+ }> 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, {
120
108
  _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>]>;
121
- }> extends infer T_4 extends z.ZodRawShape ? { [k_2 in keyof T_4]: z.ZodOptional<z.objectUtil.extendShape<T, {
122
- _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>]>;
123
- }>[k_2]>; } : never, z.ZodTypeAny, "passthrough">, z.objectInputType<z.objectUtil.extendShape<T, {
124
- _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>]>;
125
- }> extends infer T_5 extends z.ZodRawShape ? { [k_2 in keyof T_5]: z.ZodOptional<z.objectUtil.extendShape<T, {
126
- _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>]>;
127
- }>[k_2]>; } : never, z.ZodTypeAny, "passthrough">>;
109
+ }> extends infer T_5 extends z.ZodRawShape ? { [k_2 in keyof T_5]: z.ZodOptional<T_5[k_2]>; } : never, z.ZodTypeAny, "passthrough">>;
128
110
  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>]>;
129
111
  UpdateSchema: z.ZodObject<z.objectUtil.extendShape<T, {
130
112
  _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>]>;
131
- }> extends infer T_6 extends z.ZodRawShape ? { [k_2 in keyof T_6]: z.ZodOptional<z.objectUtil.extendShape<T, {
132
- _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>]>;
133
- }>[k_2]>; } : never, "passthrough", z.ZodTypeAny, z.objectOutputType<z.objectUtil.extendShape<T, {
134
- _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>]>;
135
- }> extends infer T_7 extends z.ZodRawShape ? { [k_2 in keyof T_7]: z.ZodOptional<z.objectUtil.extendShape<T, {
136
- _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>]>;
137
- }>[k_2]>; } : never, z.ZodTypeAny, "passthrough">, z.objectInputType<z.objectUtil.extendShape<T, {
113
+ }> 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, {
138
114
  _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>]>;
139
- }> extends infer T_8 extends z.ZodRawShape ? { [k_2 in keyof T_8]: z.ZodOptional<z.objectUtil.extendShape<T, {
115
+ }> 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, {
140
116
  _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>]>;
141
- }>[k_2]>; } : never, z.ZodTypeAny, "passthrough">> | z.ZodObject<{
117
+ }> 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<{
142
118
  [x: string]: z.ZodOptional<z.ZodTypeAny>;
143
119
  }, "strict", z.ZodTypeAny, {
144
120
  [x: string]: any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lyxa.ai/core",
3
- "version": "1.0.277",
3
+ "version": "1.0.278",
4
4
  "description": "The Core system of the Lyxa services.",
5
5
  "author": "elie <42282499+Internalizable@users.noreply.github.com>",
6
6
  "license": "MIT",
@@ -1 +0,0 @@
1
- {"version":3,"file":"SocketEmitEvent.js","sourceRoot":"/","sources":["libraries/event/SocketEmitEvent.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAwC;AACxC,oDAAsD;AAa/C,IAAM,eAAe,GAArB,MAAM,eAAgC,SAAQ,qBAAsC;IAC1F,YAAY,UAAkB,EAAE,UAAuC;QACtE,KAAK,CAAC,eAAe,UAAU,EAAE,EAAE,UAAU,CAAC,CAAC;IAChD,CAAC;CACD,CAAA;AAJY,0CAAe;0BAAf,eAAe;IAL3B,IAAA,wBAAa,EAAC,aAAa,EAAE;QAC7B,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,QAAQ,EAAE;QACrC,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,OAAO,EAAE;QACpC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE;KAChC,CAAC;;GACW,eAAe,CAI3B","sourcesContent":["import { BaseEvent } from './BaseEvent';\nimport { EventMetadata } from './decorators/metadata';\n\nexport type SocketEventParams<TData = any> = {\n\teventType: string;\n\tsocketIds: string[];\n\tdata: TData;\n};\n\n@EventMetadata('socket.emit', [\n\t{ name: 'eventType', type: 'string' },\n\t{ name: 'socketIds', type: 'array' },\n\t{ name: 'data', type: 'object' },\n])\nexport class SocketEmitEvent<TPayload = any> extends BaseEvent<SocketEventParams<TPayload>> {\n\tconstructor(instanceId: string, parameters: SocketEventParams<TPayload>) {\n\t\tsuper(`socket.emit.${instanceId}`, parameters);\n\t}\n}\n"]}