@campxdev/server-shared 1.3.40 → 1.3.41

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.
@@ -0,0 +1,3 @@
1
+ export declare class CloudWatchLoggerModule {
2
+ }
3
+ //# sourceMappingURL=cloud-watch-logger.module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cloud-watch-logger.module.d.ts","sourceRoot":"","sources":["../../src/cloud-watch-logger/cloud-watch-logger.module.ts"],"names":[],"mappings":"AAGA,qBAIa,sBAAsB;CAAG"}
@@ -0,0 +1,21 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.CloudWatchLoggerModule = void 0;
10
+ const common_1 = require("@nestjs/common");
11
+ const cloud_water_logger_service_1 = require("./cloud-water-logger.service");
12
+ let CloudWatchLoggerModule = class CloudWatchLoggerModule {
13
+ };
14
+ exports.CloudWatchLoggerModule = CloudWatchLoggerModule;
15
+ exports.CloudWatchLoggerModule = CloudWatchLoggerModule = __decorate([
16
+ (0, common_1.Module)({
17
+ providers: [cloud_water_logger_service_1.CloudWatchLoggerService],
18
+ exports: [cloud_water_logger_service_1.CloudWatchLoggerService],
19
+ })
20
+ ], CloudWatchLoggerModule);
21
+ //# sourceMappingURL=cloud-watch-logger.module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cloud-watch-logger.module.js","sourceRoot":"","sources":["../../src/cloud-watch-logger/cloud-watch-logger.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,6EAAuE;AAMhE,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;CAAG,CAAA;AAAzB,wDAAsB;iCAAtB,sBAAsB;IAJlC,IAAA,eAAM,EAAC;QACN,SAAS,EAAE,CAAC,oDAAuB,CAAC;QACpC,OAAO,EAAE,CAAC,oDAAuB,CAAC;KACnC,CAAC;GACW,sBAAsB,CAAG"}
@@ -0,0 +1,37 @@
1
+ import { PutLogEventDto } from './dtos/put-log-event.dto';
2
+ export declare class CloudWatchLoggerService {
3
+ private cloudWatchClient;
4
+ constructor();
5
+ /**
6
+ * Creates a log stream in the specified log group.
7
+ *
8
+ * @param logGroupName - The name of the log group.
9
+ * @param logStreamName - The name of the log stream.
10
+ * @returns A promise that resolves to the response from creating the log stream.
11
+ * @throws UnprocessableEntityException if there is an error creating the log stream.
12
+ */
13
+ createLogStream(logGroupName: string, logStreamName: string): Promise<any>;
14
+ /**
15
+ * Writes log events to a CloudWatch log stream.
16
+ * @param data - The log event data.
17
+ * @returns A promise that resolves with the response from CloudWatch.
18
+ */
19
+ putLogEvents(data: PutLogEventDto): Promise<any>;
20
+ /**
21
+ * Retrieves the sequence token for a given log stream in a log group.
22
+ * @param logGroupName - The name of the log group.
23
+ * @param logStreamName - The name of the log stream.
24
+ * @returns A promise that resolves to the sequence token of the log stream.
25
+ * @throws {UnprocessableEntityException} If there is an error retrieving the sequence token.
26
+ */
27
+ getSequenceTokenForLogStream(logGroupName: string, logStreamName: string): Promise<string>;
28
+ /**
29
+ * Retrieves log events from CloudWatch Logs based on the specified log group name and query.
30
+ * @param logGroupName - The name of the log group.
31
+ * @param query - The query string used to filter log events.
32
+ * @returns A promise that resolves to an array of log event results.
33
+ * @throws UnprocessableEntityException if there is an error retrieving the logs.
34
+ */
35
+ getLogEvents(logGroupName: string, query: string): Promise<any>;
36
+ }
37
+ //# sourceMappingURL=cloud-water-logger.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cloud-water-logger.service.d.ts","sourceRoot":"","sources":["../../src/cloud-watch-logger/cloud-water-logger.service.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE1D,qBACa,uBAAuB;IAClC,OAAO,CAAC,gBAAgB,CAAuB;;IAY/C;;;;;;;OAOG;IACG,eAAe,CAAC,YAAY,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;IAiBhF;;;;OAIG;IACG,YAAY,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC;IAmCtD;;;;;;OAMG;IACG,4BAA4B,CAAC,YAAY,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAoBhG;;;;;;OAMG;IACG,YAAY,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;CAkCtE"}
@@ -0,0 +1,147 @@
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.CloudWatchLoggerService = void 0;
13
+ const client_cloudwatch_logs_1 = require("@aws-sdk/client-cloudwatch-logs");
14
+ const common_1 = require("@nestjs/common");
15
+ let CloudWatchLoggerService = class CloudWatchLoggerService {
16
+ constructor() {
17
+ this.cloudWatchClient = new client_cloudwatch_logs_1.CloudWatchLogsClient({
18
+ region: 'ap-south-1',
19
+ credentials: {
20
+ accessKeyId: process.env.AWS_ACCESS_KEY_ID,
21
+ secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY,
22
+ },
23
+ });
24
+ }
25
+ /**
26
+ * Creates a log stream in the specified log group.
27
+ *
28
+ * @param logGroupName - The name of the log group.
29
+ * @param logStreamName - The name of the log stream.
30
+ * @returns A promise that resolves to the response from creating the log stream.
31
+ * @throws UnprocessableEntityException if there is an error creating the log stream.
32
+ */
33
+ async createLogStream(logGroupName, logStreamName) {
34
+ const params = {
35
+ logGroupName,
36
+ logStreamName,
37
+ };
38
+ try {
39
+ const command = new client_cloudwatch_logs_1.CreateLogStreamCommand(params);
40
+ const response = await this.cloudWatchClient.send(command);
41
+ return response;
42
+ }
43
+ catch (error) {
44
+ throw new common_1.UnprocessableEntityException(`Error creating log stream ${params.logGroupName}-${params.logStreamName}`, error);
45
+ }
46
+ }
47
+ /**
48
+ * Writes log events to a CloudWatch log stream.
49
+ * @param data - The log event data.
50
+ * @returns A promise that resolves with the response from CloudWatch.
51
+ */
52
+ async putLogEvents(data) {
53
+ const sequenceToken = await this.getSequenceTokenForLogStream(data.logGroupName, data.logStreamName);
54
+ const params = {
55
+ logGroupName: data.logGroupName,
56
+ logStreamName: data.logStreamName,
57
+ logEvents: [
58
+ {
59
+ message: data.message,
60
+ timestamp: Date.now(),
61
+ },
62
+ ],
63
+ sequenceToken,
64
+ };
65
+ try {
66
+ const command = new client_cloudwatch_logs_1.PutLogEventsCommand(params);
67
+ const response = await this.cloudWatchClient.send(command);
68
+ return response;
69
+ }
70
+ catch (error) {
71
+ if (error.name === 'ResourceNotFoundException') {
72
+ console.log('Log stream not found. Creating log stream...');
73
+ await this.createLogStream(data.logGroupName, data.logStreamName);
74
+ return this.putLogEvents(data);
75
+ }
76
+ else {
77
+ throw new common_1.UnprocessableEntityException(`Error logging message to ${params.logGroupName}-${params.logStreamName}`, error);
78
+ }
79
+ }
80
+ }
81
+ /**
82
+ * Retrieves the sequence token for a given log stream in a log group.
83
+ * @param logGroupName - The name of the log group.
84
+ * @param logStreamName - The name of the log stream.
85
+ * @returns A promise that resolves to the sequence token of the log stream.
86
+ * @throws {UnprocessableEntityException} If there is an error retrieving the sequence token.
87
+ */
88
+ async getSequenceTokenForLogStream(logGroupName, logStreamName) {
89
+ const params = {
90
+ logGroupName,
91
+ logStreamNamePrefix: logStreamName,
92
+ };
93
+ try {
94
+ const command = new client_cloudwatch_logs_1.DescribeLogStreamsCommand(params);
95
+ const response = await this.cloudWatchClient.send(command);
96
+ const logStream = response.logStreams.find((stream) => stream.logStreamName === logStreamName);
97
+ return logStream?.uploadSequenceToken || null;
98
+ }
99
+ catch (error) {
100
+ throw new common_1.UnprocessableEntityException(`Error getting sequence token for log stream ${logGroupName}-${logStreamName}`, error);
101
+ }
102
+ }
103
+ /**
104
+ * Retrieves log events from CloudWatch Logs based on the specified log group name and query.
105
+ * @param logGroupName - The name of the log group.
106
+ * @param query - The query string used to filter log events.
107
+ * @returns A promise that resolves to an array of log event results.
108
+ * @throws UnprocessableEntityException if there is an error retrieving the logs.
109
+ */
110
+ async getLogEvents(logGroupName, query) {
111
+ const params = {
112
+ logGroupName,
113
+ startTime: 0,
114
+ endTime: Date.now(),
115
+ queryString: query,
116
+ };
117
+ try {
118
+ const command = new client_cloudwatch_logs_1.StartQueryCommand(params);
119
+ const startQueryResponse = await this.cloudWatchClient.send(command);
120
+ // Polling for query results
121
+ let queryStatus;
122
+ let results;
123
+ do {
124
+ await new Promise((resolve) => setTimeout(resolve, 1000)); // Wait for 1 second before checking the query status
125
+ const getQueryResultsCommand = new client_cloudwatch_logs_1.GetQueryResultsCommand({
126
+ queryId: startQueryResponse.queryId,
127
+ });
128
+ const queryResults = await this.cloudWatchClient.send(getQueryResultsCommand);
129
+ queryStatus = queryResults.status;
130
+ if (queryStatus === 'Complete') {
131
+ results = queryResults.results;
132
+ break;
133
+ }
134
+ } while (queryStatus === 'Running' || queryStatus === 'Scheduled');
135
+ return results;
136
+ }
137
+ catch (error) {
138
+ throw new common_1.UnprocessableEntityException(`Error getting logs for log stream ${logGroupName}`, error);
139
+ }
140
+ }
141
+ };
142
+ exports.CloudWatchLoggerService = CloudWatchLoggerService;
143
+ exports.CloudWatchLoggerService = CloudWatchLoggerService = __decorate([
144
+ (0, common_1.Injectable)(),
145
+ __metadata("design:paramtypes", [])
146
+ ], CloudWatchLoggerService);
147
+ //# sourceMappingURL=cloud-water-logger.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cloud-water-logger.service.js","sourceRoot":"","sources":["../../src/cloud-watch-logger/cloud-water-logger.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4EAayC;AACzC,2CAA0E;AAInE,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;IAGlC;QACE,IAAI,CAAC,gBAAgB,GAAG,IAAI,6CAAoB,CAAC;YAC/C,MAAM,EAAE,YAAY;YACpB,WAAW,EAAE;gBACX,WAAW,EAAE,OAAO,CAAC,GAAG,CAAC,iBAAiB;gBAC1C,eAAe,EAAE,OAAO,CAAC,GAAG,CAAC,qBAAqB;aACnD;SACF,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,eAAe,CAAC,YAAoB,EAAE,aAAqB;QAC/D,MAAM,MAAM,GAAgC;YAC1C,YAAY;YACZ,aAAa;SACd,CAAC;QACF,IAAI,CAAC;YACH,MAAM,OAAO,GAAG,IAAI,+CAAsB,CAAC,MAAM,CAAC,CAAC;YACnD,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YAC3D,OAAO,QAAQ,CAAC;QAClB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,IAAI,qCAA4B,CACp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AE,kBAAkB,CAAC,OAAO;iBACpC,CAAC,CAAC;gBACH,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;gBAC9E,WAAW,GAAG,YAAY,CAAC,MAAM,CAAC;gBAClC,IAAI,WAAW,KAAK,UAAU,EAAE,CAAC;oBAC/B,OAAO,GAAG,YAAY,CAAC,OAAO,CAAC;oBAC/B,MAAM;gBACR,CAAC;YACH,CAAC,QAAQ,WAAW,KAAK,SAAS,IAAI,WAAW,KAAK,WAAW,EAAE;YAEnE,OAAO,OAAO,CAAC;QACjB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,IAAI,qCAA4B,CACpC,qCAAqC,YAAY,EAAE,EACnD,KAAK,CACN,CAAC;QACJ,CAAC;IACH,CAAC;CACF,CAAA;AAlJY,0DAAuB;kCAAvB,uBAAuB;IADnC,IAAA,mBAAU,GAAE;;GACA,uBAAuB,CAkJnC"}
@@ -0,0 +1,6 @@
1
+ export declare class PutLogEventDto {
2
+ logGroupName: string;
3
+ logStreamName: string;
4
+ message: string;
5
+ }
6
+ //# sourceMappingURL=put-log-event.dto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"put-log-event.dto.d.ts","sourceRoot":"","sources":["../../../src/cloud-watch-logger/dtos/put-log-event.dto.ts"],"names":[],"mappings":"AAEA,qBAAa,cAAc;IAEzB,YAAY,EAAE,MAAM,CAAC;IAGrB,aAAa,EAAE,MAAM,CAAC;IAGtB,OAAO,EAAE,MAAM,CAAC;CACjB"}
@@ -0,0 +1,29 @@
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.PutLogEventDto = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ class PutLogEventDto {
15
+ }
16
+ exports.PutLogEventDto = PutLogEventDto;
17
+ __decorate([
18
+ (0, class_validator_1.IsNotEmpty)(),
19
+ __metadata("design:type", String)
20
+ ], PutLogEventDto.prototype, "logGroupName", void 0);
21
+ __decorate([
22
+ (0, class_validator_1.IsNotEmpty)(),
23
+ __metadata("design:type", String)
24
+ ], PutLogEventDto.prototype, "logStreamName", void 0);
25
+ __decorate([
26
+ (0, class_validator_1.IsNotEmpty)(),
27
+ __metadata("design:type", String)
28
+ ], PutLogEventDto.prototype, "message", void 0);
29
+ //# sourceMappingURL=put-log-event.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"put-log-event.dto.js","sourceRoot":"","sources":["../../../src/cloud-watch-logger/dtos/put-log-event.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA6C;AAE7C,MAAa,cAAc;CAS1B;AATD,wCASC;AAPC;IADC,IAAA,4BAAU,GAAE;;oDACQ;AAGrB;IADC,IAAA,4BAAU,GAAE;;qDACS;AAGtB;IADC,IAAA,4BAAU,GAAE;;+CACG"}
@@ -0,0 +1,3 @@
1
+ export * from './cloud-watch-logger.module';
2
+ export * from './cloud-water-logger.service';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cloud-watch-logger/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC"}
@@ -0,0 +1,19 @@
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("./cloud-watch-logger.module"), exports);
18
+ __exportStar(require("./cloud-water-logger.service"), exports);
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cloud-watch-logger/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8DAA4C;AAC5C,+DAA6C"}
@@ -58,6 +58,7 @@ export interface TenantDetails {
58
58
  paymentCredentials?: PaymentCredentials[];
59
59
  masterInstitutionId?: string;
60
60
  masterInstitutionUniqueId?: number;
61
+ twoFactorAuthEnabled: boolean;
61
62
  }
62
63
  export interface SmtpConfig {
63
64
  host: string;
@@ -1 +1 @@
1
- {"version":3,"file":"context.interface.d.ts","sourceRoot":"","sources":["../../../src/common/interfaces/context.interface.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,QAAQ,MAAM,UAAU,CAAC;AACrC,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAExE,MAAM,WAAW,QAAQ;IACvB,GAAG,EAAE;QACH,GAAG,EAAE,MAAM,CAAC;QACZ,MAAM,EAAE,MAAM,CAAC;QACf,OAA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ACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B"}
1
+ {"version":3,"file":"context.interface.d.ts","sourceRoot":"","sources":["../../../src/common/interfaces/context.interface.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,QAAQ,MAAM,UAAU,CAAC;AACrC,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAExE,MAAM,WAAW,QAAQ;IACvB,GAAG,EAAE;QACH,GAAG,EAAE,MAAM,CAAC;QACZ,MAAM,EAAE,MAAM,CAAC;QACf,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;IACF,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,OAAO,CAAC,EAAE;QACR,SAAS,EAAE,MAAM,CAAC;QAClB,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;IACF,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,WAAW,CAAC,EAAE,YAAY,CAAC;IAC3B,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,MAAM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;IACpB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,cAAc;IAC7B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B"}
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ export * from './cloud-watch-logger';
1
2
  export * from './common';
2
3
  export * from './domain';
3
4
  export * from './permissions';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC"}
package/dist/index.js CHANGED
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./cloud-watch-logger"), exports);
17
18
  __exportStar(require("./common"), exports);
18
19
  __exportStar(require("./domain"), exports);
19
20
  __exportStar(require("./permissions"), exports);
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,2CAAyB;AACzB,gDAA8B;AAC9B,kDAAgC;AAChC,0CAAwB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAqC;AACrC,2CAAyB;AACzB,2CAAyB;AACzB,gDAA8B;AAC9B,kDAAgC;AAChC,0CAAwB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@campxdev/server-shared",
3
- "version": "1.3.40",
3
+ "version": "1.3.41",
4
4
  "description": "Campx server shared files",
5
5
  "main": "dist/index.js",
6
6
  "license": "MIT",
@@ -20,6 +20,7 @@
20
20
  },
21
21
  "dependencies": {
22
22
  "@aws-sdk/client-cloudwatch": "^3.504.0",
23
+ "@aws-sdk/client-cloudwatch-logs": "^3.511.0",
23
24
  "@nestjs/common": "^9.3.9",
24
25
  "@nestjs/core": "^9.3.9",
25
26
  "@nestjs/microservices": "^9.3.9",