@yolo-croket-dev/entity-v2 0.3.71-sj1 → 0.3.72

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-sj1",
3
+ "version": "0.3.72",
4
4
  "main": "index.js",
5
5
  "author": "Yolo Co., Ltd.",
6
6
  "description": "크로켓 nest 용 entity-v3",
@@ -12,7 +12,7 @@ export default interface PurchasedInfoForSeller {
12
12
  }
13
13
  export type RefundInfoPickedForSeller = Pick<RefundEntity, '_id' | 'reg_date' | 'acceptInfo' | 'process' | '_authorType' | 'openInfo' | 'refundVersion' | 'returnInfo' | 'rejectInfo' | 'PInfoLastProcess'>;
14
14
  export type UserInfoPickedForSeller = Pick<UserEntity, '_id' | 'username' | 'phoneCountry' | 'phoneNumber' | 'photos' | 'subContactList'>;
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' | 'isCustomsDutyAndTaxNotOccurred' |
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
18
  /** 구매건의 payTryLogId_v2를 문자열로 반환한다. 해당 값이 없는 기존 주문은 생략한다. */
@@ -815,8 +815,6 @@ export interface PastStoreItemInfo {
815
815
  itemName: string;
816
816
  /** @description 구매 당시 상품 타입 */
817
817
  itemType?: StoreItemTypeEnum;
818
- /** @description 구매 당시 관세 및 부가세 미발생 여부 */
819
- isCustomsDutyAndTaxNotOccurred?: boolean;
820
818
  isDelete: boolean;
821
819
  sellingInfo: PastSellingInfo;
822
820
  itemKeywords?: StoreItemKeyword[];
@@ -1295,8 +1293,6 @@ export interface CrawlerProxyOrderInfo {
1295
1293
  }
1296
1294
  /** PInfo schema inteface (아직 선언하다 말았음) */
1297
1295
  export default interface PurchasedInfoEntity extends CustomsVerificationLink {
1298
- /** 결제 시점 관세 및 부가세 미발생 여부 */
1299
- isCustomsDutyAndTaxNotOccurred?: boolean;
1300
1296
  _id: Types.ObjectId | string;
1301
1297
  /** @description 해당 결제 정보 셀러 아이디 */
1302
1298
  sellerId: Types.ObjectId | string;
@@ -773,8 +773,6 @@ export interface StoreItemEntity {
773
773
  isRequiredPCCC?: boolean;
774
774
  /** 관세 및 부가세가 상품 가격에 포함되었는지 여부 */
775
775
  isCustomsDutyAndTaxIncluded?: boolean;
776
- /** 관세 및 부가세가 발생하지 않는 상품인지 여부 */
777
- isCustomsDutyAndTaxNotOccurred?: boolean;
778
776
  /**
779
777
  * @deprecated 상품 평점
780
778
  * - 검증: true