@yolo-croket-dev/amqp-access 0.0.90-jun.27 → 0.0.90-jun.29
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/coupon-server/dto/issued-coupon/query/get-selected-issued-coupons-by-ids.dto.d.ts +11 -0
- package/coupon-server/dto/issued-coupon/query/get-selected-issued-coupons-by-ids.dto.js +32 -0
- package/coupon-server/dto/issued-coupon/query/index.d.ts +1 -0
- package/coupon-server/dto/issued-coupon/query/index.js +1 -0
- package/coupon-server/services/amqp.issued-coupon.service.d.ts +2 -1
- package/coupon-server/services/amqp.issued-coupon.service.js +3 -0
- package/package.json +1 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IssuedCouponEntity } from '@yolo-croket-dev/entity/src/issued-coupon/issued-coupon.entity';
|
|
2
|
+
export declare class GetSelectedIssuedCouponsByIdsPayload {
|
|
3
|
+
issuedCouponIds: string[];
|
|
4
|
+
/** 검색 포함 필드 */
|
|
5
|
+
includeFields: string[];
|
|
6
|
+
/** 검색 제외 필드 */
|
|
7
|
+
excludeFields?: string[];
|
|
8
|
+
}
|
|
9
|
+
export declare class GetSelectedIssuedCouponsByIdsResult {
|
|
10
|
+
issuedCoupons: IssuedCouponEntity[];
|
|
11
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
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.GetSelectedIssuedCouponsByIdsResult = exports.GetSelectedIssuedCouponsByIdsPayload = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
class GetSelectedIssuedCouponsByIdsPayload {
|
|
15
|
+
}
|
|
16
|
+
__decorate([
|
|
17
|
+
(0, class_validator_1.IsMongoId)({ each: true }),
|
|
18
|
+
__metadata("design:type", Array)
|
|
19
|
+
], GetSelectedIssuedCouponsByIdsPayload.prototype, "issuedCouponIds", void 0);
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, class_validator_1.IsString)({ each: true }),
|
|
22
|
+
__metadata("design:type", Array)
|
|
23
|
+
], GetSelectedIssuedCouponsByIdsPayload.prototype, "includeFields", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, class_validator_1.IsOptional)(),
|
|
26
|
+
(0, class_validator_1.IsString)({ each: true }),
|
|
27
|
+
__metadata("design:type", Array)
|
|
28
|
+
], GetSelectedIssuedCouponsByIdsPayload.prototype, "excludeFields", void 0);
|
|
29
|
+
exports.GetSelectedIssuedCouponsByIdsPayload = GetSelectedIssuedCouponsByIdsPayload;
|
|
30
|
+
class GetSelectedIssuedCouponsByIdsResult {
|
|
31
|
+
}
|
|
32
|
+
exports.GetSelectedIssuedCouponsByIdsResult = GetSelectedIssuedCouponsByIdsResult;
|
|
@@ -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("./check-can-use-coupon-for-payment.dto"), exports);
|
|
18
|
+
__exportStar(require("./get-selected-issued-coupons-by-ids.dto"), exports);
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { ClientProxy } from '@nestjs/microservices';
|
|
2
2
|
import { AbstractParam } from '@yolo-croket-dev/core';
|
|
3
|
-
import { CheckCanUseCouponForPaymentPayload } from '../dto/issued-coupon';
|
|
3
|
+
import { CheckCanUseCouponForPaymentPayload, GetSelectedIssuedCouponsByIdsPayload, GetSelectedIssuedCouponsByIdsResult } from '../dto/issued-coupon';
|
|
4
4
|
export declare class AmqpIssuedCouponService {
|
|
5
5
|
private readonly client;
|
|
6
6
|
private readonly amqpManager;
|
|
7
7
|
constructor(client: ClientProxy);
|
|
8
8
|
checkCanUseCouponForPayment(payload: CheckCanUseCouponForPaymentPayload, param: AbstractParam): Promise<void>;
|
|
9
|
+
getSelectedIssuedCouponsByIds(payload: GetSelectedIssuedCouponsByIdsPayload, param: AbstractParam): Promise<GetSelectedIssuedCouponsByIdsResult>;
|
|
9
10
|
}
|
|
@@ -24,6 +24,9 @@ let AmqpIssuedCouponService = class AmqpIssuedCouponService {
|
|
|
24
24
|
async checkCanUseCouponForPayment(payload, param) {
|
|
25
25
|
return this.amqpManager.call('결제시 해당 쿠폰 사용가능한지 체크', 'coupon-template.get.datas-for-item-max-discount-coupon', payload, param, { isErrorThrowing: true });
|
|
26
26
|
}
|
|
27
|
+
async getSelectedIssuedCouponsByIds(payload, param) {
|
|
28
|
+
return this.amqpManager.call('발급된 쿠폰 중 선택한 데이터만 가져오기', 'issued-coupon.get.selected-issued-coupons-by-ids', payload, param, { isErrorThrowing: true });
|
|
29
|
+
}
|
|
27
30
|
};
|
|
28
31
|
AmqpIssuedCouponService = __decorate([
|
|
29
32
|
(0, common_1.Injectable)(),
|