trucostars-core-module 0.0.1
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/LICENSE +21 -0
- package/README.md +423 -0
- package/dist/app.controller.d.ts +6 -0
- package/dist/app.controller.js +43 -0
- package/dist/app.controller.js.map +1 -0
- package/dist/app.module.d.ts +4 -0
- package/dist/app.module.js +31 -0
- package/dist/app.module.js.map +1 -0
- package/dist/app.service.d.ts +5 -0
- package/dist/app.service.js +28 -0
- package/dist/app.service.js.map +1 -0
- package/dist/common/common.module.d.ts +2 -0
- package/dist/common/common.module.js +58 -0
- package/dist/common/common.module.js.map +1 -0
- package/dist/common/config/env.validation.d.ts +2 -0
- package/dist/common/config/env.validation.js +93 -0
- package/dist/common/config/env.validation.js.map +1 -0
- package/dist/common/config/firebase.config.d.ts +2 -0
- package/dist/common/config/firebase.config.js +9 -0
- package/dist/common/config/firebase.config.js.map +1 -0
- package/dist/common/config/index.d.ts +1 -0
- package/dist/common/config/index.js +18 -0
- package/dist/common/config/index.js.map +1 -0
- package/dist/common/database/database.module.d.ts +2 -0
- package/dist/common/database/database.module.js +54 -0
- package/dist/common/database/database.module.js.map +1 -0
- package/dist/common/database/database.service.d.ts +25 -0
- package/dist/common/database/database.service.js +91 -0
- package/dist/common/database/database.service.js.map +1 -0
- package/dist/common/decorators/api-performance.decorator.d.ts +1 -0
- package/dist/common/decorators/api-performance.decorator.js +42 -0
- package/dist/common/decorators/api-performance.decorator.js.map +1 -0
- package/dist/common/decorators/index.d.ts +1 -0
- package/dist/common/decorators/index.js +18 -0
- package/dist/common/decorators/index.js.map +1 -0
- package/dist/common/filters/all-exceptions.filter.d.ts +5 -0
- package/dist/common/filters/all-exceptions.filter.js +38 -0
- package/dist/common/filters/all-exceptions.filter.js.map +1 -0
- package/dist/common/firebase/firebase.controller.d.ts +35 -0
- package/dist/common/firebase/firebase.controller.js +115 -0
- package/dist/common/firebase/firebase.controller.js.map +1 -0
- package/dist/common/firebase/firebase.module.d.ts +3 -0
- package/dist/common/firebase/firebase.module.js +83 -0
- package/dist/common/firebase/firebase.module.js.map +1 -0
- package/dist/common/firebase/firebase.service.d.ts +17 -0
- package/dist/common/firebase/firebase.service.js +127 -0
- package/dist/common/firebase/firebase.service.js.map +1 -0
- package/dist/common/firebase/firebase.types.d.ts +22 -0
- package/dist/common/firebase/firebase.types.js +3 -0
- package/dist/common/firebase/firebase.types.js.map +1 -0
- package/dist/common/interceptors/logging.interceptor.d.ts +10 -0
- package/dist/common/interceptors/logging.interceptor.js +108 -0
- package/dist/common/interceptors/logging.interceptor.js.map +1 -0
- package/dist/common/interceptors/performance.interceptor.d.ts +7 -0
- package/dist/common/interceptors/performance.interceptor.js +58 -0
- package/dist/common/interceptors/performance.interceptor.js.map +1 -0
- package/dist/common/middleware/logger.middleware.d.ts +19 -0
- package/dist/common/middleware/logger.middleware.js +231 -0
- package/dist/common/middleware/logger.middleware.js.map +1 -0
- package/dist/common/redis/redis.module.d.ts +2 -0
- package/dist/common/redis/redis.module.js +21 -0
- package/dist/common/redis/redis.module.js.map +1 -0
- package/dist/common/redis/redis.service.d.ts +11 -0
- package/dist/common/redis/redis.service.js +52 -0
- package/dist/common/redis/redis.service.js.map +1 -0
- package/dist/common/sqs/sqs.consumer.d.ts +20 -0
- package/dist/common/sqs/sqs.consumer.js +140 -0
- package/dist/common/sqs/sqs.consumer.js.map +1 -0
- package/dist/common/sqs/sqs.controller.d.ts +21 -0
- package/dist/common/sqs/sqs.controller.js +70 -0
- package/dist/common/sqs/sqs.controller.js.map +1 -0
- package/dist/common/sqs/sqs.example.service.d.ts +27 -0
- package/dist/common/sqs/sqs.example.service.js +206 -0
- package/dist/common/sqs/sqs.example.service.js.map +1 -0
- package/dist/common/sqs/sqs.module.d.ts +2 -0
- package/dist/common/sqs/sqs.module.js +24 -0
- package/dist/common/sqs/sqs.module.js.map +1 -0
- package/dist/common/sqs/sqs.producer.d.ts +13 -0
- package/dist/common/sqs/sqs.producer.js +197 -0
- package/dist/common/sqs/sqs.producer.js.map +1 -0
- package/dist/common/websocket/websocket.gateway.d.ts +9 -0
- package/dist/common/websocket/websocket.gateway.js +41 -0
- package/dist/common/websocket/websocket.gateway.js.map +1 -0
- package/dist/common/websocket/websocket.module.d.ts +2 -0
- package/dist/common/websocket/websocket.module.js +22 -0
- package/dist/common/websocket/websocket.module.js.map +1 -0
- package/dist/common/websocket/websocket.service.d.ts +25 -0
- package/dist/common/websocket/websocket.service.js +248 -0
- package/dist/common/websocket/websocket.service.js.map +1 -0
- package/dist/data/data.d.ts +10 -0
- package/dist/data/data.js +10 -0
- package/dist/data/data.js.map +1 -0
- package/dist/main.d.ts +1 -0
- package/dist/main.js +48 -0
- package/dist/main.js.map +1 -0
- package/dist/products/entities/product.entity.d.ts +56 -0
- package/dist/products/entities/product.entity.js +80 -0
- package/dist/products/entities/product.entity.js.map +1 -0
- package/dist/products/products.controller.d.ts +35 -0
- package/dist/products/products.controller.js +98 -0
- package/dist/products/products.controller.js.map +1 -0
- package/dist/products/products.module.d.ts +2 -0
- package/dist/products/products.module.js +27 -0
- package/dist/products/products.module.js.map +1 -0
- package/dist/products/products.service.d.ts +36 -0
- package/dist/products/products.service.example.d.ts +1 -0
- package/dist/products/products.service.example.js +3 -0
- package/dist/products/products.service.example.js.map +1 -0
- package/dist/products/products.service.js +74 -0
- package/dist/products/products.service.js.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -0
- package/package.json +106 -0
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
var WebSocketService_1;
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.WebSocketService = void 0;
|
|
17
|
+
const common_1 = require("@nestjs/common");
|
|
18
|
+
const websocket_gateway_1 = require("./websocket.gateway");
|
|
19
|
+
let WebSocketService = WebSocketService_1 = class WebSocketService {
|
|
20
|
+
gateway;
|
|
21
|
+
logger = new common_1.Logger(WebSocketService_1.name);
|
|
22
|
+
constructor(gateway) {
|
|
23
|
+
this.gateway = gateway;
|
|
24
|
+
}
|
|
25
|
+
emitToAll(event, data) {
|
|
26
|
+
try {
|
|
27
|
+
if (!event || typeof event !== 'string' || event.trim().length === 0) {
|
|
28
|
+
throw new Error('Event name is required and must be a non-empty string');
|
|
29
|
+
}
|
|
30
|
+
if (!this.gateway?.server) {
|
|
31
|
+
throw new Error('WebSocket server is not initialized');
|
|
32
|
+
}
|
|
33
|
+
const clientCount = this.gateway.server.sockets.sockets.size;
|
|
34
|
+
this.gateway.server.emit(event, data);
|
|
35
|
+
const hasClients = clientCount > 0;
|
|
36
|
+
const response = {
|
|
37
|
+
success: hasClients,
|
|
38
|
+
message: `Event '${event}' emitted to ${clientCount} client(s)`,
|
|
39
|
+
event,
|
|
40
|
+
timestamp: new Date(),
|
|
41
|
+
};
|
|
42
|
+
this.logger.debug(`Event '${event}' emitted to ${clientCount} client(s)`);
|
|
43
|
+
return response;
|
|
44
|
+
}
|
|
45
|
+
catch (error) {
|
|
46
|
+
const errorMessage = `Failed to emit event '${event}': ${error instanceof Error ? error.message : String(error)}`;
|
|
47
|
+
this.logger.error(errorMessage, error instanceof Error ? error.stack : undefined);
|
|
48
|
+
return {
|
|
49
|
+
success: false,
|
|
50
|
+
message: errorMessage,
|
|
51
|
+
event,
|
|
52
|
+
timestamp: new Date(),
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
emitToRoom(room, event, data) {
|
|
57
|
+
try {
|
|
58
|
+
if (!room || typeof room !== 'string' || room.trim().length === 0) {
|
|
59
|
+
throw new Error('Room name is required and must be a non-empty string');
|
|
60
|
+
}
|
|
61
|
+
if (!event || typeof event !== 'string' || event.trim().length === 0) {
|
|
62
|
+
throw new Error('Event name is required and must be a non-empty string');
|
|
63
|
+
}
|
|
64
|
+
if (!this.gateway?.server) {
|
|
65
|
+
throw new Error('WebSocket server is not initialized');
|
|
66
|
+
}
|
|
67
|
+
const roomSockets = this.gateway.server.sockets.adapter.rooms.get(room);
|
|
68
|
+
const recipientCount = roomSockets ? roomSockets.size : 0;
|
|
69
|
+
if (recipientCount === 0) {
|
|
70
|
+
this.logger.warn(`No clients found in room '${room}' for event '${event}'`);
|
|
71
|
+
}
|
|
72
|
+
this.gateway.server.to(room).emit(event, data);
|
|
73
|
+
const response = {
|
|
74
|
+
success: recipientCount > 0,
|
|
75
|
+
message: `Event '${event}' emitted to room '${room}' (${recipientCount} client(s))`,
|
|
76
|
+
event,
|
|
77
|
+
timestamp: new Date(),
|
|
78
|
+
};
|
|
79
|
+
this.logger.debug(`Event '${event}' emitted to room '${room}' (${recipientCount} client(s))`);
|
|
80
|
+
return response;
|
|
81
|
+
}
|
|
82
|
+
catch (error) {
|
|
83
|
+
const errorMessage = `Failed to emit event '${event}' to room '${room}': ${error instanceof Error ? error.message : String(error)}`;
|
|
84
|
+
this.logger.error(errorMessage, error instanceof Error ? error.stack : undefined);
|
|
85
|
+
return {
|
|
86
|
+
success: false,
|
|
87
|
+
message: errorMessage,
|
|
88
|
+
event,
|
|
89
|
+
timestamp: new Date(),
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
emitToClient(clientId, event, data) {
|
|
94
|
+
try {
|
|
95
|
+
if (!clientId || typeof clientId !== 'string' || clientId.trim().length === 0) {
|
|
96
|
+
throw new Error('Client ID is required and must be a non-empty string');
|
|
97
|
+
}
|
|
98
|
+
if (!event || typeof event !== 'string' || event.trim().length === 0) {
|
|
99
|
+
throw new Error('Event name is required and must be a non-empty string');
|
|
100
|
+
}
|
|
101
|
+
if (!this.gateway?.server) {
|
|
102
|
+
throw new Error('WebSocket server is not initialized');
|
|
103
|
+
}
|
|
104
|
+
const socket = this.gateway.server.sockets.sockets.get(clientId);
|
|
105
|
+
if (!socket) {
|
|
106
|
+
const errorMessage = `Client '${clientId}' not found`;
|
|
107
|
+
this.logger.warn(errorMessage);
|
|
108
|
+
return {
|
|
109
|
+
success: false,
|
|
110
|
+
message: errorMessage,
|
|
111
|
+
event,
|
|
112
|
+
timestamp: new Date(),
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
this.gateway.server.to(clientId).emit(event, data);
|
|
116
|
+
const isConnected = socket.connected;
|
|
117
|
+
const response = {
|
|
118
|
+
success: isConnected,
|
|
119
|
+
message: `Event '${event}' emitted to client '${clientId}'. Status: ${isConnected ? 'connected' : 'disconnected'}`,
|
|
120
|
+
event,
|
|
121
|
+
timestamp: new Date(),
|
|
122
|
+
};
|
|
123
|
+
this.logger.debug(`Event '${event}' emitted to client '${clientId}' (connected: ${isConnected})`);
|
|
124
|
+
return response;
|
|
125
|
+
}
|
|
126
|
+
catch (error) {
|
|
127
|
+
const errorMessage = `Failed to emit event '${event}' to client '${clientId}': ${error instanceof Error ? error.message : String(error)}`;
|
|
128
|
+
this.logger.error(errorMessage, error instanceof Error ? error.stack : undefined);
|
|
129
|
+
return {
|
|
130
|
+
success: false,
|
|
131
|
+
message: errorMessage,
|
|
132
|
+
event,
|
|
133
|
+
timestamp: new Date(),
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
joinRoom(clientId, room) {
|
|
138
|
+
try {
|
|
139
|
+
if (!clientId || typeof clientId !== 'string' || clientId.trim().length === 0) {
|
|
140
|
+
throw new Error('Client ID is required and must be a non-empty string');
|
|
141
|
+
}
|
|
142
|
+
if (!room || typeof room !== 'string' || room.trim().length === 0) {
|
|
143
|
+
throw new Error('Room name is required and must be a non-empty string');
|
|
144
|
+
}
|
|
145
|
+
if (!this.gateway?.server) {
|
|
146
|
+
throw new Error('WebSocket server is not initialized');
|
|
147
|
+
}
|
|
148
|
+
const socket = this.gateway.server.sockets.sockets.get(clientId);
|
|
149
|
+
if (!socket) {
|
|
150
|
+
const errorMessage = `Client '${clientId}' not found`;
|
|
151
|
+
this.logger.warn(errorMessage);
|
|
152
|
+
return {
|
|
153
|
+
success: false,
|
|
154
|
+
message: errorMessage,
|
|
155
|
+
clientId,
|
|
156
|
+
room,
|
|
157
|
+
timestamp: new Date(),
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
const wasInRoom = socket.rooms.has(room);
|
|
161
|
+
if (wasInRoom) {
|
|
162
|
+
this.logger.debug(`Client '${clientId}' is already in room '${room}'`);
|
|
163
|
+
}
|
|
164
|
+
socket.join(room);
|
|
165
|
+
const isNowInRoom = socket.rooms.has(room);
|
|
166
|
+
const currentRooms = Array.from(socket.rooms).join(', ');
|
|
167
|
+
const response = {
|
|
168
|
+
success: isNowInRoom,
|
|
169
|
+
message: `Client '${clientId}' ${isNowInRoom ? 'joined' : 'failed to join'} room '${room}'`,
|
|
170
|
+
clientId,
|
|
171
|
+
room,
|
|
172
|
+
timestamp: new Date(),
|
|
173
|
+
};
|
|
174
|
+
this.logger.debug(`Client '${clientId}' ${isNowInRoom ? 'successfully joined' : 'failed to join'} room '${room}'`);
|
|
175
|
+
return response;
|
|
176
|
+
}
|
|
177
|
+
catch (error) {
|
|
178
|
+
const errorMessage = `Failed to join client '${clientId}' to room '${room}': ${error instanceof Error ? error.message : String(error)}`;
|
|
179
|
+
this.logger.error(errorMessage, error instanceof Error ? error.stack : undefined);
|
|
180
|
+
return {
|
|
181
|
+
success: false,
|
|
182
|
+
message: errorMessage,
|
|
183
|
+
clientId,
|
|
184
|
+
room,
|
|
185
|
+
timestamp: new Date(),
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
leaveRoom(clientId, room) {
|
|
190
|
+
try {
|
|
191
|
+
if (!clientId || typeof clientId !== 'string' || clientId.trim().length === 0) {
|
|
192
|
+
throw new Error('Client ID is required and must be a non-empty string');
|
|
193
|
+
}
|
|
194
|
+
if (!room || typeof room !== 'string' || room.trim().length === 0) {
|
|
195
|
+
throw new Error('Room name is required and must be a non-empty string');
|
|
196
|
+
}
|
|
197
|
+
if (!this.gateway?.server) {
|
|
198
|
+
throw new Error('WebSocket server is not initialized');
|
|
199
|
+
}
|
|
200
|
+
const socket = this.gateway.server.sockets.sockets.get(clientId);
|
|
201
|
+
if (!socket) {
|
|
202
|
+
const errorMessage = `Client '${clientId}' not found`;
|
|
203
|
+
this.logger.warn(errorMessage);
|
|
204
|
+
return {
|
|
205
|
+
success: false,
|
|
206
|
+
message: errorMessage,
|
|
207
|
+
clientId,
|
|
208
|
+
room,
|
|
209
|
+
timestamp: new Date(),
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
const wasInRoom = socket.rooms.has(room);
|
|
213
|
+
if (!wasInRoom) {
|
|
214
|
+
this.logger.debug(`Client '${clientId}' is not in room '${room}'`);
|
|
215
|
+
}
|
|
216
|
+
socket.leave(room);
|
|
217
|
+
const isStillInRoom = socket.rooms.has(room);
|
|
218
|
+
const currentRooms = Array.from(socket.rooms).join(', ');
|
|
219
|
+
const response = {
|
|
220
|
+
success: wasInRoom && !isStillInRoom,
|
|
221
|
+
message: `Client '${clientId}' ${!isStillInRoom ? 'left' : 'failed to leave'} room '${room}'`,
|
|
222
|
+
clientId,
|
|
223
|
+
room,
|
|
224
|
+
timestamp: new Date(),
|
|
225
|
+
};
|
|
226
|
+
this.logger.debug(`Client '${clientId}' ${!isStillInRoom ? 'successfully left' : 'failed to leave'} room '${room}'`);
|
|
227
|
+
return response;
|
|
228
|
+
}
|
|
229
|
+
catch (error) {
|
|
230
|
+
const errorMessage = `Failed to leave client '${clientId}' from room '${room}': ${error instanceof Error ? error.message : String(error)}`;
|
|
231
|
+
this.logger.error(errorMessage, error instanceof Error ? error.stack : undefined);
|
|
232
|
+
return {
|
|
233
|
+
success: false,
|
|
234
|
+
message: errorMessage,
|
|
235
|
+
clientId,
|
|
236
|
+
room,
|
|
237
|
+
timestamp: new Date(),
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
};
|
|
242
|
+
exports.WebSocketService = WebSocketService;
|
|
243
|
+
exports.WebSocketService = WebSocketService = WebSocketService_1 = __decorate([
|
|
244
|
+
(0, common_1.Injectable)(),
|
|
245
|
+
__param(0, (0, common_1.Inject)((0, common_1.forwardRef)(() => websocket_gateway_1.WebSocketGatewayHandler))),
|
|
246
|
+
__metadata("design:paramtypes", [websocket_gateway_1.WebSocketGatewayHandler])
|
|
247
|
+
], WebSocketService);
|
|
248
|
+
//# sourceMappingURL=websocket.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"websocket.service.js","sourceRoot":"","sources":["../../../src/common/websocket/websocket.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAwE;AACxE,2DAA8D;AAkBvD,IAAM,gBAAgB,wBAAtB,MAAM,gBAAgB;IAKR;IAJF,MAAM,GAAG,IAAI,eAAM,CAAC,kBAAgB,CAAC,IAAI,CAAC,CAAC;IAE5D,YAEmB,OAAgC;QAAhC,YAAO,GAAP,OAAO,CAAyB;IAChD,CAAC;IAQJ,SAAS,CAAC,KAAa,EAAE,IAAS;QAChC,IAAI,CAAC;YAEH,IAAI,CAAC,KAAK,IAAI,OAAO,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AAgB;2BAAhB,gBAAgB;IAD5B,IAAA,mBAAU,GAAE;IAKR,WAAA,IAAA,eAAM,EAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,2CAAuB,CAAC,CAAC,CAAA;qCACxB,2CAAuB;GALxC,gBAAgB,CA0U5B"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DataBaseResponse = void 0;
|
|
4
|
+
class DataBaseResponse {
|
|
5
|
+
database;
|
|
6
|
+
status;
|
|
7
|
+
isConnected;
|
|
8
|
+
}
|
|
9
|
+
exports.DataBaseResponse = DataBaseResponse;
|
|
10
|
+
//# sourceMappingURL=data.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data.js","sourceRoot":"","sources":["../../src/data/data.ts"],"names":[],"mappings":";;;AAuBA,MAAa,gBAAgB;IAE3B,QAAQ,CAAS;IACjB,MAAM,CAAS;IACf,WAAW,CAAU;CACtB;AALD,4CAKC"}
|
package/dist/main.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/main.js
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const core_1 = require("@nestjs/core");
|
|
4
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
5
|
+
const app_module_1 = require("./app.module");
|
|
6
|
+
const common_1 = require("@nestjs/common");
|
|
7
|
+
const logging_interceptor_1 = require("./common/interceptors/logging.interceptor");
|
|
8
|
+
const performance_interceptor_1 = require("./common/interceptors/performance.interceptor");
|
|
9
|
+
const all_exceptions_filter_1 = require("./common/filters/all-exceptions.filter");
|
|
10
|
+
async function bootstrap() {
|
|
11
|
+
const logger = new common_1.Logger('Bootstrap');
|
|
12
|
+
const app = await core_1.NestFactory.create(app_module_1.AppModule, {
|
|
13
|
+
logger: ['error', 'warn', 'log', 'debug', 'verbose'],
|
|
14
|
+
});
|
|
15
|
+
app.useGlobalPipes(new common_1.ValidationPipe({
|
|
16
|
+
whitelist: true,
|
|
17
|
+
forbidNonWhitelisted: true,
|
|
18
|
+
transform: true,
|
|
19
|
+
}));
|
|
20
|
+
app.useGlobalInterceptors(new logging_interceptor_1.LoggingInterceptor(), new performance_interceptor_1.PerformanceInterceptor());
|
|
21
|
+
app.useGlobalFilters(new all_exceptions_filter_1.AllExceptionsFilter());
|
|
22
|
+
app.setGlobalPrefix('api', {
|
|
23
|
+
exclude: ['/'],
|
|
24
|
+
});
|
|
25
|
+
const config = new swagger_1.DocumentBuilder()
|
|
26
|
+
.setTitle('Truco Stars')
|
|
27
|
+
.setDescription('Trucostars api microservices documentation')
|
|
28
|
+
.setVersion('1.0')
|
|
29
|
+
.addTag('Products')
|
|
30
|
+
.addServer('http://localhost:3000', 'Development server')
|
|
31
|
+
.build();
|
|
32
|
+
const document = swagger_1.SwaggerModule.createDocument(app, config);
|
|
33
|
+
swagger_1.SwaggerModule.setup('api-docs', app, document);
|
|
34
|
+
app.enableCors({
|
|
35
|
+
origin: process.env.CORS_ORIGIN || '*',
|
|
36
|
+
credentials: true,
|
|
37
|
+
});
|
|
38
|
+
const port = process.env.PORT ?? 3000;
|
|
39
|
+
await app.listen(port);
|
|
40
|
+
logger.log(`🚀 Application is running on: http://localhost:${port}/api`);
|
|
41
|
+
logger.log(`📚 Swagger documentation: http://localhost:${port}/api-docs`);
|
|
42
|
+
}
|
|
43
|
+
bootstrap().catch((error) => {
|
|
44
|
+
const logger = new common_1.Logger('Bootstrap');
|
|
45
|
+
logger.error('Failed to start application', error);
|
|
46
|
+
process.exit(1);
|
|
47
|
+
});
|
|
48
|
+
//# sourceMappingURL=main.js.map
|
package/dist/main.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":";;AAAA,uCAA2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AAG;QACtC,WAAW,EAAE,IAAI;KAClB,CAAC,CAAC;IAEH,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,IAAI,CAAC;IACtC,MAAM,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAEvB,MAAM,CAAC,GAAG,CAAC,kDAAkD,IAAI,MAAM,CAAC,CAAC;IACzE,MAAM,CAAC,GAAG,CAAC,8CAA8C,IAAI,WAAW,CAAC,CAAC;AAC5E,CAAC;AAED,SAAS,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IAC1B,MAAM,MAAM,GAAG,IAAI,eAAM,CAAC,WAAW,CAAC,CAAC;IACvC,MAAM,CAAC,KAAK,CAAC,6BAA6B,EAAE,KAAK,CAAC,CAAC;IACnD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { HydratedDocument } from 'mongoose';
|
|
2
|
+
export declare enum ProductCategory {
|
|
3
|
+
FOOD = "Food",
|
|
4
|
+
TOY = "Toy",
|
|
5
|
+
ACCESSORY = "Accessory",
|
|
6
|
+
MEDICINE = "Medicine"
|
|
7
|
+
}
|
|
8
|
+
export type ProductDocument = HydratedDocument<Product>;
|
|
9
|
+
export declare class Product {
|
|
10
|
+
id: number;
|
|
11
|
+
name: string;
|
|
12
|
+
price: number;
|
|
13
|
+
valid: boolean;
|
|
14
|
+
tags: string[];
|
|
15
|
+
category: ProductCategory;
|
|
16
|
+
}
|
|
17
|
+
export declare const ProductSchema: import("mongoose").Schema<Product, import("mongoose").Model<Product, any, any, any, import("mongoose").Document<unknown, any, Product, any, import("mongoose").DefaultSchemaOptions> & Product & {
|
|
18
|
+
_id: import("mongoose").Types.ObjectId;
|
|
19
|
+
} & {
|
|
20
|
+
__v: number;
|
|
21
|
+
}, any, Product>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Product, import("mongoose").Document<unknown, {}, Product, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Product & {
|
|
22
|
+
_id: import("mongoose").Types.ObjectId;
|
|
23
|
+
} & {
|
|
24
|
+
__v: number;
|
|
25
|
+
}, {
|
|
26
|
+
id?: import("mongoose").SchemaDefinitionProperty<number, Product, import("mongoose").Document<unknown, {}, Product, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Product & {
|
|
27
|
+
_id: import("mongoose").Types.ObjectId;
|
|
28
|
+
} & {
|
|
29
|
+
__v: number;
|
|
30
|
+
}> | undefined;
|
|
31
|
+
name?: import("mongoose").SchemaDefinitionProperty<string, Product, import("mongoose").Document<unknown, {}, Product, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Product & {
|
|
32
|
+
_id: import("mongoose").Types.ObjectId;
|
|
33
|
+
} & {
|
|
34
|
+
__v: number;
|
|
35
|
+
}> | undefined;
|
|
36
|
+
price?: import("mongoose").SchemaDefinitionProperty<number, Product, import("mongoose").Document<unknown, {}, Product, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Product & {
|
|
37
|
+
_id: import("mongoose").Types.ObjectId;
|
|
38
|
+
} & {
|
|
39
|
+
__v: number;
|
|
40
|
+
}> | undefined;
|
|
41
|
+
valid?: import("mongoose").SchemaDefinitionProperty<boolean, Product, import("mongoose").Document<unknown, {}, Product, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Product & {
|
|
42
|
+
_id: import("mongoose").Types.ObjectId;
|
|
43
|
+
} & {
|
|
44
|
+
__v: number;
|
|
45
|
+
}> | undefined;
|
|
46
|
+
tags?: import("mongoose").SchemaDefinitionProperty<string[], Product, import("mongoose").Document<unknown, {}, Product, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Product & {
|
|
47
|
+
_id: import("mongoose").Types.ObjectId;
|
|
48
|
+
} & {
|
|
49
|
+
__v: number;
|
|
50
|
+
}> | undefined;
|
|
51
|
+
category?: import("mongoose").SchemaDefinitionProperty<ProductCategory, Product, import("mongoose").Document<unknown, {}, Product, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Product & {
|
|
52
|
+
_id: import("mongoose").Types.ObjectId;
|
|
53
|
+
} & {
|
|
54
|
+
__v: number;
|
|
55
|
+
}> | undefined;
|
|
56
|
+
}, Product>;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ProductSchema = exports.Product = exports.ProductCategory = void 0;
|
|
13
|
+
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
15
|
+
var ProductCategory;
|
|
16
|
+
(function (ProductCategory) {
|
|
17
|
+
ProductCategory["FOOD"] = "Food";
|
|
18
|
+
ProductCategory["TOY"] = "Toy";
|
|
19
|
+
ProductCategory["ACCESSORY"] = "Accessory";
|
|
20
|
+
ProductCategory["MEDICINE"] = "Medicine";
|
|
21
|
+
})(ProductCategory || (exports.ProductCategory = ProductCategory = {}));
|
|
22
|
+
let Product = class Product {
|
|
23
|
+
id;
|
|
24
|
+
name;
|
|
25
|
+
price;
|
|
26
|
+
valid;
|
|
27
|
+
tags;
|
|
28
|
+
category;
|
|
29
|
+
};
|
|
30
|
+
exports.Product = Product;
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, swagger_1.ApiProperty)({
|
|
33
|
+
description: 'The unique identifier of the product',
|
|
34
|
+
example: 1,
|
|
35
|
+
}),
|
|
36
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
37
|
+
__metadata("design:type", Number)
|
|
38
|
+
], Product.prototype, "id", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, swagger_1.ApiProperty)({
|
|
41
|
+
description: 'The name of the product',
|
|
42
|
+
example: 'Product Name',
|
|
43
|
+
}),
|
|
44
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
45
|
+
__metadata("design:type", String)
|
|
46
|
+
], Product.prototype, "name", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
49
|
+
description: 'The price of the product',
|
|
50
|
+
example: 5.5,
|
|
51
|
+
default: 1.5,
|
|
52
|
+
}),
|
|
53
|
+
(0, mongoose_1.Prop)({ required: true, nullable: true, default: 1.5 }),
|
|
54
|
+
__metadata("design:type", Number)
|
|
55
|
+
], Product.prototype, "price", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
58
|
+
description: 'Indicates if the product is valid',
|
|
59
|
+
example: true,
|
|
60
|
+
default: true,
|
|
61
|
+
}),
|
|
62
|
+
(0, mongoose_1.Prop)({ required: true, nullable: true }),
|
|
63
|
+
__metadata("design:type", Boolean)
|
|
64
|
+
], Product.prototype, "valid", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
(0, swagger_1.ApiProperty)({ type: [String] }),
|
|
67
|
+
(0, mongoose_1.Prop)({ nullable: true }),
|
|
68
|
+
__metadata("design:type", Array)
|
|
69
|
+
], Product.prototype, "tags", void 0);
|
|
70
|
+
__decorate([
|
|
71
|
+
(0, swagger_1.ApiProperty)({ enum: ProductCategory }),
|
|
72
|
+
(0, mongoose_1.Prop)({ nullable: true }),
|
|
73
|
+
__metadata("design:type", String)
|
|
74
|
+
], Product.prototype, "category", void 0);
|
|
75
|
+
exports.Product = Product = __decorate([
|
|
76
|
+
(0, swagger_1.ApiTags)('Products'),
|
|
77
|
+
(0, mongoose_1.Schema)()
|
|
78
|
+
], Product);
|
|
79
|
+
exports.ProductSchema = mongoose_1.SchemaFactory.createForClass(Product);
|
|
80
|
+
//# sourceMappingURL=product.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"product.entity.js","sourceRoot":"","sources":["../../../src/products/entities/product.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAA+D;AAE/D,6CAA4E;AAE5E,IAAY,eAMX;AAND,WAAY,eAAe;IAEzB,gCAAa,CAAA;IACb,8BAAW,CAAA;IACX,0CAAuB,CAAA;IACvB,wCAAqB,CAAA;AACvB,CAAC,EANW,eAAe,+BAAf,eAAe,QAM1B;AAMM,IAAM,OAAO,GAAb,MAAM,OAAO;IAMX,EAAE,CAAS;IAOX,IAAI,CAAS;IAQb,KAAK,CAAS;IAQd,KAAK,CAAU;IAIf,IAAI,CAAW;IAKf,QAAQ,CAAkB;CAClC,CAAA;AAvCY,0BAAO;AAMX;IALN,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,sCAAsC;QACnD,OAAO,EAAE,CAAC;KACX,CAAC;IACD,IAAA,eAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mCACP;AAOX;IALN,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,yBAAyB;QACtC,OAAO,EAAE,cAAc;KACxB,CAAC;IACD,IAAA,eAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qCACL;AAQb;IANN,IAAA,6BAAmB,EAAC;QACnB,WAAW,EAAE,0BAA0B;QACvC,OAAO,EAAE,GAAG;QACZ,OAAO,EAAE,GAAG;KACb,CAAC;IACD,IAAA,eAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC;;sCAClC;AAQd;IANN,IAAA,6BAAmB,EAAC;QACnB,WAAW,EAAE,mCAAmC;QAChD,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,IAAI;KACd,CAAC;IACD,IAAA,eAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sCACnB;AAIf;IAFN,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC;IAC/B,IAAA,eAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qCACH;AAKf;IAHN,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,eAAe,EAAE,CAAC;IACtC,IAAA,eAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yCAEQ;kBAtCtB,OAAO;IAFnB,IAAA,iBAAO,EAAC,UAAU,CAAC;IACnB,IAAA,iBAAM,GAAE;GACI,OAAO,CAuCnB;AAEY,QAAA,aAAa,GAAG,wBAAa,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ProductsService } from './products.service';
|
|
2
|
+
import { Product } from './entities/product.entity';
|
|
3
|
+
export declare class ProductsController {
|
|
4
|
+
private readonly productsService;
|
|
5
|
+
constructor(productsService: ProductsService);
|
|
6
|
+
create(product: Product): Promise<import("mongoose").Document<unknown, {}, Product, {}, import("mongoose").DefaultSchemaOptions> & Product & {
|
|
7
|
+
_id: import("mongoose").Types.ObjectId;
|
|
8
|
+
} & {
|
|
9
|
+
__v: number;
|
|
10
|
+
}>;
|
|
11
|
+
findAll(): import("mongoose").Query<(import("mongoose").Document<unknown, {}, Product, {}, import("mongoose").DefaultSchemaOptions> & Product & {
|
|
12
|
+
_id: import("mongoose").Types.ObjectId;
|
|
13
|
+
} & {
|
|
14
|
+
__v: number;
|
|
15
|
+
})[], import("mongoose").Document<unknown, {}, Product, {}, import("mongoose").DefaultSchemaOptions> & Product & {
|
|
16
|
+
_id: import("mongoose").Types.ObjectId;
|
|
17
|
+
} & {
|
|
18
|
+
__v: number;
|
|
19
|
+
}, {}, Product, "find", {}>;
|
|
20
|
+
findOne(id: string): Promise<import("mongoose").Document<unknown, {}, Product, {}, import("mongoose").DefaultSchemaOptions> & Product & {
|
|
21
|
+
_id: import("mongoose").Types.ObjectId;
|
|
22
|
+
} & {
|
|
23
|
+
__v: number;
|
|
24
|
+
}>;
|
|
25
|
+
update(id: string, product: Product): Promise<import("mongoose").Document<unknown, {}, Product, {}, import("mongoose").DefaultSchemaOptions> & Product & {
|
|
26
|
+
_id: import("mongoose").Types.ObjectId;
|
|
27
|
+
} & {
|
|
28
|
+
__v: number;
|
|
29
|
+
}>;
|
|
30
|
+
remove(id: string): Promise<import("mongoose").Document<unknown, {}, Product, {}, import("mongoose").DefaultSchemaOptions> & Product & {
|
|
31
|
+
_id: import("mongoose").Types.ObjectId;
|
|
32
|
+
} & {
|
|
33
|
+
__v: number;
|
|
34
|
+
}>;
|
|
35
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.ProductsController = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const products_service_1 = require("./products.service");
|
|
18
|
+
const product_entity_1 = require("./entities/product.entity");
|
|
19
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
20
|
+
const api_performance_decorator_1 = require("../common/decorators/api-performance.decorator");
|
|
21
|
+
let ProductsController = class ProductsController {
|
|
22
|
+
productsService;
|
|
23
|
+
constructor(productsService) {
|
|
24
|
+
this.productsService = productsService;
|
|
25
|
+
}
|
|
26
|
+
create(product) {
|
|
27
|
+
return this.productsService.create(product);
|
|
28
|
+
}
|
|
29
|
+
findAll() {
|
|
30
|
+
return this.productsService.findAll();
|
|
31
|
+
}
|
|
32
|
+
findOne(id) {
|
|
33
|
+
return this.productsService.findOne(+id);
|
|
34
|
+
}
|
|
35
|
+
update(id, product) {
|
|
36
|
+
return this.productsService.update(+id, product);
|
|
37
|
+
}
|
|
38
|
+
remove(id) {
|
|
39
|
+
return this.productsService.remove(+id);
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
exports.ProductsController = ProductsController;
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, common_1.Post)('create'),
|
|
45
|
+
(0, swagger_1.ApiBody)({ type: product_entity_1.Product }),
|
|
46
|
+
(0, swagger_1.ApiOperation)({ summary: 'Create a new product' }),
|
|
47
|
+
(0, swagger_1.ApiResponse)({ status: 201, description: 'Product created successfully', type: product_entity_1.Product }),
|
|
48
|
+
(0, api_performance_decorator_1.ApiPerformanceHeaders)(),
|
|
49
|
+
__param(0, (0, common_1.Body)()),
|
|
50
|
+
__metadata("design:type", Function),
|
|
51
|
+
__metadata("design:paramtypes", [product_entity_1.Product]),
|
|
52
|
+
__metadata("design:returntype", void 0)
|
|
53
|
+
], ProductsController.prototype, "create", null);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, common_1.Get)('getAll'),
|
|
56
|
+
(0, swagger_1.ApiOperation)({ summary: 'Get all products' }),
|
|
57
|
+
(0, swagger_1.ApiResponse)({ status: 200, description: 'List of all products', type: [product_entity_1.Product] }),
|
|
58
|
+
(0, api_performance_decorator_1.ApiPerformanceHeaders)(),
|
|
59
|
+
__metadata("design:type", Function),
|
|
60
|
+
__metadata("design:paramtypes", []),
|
|
61
|
+
__metadata("design:returntype", void 0)
|
|
62
|
+
], ProductsController.prototype, "findAll", null);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, common_1.Get)('get/:id'),
|
|
65
|
+
(0, swagger_1.ApiOperation)({ summary: 'Get a product by ID' }),
|
|
66
|
+
(0, swagger_1.ApiResponse)({ status: 200, description: 'Product found', type: product_entity_1.Product }),
|
|
67
|
+
(0, api_performance_decorator_1.ApiPerformanceHeaders)(),
|
|
68
|
+
__param(0, (0, common_1.Param)('id')),
|
|
69
|
+
__metadata("design:type", Function),
|
|
70
|
+
__metadata("design:paramtypes", [String]),
|
|
71
|
+
__metadata("design:returntype", void 0)
|
|
72
|
+
], ProductsController.prototype, "findOne", null);
|
|
73
|
+
__decorate([
|
|
74
|
+
(0, common_1.Patch)('update/:id'),
|
|
75
|
+
(0, swagger_1.ApiOperation)({ summary: 'Update a product' }),
|
|
76
|
+
(0, swagger_1.ApiResponse)({ status: 200, description: 'Product updated successfully', type: product_entity_1.Product }),
|
|
77
|
+
(0, api_performance_decorator_1.ApiPerformanceHeaders)(),
|
|
78
|
+
__param(0, (0, common_1.Param)('id')),
|
|
79
|
+
__param(1, (0, common_1.Body)()),
|
|
80
|
+
__metadata("design:type", Function),
|
|
81
|
+
__metadata("design:paramtypes", [String, product_entity_1.Product]),
|
|
82
|
+
__metadata("design:returntype", void 0)
|
|
83
|
+
], ProductsController.prototype, "update", null);
|
|
84
|
+
__decorate([
|
|
85
|
+
(0, common_1.Delete)('delete/:id'),
|
|
86
|
+
(0, swagger_1.ApiOperation)({ summary: 'Delete a product' }),
|
|
87
|
+
(0, swagger_1.ApiResponse)({ status: 200, description: 'Product deleted successfully' }),
|
|
88
|
+
(0, api_performance_decorator_1.ApiPerformanceHeaders)(),
|
|
89
|
+
__param(0, (0, common_1.Param)('id')),
|
|
90
|
+
__metadata("design:type", Function),
|
|
91
|
+
__metadata("design:paramtypes", [String]),
|
|
92
|
+
__metadata("design:returntype", void 0)
|
|
93
|
+
], ProductsController.prototype, "remove", null);
|
|
94
|
+
exports.ProductsController = ProductsController = __decorate([
|
|
95
|
+
(0, common_1.Controller)('products'),
|
|
96
|
+
__metadata("design:paramtypes", [products_service_1.ProductsService])
|
|
97
|
+
], ProductsController);
|
|
98
|
+
//# sourceMappingURL=products.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"products.controller.js","sourceRoot":"","sources":["../../src/products/products.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAQwB;AACxB,yDAAqD;AACrD,8DAAoD;AACpD,6CAAgF;AAChF,8FAAuF;AAGhF,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IACA;IAA7B,YAA6B,eAAgC;QAAhC,oBAAe,GAAf,eAAe,CAAiB;IAAG,CAAC;IAOjE,MAAM,CAAS,OAAgB;QAC7B,OAAO,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAC9C,CAAC;IAMD,OAAO;QACL,OAAO,IAAI,CAAC,eAAe,CAAC,OAAO,EAAE,CAAC;IACxC,CAAC;IAMD,OAAO,CAAc,EAAU;QAC7B,OAAO,IAAI,CAAC,eAAe,CAAC,OAA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