@yolo-croket-dev/amqp-access 0.5.94 → 0.5.95

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 @@
1
+ export * from './issue-daily-random-coupon.dto';
@@ -0,0 +1,17 @@
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("./issue-daily-random-coupon.dto"), exports);
@@ -0,0 +1,14 @@
1
+ import { CouponDiscountTypeEnum } from '@yolo-croket-dev/entity/src/coupon-template';
2
+ export declare class IssueDailyRandomCouponPayload {
3
+ dailyRandomCouponId: string;
4
+ }
5
+ export interface IssueDailyRandomCouponResult {
6
+ isSuccess: boolean;
7
+ issuedCoupon: {
8
+ couponCode: string;
9
+ discountType: CouponDiscountTypeEnum;
10
+ discountRate?: number;
11
+ discountValue?: number;
12
+ };
13
+ errorCode?: string;
14
+ }
@@ -9,18 +9,12 @@ var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.PushRedisDBPayload = void 0;
12
+ exports.IssueDailyRandomCouponPayload = void 0;
13
13
  const class_validator_1 = require("class-validator");
14
- class PushRedisDBPayload {
14
+ class IssueDailyRandomCouponPayload {
15
15
  }
16
- exports.PushRedisDBPayload = PushRedisDBPayload;
16
+ exports.IssueDailyRandomCouponPayload = IssueDailyRandomCouponPayload;
17
17
  __decorate([
18
- (0, class_validator_1.IsString)(),
19
- (0, class_validator_1.MinLength)(1),
18
+ (0, class_validator_1.IsMongoId)(),
20
19
  __metadata("design:type", String)
21
- ], PushRedisDBPayload.prototype, "redisDBKey", void 0);
22
- __decorate([
23
- (0, class_validator_1.IsString)(),
24
- (0, class_validator_1.MinLength)(1),
25
- __metadata("design:type", String)
26
- ], PushRedisDBPayload.prototype, "value", void 0);
20
+ ], IssueDailyRandomCouponPayload.prototype, "dailyRandomCouponId", void 0);
@@ -1 +1,2 @@
1
1
  export * from './query';
2
+ export * from './command';
@@ -15,3 +15,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./query"), exports);
18
+ __exportStar(require("./command"), exports);
@@ -1,7 +1,7 @@
1
1
  import { ClientProxy } from '@nestjs/microservices';
2
2
  import { AbstractParam } from '@yolo-croket-dev/core';
3
3
  import { GetUseableIssuedCouponsPayload, GetUseableIssuedCouponsResult, IssueCouponPayload } from '@yolo-croket-dev/dto-v2/coupon-server';
4
- import { CheckCanUseCouponForPaymentPayload, GetSelectedIssuedCouponsByIdsPayload, GetSelectedIssuedCouponsByIdsResult, GetMyLimitItemIssuedCouponsPayload, GetMyLimitItemIssuedCouponsResult, GetBindIssuedCouponForPaymentPayload, GetBindIssuedCouponForPaymentResult, GetItemIdsForSeduceAddCartResult } from '../dto/issued-coupon';
4
+ import { CheckCanUseCouponForPaymentPayload, GetSelectedIssuedCouponsByIdsPayload, GetSelectedIssuedCouponsByIdsResult, GetMyLimitItemIssuedCouponsPayload, GetMyLimitItemIssuedCouponsResult, GetBindIssuedCouponForPaymentPayload, GetBindIssuedCouponForPaymentResult, GetItemIdsForSeduceAddCartResult, IssueDailyRandomCouponPayload, IssueDailyRandomCouponResult } from '../dto/issued-coupon';
5
5
  export declare class AmqpIssuedCouponService {
6
6
  private readonly client;
7
7
  private readonly amqpManager;
@@ -13,4 +13,5 @@ export declare class AmqpIssuedCouponService {
13
13
  getBindIssuedCouponForPayment(payload: GetBindIssuedCouponForPaymentPayload, param: AbstractParam): Promise<GetBindIssuedCouponForPaymentResult>;
14
14
  getItemIdsForSeduceAddCart(payload: void, param: AbstractParam): Promise<GetItemIdsForSeduceAddCartResult>;
15
15
  issueCoupon(payload: IssueCouponPayload, param: AbstractParam): Promise<void>;
16
+ issueDailyRandomCoupon(payload: IssueDailyRandomCouponPayload, param: AbstractParam): Promise<IssueDailyRandomCouponResult>;
16
17
  }
@@ -42,6 +42,9 @@ let AmqpIssuedCouponService = class AmqpIssuedCouponService {
42
42
  async issueCoupon(payload, param) {
43
43
  return this.amqpManager.call('쿠폰 발급', 'issued-coupon.issue', payload, param, { isErrorThrowing: true });
44
44
  }
45
+ async issueDailyRandomCoupon(payload, param) {
46
+ return this.amqpManager.call('일일 랜덤 쿠폰 발급', 'issued-coupon.issue.daily-random-coupon', payload, param, { isErrorThrowing: true });
47
+ }
45
48
  };
46
49
  exports.AmqpIssuedCouponService = AmqpIssuedCouponService;
47
50
  exports.AmqpIssuedCouponService = AmqpIssuedCouponService = __decorate([
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yolo-croket-dev/amqp-access",
3
- "version": "0.5.94",
3
+ "version": "0.5.95",
4
4
  "main": "index.js",
5
5
  "author": "Yolo Co., Ltd.",
6
6
  "description": "크로켓 amqp-access npm",
@@ -22,7 +22,7 @@
22
22
  "@yolo-croket-dev/domain": "^0.2.12",
23
23
  "@yolo-croket-dev/dto-v2": "^0.1.10",
24
24
  "@yolo-croket-dev/entity": "^0.2.24",
25
- "@yolo-croket-dev/entity-v2": "^0.2.35",
25
+ "@yolo-croket-dev/entity-v2": "^0.2.38",
26
26
  "class-transformer": "^0.5.1",
27
27
  "class-validator": "^0.13.2",
28
28
  "dotenv": "^16.3.1"
@@ -1,3 +0,0 @@
1
- import { PushRedisDBPayload } from './push-redis-db.dto';
2
- export declare class PullRedisDBPayload extends PushRedisDBPayload {
3
- }
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PullRedisDBPayload = void 0;
4
- const push_redis_db_dto_1 = require("./push-redis-db.dto");
5
- class PullRedisDBPayload extends push_redis_db_dto_1.PushRedisDBPayload {
6
- }
7
- exports.PullRedisDBPayload = PullRedisDBPayload;
@@ -1,4 +0,0 @@
1
- export declare class PushRedisDBPayload {
2
- redisDBKey: string;
3
- value: string;
4
- }