@eventista/ticketing-common 1.0.68 → 1.0.69

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/README.md CHANGED
@@ -1,17 +1,17 @@
1
- # 1.Lệnh build
2
- ```bash
3
- npm run build
4
- ```
5
-
6
- # 2.Lệnh Push lên NPM
7
- ```bash
8
- npm publish
9
- ```
10
-
11
- # Tên thư viện
12
- @eventista/ticketing-common
13
-
14
- # Lệnh cài đặt thư viện
15
- ```bash
16
- npm install @eventista/ticketing-common
1
+ # 1.Lệnh build
2
+ ```bash
3
+ npm run build
4
+ ```
5
+
6
+ # 2.Lệnh Push lên NPM
7
+ ```bash
8
+ npm publish
9
+ ```
10
+
11
+ # Tên thư viện
12
+ @eventista/ticketing-common
13
+
14
+ # Lệnh cài đặt thư viện
15
+ ```bash
16
+ npm install @eventista/ticketing-common
17
17
  ```
@@ -253,12 +253,12 @@ let RedisService = class RedisService {
253
253
  }
254
254
  }
255
255
  async releaseLock(lockKey, value) {
256
- const script = `
257
- if redis.call("get", KEYS[1]) == ARGV[1] then
258
- return redis.call("del", KEYS[1])
259
- else
260
- return 0
261
- end
256
+ const script = `
257
+ if redis.call("get", KEYS[1]) == ARGV[1] then
258
+ return redis.call("del", KEYS[1])
259
+ else
260
+ return 0
261
+ end
262
262
  `;
263
263
  const result = await this.redis.eval(script, 1, lockKey, value);
264
264
  return result === 1;
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=dead-letter-queue.interfaces.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dead-letter-queue.interfaces.js","sourceRoot":"","sources":["../../../src/schemas/dead-letter-queue/dead-letter-queue.interfaces.ts"],"names":[],"mappings":""}
@@ -0,0 +1,19 @@
1
+ import { HydratedDocument } from 'mongoose';
2
+ import { BaseDocument, BaseSchema } from '../index';
3
+ export type DeadLetterQueueDocument = HydratedDocument<DeadLetterQueue> & BaseDocument;
4
+ export declare class DeadLetterQueue extends BaseSchema {
5
+ eventId: string;
6
+ exchange: string;
7
+ routingKey: string;
8
+ queueName: string;
9
+ message: string;
10
+ }
11
+ export declare const DeadLetterQueueSchema: import("mongoose").Schema<DeadLetterQueue, import("mongoose").Model<DeadLetterQueue, any, any, any, import("mongoose").Document<unknown, any, DeadLetterQueue, any> & DeadLetterQueue & {
12
+ _id: import("mongoose").Types.ObjectId;
13
+ } & {
14
+ __v: number;
15
+ }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, DeadLetterQueue, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<DeadLetterQueue>, {}> & import("mongoose").FlatRecord<DeadLetterQueue> & {
16
+ _id: import("mongoose").Types.ObjectId;
17
+ } & {
18
+ __v: number;
19
+ }>;
@@ -0,0 +1,62 @@
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.DeadLetterQueueSchema = exports.DeadLetterQueue = void 0;
13
+ const mongoose_1 = require("@nestjs/mongoose");
14
+ const index_1 = require("../index");
15
+ let DeadLetterQueue = class DeadLetterQueue extends index_1.BaseSchema {
16
+ };
17
+ exports.DeadLetterQueue = DeadLetterQueue;
18
+ __decorate([
19
+ (0, mongoose_1.Prop)({
20
+ required: true,
21
+ index: true,
22
+ }),
23
+ __metadata("design:type", String)
24
+ ], DeadLetterQueue.prototype, "eventId", void 0);
25
+ __decorate([
26
+ (0, mongoose_1.Prop)({
27
+ type: String,
28
+ default: '',
29
+ }),
30
+ __metadata("design:type", String)
31
+ ], DeadLetterQueue.prototype, "exchange", void 0);
32
+ __decorate([
33
+ (0, mongoose_1.Prop)({
34
+ type: String,
35
+ }),
36
+ __metadata("design:type", String)
37
+ ], DeadLetterQueue.prototype, "routingKey", void 0);
38
+ __decorate([
39
+ (0, mongoose_1.Prop)({
40
+ type: String,
41
+ default: '',
42
+ }),
43
+ __metadata("design:type", String)
44
+ ], DeadLetterQueue.prototype, "queueName", void 0);
45
+ __decorate([
46
+ (0, mongoose_1.Prop)({
47
+ type: String,
48
+ default: '',
49
+ }),
50
+ __metadata("design:type", String)
51
+ ], DeadLetterQueue.prototype, "message", void 0);
52
+ exports.DeadLetterQueue = DeadLetterQueue = __decorate([
53
+ (0, mongoose_1.Schema)({
54
+ collection: 'dead_letter_queues',
55
+ ...index_1.defaultSchemaOptions,
56
+ })
57
+ ], DeadLetterQueue);
58
+ exports.DeadLetterQueueSchema = mongoose_1.SchemaFactory.createForClass(DeadLetterQueue);
59
+ exports.DeadLetterQueueSchema.plugin(index_1.addUpdateHooks);
60
+ exports.DeadLetterQueueSchema.plugin(index_1.addSoftDeleteHooks);
61
+ exports.DeadLetterQueueSchema.index({ eventId: 1 });
62
+ //# sourceMappingURL=dead-letter-queue.schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dead-letter-queue.schema.js","sourceRoot":"","sources":["../../../src/schemas/dead-letter-queue/dead-letter-queue.schema.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAA+D;AAE/D,oCAA8G;AASvG,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,kBAAU;CAgC9C,CAAA;AAhCY,0CAAe;AAKxB;IAJC,IAAA,eAAI,EAAC;QACF,QAAQ,EAAE,IAAI;QACd,KAAK,EAAE,IAAI;KACd,CAAC;;gDACc;AAMhB;IAJC,IAAA,eAAI,EAAC;QACF,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,EAAE;KACd,CAAC;;iDACe;AAMjB;IAJC,IAAA,eAAI,EAAC;QACF,IAAI,EAAE,MAAM;KAEf,CAAC;;mDACiB;AAMnB;IAJC,IAAA,eAAI,EAAC;QACF,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,EAAE;KACd,CAAC;;kDACgB;AAQlB;IANC,IAAA,eAAI,EACD;QACI,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,EAAE;KACd,CACJ;;gDACe;0BA/BP,eAAe;IAJ3B,IAAA,iBAAM,EAAC;QACJ,UAAU,EAAE,oBAAoB;QAChC,GAAG,4BAAoB;KAC1B,CAAC;GACW,eAAe,CAgC3B;AAEY,QAAA,qBAAqB,GAAG,wBAAa,CAAC,cAAc,CAAC,eAAe,CAAC,CAAC;AACnF,6BAAqB,CAAC,MAAM,CAAC,sBAAc,CAAC,CAAC;AAC7C,6BAAqB,CAAC,MAAM,CAAC,0BAAkB,CAAC,CAAC;AAEjD,6BAAqB,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC"}