@yolo-croket-dev/entity-v2 0.3.52 → 0.3.54-beta.1
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/index.d.ts +1 -0
- package/index.js +1 -0
- package/notification-campaign/index.d.ts +30 -0
- package/notification-campaign/index.js +2 -0
- package/package.json +2 -2
- package/purchased-info/purchased-info-for-seller.entity.d.ts +2 -0
- package/purchased-info/purchased-info.entity.d.ts +8 -0
- package/AGENTS.md +0 -50
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -99,3 +99,4 @@ __exportStar(require("./store-item-pending-settle"), exports);
|
|
|
99
99
|
__exportStar(require("./store-pending-settle"), exports);
|
|
100
100
|
__exportStar(require("./admin-settlement-limit"), exports);
|
|
101
101
|
__exportStar(require("./settle-adjustment-plan"), exports);
|
|
102
|
+
__exportStar(require("./notification-campaign"), exports);
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author jun
|
|
3
|
+
* @description 캠페인별 수신자 불변 메시지와 발송 상태
|
|
4
|
+
* @process 등록 → 원자적 선점 → 푸시 → 결과 저장
|
|
5
|
+
*/
|
|
6
|
+
export interface NotificationCampaignMessage {
|
|
7
|
+
userId: string;
|
|
8
|
+
itemId: string;
|
|
9
|
+
couponCode: string;
|
|
10
|
+
pushTitle: string;
|
|
11
|
+
pushBody: string;
|
|
12
|
+
pushAppLink: string;
|
|
13
|
+
pushWebLink: string;
|
|
14
|
+
pushImage: string;
|
|
15
|
+
}
|
|
16
|
+
export type NotificationCampaignStatus = 'ready' | 'sending' | 'accepted' | 'failed' | 'unknown' | 'skipped';
|
|
17
|
+
export interface NotificationCampaignRecipientEntity {
|
|
18
|
+
_id: string;
|
|
19
|
+
campaignId: string;
|
|
20
|
+
snapshotHash: string;
|
|
21
|
+
messageHash: string;
|
|
22
|
+
message: NotificationCampaignMessage;
|
|
23
|
+
startsAt: string;
|
|
24
|
+
endsAt: string;
|
|
25
|
+
status: NotificationCampaignStatus;
|
|
26
|
+
reason: string;
|
|
27
|
+
providerRequestId?: string;
|
|
28
|
+
createdAt: Date;
|
|
29
|
+
updatedAt: Date;
|
|
30
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yolo-croket-dev/entity-v2",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.54-beta.1",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"author": "Yolo Co., Ltd.",
|
|
6
6
|
"description": "크로켓 nest 용 entity-v3",
|
|
@@ -23,4 +23,4 @@
|
|
|
23
23
|
},
|
|
24
24
|
"license": "UNLICENSED",
|
|
25
25
|
"dependencies": {}
|
|
26
|
-
}
|
|
26
|
+
}
|
|
@@ -15,6 +15,8 @@ export type UserInfoPickedForSeller = Pick<UserEntity, '_id' | 'username' | 'pho
|
|
|
15
15
|
export type PInfoPickedForSeller = Pick<PurchasedInfoEntity, '_id' | 'publicId' | 'process' | 'pOptionInfo' | 'proceedsInfo' | 'itemId' | 'pastName' | 'pastImg' | 'pastPrice' | 'deliveryMethod' | 'deliveryData' | 'paymentDate' | 'pastSellingInfo' | 'PCCCInfo' | 'cancelInfo' | 'requirement' | 'originPrice' | 'buyerInfo' | 'lastPartialRefundProcess' | 'lastPartialRefundId' | 'waitingReceiveInfo' | 'cancelledDate' | 'process_v2' | 'isPOptionChanged' | 'pInfoType' | 'isSplitDelivery' | 'splitDeliveryDataList' | 'remainingShipQuantity' | 'refundWaitingInfo' |
|
|
16
16
|
/** Original/Additional을 목록 UI에서 물리적 Bundle 병합 없이 묶기 위한 관계 정보 */
|
|
17
17
|
'additionalPaymentRequestInfo' | 'additionalPaymentInfo'> & {
|
|
18
|
+
/** 구매건의 payTryLogId_v2를 문자열로 반환한다. 해당 값이 없는 기존 주문은 생략한다. */
|
|
19
|
+
payTryLogId?: string;
|
|
18
20
|
/** 주문 당시 상품 키워드 스냅샷 */
|
|
19
21
|
itemKeywords?: StoreItemKeyword[];
|
|
20
22
|
/** 해당 거래의 완료 인증에 연결된 6자리 OTP. 미인증·이전 주문은 생략한다. */
|
|
@@ -191,12 +191,20 @@ export interface AdditionalPaymentRequestInfo {
|
|
|
191
191
|
additionalPaymentCalculationGuide: string;
|
|
192
192
|
requestedManagerId: Types.ObjectId | string;
|
|
193
193
|
requestedDate: Date;
|
|
194
|
+
/** 신규 추가금 요청의 3일 자동 환불 대상 기준 시각. 과거 데이터 호환을 위해 optional이다. */
|
|
195
|
+
additionalPaymentDueDate?: Date;
|
|
196
|
+
/** 3일 만료 크론이 Parent 환불을 선점한 시각이다. */
|
|
197
|
+
additionalPaymentExpiredDate?: Date;
|
|
198
|
+
/** 추가금 결제가 시작되지 않아 만료된 경우에만 기록한다. */
|
|
199
|
+
additionalPaymentExpiredReason?: 'NO_ADDITIONAL_PAYMENT';
|
|
194
200
|
/** 현재 유효한 추가금 결제 시도의 PTL. Original 환불 시 이 시도만 무효화한다. */
|
|
195
201
|
activeAdditionalPaymentPayTryLogId?: Types.ObjectId | string;
|
|
196
202
|
/** 여러 init 중 현재 Original을 선점한 결제 시도 토큰. 이전 결제창 callback을 무효화한다. */
|
|
197
203
|
activeAdditionalPaymentAttemptId?: Types.ObjectId | string;
|
|
198
204
|
/** 현재 Additional 결제 시도 토큰을 선점한 시각. 운영 추적 및 장애 복구에 사용한다. */
|
|
199
205
|
activeAdditionalPaymentInitDate?: Date;
|
|
206
|
+
/** PG 승인/입금 수락과 만료 환불이 동시에 진행되지 않도록 하는 짧은 lease다. */
|
|
207
|
+
paymentAcceptanceProcessingDate?: Date;
|
|
200
208
|
/** Original 환불로 활성 Additional PTL을 무효화한 시각. */
|
|
201
209
|
activeAdditionalPaymentInvalidatedDate?: Date;
|
|
202
210
|
/**
|
package/AGENTS.md
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
# ENTITY-V2 KNOWLEDGE BASE
|
|
2
|
-
|
|
3
|
-
## OVERVIEW
|
|
4
|
-
|
|
5
|
-
Mongo 영속 모델과 서비스 contract가 공유하는 최신 entity interface 중심 패키지다. 신규 entity의 우선 위치지만 legacy `entity`와 양방향 호환 import가 남아 있어 일괄 분리하지 않는다.
|
|
6
|
-
|
|
7
|
-
## STRUCTURE
|
|
8
|
-
|
|
9
|
-
```text
|
|
10
|
-
entity-v2/
|
|
11
|
-
├── index.ts # 약 80개 domain public export
|
|
12
|
-
├── <domain>/index.ts
|
|
13
|
-
├── <domain>/*.entity.ts
|
|
14
|
-
└── <domain>.modules/ # 세부 bounded context
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
대형 호환 surface는 `store-item/store-item.entity.ts`, `purchased-info/purchased-info.entity.ts`; 수정 전 `@deprecated` 필드와 legacy import를 먼저 확인한다.
|
|
18
|
-
|
|
19
|
-
## WHERE TO LOOK
|
|
20
|
-
|
|
21
|
-
| 작업 | 위치 | 확인 |
|
|
22
|
-
|---|---|---|
|
|
23
|
-
| 신규 Mongo entity | `<domain>/*.entity.ts` | 실제 schema field/type/nullability |
|
|
24
|
-
| Public export | `<domain>/index.ts`, root `index.ts` | named/type export 호환성 |
|
|
25
|
-
| Legacy 결합 | `packages/entity`, v2의 legacy imports | 양방향 dependency 확대 여부 |
|
|
26
|
-
| 대형 commerce 모델 | `store-item`, `purchased-info`, `refund`, `cart` | deprecated 대체 필드 |
|
|
27
|
-
|
|
28
|
-
## CONVENTIONS
|
|
29
|
-
|
|
30
|
-
- 실제 DB 문서를 표현하는 서비스의 Mongoose `@Schema` class는 이 패키지의 대응 interface를 `implements`해야 한다.
|
|
31
|
-
- `_id`, `ObjectId|string`, optional, `null`, array element type을 실제 저장 shape와 정확히 맞춘다.
|
|
32
|
-
- 신규 domain은 local `index.ts`와 root barrel을 함께 갱신하되 기존 namespace/named export를 깨지 않는다.
|
|
33
|
-
- 기존 v2→legacy import는 호환성 경계로 취급한다. 신규 reverse dependency는 소비 영향 근거 없이 추가하지 않는다.
|
|
34
|
-
- 제거 예정 필드는 `@deprecated`와 대체 필드 설명을 유지한다.
|
|
35
|
-
|
|
36
|
-
## ANTI-PATTERNS
|
|
37
|
-
|
|
38
|
-
- DTO/response 전용 임시 shape를 영속 entity로 추가하지 않는다.
|
|
39
|
-
- Deprecated 필드를 신규 feature의 정식 모델로 사용하지 않는다.
|
|
40
|
-
- Legacy field를 소비자와 migration 확인 없이 삭제하거나 type을 축소하지 않는다.
|
|
41
|
-
- `dist`, `.d.ts`, 생성 JS를 source 대신 수정하지 않는다.
|
|
42
|
-
|
|
43
|
-
## VERIFY
|
|
44
|
-
|
|
45
|
-
```bash
|
|
46
|
-
yarn workspace @yolo-croket-dev/entity-v2 build
|
|
47
|
-
yarn workspace @yolo-croket-dev/entity-v2 lint
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
Entity 변경은 `entity`, `dto-v2`, AMQP contract와 실제 Mongoose schema 소비 서비스까지 의존 순서대로 검증한다.
|