@lyxa.ai/core 1.3.172 → 1.3.174

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.
@@ -9,32 +9,38 @@ export declare const TicketActionsSocketOutputSchema: z.ZodObject<{
9
9
  status: z.ZodNativeEnum<typeof TicketStatus>;
10
10
  type: z.ZodNativeEnum<typeof TicketType>;
11
11
  content: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
12
+ title: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
12
13
  }, "strip", z.ZodTypeAny, {
13
14
  type: TicketType;
14
15
  status: TicketStatus;
15
16
  _id: import("mongoose").Types.ObjectId;
16
17
  content?: string | undefined;
18
+ title?: string | undefined;
17
19
  }, {
18
20
  type: TicketType;
19
21
  status: TicketStatus;
20
22
  _id: import("mongoose").Types.ObjectId;
21
23
  content?: string | undefined;
24
+ title?: string | undefined;
22
25
  }>;
23
26
  export declare const TicketActionsPushOutputSchema: z.ZodObject<{
24
27
  ticketId: z.ZodEffects<z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>, import("mongoose").Types.ObjectId, import("mongoose").Types.ObjectId>;
25
28
  status: z.ZodNativeEnum<typeof TicketStatus>;
26
29
  type: z.ZodNativeEnum<typeof TicketType>;
27
30
  content: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
31
+ title: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
28
32
  }, "strip", z.ZodTypeAny, {
29
33
  type: TicketType;
30
34
  status: TicketStatus;
31
35
  ticketId: import("mongoose").Types.ObjectId;
32
36
  content?: string | undefined;
37
+ title?: string | undefined;
33
38
  }, {
34
39
  type: TicketType;
35
40
  status: TicketStatus;
36
41
  ticketId: import("mongoose").Types.ObjectId;
37
42
  content?: string | undefined;
43
+ title?: string | undefined;
38
44
  }>;
39
45
  export type TicketActionsSocketOutputDTO = DTO<typeof TicketActionsSocketOutputSchema>;
40
46
  export type TicketActionsPushOutputDTO = DTO<typeof TicketActionsPushOutputSchema>;
@@ -47,32 +53,38 @@ export declare class TicketActionsSocketEvent extends BaseSocketEvent<typeof Tic
47
53
  status: z.ZodNativeEnum<typeof TicketStatus>;
48
54
  type: z.ZodNativeEnum<typeof TicketType>;
49
55
  content: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
56
+ title: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
50
57
  }, "strip", z.ZodTypeAny, {
51
58
  type: TicketType;
52
59
  status: TicketStatus;
53
60
  _id: import("mongoose").Types.ObjectId;
54
61
  content?: string | undefined;
62
+ title?: string | undefined;
55
63
  }, {
56
64
  type: TicketType;
57
65
  status: TicketStatus;
58
66
  _id: import("mongoose").Types.ObjectId;
59
67
  content?: string | undefined;
68
+ title?: string | undefined;
60
69
  }>;
61
70
  pushNotificationOutput: z.ZodObject<{
62
71
  ticketId: z.ZodEffects<z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>, import("mongoose").Types.ObjectId, import("mongoose").Types.ObjectId>;
63
72
  status: z.ZodNativeEnum<typeof TicketStatus>;
64
73
  type: z.ZodNativeEnum<typeof TicketType>;
65
74
  content: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
75
+ title: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
66
76
  }, "strip", z.ZodTypeAny, {
67
77
  type: TicketType;
68
78
  status: TicketStatus;
69
79
  ticketId: import("mongoose").Types.ObjectId;
70
80
  content?: string | undefined;
81
+ title?: string | undefined;
71
82
  }, {
72
83
  type: TicketType;
73
84
  status: TicketStatus;
74
85
  ticketId: import("mongoose").Types.ObjectId;
75
86
  content?: string | undefined;
87
+ title?: string | undefined;
76
88
  }>;
77
89
  };
78
90
  get notificationSettings(): NotificationSettings | undefined;
@@ -82,6 +94,7 @@ export declare class TicketActionsSocketEvent extends BaseSocketEvent<typeof Tic
82
94
  status: TicketStatus;
83
95
  ticketId: import("mongoose").Types.ObjectId;
84
96
  content?: string | undefined;
97
+ title?: string | undefined;
85
98
  } | undefined;
86
99
  protected getIdentifier(): string;
87
100
  }
@@ -14,12 +14,14 @@ exports.TicketActionsSocketOutputSchema = zod_1.default.object({
14
14
  status: validation_1.ZodValidation.enumType(enum_1.TicketStatus, 'status'),
15
15
  type: validation_1.ZodValidation.enumType(enum_1.TicketType, 'type'),
16
16
  content: validation_1.ZodValidation.string('content').optional(),
17
+ title: validation_1.ZodValidation.string('title').optional(),
17
18
  });
18
19
  exports.TicketActionsPushOutputSchema = zod_1.default.object({
19
20
  ticketId: validation_1.ZodValidation.coerce.objectId(),
20
21
  status: validation_1.ZodValidation.enumType(enum_1.TicketStatus, 'status'),
21
22
  type: validation_1.ZodValidation.enumType(enum_1.TicketType, 'type'),
22
23
  content: validation_1.ZodValidation.string('content').optional(),
24
+ title: validation_1.ZodValidation.string('title').optional(),
23
25
  });
24
26
  class TicketActionsSocketEvent extends BaseSocketEvent_1.BaseSocketEvent {
25
27
  static schemas = {
@@ -32,7 +34,7 @@ class TicketActionsSocketEvent extends BaseSocketEvent_1.BaseSocketEvent {
32
34
  isPushNotification: true,
33
35
  isClickable: true,
34
36
  clickType: enum_1.ClickType.CLICKABLE_TICKET,
35
- title: 'Customer Support',
37
+ title: this.pushNotificationData?.title || 'Customer Support',
36
38
  };
37
39
  }
38
40
  constructor(payload) {
@@ -41,6 +43,7 @@ class TicketActionsSocketEvent extends BaseSocketEvent_1.BaseSocketEvent {
41
43
  status: payload.status,
42
44
  type: payload.type,
43
45
  content: payload.content,
46
+ title: payload.title,
44
47
  };
45
48
  super(enum_1.SocketEventType.TICKET_ACTIONS, TicketActionsSocketEvent.schemas, payload, pushPayload);
46
49
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ticket-actions.socket.event.js","sourceRoot":"/","sources":["libraries/socket/events/ticket-actions.socket.event.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAoB;AACpB,kDAA+F;AAC/F,8DAAmE;AACnE,wDAAqD;AAGxC,QAAA,8BAA8B,GAAG,aAAC,CAAC,SAAS,EAAE,CAAC;AAC/C,QAAA,+BAA+B,GAAG,aAAC,CAAC,MAAM,CAAC;IACvD,GAAG,EAAE,0BAAa,CAAC,MAAM,CAAC,QAAQ,EAAE;IACpC,MAAM,EAAE,0BAAa,CAAC,QAAQ,CAAC,mBAAY,EAAE,QAAQ,CAAC;IACtD,IAAI,EAAE,0BAAa,CAAC,QAAQ,CAAC,iBAAU,EAAE,MAAM,CAAC;IAChD,OAAO,EAAE,0BAAa,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,QAAQ,EAAE;CACnD,CAAC,CAAC;AAEU,QAAA,6BAA6B,GAAG,aAAC,CAAC,MAAM,CAAC;IACrD,QAAQ,EAAE,0BAAa,CAAC,MAAM,CAAC,QAAQ,EAAE;IACzC,MAAM,EAAE,0BAAa,CAAC,QAAQ,CAAC,mBAAY,EAAE,QAAQ,CAAC;IACtD,IAAI,EAAE,0BAAa,CAAC,QAAQ,CAAC,iBAAU,EAAE,MAAM,CAAC;IAChD,OAAO,EAAE,0BAAa,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,QAAQ,EAAE;CACnD,CAAC,CAAC;AAMH,MAAa,wBAAyB,SAAQ,iCAI7C;IACA,MAAM,CAAU,OAAO,GAAG;QACzB,KAAK,EAAE,sCAA8B;QACrC,MAAM,EAAE,uCAA+B;QACvC,sBAAsB,EAAE,qCAA6B;KACrD,CAAC;IAEF,IAAW,oBAAoB;QAC9B,OAAO;YACN,kBAAkB,EAAE,IAAI;YACxB,WAAW,EAAE,IAAI;YACjB,SAAS,EAAE,gBAAS,CAAC,gBAAgB;YACrC,KAAK,EAAE,kBAAkB;SACzB,CAAC;IACH,CAAC;IAED,YAAY,OAAqC;QAChD,MAAM,WAAW,GAA+B;YAC/C,QAAQ,EAAE,OAAO,CAAC,GAAG;YACrB,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,OAAO,EAAE,OAAO,CAAC,OAAO;SACxB,CAAC;QAEF,KAAK,CAAC,sBAAe,CAAC,cAAc,EAAE,wBAAwB,CAAC,OAAO,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;IAC/F,CAAC;IAEM,0BAA0B;QAChC,OAAO,IAAI,CAAC,oBAAoB,CAAC;IAClC,CAAC;IAES,aAAa;QACtB,OAAO,SAAS,CAAC;IAClB,CAAC;;AArCF,4DAsCC","sourcesContent":["import z from 'zod';\nimport { ClickType, SocketEventType, TicketStatus, TicketType } from '../../../utilities/enum';\nimport { DTO, ZodValidation } from '../../../utilities/validation';\nimport { BaseSocketEvent } from '../BaseSocketEvent';\nimport { NotificationSettings } from '../PushNotificationEvent';\n\nexport const TicketActionsSocketInputSchema = z.undefined();\nexport const TicketActionsSocketOutputSchema = z.object({\n\t_id: ZodValidation.coerce.objectId(),\n\tstatus: ZodValidation.enumType(TicketStatus, 'status'),\n\ttype: ZodValidation.enumType(TicketType, 'type'),\n\tcontent: ZodValidation.string('content').optional(),\n});\n\nexport const TicketActionsPushOutputSchema = z.object({\n\tticketId: ZodValidation.coerce.objectId(),\n\tstatus: ZodValidation.enumType(TicketStatus, 'status'),\n\ttype: ZodValidation.enumType(TicketType, 'type'),\n\tcontent: ZodValidation.string('content').optional(),\n});\n\nexport type TicketActionsSocketOutputDTO = DTO<typeof TicketActionsSocketOutputSchema>;\nexport type TicketActionsPushOutputDTO = DTO<typeof TicketActionsPushOutputSchema>;\nexport type TicketActionsSocketInputDTO = DTO<typeof TicketActionsSocketInputSchema>;\n\nexport class TicketActionsSocketEvent extends BaseSocketEvent<\n\ttypeof TicketActionsSocketInputSchema,\n\ttypeof TicketActionsSocketOutputSchema,\n\ttypeof TicketActionsPushOutputSchema\n> {\n\tstatic readonly schemas = {\n\t\tinput: TicketActionsSocketInputSchema,\n\t\toutput: TicketActionsSocketOutputSchema,\n\t\tpushNotificationOutput: TicketActionsPushOutputSchema,\n\t};\n\n\tpublic get notificationSettings(): NotificationSettings | undefined {\n\t\treturn {\n\t\t\tisPushNotification: true,\n\t\t\tisClickable: true,\n\t\t\tclickType: ClickType.CLICKABLE_TICKET,\n\t\t\ttitle: 'Customer Support',\n\t\t};\n\t}\n\n\tconstructor(payload: TicketActionsSocketOutputDTO) {\n\t\tconst pushPayload: TicketActionsPushOutputDTO = {\n\t\t\tticketId: payload._id,\n\t\t\tstatus: payload.status,\n\t\t\ttype: payload.type,\n\t\t\tcontent: payload.content,\n\t\t};\n\n\t\tsuper(SocketEventType.TICKET_ACTIONS, TicketActionsSocketEvent.schemas, payload, pushPayload);\n\t}\n\n\tpublic getPushNotificationPayload() {\n\t\treturn this.pushNotificationData;\n\t}\n\n\tprotected getIdentifier(): string {\n\t\treturn 'default';\n\t}\n}\n"]}
1
+ {"version":3,"file":"ticket-actions.socket.event.js","sourceRoot":"/","sources":["libraries/socket/events/ticket-actions.socket.event.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAoB;AACpB,kDAA+F;AAC/F,8DAAmE;AACnE,wDAAqD;AAGxC,QAAA,8BAA8B,GAAG,aAAC,CAAC,SAAS,EAAE,CAAC;AAC/C,QAAA,+BAA+B,GAAG,aAAC,CAAC,MAAM,CAAC;IACvD,GAAG,EAAE,0BAAa,CAAC,MAAM,CAAC,QAAQ,EAAE;IACpC,MAAM,EAAE,0BAAa,CAAC,QAAQ,CAAC,mBAAY,EAAE,QAAQ,CAAC;IACtD,IAAI,EAAE,0BAAa,CAAC,QAAQ,CAAC,iBAAU,EAAE,MAAM,CAAC;IAChD,OAAO,EAAE,0BAAa,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,QAAQ,EAAE;IACnD,KAAK,EAAE,0BAAa,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE;CAC/C,CAAC,CAAC;AAEU,QAAA,6BAA6B,GAAG,aAAC,CAAC,MAAM,CAAC;IACrD,QAAQ,EAAE,0BAAa,CAAC,MAAM,CAAC,QAAQ,EAAE;IACzC,MAAM,EAAE,0BAAa,CAAC,QAAQ,CAAC,mBAAY,EAAE,QAAQ,CAAC;IACtD,IAAI,EAAE,0BAAa,CAAC,QAAQ,CAAC,iBAAU,EAAE,MAAM,CAAC;IAChD,OAAO,EAAE,0BAAa,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,QAAQ,EAAE;IACnD,KAAK,EAAE,0BAAa,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE;CAC/C,CAAC,CAAC;AAMH,MAAa,wBAAyB,SAAQ,iCAI7C;IACA,MAAM,CAAU,OAAO,GAAG;QACzB,KAAK,EAAE,sCAA8B;QACrC,MAAM,EAAE,uCAA+B;QACvC,sBAAsB,EAAE,qCAA6B;KACrD,CAAC;IAEF,IAAW,oBAAoB;QAC9B,OAAO;YACN,kBAAkB,EAAE,IAAI;YACxB,WAAW,EAAE,IAAI;YACjB,SAAS,EAAE,gBAAS,CAAC,gBAAgB;YACrC,KAAK,EAAE,IAAI,CAAC,oBAAoB,EAAE,KAAK,IAAI,kBAAkB;SAC7D,CAAC;IACH,CAAC;IAED,YAAY,OAAqC;QAChD,MAAM,WAAW,GAA+B;YAC/C,QAAQ,EAAE,OAAO,CAAC,GAAG;YACrB,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,KAAK,EAAE,OAAO,CAAC,KAAK;SACpB,CAAC;QAEF,KAAK,CAAC,sBAAe,CAAC,cAAc,EAAE,wBAAwB,CAAC,OAAO,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;IAC/F,CAAC;IAEM,0BAA0B;QAChC,OAAO,IAAI,CAAC,oBAAoB,CAAC;IAClC,CAAC;IAES,aAAa;QACtB,OAAO,SAAS,CAAC;IAClB,CAAC;;AAtCF,4DAuCC","sourcesContent":["import z from 'zod';\nimport { ClickType, SocketEventType, TicketStatus, TicketType } from '../../../utilities/enum';\nimport { DTO, ZodValidation } from '../../../utilities/validation';\nimport { BaseSocketEvent } from '../BaseSocketEvent';\nimport { NotificationSettings } from '../PushNotificationEvent';\n\nexport const TicketActionsSocketInputSchema = z.undefined();\nexport const TicketActionsSocketOutputSchema = z.object({\n\t_id: ZodValidation.coerce.objectId(),\n\tstatus: ZodValidation.enumType(TicketStatus, 'status'),\n\ttype: ZodValidation.enumType(TicketType, 'type'),\n\tcontent: ZodValidation.string('content').optional(),\n\ttitle: ZodValidation.string('title').optional(),\n});\n\nexport const TicketActionsPushOutputSchema = z.object({\n\tticketId: ZodValidation.coerce.objectId(),\n\tstatus: ZodValidation.enumType(TicketStatus, 'status'),\n\ttype: ZodValidation.enumType(TicketType, 'type'),\n\tcontent: ZodValidation.string('content').optional(),\n\ttitle: ZodValidation.string('title').optional(),\n});\n\nexport type TicketActionsSocketOutputDTO = DTO<typeof TicketActionsSocketOutputSchema>;\nexport type TicketActionsPushOutputDTO = DTO<typeof TicketActionsPushOutputSchema>;\nexport type TicketActionsSocketInputDTO = DTO<typeof TicketActionsSocketInputSchema>;\n\nexport class TicketActionsSocketEvent extends BaseSocketEvent<\n\ttypeof TicketActionsSocketInputSchema,\n\ttypeof TicketActionsSocketOutputSchema,\n\ttypeof TicketActionsPushOutputSchema\n> {\n\tstatic readonly schemas = {\n\t\tinput: TicketActionsSocketInputSchema,\n\t\toutput: TicketActionsSocketOutputSchema,\n\t\tpushNotificationOutput: TicketActionsPushOutputSchema,\n\t};\n\n\tpublic get notificationSettings(): NotificationSettings | undefined {\n\t\treturn {\n\t\t\tisPushNotification: true,\n\t\t\tisClickable: true,\n\t\t\tclickType: ClickType.CLICKABLE_TICKET,\n\t\t\ttitle: this.pushNotificationData?.title || 'Customer Support',\n\t\t};\n\t}\n\n\tconstructor(payload: TicketActionsSocketOutputDTO) {\n\t\tconst pushPayload: TicketActionsPushOutputDTO = {\n\t\t\tticketId: payload._id,\n\t\t\tstatus: payload.status,\n\t\t\ttype: payload.type,\n\t\t\tcontent: payload.content,\n\t\t\ttitle: payload.title,\n\t\t};\n\n\t\tsuper(SocketEventType.TICKET_ACTIONS, TicketActionsSocketEvent.schemas, payload, pushPayload);\n\t}\n\n\tpublic getPushNotificationPayload() {\n\t\treturn this.pushNotificationData;\n\t}\n\n\tprotected getIdentifier(): string {\n\t\treturn 'default';\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.3.172
25
+ Version: 1.3.174
26
26
 
27
27
  ## Dependencies
28
28
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lyxa.ai/types",
3
- "version": "1.3.172",
3
+ "version": "1.3.174",
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",
@@ -5,8 +5,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.hashPassword = hashPassword;
7
7
  exports.verifyPassword = verifyPassword;
8
- const server_1 = require("@trpc/server");
9
8
  const bcryptjs_1 = __importDefault(require("bcryptjs"));
9
+ const error_common_1 = require("./error-common");
10
10
  async function hashPassword(password) {
11
11
  const salt = await bcryptjs_1.default.genSalt(10);
12
12
  return bcryptjs_1.default.hash(password, salt);
@@ -14,10 +14,7 @@ async function hashPassword(password) {
14
14
  async function verifyPassword(inputPassword, hashedPassword) {
15
15
  const isPasswordValid = await bcryptjs_1.default.compare(inputPassword, hashedPassword);
16
16
  if (!isPasswordValid) {
17
- throw new server_1.TRPCError({
18
- code: 'UNAUTHORIZED',
19
- message: 'Incorrect email or password.',
20
- });
17
+ (0, error_common_1.badRequestError)('Incorrect email or password');
21
18
  }
22
19
  }
23
20
  //# sourceMappingURL=password.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"password.js","sourceRoot":"/","sources":["utilities/password.ts"],"names":[],"mappings":";;;;;AAGA,oCAGC;AAED,wCAQC;AAhBD,yCAAyC;AACzC,wDAA8B;AAEvB,KAAK,UAAU,YAAY,CAAC,QAAgB;IAClD,MAAM,IAAI,GAAG,MAAM,kBAAM,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IACtC,OAAO,kBAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;AACpC,CAAC;AAEM,KAAK,UAAU,cAAc,CAAC,aAAqB,EAAE,cAAsB;IACjF,MAAM,eAAe,GAAG,MAAM,kBAAM,CAAC,OAAO,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC;IAC5E,IAAI,CAAC,eAAe,EAAE,CAAC;QACtB,MAAM,IAAI,kBAAS,CAAC;YACnB,IAAI,EAAE,cAAc;YACpB,OAAO,EAAE,8BAA8B;SACvC,CAAC,CAAC;IACJ,CAAC;AACF,CAAC","sourcesContent":["import { TRPCError } from '@trpc/server';\nimport bcrypt from 'bcryptjs';\n\nexport async function hashPassword(password: string): Promise<string> {\n\tconst salt = await bcrypt.genSalt(10);\n\treturn bcrypt.hash(password, salt);\n}\n\nexport async function verifyPassword(inputPassword: string, hashedPassword: string) {\n\tconst isPasswordValid = await bcrypt.compare(inputPassword, hashedPassword);\n\tif (!isPasswordValid) {\n\t\tthrow new TRPCError({\n\t\t\tcode: 'UNAUTHORIZED',\n\t\t\tmessage: 'Incorrect email or password.',\n\t\t});\n\t}\n}\n"]}
1
+ {"version":3,"file":"password.js","sourceRoot":"/","sources":["utilities/password.ts"],"names":[],"mappings":";;;;;AAIA,oCAGC;AAED,wCAKC;AAbD,wDAA8B;AAC9B,iDAAiD;AAE1C,KAAK,UAAU,YAAY,CAAC,QAAgB;IAClD,MAAM,IAAI,GAAG,MAAM,kBAAM,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IACtC,OAAO,kBAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;AACpC,CAAC;AAEM,KAAK,UAAU,cAAc,CAAC,aAAqB,EAAE,cAAsB;IACjF,MAAM,eAAe,GAAG,MAAM,kBAAM,CAAC,OAAO,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC;IAC5E,IAAI,CAAC,eAAe,EAAE,CAAC;QACtB,IAAA,8BAAe,EAAC,6BAA6B,CAAC,CAAC;IAChD,CAAC;AACF,CAAC","sourcesContent":["import { TRPCError } from '@trpc/server';\nimport bcrypt from 'bcryptjs';\nimport { badRequestError } from './error-common';\n\nexport async function hashPassword(password: string): Promise<string> {\n\tconst salt = await bcrypt.genSalt(10);\n\treturn bcrypt.hash(password, salt);\n}\n\nexport async function verifyPassword(inputPassword: string, hashedPassword: string) {\n\tconst isPasswordValid = await bcrypt.compare(inputPassword, hashedPassword);\n\tif (!isPasswordValid) {\n\t\tbadRequestError('Incorrect email or password');\n\t}\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lyxa.ai/core",
3
- "version": "1.3.172",
3
+ "version": "1.3.174",
4
4
  "description": "The Core system of the Lyxa services.",
5
5
  "author": "elie <42282499+Internalizable@users.noreply.github.com>",
6
6
  "license": "MIT",