@uber-clone/common 1.0.0 → 1.0.3

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.
Files changed (31) hide show
  1. package/build/errors/bad-request-error.d.ts +9 -0
  2. package/build/errors/bad-request-error.js +20 -0
  3. package/build/errors/custom-error.d.ts +8 -0
  4. package/build/errors/custom-error.js +10 -0
  5. package/build/errors/database-conection-error.d.ts +9 -0
  6. package/build/errors/database-conection-error.js +20 -0
  7. package/build/errors/not-authorized-error.d.ts +8 -0
  8. package/build/errors/not-authorized-error.js +19 -0
  9. package/build/errors/not-found-error.d.ts +8 -0
  10. package/build/errors/not-found-error.js +19 -0
  11. package/build/errors/request-validation-error.d.ts +11 -0
  12. package/build/errors/request-validation-error.js +29 -0
  13. package/build/events/event-types/user-created-event.d.ts +9 -0
  14. package/build/events/event-types/user-created-event.js +2 -0
  15. package/build/events/kafka-listener.d.ts +34 -0
  16. package/build/events/kafka-listener.js +89 -0
  17. package/build/events/kafka-publisher.d.ts +28 -0
  18. package/build/events/kafka-publisher.js +67 -0
  19. package/build/events/subjects.d.ts +3 -0
  20. package/build/events/subjects.js +7 -0
  21. package/build/index.d.ts +14 -0
  22. package/build/index.js +30 -0
  23. package/build/middlewares/current-user.d.ts +14 -0
  24. package/build/middlewares/current-user.js +23 -0
  25. package/build/middlewares/error-handler.d.ts +2 -0
  26. package/build/middlewares/error-handler.js +17 -0
  27. package/build/middlewares/require-auth.d.ts +14 -0
  28. package/build/middlewares/require-auth.js +11 -0
  29. package/build/middlewares/validate-request.d.ts +2 -0
  30. package/build/middlewares/validate-request.js +13 -0
  31. package/package.json +3 -2
@@ -0,0 +1,9 @@
1
+ import { CustomError } from "./custom-error";
2
+ export declare class BadRequestError extends CustomError {
3
+ message: string;
4
+ statusCode: number;
5
+ constructor(message: string);
6
+ serializedError(): {
7
+ message: string;
8
+ }[];
9
+ }
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BadRequestError = void 0;
4
+ const custom_error_1 = require("./custom-error");
5
+ class BadRequestError extends custom_error_1.CustomError {
6
+ constructor(message) {
7
+ super(message);
8
+ this.message = message;
9
+ this.statusCode = 400;
10
+ Object.setPrototypeOf(this, BadRequestError.prototype);
11
+ }
12
+ serializedError() {
13
+ return [
14
+ {
15
+ message: this.message,
16
+ },
17
+ ];
18
+ }
19
+ }
20
+ exports.BadRequestError = BadRequestError;
@@ -0,0 +1,8 @@
1
+ export declare abstract class CustomError extends Error {
2
+ abstract statusCode: number;
3
+ constructor(message: string);
4
+ abstract serializedError(): {
5
+ message: string;
6
+ field?: string;
7
+ }[];
8
+ }
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CustomError = void 0;
4
+ class CustomError extends Error {
5
+ constructor(message) {
6
+ super(message);
7
+ Object.setPrototypeOf(this, CustomError.prototype);
8
+ }
9
+ }
10
+ exports.CustomError = CustomError;
@@ -0,0 +1,9 @@
1
+ import { CustomError } from "./custom-error";
2
+ export declare class DatabaseConnectionError extends CustomError {
3
+ statusCode: number;
4
+ reason: string;
5
+ constructor();
6
+ serializedError(): {
7
+ message: string;
8
+ }[];
9
+ }
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DatabaseConnectionError = void 0;
4
+ const custom_error_1 = require("./custom-error");
5
+ class DatabaseConnectionError extends custom_error_1.CustomError {
6
+ constructor() {
7
+ super("Error while connection to database");
8
+ this.statusCode = 500;
9
+ this.reason = "Error while connection to database";
10
+ Object.setPrototypeOf(this, DatabaseConnectionError.prototype);
11
+ }
12
+ serializedError() {
13
+ return [
14
+ {
15
+ message: this.reason,
16
+ },
17
+ ];
18
+ }
19
+ }
20
+ exports.DatabaseConnectionError = DatabaseConnectionError;
@@ -0,0 +1,8 @@
1
+ import { CustomError } from "./custom-error";
2
+ export declare class NotAuthorizedError extends CustomError {
3
+ statusCode: number;
4
+ constructor();
5
+ serializedError(): {
6
+ message: string;
7
+ }[];
8
+ }
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NotAuthorizedError = void 0;
4
+ const custom_error_1 = require("./custom-error");
5
+ class NotAuthorizedError extends custom_error_1.CustomError {
6
+ constructor() {
7
+ super("Not Authorized");
8
+ this.statusCode = 401;
9
+ Object.setPrototypeOf(this, NotAuthorizedError.prototype);
10
+ }
11
+ serializedError() {
12
+ return [
13
+ {
14
+ message: "Not Authorized",
15
+ },
16
+ ];
17
+ }
18
+ }
19
+ exports.NotAuthorizedError = NotAuthorizedError;
@@ -0,0 +1,8 @@
1
+ import { CustomError } from "./custom-error";
2
+ export declare class NotFoundError extends CustomError {
3
+ statusCode: number;
4
+ constructor();
5
+ serializedError(): {
6
+ message: string;
7
+ }[];
8
+ }
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NotFoundError = void 0;
4
+ const custom_error_1 = require("./custom-error");
5
+ class NotFoundError extends custom_error_1.CustomError {
6
+ constructor() {
7
+ super("Route not found");
8
+ this.statusCode = 404;
9
+ Object.setPrototypeOf(this, NotFoundError.prototype);
10
+ }
11
+ serializedError() {
12
+ return [
13
+ {
14
+ message: "Route not found",
15
+ },
16
+ ];
17
+ }
18
+ }
19
+ exports.NotFoundError = NotFoundError;
@@ -0,0 +1,11 @@
1
+ import { ValidationError } from "express-validator";
2
+ import { CustomError } from "./custom-error";
3
+ export declare class RequestValidationError extends CustomError {
4
+ errors: ValidationError[];
5
+ statusCode: number;
6
+ constructor(errors: ValidationError[]);
7
+ serializedError(): {
8
+ message: any;
9
+ field: string;
10
+ }[];
11
+ }
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RequestValidationError = void 0;
4
+ const custom_error_1 = require("./custom-error");
5
+ class RequestValidationError extends custom_error_1.CustomError {
6
+ constructor(errors) {
7
+ super("Invalid request param");
8
+ this.errors = errors;
9
+ this.statusCode = 400;
10
+ Object.setPrototypeOf(this, RequestValidationError.prototype);
11
+ }
12
+ serializedError() {
13
+ return this.errors.map((err) => {
14
+ if (err.type === "field") {
15
+ return {
16
+ message: err.msg,
17
+ field: err.path,
18
+ };
19
+ }
20
+ else {
21
+ return {
22
+ message: err.msg,
23
+ field: "unknown",
24
+ };
25
+ }
26
+ });
27
+ }
28
+ }
29
+ exports.RequestValidationError = RequestValidationError;
@@ -0,0 +1,9 @@
1
+ import { Subjects } from "../subjects";
2
+ export interface UserCreatedEvent {
3
+ subject: Subjects.UserCreated;
4
+ data: {
5
+ id: string;
6
+ name: string;
7
+ email: number;
8
+ };
9
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,34 @@
1
+ import { Kafka, EachMessagePayload } from "kafkajs";
2
+ import { Subjects } from "./subjects";
3
+ interface Event {
4
+ subject: Subjects;
5
+ data: any;
6
+ }
7
+ /**
8
+ * Abstract class for a Kafka Consumer (Listener).
9
+ * It abstracts away Kafka connection, topic subscription, and message parsing.
10
+ * The equivalent of NATS 'queueGroupName' is the Kafka 'groupId'.
11
+ */
12
+ export declare abstract class KafkaListener<T extends Event> {
13
+ abstract subject: T["subject"];
14
+ abstract groupId: string;
15
+ abstract onMessage(data: T["data"], messagePayload: EachMessagePayload): void;
16
+ private kafka;
17
+ private consumer;
18
+ constructor(kafka: Kafka);
19
+ /**
20
+ * Connects the consumer and subscribes to the topic.
21
+ * FIX: The consumer is now initialized here, where 'this.groupId' is guaranteed to be set
22
+ * by the subclass constructor before the 'listen()' method is called.
23
+ */
24
+ listen(): Promise<void>;
25
+ /**
26
+ * Converts the message value (Buffer) into a parsed JSON object.
27
+ */
28
+ private parseMessage;
29
+ /**
30
+ * Graceful shutdown function.
31
+ */
32
+ close(): Promise<void>;
33
+ }
34
+ export {};
@@ -0,0 +1,89 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.KafkaListener = void 0;
13
+ /**
14
+ * Abstract class for a Kafka Consumer (Listener).
15
+ * It abstracts away Kafka connection, topic subscription, and message parsing.
16
+ * The equivalent of NATS 'queueGroupName' is the Kafka 'groupId'.
17
+ */
18
+ class KafkaListener {
19
+ // No changes needed here, as it only stores the Kafka client instance.
20
+ constructor(kafka) {
21
+ this.kafka = kafka;
22
+ }
23
+ /**
24
+ * Connects the consumer and subscribes to the topic.
25
+ * FIX: The consumer is now initialized here, where 'this.groupId' is guaranteed to be set
26
+ * by the subclass constructor before the 'listen()' method is called.
27
+ */
28
+ listen() {
29
+ return __awaiter(this, void 0, void 0, function* () {
30
+ try {
31
+ // Initialize the consumer instance using the abstract 'groupId'
32
+ this.consumer = this.kafka.consumer({ groupId: this.groupId });
33
+ yield this.consumer.connect();
34
+ // Subscribe to the defined topic
35
+ yield this.consumer.subscribe({
36
+ topic: this.subject,
37
+ fromBeginning: true, // Similar to NATS setDeliverAllAvailable
38
+ });
39
+ console.log(`Kafka Consumer connected and listening to topic: ${this.subject} with group: ${this.groupId}`);
40
+ // Run the consumer to process messages
41
+ yield this.consumer.run({
42
+ eachMessage: (payload) => __awaiter(this, void 0, void 0, function* () {
43
+ const { topic, partition, message } = payload;
44
+ console.log(`Message received: ${topic} / partition ${partition}`);
45
+ // Kafka data is always a Buffer or null, so we must parse it.
46
+ const parsedData = this.parseMessage(message.value);
47
+ // Pass the parsed data and the full payload to the implementation
48
+ this.onMessage(parsedData, payload);
49
+ // Note: Offset is automatically committed by kafkajs
50
+ // after onMessage completes successfully.
51
+ }),
52
+ });
53
+ }
54
+ catch (err) {
55
+ console.error("Kafka Listener Error:", err);
56
+ // Exit or retry connection logic would go here
57
+ }
58
+ });
59
+ }
60
+ /**
61
+ * Converts the message value (Buffer) into a parsed JSON object.
62
+ */
63
+ parseMessage(value) {
64
+ if (!value) {
65
+ console.warn("Received null message value. Returning empty object.");
66
+ return {};
67
+ }
68
+ try {
69
+ return JSON.parse(value.toString("utf8"));
70
+ }
71
+ catch (e) {
72
+ console.error("Failed to parse Kafka message value.", e);
73
+ throw new Error("Invalid message format received from Kafka.");
74
+ }
75
+ }
76
+ /**
77
+ * Graceful shutdown function.
78
+ */
79
+ close() {
80
+ return __awaiter(this, void 0, void 0, function* () {
81
+ // Only try to disconnect if the consumer was actually initialized
82
+ if (this.consumer) {
83
+ yield this.consumer.disconnect();
84
+ console.log(`Kafka Consumer for group ${this.groupId} disconnected.`);
85
+ }
86
+ });
87
+ }
88
+ }
89
+ exports.KafkaListener = KafkaListener;
@@ -0,0 +1,28 @@
1
+ import { Kafka } from "kafkajs";
2
+ import { Subjects } from "./subjects";
3
+ interface Event {
4
+ subject: Subjects;
5
+ data: any;
6
+ }
7
+ /**
8
+ * Abstract class for a Kafka Producer (Publisher).
9
+ * It abstracts away Kafka connection and message serialization.
10
+ */
11
+ export declare abstract class KafkaPublisher<T extends Event> {
12
+ abstract subject: T["subject"];
13
+ private producer;
14
+ constructor(kafka: Kafka);
15
+ /**
16
+ * Connects the producer to the Kafka broker. Call this before publishing.
17
+ */
18
+ connect(): Promise<void>;
19
+ /**
20
+ * Publishes the event data to the defined topic.
21
+ */
22
+ publish(data: T["data"]): Promise<void>;
23
+ /**
24
+ * Graceful shutdown function.
25
+ */
26
+ close(): Promise<void>;
27
+ }
28
+ export {};
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.KafkaPublisher = void 0;
13
+ /**
14
+ * Abstract class for a Kafka Producer (Publisher).
15
+ * It abstracts away Kafka connection and message serialization.
16
+ */
17
+ class KafkaPublisher {
18
+ constructor(kafka) {
19
+ // Create a producer instance
20
+ this.producer = kafka.producer();
21
+ }
22
+ /**
23
+ * Connects the producer to the Kafka broker. Call this before publishing.
24
+ */
25
+ connect() {
26
+ return __awaiter(this, void 0, void 0, function* () {
27
+ yield this.producer.connect();
28
+ console.log("Kafka Producer connected.");
29
+ });
30
+ }
31
+ /**
32
+ * Publishes the event data to the defined topic.
33
+ */
34
+ publish(data) {
35
+ return __awaiter(this, void 0, void 0, function* () {
36
+ // Ensure the producer is connected before sending
37
+ // In a real app, you'd manage connection state better.
38
+ // Assuming connect() was called before this method.
39
+ try {
40
+ const response = yield this.producer.send({
41
+ topic: this.subject,
42
+ messages: [
43
+ {
44
+ value: JSON.stringify(data), // Kafka requires data to be a Buffer or string
45
+ // key: 'some-key-for-partitioning' // Use a key for ordered processing (e.g., ticket ID)
46
+ },
47
+ ],
48
+ });
49
+ console.log("Event published to subject", this.subject, "Response:", response);
50
+ }
51
+ catch (err) {
52
+ console.error("Kafka Publisher Error:", err);
53
+ throw err;
54
+ }
55
+ });
56
+ }
57
+ /**
58
+ * Graceful shutdown function.
59
+ */
60
+ close() {
61
+ return __awaiter(this, void 0, void 0, function* () {
62
+ yield this.producer.disconnect();
63
+ console.log("Kafka Producer disconnected.");
64
+ });
65
+ }
66
+ }
67
+ exports.KafkaPublisher = KafkaPublisher;
@@ -0,0 +1,3 @@
1
+ export declare enum Subjects {
2
+ UserCreated = "user-created"
3
+ }
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Subjects = void 0;
4
+ var Subjects;
5
+ (function (Subjects) {
6
+ Subjects["UserCreated"] = "user-created";
7
+ })(Subjects || (exports.Subjects = Subjects = {}));
@@ -0,0 +1,14 @@
1
+ export * from "./errors/bad-request-error";
2
+ export * from "./errors/custom-error";
3
+ export * from "./errors/database-conection-error";
4
+ export * from "./errors/not-authorized-error";
5
+ export * from "./errors/not-found-error";
6
+ export * from "./errors/request-validation-error";
7
+ export * from "./middlewares/current-user";
8
+ export * from "./middlewares/error-handler";
9
+ export * from "./middlewares/require-auth";
10
+ export * from "./middlewares/validate-request";
11
+ export * from "./events/kafka-listener";
12
+ export * from "./events/kafka-publisher";
13
+ export * from "./events/subjects";
14
+ export * from "./events/event-types/user-created-event";
package/build/index.js ADDED
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./errors/bad-request-error"), exports);
18
+ __exportStar(require("./errors/custom-error"), exports);
19
+ __exportStar(require("./errors/database-conection-error"), exports);
20
+ __exportStar(require("./errors/not-authorized-error"), exports);
21
+ __exportStar(require("./errors/not-found-error"), exports);
22
+ __exportStar(require("./errors/request-validation-error"), exports);
23
+ __exportStar(require("./middlewares/current-user"), exports);
24
+ __exportStar(require("./middlewares/error-handler"), exports);
25
+ __exportStar(require("./middlewares/require-auth"), exports);
26
+ __exportStar(require("./middlewares/validate-request"), exports);
27
+ __exportStar(require("./events/kafka-listener"), exports);
28
+ __exportStar(require("./events/kafka-publisher"), exports);
29
+ __exportStar(require("./events/subjects"), exports);
30
+ __exportStar(require("./events/event-types/user-created-event"), exports);
@@ -0,0 +1,14 @@
1
+ import { NextFunction, Request, Response } from "express";
2
+ interface UserPayload {
3
+ id: string;
4
+ email: string;
5
+ }
6
+ declare global {
7
+ namespace Express {
8
+ interface Request {
9
+ currentUser?: UserPayload;
10
+ }
11
+ }
12
+ }
13
+ export declare const currentUser: (req: Request, res: Response, next: NextFunction) => void;
14
+ export {};
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.currentUser = void 0;
7
+ const jsonwebtoken_1 = __importDefault(require("jsonwebtoken"));
8
+ const currentUser = (req, res, next) => {
9
+ var _a;
10
+ if (!((_a = req.session) === null || _a === void 0 ? void 0 : _a.jwt)) {
11
+ return next();
12
+ }
13
+ try {
14
+ const payload = jsonwebtoken_1.default.verify(req.session.jwt, process.env.JWT_KEY);
15
+ req.currentUser = payload;
16
+ }
17
+ catch (error) {
18
+ }
19
+ finally {
20
+ next();
21
+ }
22
+ };
23
+ exports.currentUser = currentUser;
@@ -0,0 +1,2 @@
1
+ import { NextFunction, Request, Response } from "express";
2
+ export declare const errorHandler: (err: Error, req: Request, res: Response, next: NextFunction) => Response<any, Record<string, any>> | undefined;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.errorHandler = void 0;
4
+ const custom_error_1 = require("../errors/custom-error");
5
+ const errorHandler = (err, req, res, next) => {
6
+ if (err instanceof custom_error_1.CustomError) {
7
+ return res.status(err.statusCode).send({ errors: err.serializedError() });
8
+ }
9
+ res.status(400).send({
10
+ errors: [
11
+ {
12
+ message: "Something went wrong",
13
+ },
14
+ ],
15
+ });
16
+ };
17
+ exports.errorHandler = errorHandler;
@@ -0,0 +1,14 @@
1
+ import { NextFunction, Request, Response } from "express";
2
+ interface UserPayload {
3
+ id: string;
4
+ email: string;
5
+ }
6
+ declare global {
7
+ namespace Express {
8
+ interface Request {
9
+ currentUser?: UserPayload;
10
+ }
11
+ }
12
+ }
13
+ export declare const requireAuth: (req: Request, res: Response, next: NextFunction) => void;
14
+ export {};
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.requireAuth = void 0;
4
+ const not_authorized_error_1 = require("../errors/not-authorized-error");
5
+ const requireAuth = (req, res, next) => {
6
+ if (!req.currentUser) {
7
+ throw new not_authorized_error_1.NotAuthorizedError();
8
+ }
9
+ next();
10
+ };
11
+ exports.requireAuth = requireAuth;
@@ -0,0 +1,2 @@
1
+ import { Request, Response, NextFunction } from "express";
2
+ export declare const ValidationRequest: (req: Request, res: Response, next: NextFunction) => void;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ValidationRequest = void 0;
4
+ const express_validator_1 = require("express-validator");
5
+ const request_validation_error_1 = require("../errors/request-validation-error");
6
+ const ValidationRequest = (req, res, next) => {
7
+ const err = (0, express_validator_1.validationResult)(req);
8
+ if (!err.isEmpty()) {
9
+ throw new request_validation_error_1.RequestValidationError(err.array());
10
+ }
11
+ next();
12
+ };
13
+ exports.ValidationRequest = ValidationRequest;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uber-clone/common",
3
- "version": "1.0.0",
3
+ "version": "1.0.3",
4
4
  "main": "./build/index.js",
5
5
  "types": "./build/index.d.ts",
6
6
  "files": [
@@ -27,6 +27,7 @@
27
27
  "express": "^5.1.0",
28
28
  "express-validator": "^7.2.1",
29
29
  "jsonwebtoken": "^9.0.2",
30
+ "kafkajs": "^2.2.4",
30
31
  "node-nats-streaming": "^0.3.2"
31
32
  }
32
- }
33
+ }