@sayren/store-sdk 0.44.0 → 0.45.0
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/dist/index.d.mts +477 -465
- package/dist/index.mjs +3 -1
- package/package.json +1 -1
- package/src/schemas/checkout.ts +11 -1
package/dist/index.mjs
CHANGED
|
@@ -6572,8 +6572,9 @@ const createSellerCheckoutRequestSchema = strictRequest(z.object({
|
|
|
6572
6572
|
pointsEnabled: z.boolean().optional().default(false).describe("구매자가 이 주문서에 적립금을 쓸 수 있는가. 기본 false")
|
|
6573
6573
|
}));
|
|
6574
6574
|
const sellerCheckoutSchema = z.object({
|
|
6575
|
-
checkoutId: z.string().describe("주문서 id. 스토어프론트가 이 id로 주문서를 열어 결제한다(`GET /storefront/v1/checkout/{checkoutId}`). 추측할 수 없는 값이고, 가진 사람은 누구나 결제할 수 있다"),
|
|
6575
|
+
checkoutId: z.string().describe("주문서 id. 결제 링크(`checkoutUrl`)나 스토어프론트가 이 id로 주문서를 열어 결제한다(`GET /storefront/v1/checkout/{checkoutId}`). 추측할 수 없는 값이고, 가진 사람은 누구나 결제할 수 있다"),
|
|
6576
6576
|
status: z.string().describe("`OPEN`(결제 대기) · `PAID`(결제 완료) · `EXPIRED`(만료). 값이 추가될 수 있어 문자열로 받는다"),
|
|
6577
|
+
checkoutUrl: z.string().describe("결제 링크 — sayren이 호스팅하는 결제 페이지(`https://checkout.sayren.io/{상점 코드}/{checkoutId}`)다. 스토어프론트가 없거나 이 화면을 구현하지 않은 상점도 이 링크로 결제받는다"),
|
|
6577
6578
|
currency: z.string(),
|
|
6578
6579
|
items: z.array(z.object({
|
|
6579
6580
|
lineId: z.string(),
|
|
@@ -6591,6 +6592,7 @@ const sellerCheckoutSchema = z.object({
|
|
|
6591
6592
|
deliveryFee: z.number().int().describe("배송지를 모르는 시점의 배송비. 제주·도서산간 추가 배송비는 결제할 때 더해진다"),
|
|
6592
6593
|
totalAmount: z.number().int()
|
|
6593
6594
|
}),
|
|
6595
|
+
requiresShipping: z.boolean().describe("배송할 줄이 있는지. false면 배송지 없이 결제하고 배송비도 없다(배송 없는 상품만 담긴 주문서)"),
|
|
6594
6596
|
trackInventory: z.boolean(),
|
|
6595
6597
|
couponsEnabled: z.boolean(),
|
|
6596
6598
|
pointsEnabled: z.boolean(),
|
package/package.json
CHANGED
package/src/schemas/checkout.ts
CHANGED
|
@@ -77,13 +77,18 @@ export const sellerCheckoutSchema = z.object({
|
|
|
77
77
|
checkoutId: z
|
|
78
78
|
.string()
|
|
79
79
|
.describe(
|
|
80
|
-
"주문서 id. 스토어프론트가 이 id로 주문서를 열어 결제한다(`GET /storefront/v1/checkout/{checkoutId}`). 추측할 수 없는 값이고, 가진 사람은 누구나 결제할 수 있다",
|
|
80
|
+
"주문서 id. 결제 링크(`checkoutUrl`)나 스토어프론트가 이 id로 주문서를 열어 결제한다(`GET /storefront/v1/checkout/{checkoutId}`). 추측할 수 없는 값이고, 가진 사람은 누구나 결제할 수 있다",
|
|
81
81
|
),
|
|
82
82
|
status: z
|
|
83
83
|
.string()
|
|
84
84
|
.describe(
|
|
85
85
|
"`OPEN`(결제 대기) · `PAID`(결제 완료) · `EXPIRED`(만료). 값이 추가될 수 있어 문자열로 받는다",
|
|
86
86
|
),
|
|
87
|
+
checkoutUrl: z
|
|
88
|
+
.string()
|
|
89
|
+
.describe(
|
|
90
|
+
"결제 링크 — sayren이 호스팅하는 결제 페이지(`https://checkout.sayren.io/{상점 코드}/{checkoutId}`)다. 스토어프론트가 없거나 이 화면을 구현하지 않은 상점도 이 링크로 결제받는다",
|
|
91
|
+
),
|
|
87
92
|
currency: z.string(),
|
|
88
93
|
items: z.array(
|
|
89
94
|
z.object({
|
|
@@ -109,6 +114,11 @@ export const sellerCheckoutSchema = z.object({
|
|
|
109
114
|
.describe("배송지를 모르는 시점의 배송비. 제주·도서산간 추가 배송비는 결제할 때 더해진다"),
|
|
110
115
|
totalAmount: z.number().int(),
|
|
111
116
|
}),
|
|
117
|
+
requiresShipping: z
|
|
118
|
+
.boolean()
|
|
119
|
+
.describe(
|
|
120
|
+
"배송할 줄이 있는지. false면 배송지 없이 결제하고 배송비도 없다(배송 없는 상품만 담긴 주문서)",
|
|
121
|
+
),
|
|
112
122
|
trackInventory: z.boolean(),
|
|
113
123
|
couponsEnabled: z.boolean(),
|
|
114
124
|
pointsEnabled: z.boolean(),
|