@lyxa.ai/core 1.3.194 → 1.3.195

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.
@@ -22,7 +22,7 @@ Perfect for sharing types between frontend and backend applications.
22
22
 
23
23
  ## Version
24
24
 
25
- Version: 1.3.194
25
+ Version: 1.3.195
26
26
 
27
27
  ## Dependencies
28
28
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lyxa.ai/types",
3
- "version": "1.3.194",
3
+ "version": "1.3.195",
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",
@@ -7,3 +7,4 @@ export declare const unauthorizedError: (message: string) => never;
7
7
  export declare const notImplementedError: (message: string) => never;
8
8
  export declare const unprocessableContentError: (message: string) => never;
9
9
  export declare const tooManyRequestsError: (message: string) => never;
10
+ export declare const badGatewayError: (message: string) => never;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.tooManyRequestsError = exports.unprocessableContentError = exports.notImplementedError = exports.unauthorizedError = exports.internalServerError = exports.forbiddenError = exports.conflictError = exports.notFoundError = exports.badRequestError = void 0;
3
+ exports.badGatewayError = exports.tooManyRequestsError = exports.unprocessableContentError = exports.notImplementedError = exports.unauthorizedError = exports.internalServerError = exports.forbiddenError = exports.conflictError = exports.notFoundError = exports.badRequestError = void 0;
4
4
  const server_1 = require("@trpc/server");
5
5
  const enum_1 = require("./enum");
6
6
  const badRequestError = (message) => {
@@ -66,4 +66,11 @@ const tooManyRequestsError = (message) => {
66
66
  });
67
67
  };
68
68
  exports.tooManyRequestsError = tooManyRequestsError;
69
+ const badGatewayError = (message) => {
70
+ throw new server_1.TRPCError({
71
+ code: enum_1.TRPCErrorEnum.BAD_GATEWAY,
72
+ message,
73
+ });
74
+ };
75
+ exports.badGatewayError = badGatewayError;
69
76
  //# sourceMappingUR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C;AACJ,CAAC,CAAC;AALW,QAAA,iBAAiB,qBAK5B;AAEK,MAAM,mBAAmB,GAAG,CAAC,OAAe,EAAS,EAAE;IAC7D,MAAM,IAAI,kBAAS,CAAC;QACnB,IAAI,EAAE,oBAAa,CAAC,eAAe;QACnC,OAAO;KACP,CAAC,CAAC;AACJ,CAAC,CAAC;AALW,QAAA,mBAAmB,uBAK9B;AAEK,MAAM,yBAAyB,GAAG,CAAC,OAAe,EAAS,EAAE;IACnE,MAAM,IAAI,kBAAS,CAAC;QACnB,IAAI,EAAE,oBAAa,CAAC,qBAAqB;QACzC,OAAO;KACP,CAAC,CAAC;AACJ,CAAC,CAAC;AALW,QAAA,yBAAyB,6BAKpC;AAEK,MAAM,oBAAoB,GAAG,CAAC,OAAe,EAAS,EAAE;IAC9D,MAAM,IAAI,kBAAS,CAAC;QACnB,IAAI,EAAE,oBAAa,CAAC,iBAAiB;QACrC,OAAO;KACP,CAAC,CAAC;AACJ,CAAC,CAAC;AALW,QAAA,oBAAoB,wBAK/B","sourcesContent":["import { TRPCError } from '@trpc/server';\nimport { TRPCErrorEnum } from './enum';\n\nexport const badRequestError = (message: string): never => {\n\tthrow new TRPCError({\n\t\tcode: TRPCErrorEnum.BAD_REQUEST,\n\t\tmessage,\n\t});\n};\n\nexport const notFoundError = (message: string): never => {\n\tthrow new TRPCError({\n\t\tcode: TRPCErrorEnum.NOT_FOUND,\n\t\tmessage,\n\t});\n};\n\nexport const conflictError = (message: string): never => {\n\tthrow new TRPCError({\n\t\tcode: TRPCErrorEnum.CONFLICT,\n\t\tmessage,\n\t});\n};\n\nexport const forbiddenError = (message: string): never => {\n\tthrow new TRPCError({\n\t\tcode: TRPCErrorEnum.FORBIDDEN,\n\t\tmessage,\n\t});\n};\n\nexport const internalServerError = (message: string): never => {\n\tthrow new TRPCError({\n\t\tcode: TRPCErrorEnum.INTERNAL_SERVER_ERROR,\n\t\tmessage,\n\t});\n};\n\nexport const unauthorizedError = (message: string): never => {\n\tthrow new TRPCError({\n\t\tcode: TRPCErrorEnum.UNAUTHORIZED,\n\t\tmessage,\n\t});\n};\n\nexport const notImplementedError = (message: string): never => {\n\tthrow new TRPCError({\n\t\tcode: TRPCErrorEnum.NOT_IMPLEMENTED,\n\t\tmessage,\n\t});\n};\n\nexport const unprocessableContentError = (message: string): never => {\n\tthrow new TRPCError({\n\t\tcode: TRPCErrorEnum.UNPROCESSABLE_CONTENT,\n\t\tmessage,\n\t});\n};\n\nexport const tooManyRequestsError = (message: string): never => {\n\tthrow new TRPCError({\n\t\tcode: TRPCErrorEnum.TOO_MANY_REQUESTS,\n\t\tmessage,\n\t});\n};\n"]}
1
+ {"version":3,"file":"error-common.js","sourceRoot":"/","sources":["utilities/error-common.ts"],"names":[],"mappings":";;;AAAA,yCAAyC;AACzC,iCAAuC;AAEhC,MAAM,eAAe,GAAG,CAAC,OAAe,EAAS,EAAE;IACzD,MAAM,IAAI,kBAAS,CAAC;QACnB,IAAI,EAAE,oBAAa,CAAC,WAAW;QAC/B,OAAO;KACP,CAAC,CAAC;AACJ,CAAC,CAAC;AALW,QAAA,eAAe,mBAK1B;AAEK,MAAM,aAAa,GAAG,CAAC,OAAe,EAAS,EAAE;IACvD,MAAM,IAAI,kBAAS,CAAC;QACnB,IAAI,EAAE,oBAAa,CAAC,SAAS;QAC7B,OAAO;KACP,CAAC,CAAC;AACJ,CAAC,CAAC;AALW,QAAA,aAAa,iBAKxB;AAEK,MAAM,aAAa,GAAG,CAAC,OAAe,EAAS,EAAE;IACvD,MAAM,IAAI,kBAAS,CAAC;QACnB,IAAI,EAAE,oBAAa,CAAC,QAAQ;QAC5B,OAAO;KACP,CAAC,CAAC;AACJ,CAAC,CAAC;AALW,QAAA,aAAa,iBAKxB;AAEK,MAAM,cAAc,GAAG,CAAC,OAAe,EAAS,EAAE;IACxD,MAAM,IAAI,kBAAS,CAAC;QACnB,IAAI,EAAE,oBAAa,CAAC,SAAS;QAC7B,OAAO;KACP,CAAC,CAAC;AACJ,CAAC,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\nimport { TRPCErrorEnum } from './enum';\n\nexport const badRequestError = (message: string): never => {\n\tthrow new TRPCError({\n\t\tcode: TRPCErrorEnum.BAD_REQUEST,\n\t\tmessage,\n\t});\n};\n\nexport const notFoundError = (message: string): never => {\n\tthrow new TRPCError({\n\t\tcode: TRPCErrorEnum.NOT_FOUND,\n\t\tmessage,\n\t});\n};\n\nexport const conflictError = (message: string): never => {\n\tthrow new TRPCError({\n\t\tcode: TRPCErrorEnum.CONFLICT,\n\t\tmessage,\n\t});\n};\n\nexport const forbiddenError = (message: string): never => {\n\tthrow new TRPCError({\n\t\tcode: TRPCErrorEnum.FORBIDDEN,\n\t\tmessage,\n\t});\n};\n\nexport const internalServerError = (message: string): never => {\n\tthrow new TRPCError({\n\t\tcode: TRPCErrorEnum.INTERNAL_SERVER_ERROR,\n\t\tmessage,\n\t});\n};\n\nexport const unauthorizedError = (message: string): never => {\n\tthrow new TRPCError({\n\t\tcode: TRPCErrorEnum.UNAUTHORIZED,\n\t\tmessage,\n\t});\n};\n\nexport const notImplementedError = (message: string): never => {\n\tthrow new TRPCError({\n\t\tcode: TRPCErrorEnum.NOT_IMPLEMENTED,\n\t\tmessage,\n\t});\n};\n\nexport const unprocessableContentError = (message: string): never => {\n\tthrow new TRPCError({\n\t\tcode: TRPCErrorEnum.UNPROCESSABLE_CONTENT,\n\t\tmessage,\n\t});\n};\n\nexport const tooManyRequestsError = (message: string): never => {\n\tthrow new TRPCError({\n\t\tcode: TRPCErrorEnum.TOO_MANY_REQUESTS,\n\t\tmessage,\n\t});\n};\n\nexport const badGatewayError = (message: string): never => {\n\tthrow new TRPCError({\n\t\tcode: TRPCErrorEnum.BAD_GATEWAY,\n\t\tmessage,\n\t});\n};\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lyxa.ai/core",
3
- "version": "1.3.194",
3
+ "version": "1.3.195",
4
4
  "description": "The Core system of the Lyxa services.",
5
5
  "author": "elie <42282499+Internalizable@users.noreply.github.com>",
6
6
  "license": "MIT",