@yolo-croket-dev/amqp-access 0.5.60-jun.4 → 0.5.60-jun.5

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 './issued-receipt-coupon-cron';
@@ -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("./issued-receipt-coupon-cron"), exports);
@@ -0,0 +1 @@
1
+ export * from './send-noti-expired-issued-receipt-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("./send-noti-expired-issued-receipt-coupon.dto"), exports);
@@ -0,0 +1,8 @@
1
+ export declare class SendNotiExpiredIssuedReceiptCouponPayload {
2
+ /**
3
+ * @description 만료일 날짜 (한국시간 기준)
4
+ * @형식 YYYY-MM-DD
5
+ * @예시 2025-08-13 -> 2025-08-13에 만료되는 쿠폰만 조회
6
+ * */
7
+ expiredDate: string;
8
+ }
@@ -0,0 +1,20 @@
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.SendNotiExpiredIssuedReceiptCouponPayload = void 0;
13
+ const decorator_1 = require("@yolo-croket-dev/amqp-access/decorator");
14
+ class SendNotiExpiredIssuedReceiptCouponPayload {
15
+ }
16
+ __decorate([
17
+ (0, decorator_1.IsYyyyMmDd)(),
18
+ __metadata("design:type", String)
19
+ ], SendNotiExpiredIssuedReceiptCouponPayload.prototype, "expiredDate", void 0);
20
+ exports.SendNotiExpiredIssuedReceiptCouponPayload = SendNotiExpiredIssuedReceiptCouponPayload;
@@ -1 +1,2 @@
1
1
  export * from './is-iso-8601-utc.decorator';
2
+ export * from './is-yyyy-mm-dd.decorator';
@@ -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("./is-iso-8601-utc.decorator"), exports);
18
+ __exportStar(require("./is-yyyy-mm-dd.decorator"), exports);
@@ -0,0 +1,10 @@
1
+ import { ValidationOptions } from 'class-validator';
2
+ /**
3
+ * @author jun
4
+ * YYYY-MM-DD 형식을 검증하는 데코레이터
5
+ *
6
+ * @example
7
+ * @IsYyyyMmDd()
8
+ * date: string; // "2025-08-13"
9
+ */
10
+ export declare function IsYyyyMmDd(validationOptions?: ValidationOptions): (object: object, propertyName: string) => void;
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.IsYyyyMmDd = void 0;
4
+ const class_validator_1 = require("class-validator");
5
+ /**
6
+ * @author jun
7
+ * YYYY-MM-DD 형식을 검증하는 데코레이터
8
+ *
9
+ * @example
10
+ * @IsYyyyMmDd()
11
+ * date: string; // "2025-08-13"
12
+ */
13
+ function IsYyyyMmDd(validationOptions) {
14
+ return function (object, propertyName) {
15
+ (0, class_validator_1.registerDecorator)({
16
+ name: 'isYyyyMmDd',
17
+ target: object.constructor,
18
+ propertyName,
19
+ options: validationOptions,
20
+ validator: {
21
+ validate(value) {
22
+ if (typeof value !== 'string') {
23
+ return false;
24
+ }
25
+ // YYYY-MM-DD 형식 검증
26
+ const yyyyMmDdRegex = /^\d{4}-\d{2}-\d{2}$/;
27
+ if (!yyyyMmDdRegex.test(value)) {
28
+ return false;
29
+ }
30
+ // 실제로 유효한 날짜인지 확인 (예: 2025-02-30 같은 잘못된 날짜 방지)
31
+ const date = new Date(value);
32
+ const [year, month, day,] = value.split('-').map(Number);
33
+ // Date 객체는 2025-02-30을 2025-03-02로 자동 변환하므로,
34
+ // 생성된 날짜의 년/월/일이 입력된 년/월/일과 일치하는지 확인해야 함
35
+ return (date.getFullYear() === year
36
+ && date.getMonth() === month - 1 // getMonth()는 0부터 시작
37
+ && date.getDate() === day);
38
+ },
39
+ defaultMessage(args) {
40
+ return `${args.property}는 YYYY-MM-DD 형식(예: 2025-08-13)이어야 합니다.`;
41
+ },
42
+ },
43
+ });
44
+ };
45
+ }
46
+ exports.IsYyyyMmDd = IsYyyyMmDd;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yolo-croket-dev/amqp-access",
3
- "version": "0.5.60-jun.4",
3
+ "version": "0.5.60-jun.5",
4
4
  "main": "index.js",
5
5
  "author": "Yolo Co., Ltd.",
6
6
  "description": "크로켓 amqp-access npm",