@yolo-croket-dev/entity-v2 0.3.54 → 0.3.56-sj

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 CHANGED
@@ -85,3 +85,4 @@ export * from './store-item-pending-settle';
85
85
  export * from './store-pending-settle';
86
86
  export * from './admin-settlement-limit';
87
87
  export * from './settle-adjustment-plan';
88
+ export * from './notification-campaign';
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
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yolo-croket-dev/entity-v2",
3
- "version": "0.3.54",
3
+ "version": "0.3.56-sj",
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
+ }
@@ -1246,6 +1246,31 @@ export interface CrawlerForwardingAgent {
1246
1246
  updatedByAdminId: Types.ObjectId | string;
1247
1247
  changeLogs: CrawlerForwardingAgentChangeLog[];
1248
1248
  }
1249
+ /** @description 현지구매중 자동 변경 정책 이력의 상태 전이 종류 */
1250
+ export declare enum AutoCheckingStockSellerPolicyHistoryActionEnum {
1251
+ REGISTER = "REGISTER",
1252
+ RELEASE = "RELEASE"
1253
+ }
1254
+ /** @description 현지구매중 자동 변경 대상 셀러의 현재 정책 */
1255
+ export interface AutoCheckingStockSellerPolicy {
1256
+ _id: Types.ObjectId | string;
1257
+ sellerId: Types.ObjectId | string;
1258
+ isActive: boolean;
1259
+ registeredAt: Date;
1260
+ registeredByAdminId: Types.ObjectId | string;
1261
+ releasedAt?: Date;
1262
+ releasedByAdminId?: Types.ObjectId | string;
1263
+ createdAt: Date;
1264
+ updatedAt: Date;
1265
+ }
1266
+ /** @description 현지구매중 자동 변경 정책의 append-only 감사 이력 */
1267
+ export interface AutoCheckingStockSellerPolicyHistory {
1268
+ _id: Types.ObjectId | string;
1269
+ sellerId: Types.ObjectId | string;
1270
+ action: AutoCheckingStockSellerPolicyHistoryActionEnum;
1271
+ changedAt: Date;
1272
+ changedByAdminId: Types.ObjectId | string;
1273
+ }
1249
1274
  /** @description 크롤링 상품 대신 주문 운영 정보 */
1250
1275
  export interface CrawlerProxyOrderInfo {
1251
1276
  /** 관리자 크롤러 사입 주문 목록 가림 여부 */
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PriceCompareAffiliateSettleStatusEnum = exports.PriceCompareAffiliateTypeEnum = exports.InsuranceProcessTypeEnum = exports.ShippingForwarderProviderEnum = exports.CrawlerProxyOrderForeignCurrencyEnum = exports.CrawlerProxyForwardingStatusEnum = exports.CrawlerProxyPurchaseStatusEnum = exports.PastSelectionFrameDataInfo = exports.RefundWaitingBuyerActionTypeEnum = exports.RefundWaitingReasonCode = exports.RefundWaitingStatusEnum = exports.PurchasedProcessV2Enum = exports.PurchasedProcessEnum = exports.UserTypeEnum = exports.TaxInvoiceIssueProcessEnum = exports.POptionTypeEnum = exports.PInfoTypeEnum = exports.ReservationCancelReasonEnum = exports.CardQuotaEnum = void 0;
3
+ exports.PriceCompareAffiliateSettleStatusEnum = exports.PriceCompareAffiliateTypeEnum = exports.InsuranceProcessTypeEnum = exports.AutoCheckingStockSellerPolicyHistoryActionEnum = exports.ShippingForwarderProviderEnum = exports.CrawlerProxyOrderForeignCurrencyEnum = exports.CrawlerProxyForwardingStatusEnum = exports.CrawlerProxyPurchaseStatusEnum = exports.PastSelectionFrameDataInfo = exports.RefundWaitingBuyerActionTypeEnum = exports.RefundWaitingReasonCode = exports.RefundWaitingStatusEnum = exports.PurchasedProcessV2Enum = exports.PurchasedProcessEnum = exports.UserTypeEnum = exports.TaxInvoiceIssueProcessEnum = exports.POptionTypeEnum = exports.PInfoTypeEnum = exports.ReservationCancelReasonEnum = exports.CardQuotaEnum = void 0;
4
4
  var CardQuotaEnum;
5
5
  (function (CardQuotaEnum) {
6
6
  CardQuotaEnum["\uC77C\uC2DC\uBD88"] = "00";
@@ -159,6 +159,12 @@ var ShippingForwarderProviderEnum;
159
159
  ShippingForwarderProviderEnum["GOBAESONG"] = "GOBAESONG";
160
160
  ShippingForwarderProviderEnum["HOOTTOWN"] = "HOOTTOWN";
161
161
  })(ShippingForwarderProviderEnum || (exports.ShippingForwarderProviderEnum = ShippingForwarderProviderEnum = {}));
162
+ /** @description 현지구매중 자동 변경 정책 이력의 상태 전이 종류 */
163
+ var AutoCheckingStockSellerPolicyHistoryActionEnum;
164
+ (function (AutoCheckingStockSellerPolicyHistoryActionEnum) {
165
+ AutoCheckingStockSellerPolicyHistoryActionEnum["REGISTER"] = "REGISTER";
166
+ AutoCheckingStockSellerPolicyHistoryActionEnum["RELEASE"] = "RELEASE";
167
+ })(AutoCheckingStockSellerPolicyHistoryActionEnum || (exports.AutoCheckingStockSellerPolicyHistoryActionEnum = AutoCheckingStockSellerPolicyHistoryActionEnum = {}));
162
168
  var InsuranceProcessTypeEnum;
163
169
  (function (InsuranceProcessTypeEnum) {
164
170
  InsuranceProcessTypeEnum["REG"] = "reg";
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 소비 서비스까지 의존 순서대로 검증한다.