@yolo-croket-dev/entity-v2 0.3.71-sj3 → 0.3.73

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.
@@ -98,8 +98,26 @@ export interface BuymaRefundRecord {
98
98
  refundedAt: Date;
99
99
  evidence: string;
100
100
  }
101
- /** 주문별 수기 정산 기록. 금액·비율은 자동 계산하지 않는다. */
101
+ /** 정산 계산에 사용한 주문별 입력값. 원천 주문·구매 건을 수정하지 않는 스냅샷이다. */
102
+ export interface BuymaSettlementInputs {
103
+ productRevenue: BuymaMoney | null;
104
+ shippingRevenue: BuymaMoney | null;
105
+ sellerSettlement: BuymaMoney | null;
106
+ outboundShipping: BuymaMoney | null;
107
+ purchasedQuantity: number | null;
108
+ allocatedQuantity: number;
109
+ purchasedInfoId: string | null;
110
+ }
111
+ export type BuymaSettlementOverrideKey = 'buymaFee' | 'productMargin' | 'shippingFee' | 'outboundShippingJPY' | 'sellerSettlementJPY' | 'shippingMargin' | 'totalMargin' | 'productMarginRate' | 'shippingMarginRate' | 'totalMarginRate';
112
+ /** 계산 결과의 직접 수정은 자동 계산과 구분하여 보존한다. 비율 단위는 %다. */
113
+ export interface BuymaSettlementCalculation {
114
+ version: 1;
115
+ inputs: BuymaSettlementInputs;
116
+ overrides: Partial<Record<BuymaSettlementOverrideKey, number | null>>;
117
+ }
118
+ /** 주문별 관리용 정산. 이전 수기 기록과 새 계산 기록을 구분한다. */
102
119
  export interface BuymaSettlement {
120
+ calculation?: BuymaSettlementCalculation | null;
103
121
  appliedExchangeRate: string | null;
104
122
  exchangeRateUnit: string | null;
105
123
  feeRateText: string | null;
@@ -116,7 +134,7 @@ export interface BuymaSettlement {
116
134
  memo: string | null;
117
135
  }
118
136
  /** 이관 당시 시트 원본을 보존하는 정산 스냅샷. */
119
- export type BuymaLegacySettlement = BuymaSettlement;
137
+ export type BuymaLegacySettlement = Omit<BuymaSettlement, 'calculation'>;
120
138
  export interface BuymaRecipientChange {
121
139
  status: 'PENDING' | 'APPLIED' | 'UNVERIFIED';
122
140
  reportedStatus: string | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yolo-croket-dev/entity-v2",
3
- "version": "0.3.71-sj3",
3
+ "version": "0.3.73",
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
+ }