@yolo-croket-dev/amqp-access 0.7.424-sj1 → 0.7.426
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.
|
@@ -8,8 +8,36 @@ export declare class BuymaSettlementMoneyPayload {
|
|
|
8
8
|
amount: number;
|
|
9
9
|
currency: string;
|
|
10
10
|
}
|
|
11
|
+
/** @description 자동 계산의 주문별 입력. 예상 정산금은 입력 계약에 포함하지 않는다. */
|
|
12
|
+
export declare class BuymaSettlementInputsPayload {
|
|
13
|
+
productRevenue: BuymaSettlementMoneyPayload | null;
|
|
14
|
+
shippingRevenue: BuymaSettlementMoneyPayload | null;
|
|
15
|
+
sellerSettlement: BuymaSettlementMoneyPayload | null;
|
|
16
|
+
outboundShipping: BuymaSettlementMoneyPayload | null;
|
|
17
|
+
purchasedQuantity: number | null;
|
|
18
|
+
allocatedQuantity: number;
|
|
19
|
+
purchasedInfoId: string | null;
|
|
20
|
+
}
|
|
21
|
+
export declare class BuymaSettlementOverridesPayload {
|
|
22
|
+
buymaFee?: number | null;
|
|
23
|
+
sellerSettlementJPY?: number | null;
|
|
24
|
+
productMargin?: number | null;
|
|
25
|
+
shippingFee?: number | null;
|
|
26
|
+
outboundShippingJPY?: number | null;
|
|
27
|
+
shippingMargin?: number | null;
|
|
28
|
+
totalMargin?: number | null;
|
|
29
|
+
productMarginRate?: number | null;
|
|
30
|
+
shippingMarginRate?: number | null;
|
|
31
|
+
totalMarginRate?: number | null;
|
|
32
|
+
}
|
|
33
|
+
export declare class BuymaSettlementCalculationPayload {
|
|
34
|
+
version: 1;
|
|
35
|
+
inputs: BuymaSettlementInputsPayload;
|
|
36
|
+
overrides: BuymaSettlementOverridesPayload;
|
|
37
|
+
}
|
|
11
38
|
/** @description 지정한 정산 항목만 수정한다. 공란 null은 미확인으로 저장한다. */
|
|
12
39
|
export declare class BuymaSettlementPayload {
|
|
40
|
+
calculation?: BuymaSettlementCalculationPayload;
|
|
13
41
|
buymaFee?: BuymaSettlementMoneyPayload | null;
|
|
14
42
|
sellerSettlementJPY?: BuymaSettlementMoneyPayload | null;
|
|
15
43
|
productMargin?: BuymaSettlementMoneyPayload | null;
|
|
@@ -9,7 +9,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.AppendBuymaSlackLinkPayload = exports.ReceiveBuymaWebhookPayload = exports.RecordBuymaRefundPayload = exports.ChangeBuymaOrderStatusPayload = exports.ConnectBuymaProcurementPayload = exports.ConfirmBuymaPaymentPayload = exports.UpdateBuymaOrderPayload = exports.BuymaOrderCommandPayload = exports.BuymaManualFieldsPayload = exports.BuymaInternationalShipmentPayload = exports.BuymaProcurementDetailsPayload = exports.BuymaLocalShipmentPayload = exports.BuymaProductMetadataPayload = exports.BuymaRecipientPayload = exports.BuymaSettlementPayload = exports.BuymaSettlementMoneyPayload = exports.BuymaMoneyPayload = void 0;
|
|
12
|
+
exports.AppendBuymaSlackLinkPayload = exports.ReceiveBuymaWebhookPayload = exports.RecordBuymaRefundPayload = exports.ChangeBuymaOrderStatusPayload = exports.ConnectBuymaProcurementPayload = exports.ConfirmBuymaPaymentPayload = exports.UpdateBuymaOrderPayload = exports.BuymaOrderCommandPayload = exports.BuymaManualFieldsPayload = exports.BuymaInternationalShipmentPayload = exports.BuymaProcurementDetailsPayload = exports.BuymaLocalShipmentPayload = exports.BuymaProductMetadataPayload = exports.BuymaRecipientPayload = exports.BuymaSettlementPayload = exports.BuymaSettlementCalculationPayload = exports.BuymaSettlementOverridesPayload = exports.BuymaSettlementInputsPayload = exports.BuymaSettlementMoneyPayload = exports.BuymaMoneyPayload = void 0;
|
|
13
13
|
/** @author jun @description Buyma 변경 계약. @process 허용 필드·수정 버전·담당자와 선택 입력을 정의한다. */
|
|
14
14
|
const class_transformer_1 = require("class-transformer");
|
|
15
15
|
const class_validator_1 = require("class-validator");
|
|
@@ -49,10 +49,152 @@ __decorate([
|
|
|
49
49
|
(0, class_validator_1.Matches)(/^[A-Z]{3}$/),
|
|
50
50
|
__metadata("design:type", String)
|
|
51
51
|
], BuymaSettlementMoneyPayload.prototype, "currency", void 0);
|
|
52
|
+
/** @description 자동 계산의 주문별 입력. 예상 정산금은 입력 계약에 포함하지 않는다. */
|
|
53
|
+
class BuymaSettlementInputsPayload {
|
|
54
|
+
}
|
|
55
|
+
exports.BuymaSettlementInputsPayload = BuymaSettlementInputsPayload;
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, class_validator_1.IsOptional)(),
|
|
58
|
+
(0, class_validator_1.ValidateNested)(),
|
|
59
|
+
(0, class_transformer_1.Type)(() => BuymaSettlementMoneyPayload),
|
|
60
|
+
__metadata("design:type", Object)
|
|
61
|
+
], BuymaSettlementInputsPayload.prototype, "productRevenue", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
(0, class_validator_1.IsOptional)(),
|
|
64
|
+
(0, class_validator_1.ValidateNested)(),
|
|
65
|
+
(0, class_transformer_1.Type)(() => BuymaSettlementMoneyPayload),
|
|
66
|
+
__metadata("design:type", Object)
|
|
67
|
+
], BuymaSettlementInputsPayload.prototype, "shippingRevenue", void 0);
|
|
68
|
+
__decorate([
|
|
69
|
+
(0, class_validator_1.IsOptional)(),
|
|
70
|
+
(0, class_validator_1.ValidateNested)(),
|
|
71
|
+
(0, class_transformer_1.Type)(() => BuymaSettlementMoneyPayload),
|
|
72
|
+
__metadata("design:type", Object)
|
|
73
|
+
], BuymaSettlementInputsPayload.prototype, "sellerSettlement", void 0);
|
|
74
|
+
__decorate([
|
|
75
|
+
(0, class_validator_1.IsOptional)(),
|
|
76
|
+
(0, class_validator_1.ValidateNested)(),
|
|
77
|
+
(0, class_transformer_1.Type)(() => BuymaSettlementMoneyPayload),
|
|
78
|
+
__metadata("design:type", Object)
|
|
79
|
+
], BuymaSettlementInputsPayload.prototype, "outboundShipping", void 0);
|
|
80
|
+
__decorate([
|
|
81
|
+
(0, class_validator_1.IsOptional)(),
|
|
82
|
+
(0, class_validator_1.IsInt)(),
|
|
83
|
+
(0, class_validator_1.Min)(1),
|
|
84
|
+
__metadata("design:type", Object)
|
|
85
|
+
], BuymaSettlementInputsPayload.prototype, "purchasedQuantity", void 0);
|
|
86
|
+
__decorate([
|
|
87
|
+
(0, class_validator_1.IsInt)(),
|
|
88
|
+
(0, class_validator_1.Min)(1),
|
|
89
|
+
__metadata("design:type", Number)
|
|
90
|
+
], BuymaSettlementInputsPayload.prototype, "allocatedQuantity", void 0);
|
|
91
|
+
__decorate([
|
|
92
|
+
(0, class_validator_1.IsOptional)(),
|
|
93
|
+
(0, class_validator_1.IsMongoId)(),
|
|
94
|
+
__metadata("design:type", Object)
|
|
95
|
+
], BuymaSettlementInputsPayload.prototype, "purchasedInfoId", void 0);
|
|
96
|
+
class BuymaSettlementOverridesPayload {
|
|
97
|
+
}
|
|
98
|
+
exports.BuymaSettlementOverridesPayload = BuymaSettlementOverridesPayload;
|
|
99
|
+
__decorate([
|
|
100
|
+
(0, class_validator_1.IsOptional)(),
|
|
101
|
+
(0, class_validator_1.IsNumber)(),
|
|
102
|
+
(0, class_validator_1.Min)(-Number.MAX_SAFE_INTEGER),
|
|
103
|
+
(0, class_validator_1.Max)(Number.MAX_SAFE_INTEGER),
|
|
104
|
+
__metadata("design:type", Object)
|
|
105
|
+
], BuymaSettlementOverridesPayload.prototype, "buymaFee", void 0);
|
|
106
|
+
__decorate([
|
|
107
|
+
(0, class_validator_1.IsOptional)(),
|
|
108
|
+
(0, class_validator_1.IsNumber)(),
|
|
109
|
+
(0, class_validator_1.Min)(-Number.MAX_SAFE_INTEGER),
|
|
110
|
+
(0, class_validator_1.Max)(Number.MAX_SAFE_INTEGER),
|
|
111
|
+
__metadata("design:type", Object)
|
|
112
|
+
], BuymaSettlementOverridesPayload.prototype, "sellerSettlementJPY", void 0);
|
|
113
|
+
__decorate([
|
|
114
|
+
(0, class_validator_1.IsOptional)(),
|
|
115
|
+
(0, class_validator_1.IsNumber)(),
|
|
116
|
+
(0, class_validator_1.Min)(-Number.MAX_SAFE_INTEGER),
|
|
117
|
+
(0, class_validator_1.Max)(Number.MAX_SAFE_INTEGER),
|
|
118
|
+
__metadata("design:type", Object)
|
|
119
|
+
], BuymaSettlementOverridesPayload.prototype, "productMargin", void 0);
|
|
120
|
+
__decorate([
|
|
121
|
+
(0, class_validator_1.IsOptional)(),
|
|
122
|
+
(0, class_validator_1.IsNumber)(),
|
|
123
|
+
(0, class_validator_1.Min)(-Number.MAX_SAFE_INTEGER),
|
|
124
|
+
(0, class_validator_1.Max)(Number.MAX_SAFE_INTEGER),
|
|
125
|
+
__metadata("design:type", Object)
|
|
126
|
+
], BuymaSettlementOverridesPayload.prototype, "shippingFee", void 0);
|
|
127
|
+
__decorate([
|
|
128
|
+
(0, class_validator_1.IsOptional)(),
|
|
129
|
+
(0, class_validator_1.IsNumber)(),
|
|
130
|
+
(0, class_validator_1.Min)(-Number.MAX_SAFE_INTEGER),
|
|
131
|
+
(0, class_validator_1.Max)(Number.MAX_SAFE_INTEGER),
|
|
132
|
+
__metadata("design:type", Object)
|
|
133
|
+
], BuymaSettlementOverridesPayload.prototype, "outboundShippingJPY", void 0);
|
|
134
|
+
__decorate([
|
|
135
|
+
(0, class_validator_1.IsOptional)(),
|
|
136
|
+
(0, class_validator_1.IsNumber)(),
|
|
137
|
+
(0, class_validator_1.Min)(-Number.MAX_SAFE_INTEGER),
|
|
138
|
+
(0, class_validator_1.Max)(Number.MAX_SAFE_INTEGER),
|
|
139
|
+
__metadata("design:type", Object)
|
|
140
|
+
], BuymaSettlementOverridesPayload.prototype, "shippingMargin", void 0);
|
|
141
|
+
__decorate([
|
|
142
|
+
(0, class_validator_1.IsOptional)(),
|
|
143
|
+
(0, class_validator_1.IsNumber)(),
|
|
144
|
+
(0, class_validator_1.Min)(-Number.MAX_SAFE_INTEGER),
|
|
145
|
+
(0, class_validator_1.Max)(Number.MAX_SAFE_INTEGER),
|
|
146
|
+
__metadata("design:type", Object)
|
|
147
|
+
], BuymaSettlementOverridesPayload.prototype, "totalMargin", void 0);
|
|
148
|
+
__decorate([
|
|
149
|
+
(0, class_validator_1.IsOptional)(),
|
|
150
|
+
(0, class_validator_1.IsNumber)(),
|
|
151
|
+
(0, class_validator_1.Min)(-Number.MAX_SAFE_INTEGER),
|
|
152
|
+
(0, class_validator_1.Max)(Number.MAX_SAFE_INTEGER),
|
|
153
|
+
__metadata("design:type", Object)
|
|
154
|
+
], BuymaSettlementOverridesPayload.prototype, "productMarginRate", void 0);
|
|
155
|
+
__decorate([
|
|
156
|
+
(0, class_validator_1.IsOptional)(),
|
|
157
|
+
(0, class_validator_1.IsNumber)(),
|
|
158
|
+
(0, class_validator_1.Min)(-Number.MAX_SAFE_INTEGER),
|
|
159
|
+
(0, class_validator_1.Max)(Number.MAX_SAFE_INTEGER),
|
|
160
|
+
__metadata("design:type", Object)
|
|
161
|
+
], BuymaSettlementOverridesPayload.prototype, "shippingMarginRate", void 0);
|
|
162
|
+
__decorate([
|
|
163
|
+
(0, class_validator_1.IsOptional)(),
|
|
164
|
+
(0, class_validator_1.IsNumber)(),
|
|
165
|
+
(0, class_validator_1.Min)(-Number.MAX_SAFE_INTEGER),
|
|
166
|
+
(0, class_validator_1.Max)(Number.MAX_SAFE_INTEGER),
|
|
167
|
+
__metadata("design:type", Object)
|
|
168
|
+
], BuymaSettlementOverridesPayload.prototype, "totalMarginRate", void 0);
|
|
169
|
+
class BuymaSettlementCalculationPayload {
|
|
170
|
+
}
|
|
171
|
+
exports.BuymaSettlementCalculationPayload = BuymaSettlementCalculationPayload;
|
|
172
|
+
__decorate([
|
|
173
|
+
(0, class_validator_1.IsIn)([1]),
|
|
174
|
+
__metadata("design:type", Number)
|
|
175
|
+
], BuymaSettlementCalculationPayload.prototype, "version", void 0);
|
|
176
|
+
__decorate([
|
|
177
|
+
(0, class_validator_1.IsDefined)(),
|
|
178
|
+
(0, class_validator_1.ValidateNested)(),
|
|
179
|
+
(0, class_transformer_1.Type)(() => BuymaSettlementInputsPayload),
|
|
180
|
+
__metadata("design:type", BuymaSettlementInputsPayload)
|
|
181
|
+
], BuymaSettlementCalculationPayload.prototype, "inputs", void 0);
|
|
182
|
+
__decorate([
|
|
183
|
+
(0, class_validator_1.IsDefined)(),
|
|
184
|
+
(0, class_validator_1.ValidateNested)(),
|
|
185
|
+
(0, class_transformer_1.Type)(() => BuymaSettlementOverridesPayload),
|
|
186
|
+
__metadata("design:type", BuymaSettlementOverridesPayload)
|
|
187
|
+
], BuymaSettlementCalculationPayload.prototype, "overrides", void 0);
|
|
52
188
|
/** @description 지정한 정산 항목만 수정한다. 공란 null은 미확인으로 저장한다. */
|
|
53
189
|
class BuymaSettlementPayload {
|
|
54
190
|
}
|
|
55
191
|
exports.BuymaSettlementPayload = BuymaSettlementPayload;
|
|
192
|
+
__decorate([
|
|
193
|
+
(0, class_validator_1.IsOptional)(),
|
|
194
|
+
(0, class_validator_1.ValidateNested)(),
|
|
195
|
+
(0, class_transformer_1.Type)(() => BuymaSettlementCalculationPayload),
|
|
196
|
+
__metadata("design:type", BuymaSettlementCalculationPayload)
|
|
197
|
+
], BuymaSettlementPayload.prototype, "calculation", void 0);
|
|
56
198
|
__decorate([
|
|
57
199
|
(0, class_validator_1.IsOptional)(),
|
|
58
200
|
(0, class_validator_1.ValidateNested)(),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BuymaMoney, BuymaOrderEntity, BuymaOrderEventEntity, BuymaOrderStatus, BuymaPaymentStatus, BuymaProcurementWorkStatus } from '@yolo-croket-dev/entity-v2';
|
|
1
|
+
import { BuymaMoney, BuymaSettlementInputs, BuymaOrderEntity, BuymaOrderEventEntity, BuymaOrderStatus, BuymaPaymentStatus, BuymaProcurementWorkStatus } from '@yolo-croket-dev/entity-v2';
|
|
2
2
|
export type BuymaOrderSortBy = 'FIRST_ORDERED_AT_DESC' | 'FIRST_ORDERED_AT_ASC';
|
|
3
3
|
export declare const BUYMA_ORDER_SEARCH_FIELDS: readonly ["ORDER_NUMBER", "STORE_NAME", "SOURCE_COUNTRY", "CROKET_ITEM_NAME", "CROKET_ITEM_ID", "BUYMA_ITEM_NAME", "BRAND_NAME", "OPTION_NAME", "PROCUREMENT_BUYER_ID", "RECIPIENT_NAME", "RECIPIENT_PHONE"];
|
|
4
4
|
export type BuymaOrderSearchField = (typeof BUYMA_ORDER_SEARCH_FIELDS)[number];
|
|
@@ -62,7 +62,14 @@ export interface GetBuymaOrdersResult {
|
|
|
62
62
|
export interface BuymaSharedProcurementOrder extends Pick<BuymaOrderEntity, '_id' | 'buymaOrderNumber' | 'quantity' | 'orderStatus'> {
|
|
63
63
|
procurement: Pick<NonNullable<BuymaOrderEntity['procurement']>, 'allocationStatus' | 'croketOptionName'> | null;
|
|
64
64
|
}
|
|
65
|
+
/** 조회 전용 정산 원천. 예상 정산금은 저장·계산 입력에서 제외한다. */
|
|
66
|
+
export interface BuymaSettlementSource {
|
|
67
|
+
inputs: BuymaSettlementInputs;
|
|
68
|
+
expectedSellerSettlement: BuymaMoney | null;
|
|
69
|
+
allocatedExpectedSellerSettlement: BuymaMoney | null;
|
|
70
|
+
}
|
|
65
71
|
export interface GetBuymaOrderResult {
|
|
72
|
+
settlementSource?: BuymaSettlementSource;
|
|
66
73
|
/** 수기 확인 전후 기록으로 계산하는 취소 가능 여부. 주문에 저장하지 않는다. */
|
|
67
74
|
paymentConfirmationReversal?: {
|
|
68
75
|
eventId: string | null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yolo-croket-dev/amqp-access",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.426",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"author": "Yolo Co., Ltd.",
|
|
6
6
|
"description": "크로켓 amqp-access npm",
|
|
@@ -23,10 +23,10 @@
|
|
|
23
23
|
"@yolo-croket-dev/core": "1.10.2",
|
|
24
24
|
"@yolo-croket-dev/domain": "0.2.50",
|
|
25
25
|
"@yolo-croket-dev/dto-v2": "0.2.37",
|
|
26
|
-
"@yolo-croket-dev/entity": "0.2.
|
|
27
|
-
"@yolo-croket-dev/entity-v2": "0.3.
|
|
26
|
+
"@yolo-croket-dev/entity": "0.2.112",
|
|
27
|
+
"@yolo-croket-dev/entity-v2": "0.3.73",
|
|
28
28
|
"class-transformer": "^0.5.1",
|
|
29
29
|
"class-validator": "^0.13.2",
|
|
30
30
|
"dotenv": "^16.3.1"
|
|
31
31
|
}
|
|
32
|
-
}
|
|
32
|
+
}
|