@sayren/store-sdk 0.16.0 → 0.18.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 CHANGED
@@ -165,8 +165,8 @@ export declare const auditLogPageSchema: z.ZodObject<{
165
165
  }, z.core.$strip>;
166
166
  export type AuditLogPage = z.infer<typeof auditLogPageSchema>;
167
167
  export declare const agentPolicyDecisionSchema: z.ZodEnum<{
168
- DENIED: "DENIED";
169
168
  APPROVAL_REQUIRED: "APPROVAL_REQUIRED";
169
+ DENIED: "DENIED";
170
170
  ALLOW: "ALLOW";
171
171
  }>;
172
172
  export type AgentPolicyDecision = z.infer<typeof agentPolicyDecisionSchema>;
@@ -190,8 +190,8 @@ export type WritePreview = z.infer<typeof writePreviewSchema>;
190
190
  export declare const writeDryRunResultSchema: z.ZodObject<{
191
191
  dryRun: z.ZodLiteral<true>;
192
192
  decision: z.ZodEnum<{
193
- DENIED: "DENIED";
194
193
  APPROVAL_REQUIRED: "APPROVAL_REQUIRED";
194
+ DENIED: "DENIED";
195
195
  ALLOW: "ALLOW";
196
196
  }>;
197
197
  reason: z.ZodNullable<z.ZodString>;
@@ -213,25 +213,25 @@ export declare const writeDryRunResultSchema: z.ZodObject<{
213
213
  }, z.core.$strip>;
214
214
  export type WriteDryRunResult = z.infer<typeof writeDryRunResultSchema>;
215
215
  export declare const approvalStatusSchema: z.ZodEnum<{
216
+ EXPIRED: "EXPIRED";
216
217
  PENDING: "PENDING";
217
218
  FAILED: "FAILED";
218
219
  SUCCEEDED: "SUCCEEDED";
219
220
  EXECUTING: "EXECUTING";
220
221
  UNKNOWN: "UNKNOWN";
221
222
  REJECTED: "REJECTED";
222
- EXPIRED: "EXPIRED";
223
223
  }>;
224
224
  export type ApprovalStatus = z.infer<typeof approvalStatusSchema>;
225
225
  export declare const approvalRequestSchema: z.ZodObject<{
226
226
  approvalId: z.ZodString;
227
227
  status: z.ZodEnum<{
228
+ EXPIRED: "EXPIRED";
228
229
  PENDING: "PENDING";
229
230
  FAILED: "FAILED";
230
231
  SUCCEEDED: "SUCCEEDED";
231
232
  EXECUTING: "EXECUTING";
232
233
  UNKNOWN: "UNKNOWN";
233
234
  REJECTED: "REJECTED";
234
- EXPIRED: "EXPIRED";
235
235
  }>;
236
236
  operationId: z.ZodString;
237
237
  method: z.ZodString;
@@ -287,13 +287,13 @@ export declare const approvalRequestSchema: z.ZodObject<{
287
287
  export type ApprovalRequest = z.infer<typeof approvalRequestSchema>;
288
288
  export declare const approvalListQuerySchema: z.ZodObject<{
289
289
  status: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>, z.ZodTransform<string[], string | string[]>>, z.ZodArray<z.ZodEnum<{
290
+ EXPIRED: "EXPIRED";
290
291
  PENDING: "PENDING";
291
292
  FAILED: "FAILED";
292
293
  SUCCEEDED: "SUCCEEDED";
293
294
  EXECUTING: "EXECUTING";
294
295
  UNKNOWN: "UNKNOWN";
295
296
  REJECTED: "REJECTED";
296
- EXPIRED: "EXPIRED";
297
297
  }>>>>;
298
298
  cursor: z.ZodOptional<z.ZodString>;
299
299
  limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
@@ -306,13 +306,13 @@ export declare const approvalPageSchema: z.ZodObject<{
306
306
  items: z.ZodArray<z.ZodObject<{
307
307
  approvalId: z.ZodString;
308
308
  status: z.ZodEnum<{
309
+ EXPIRED: "EXPIRED";
309
310
  PENDING: "PENDING";
310
311
  FAILED: "FAILED";
311
312
  SUCCEEDED: "SUCCEEDED";
312
313
  EXECUTING: "EXECUTING";
313
314
  UNKNOWN: "UNKNOWN";
314
315
  REJECTED: "REJECTED";
315
- EXPIRED: "EXPIRED";
316
316
  }>;
317
317
  operationId: z.ZodString;
318
318
  method: z.ZodString;
@@ -1073,9 +1073,9 @@ export type ApiLogSummary = z.infer<typeof apiLogSummarySchema>;
1073
1073
  //#endregion
1074
1074
  //#region src/schemas/auth.d.ts
1075
1075
  export declare const storeRoleSchema: z.ZodEnum<{
1076
+ OWNER: "OWNER";
1076
1077
  ADMIN: "ADMIN";
1077
1078
  STAFF: "STAFF";
1078
- OWNER: "OWNER";
1079
1079
  }>;
1080
1080
  export type StoreRole = z.infer<typeof storeRoleSchema>;
1081
1081
  export declare const userTokenResponseSchema: z.ZodObject<{
@@ -1099,9 +1099,9 @@ export declare const storeTokenResponseSchema: z.ZodObject<{
1099
1099
  expires_in: z.ZodNumber;
1100
1100
  storeId: z.ZodString;
1101
1101
  role: z.ZodEnum<{
1102
+ OWNER: "OWNER";
1102
1103
  ADMIN: "ADMIN";
1103
1104
  STAFF: "STAFF";
1104
- OWNER: "OWNER";
1105
1105
  }>;
1106
1106
  scopes: z.ZodArray<z.ZodString>;
1107
1107
  }, z.core.$strip>;
@@ -1111,9 +1111,9 @@ export declare const myStoreSchema: z.ZodObject<{
1111
1111
  storeName: z.ZodString;
1112
1112
  storeCode: z.ZodString;
1113
1113
  role: z.ZodEnum<{
1114
+ OWNER: "OWNER";
1114
1115
  ADMIN: "ADMIN";
1115
1116
  STAFF: "STAFF";
1116
- OWNER: "OWNER";
1117
1117
  }>;
1118
1118
  status: z.ZodEnum<{
1119
1119
  ACTIVE: "ACTIVE";
@@ -1555,6 +1555,7 @@ export declare const claimSchema: z.ZodObject<{
1555
1555
  carrierCode: z.ZodNullable<z.ZodString>;
1556
1556
  trackingNumber: z.ZodNullable<z.ZodString>;
1557
1557
  }, z.core.$strip>>;
1558
+ fulfillmentType: z.ZodDefault<z.ZodOptional<z.ZodString>>;
1558
1559
  requestedAt: z.ZodString;
1559
1560
  completedAt: z.ZodNullable<z.ZodString>;
1560
1561
  holdExpiresAt: z.ZodNullable<z.ZodString>;
@@ -1642,6 +1643,7 @@ export declare const claimDetailSchema: z.ZodObject<{
1642
1643
  carrierCode: z.ZodNullable<z.ZodString>;
1643
1644
  trackingNumber: z.ZodNullable<z.ZodString>;
1644
1645
  }, z.core.$strip>>;
1646
+ fulfillmentType: z.ZodDefault<z.ZodOptional<z.ZodString>>;
1645
1647
  requestedAt: z.ZodString;
1646
1648
  completedAt: z.ZodNullable<z.ZodString>;
1647
1649
  holdExpiresAt: z.ZodNullable<z.ZodString>;
@@ -1700,10 +1702,312 @@ export declare const approveClaimResultSchema: z.ZodObject<{
1700
1702
  quantity: z.ZodNumber;
1701
1703
  deliveryFeeRefundAmount: z.ZodNumber;
1702
1704
  deliveryFeeChargeAmount: z.ZodNumber;
1705
+ couponChargeAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
1706
+ couponChargeRefundAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
1703
1707
  refundedAt: z.ZodString;
1704
1708
  }, z.core.$strip>;
1705
1709
  export type ApproveClaimResult = z.infer<typeof approveClaimResultSchema>;
1706
1710
  //#endregion
1711
+ //#region src/schemas/coupon.d.ts
1712
+ /**
1713
+ * 쿠폰 관리 API 계약 (이슈 #47) — `/v1/coupons/**`, 스코프 `promotion:r|rw`.
1714
+ *
1715
+ * 금액 계산 규칙은 `promotion.ts`(`quotePricing`)가 원천이고, 여기에는 셀러가 쿠폰을 만들고 나눠 주는 표면만 있다.
1716
+ * 발급·사용이 시작된 쿠폰은 혜택·조건·대상·사용 시작일을 바꿀 수 없다(409 `COUPON_LOCKED`). 이름·설명·종료일 연장·
1717
+ * 한도 상향·중지·재개·종료만 된다. 규칙을 바꾸려면 새 쿠폰을 만든다.
1718
+ */
1719
+ /** 쿠폰 상태 — `ACTIVE`(사용 중)·`PAUSED`(중지, 재개 가능)·`ENDED`(종료, 되돌릴 수 없음) */
1720
+ export declare const couponStatusSchema: z.ZodEnum<{
1721
+ ACTIVE: "ACTIVE";
1722
+ PAUSED: "PAUSED";
1723
+ ENDED: "ENDED";
1724
+ }>;
1725
+ export type CouponStatus = z.infer<typeof couponStatusSchema>;
1726
+ /** 지금 만들 수 있는 발급 방식 — 다운로드·가입 자동 지급은 뒤 단계다 */
1727
+ export declare const couponIssueMethodSchema: z.ZodEnum<{
1728
+ CODE: "CODE";
1729
+ MANUAL: "MANUAL";
1730
+ }>;
1731
+ export type CouponIssueMethod = z.infer<typeof couponIssueMethodSchema>;
1732
+ /** 코드 형식 — 영문·숫자·`-`·`_` 6~30자. 대소문자를 구분하지 않고 서버가 대문자로 저장한다 */
1733
+ export declare const COUPON_CODE_PATTERN: RegExp;
1734
+ /** 코드 정규화 — 대문자, 앞뒤 공백 제거. 입력·저장·조회가 같은 함수를 쓴다 */
1735
+ export declare function normalizeCouponCode(code: string): string;
1736
+ /** 조건 입력 — 생략한 항목은 기본값(`COUPON_CONDITIONS_DEFAULTS`)이다 */
1737
+ export declare const couponConditionsInputSchema: z.ZodObject<{
1738
+ minOrderAmount: z.ZodOptional<z.ZodNumber>;
1739
+ firstOrderOnly: z.ZodOptional<z.ZodBoolean>;
1740
+ memberOnly: z.ZodOptional<z.ZodBoolean>;
1741
+ stackWithInstantDiscount: z.ZodOptional<z.ZodBoolean>;
1742
+ }, z.core.$strict>;
1743
+ /** 대상 입력 — 생략한 목록은 빈 목록이다(포함 목록이 모두 비면 전 상품) */
1744
+ export declare const couponTargetInputSchema: z.ZodObject<{
1745
+ includeProductIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
1746
+ includeCategoryIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
1747
+ excludeProductIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
1748
+ excludeCategoryIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
1749
+ }, z.core.$strict>;
1750
+ /** `POST /v1/coupons` */
1751
+ export declare const createCouponRequestSchema: z.ZodObject<{
1752
+ name: z.ZodString;
1753
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1754
+ kind: z.ZodEnum<{
1755
+ ORDER: "ORDER";
1756
+ PRODUCT: "PRODUCT";
1757
+ DELIVERY: "DELIVERY";
1758
+ }>;
1759
+ benefit: z.ZodObject<{
1760
+ type: z.ZodEnum<{
1761
+ RATE: "RATE";
1762
+ AMOUNT: "AMOUNT";
1763
+ }>;
1764
+ value: z.ZodNumber;
1765
+ maxDiscountAmount: z.ZodNullable<z.ZodNumber>;
1766
+ }, z.core.$strip>;
1767
+ conditions: z.ZodOptional<z.ZodObject<{
1768
+ minOrderAmount: z.ZodOptional<z.ZodNumber>;
1769
+ firstOrderOnly: z.ZodOptional<z.ZodBoolean>;
1770
+ memberOnly: z.ZodOptional<z.ZodBoolean>;
1771
+ stackWithInstantDiscount: z.ZodOptional<z.ZodBoolean>;
1772
+ }, z.core.$strict>>;
1773
+ target: z.ZodOptional<z.ZodObject<{
1774
+ includeProductIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
1775
+ includeCategoryIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
1776
+ excludeProductIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
1777
+ excludeCategoryIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
1778
+ }, z.core.$strict>>;
1779
+ issueMethod: z.ZodEnum<{
1780
+ CODE: "CODE";
1781
+ MANUAL: "MANUAL";
1782
+ }>;
1783
+ code: z.ZodOptional<z.ZodString>;
1784
+ startsAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
1785
+ endsAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
1786
+ validDaysAfterIssue: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1787
+ totalIssueLimit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1788
+ totalUseLimit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1789
+ perMemberIssueLimit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1790
+ perMemberUseLimit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1791
+ }, z.core.$strict>;
1792
+ export type CreateCouponRequest = z.infer<typeof createCouponRequestSchema>;
1793
+ /**
1794
+ * `PATCH /v1/coupons/{couponId}` — 준 항목만 바뀐다. 발급·사용이 시작된 쿠폰(`locked`)은 이름·설명·종료일 연장·
1795
+ * 한도 상향만 받고, 그 밖의 항목이 현재 값과 다르면 409 `COUPON_LOCKED`다. 종류·발급 방식은 바꿀 수 없다.
1796
+ */
1797
+ export declare const updateCouponRequestSchema: z.ZodObject<{
1798
+ name: z.ZodOptional<z.ZodString>;
1799
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1800
+ benefit: z.ZodOptional<z.ZodObject<{
1801
+ type: z.ZodEnum<{
1802
+ RATE: "RATE";
1803
+ AMOUNT: "AMOUNT";
1804
+ }>;
1805
+ value: z.ZodNumber;
1806
+ maxDiscountAmount: z.ZodNullable<z.ZodNumber>;
1807
+ }, z.core.$strip>>;
1808
+ conditions: z.ZodOptional<z.ZodObject<{
1809
+ minOrderAmount: z.ZodOptional<z.ZodNumber>;
1810
+ firstOrderOnly: z.ZodOptional<z.ZodBoolean>;
1811
+ memberOnly: z.ZodOptional<z.ZodBoolean>;
1812
+ stackWithInstantDiscount: z.ZodOptional<z.ZodBoolean>;
1813
+ }, z.core.$strict>>;
1814
+ target: z.ZodOptional<z.ZodObject<{
1815
+ includeProductIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
1816
+ includeCategoryIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
1817
+ excludeProductIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
1818
+ excludeCategoryIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
1819
+ }, z.core.$strict>>;
1820
+ code: z.ZodOptional<z.ZodString>;
1821
+ startsAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
1822
+ endsAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
1823
+ validDaysAfterIssue: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1824
+ totalIssueLimit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1825
+ totalUseLimit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1826
+ perMemberIssueLimit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1827
+ perMemberUseLimit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1828
+ }, z.core.$strict>;
1829
+ export type UpdateCouponRequest = z.infer<typeof updateCouponRequestSchema>;
1830
+ /** 쿠폰 응답 */
1831
+ export declare const couponSchema: z.ZodObject<{
1832
+ couponId: z.ZodString;
1833
+ name: z.ZodString;
1834
+ description: z.ZodNullable<z.ZodString>;
1835
+ kind: z.ZodEnum<{
1836
+ ORDER: "ORDER";
1837
+ PRODUCT: "PRODUCT";
1838
+ DELIVERY: "DELIVERY";
1839
+ }>;
1840
+ benefit: z.ZodObject<{
1841
+ type: z.ZodEnum<{
1842
+ RATE: "RATE";
1843
+ AMOUNT: "AMOUNT";
1844
+ }>;
1845
+ value: z.ZodNumber;
1846
+ maxDiscountAmount: z.ZodNullable<z.ZodNumber>;
1847
+ }, z.core.$strip>;
1848
+ conditions: z.ZodObject<{
1849
+ minOrderAmount: z.ZodNumber;
1850
+ firstOrderOnly: z.ZodBoolean;
1851
+ memberOnly: z.ZodBoolean;
1852
+ stackWithInstantDiscount: z.ZodBoolean;
1853
+ }, z.core.$strip>;
1854
+ target: z.ZodObject<{
1855
+ includeProductIds: z.ZodArray<z.ZodString>;
1856
+ includeCategoryIds: z.ZodArray<z.ZodString>;
1857
+ excludeProductIds: z.ZodArray<z.ZodString>;
1858
+ excludeCategoryIds: z.ZodArray<z.ZodString>;
1859
+ }, z.core.$strip>;
1860
+ issueMethod: z.ZodString;
1861
+ code: z.ZodNullable<z.ZodString>;
1862
+ startsAt: z.ZodNullable<z.ZodString>;
1863
+ endsAt: z.ZodNullable<z.ZodString>;
1864
+ validDaysAfterIssue: z.ZodNullable<z.ZodNumber>;
1865
+ totalIssueLimit: z.ZodNullable<z.ZodNumber>;
1866
+ totalUseLimit: z.ZodNullable<z.ZodNumber>;
1867
+ perMemberIssueLimit: z.ZodNullable<z.ZodNumber>;
1868
+ perMemberUseLimit: z.ZodNullable<z.ZodNumber>;
1869
+ issuedCount: z.ZodNumber;
1870
+ reservedCount: z.ZodNumber;
1871
+ usedCount: z.ZodNumber;
1872
+ status: z.ZodEnum<{
1873
+ ACTIVE: "ACTIVE";
1874
+ PAUSED: "PAUSED";
1875
+ ENDED: "ENDED";
1876
+ }>;
1877
+ locked: z.ZodBoolean;
1878
+ lockedAt: z.ZodNullable<z.ZodString>;
1879
+ createdAt: z.ZodString;
1880
+ updatedAt: z.ZodString;
1881
+ }, z.core.$strip>;
1882
+ export type Coupon = z.infer<typeof couponSchema>;
1883
+ /** `GET /v1/coupons` 쿼리 */
1884
+ export declare const couponListQuerySchema: z.ZodObject<{
1885
+ page: z.ZodOptional<z.ZodString>;
1886
+ size: z.ZodOptional<z.ZodString>;
1887
+ status: z.ZodOptional<z.ZodEnum<{
1888
+ ACTIVE: "ACTIVE";
1889
+ PAUSED: "PAUSED";
1890
+ ENDED: "ENDED";
1891
+ }>>;
1892
+ kind: z.ZodOptional<z.ZodEnum<{
1893
+ ORDER: "ORDER";
1894
+ PRODUCT: "PRODUCT";
1895
+ DELIVERY: "DELIVERY";
1896
+ }>>;
1897
+ issueMethod: z.ZodOptional<z.ZodEnum<{
1898
+ CODE: "CODE";
1899
+ MANUAL: "MANUAL";
1900
+ }>>;
1901
+ q: z.ZodOptional<z.ZodString>;
1902
+ }, z.core.$strip>;
1903
+ /** 발급 쿠폰 상태 — 만료는 저장 상태가 아니라 조회 시각으로 판정한 값이다 */
1904
+ export declare const couponIssueStatusSchema: z.ZodString;
1905
+ export declare const couponIssueSchema: z.ZodObject<{
1906
+ issueId: z.ZodString;
1907
+ couponId: z.ZodString;
1908
+ customerId: z.ZodString;
1909
+ customerName: z.ZodNullable<z.ZodString>;
1910
+ status: z.ZodString;
1911
+ validFrom: z.ZodString;
1912
+ validUntil: z.ZodNullable<z.ZodString>;
1913
+ usedOrderId: z.ZodNullable<z.ZodString>;
1914
+ issuedAt: z.ZodString;
1915
+ revokedAt: z.ZodNullable<z.ZodString>;
1916
+ }, z.core.$strip>;
1917
+ export type CouponIssue = z.infer<typeof couponIssueSchema>;
1918
+ export declare const couponIssueListQuerySchema: z.ZodObject<{
1919
+ page: z.ZodOptional<z.ZodString>;
1920
+ size: z.ZodOptional<z.ZodString>;
1921
+ status: z.ZodOptional<z.ZodEnum<{
1922
+ REVOKED: "REVOKED";
1923
+ AVAILABLE: "AVAILABLE";
1924
+ RESERVED: "RESERVED";
1925
+ USED: "USED";
1926
+ }>>;
1927
+ }, z.core.$strip>;
1928
+ /** `POST /v1/coupons/{couponId}/issues` — 셀러 지급. 한 번에 1,000명까지 */
1929
+ export declare const issueCouponRequestSchema: z.ZodObject<{
1930
+ customerIds: z.ZodArray<z.ZodString>;
1931
+ }, z.core.$strict>;
1932
+ export type IssueCouponRequest = z.infer<typeof issueCouponRequestSchema>;
1933
+ export declare const issueCouponResultSchema: z.ZodObject<{
1934
+ issued: z.ZodArray<z.ZodObject<{
1935
+ customerId: z.ZodString;
1936
+ issueId: z.ZodString;
1937
+ }, z.core.$strip>>;
1938
+ failed: z.ZodArray<z.ZodObject<{
1939
+ customerId: z.ZodString;
1940
+ code: z.ZodString;
1941
+ message: z.ZodString;
1942
+ }, z.core.$strip>>;
1943
+ }, z.core.$strip>;
1944
+ export type IssueCouponResult = z.infer<typeof issueCouponResultSchema>;
1945
+ export declare const couponRedemptionSchema: z.ZodObject<{
1946
+ redemptionId: z.ZodString;
1947
+ couponId: z.ZodString;
1948
+ issueId: z.ZodNullable<z.ZodString>;
1949
+ customerId: z.ZodNullable<z.ZodString>;
1950
+ orderId: z.ZodNullable<z.ZodString>;
1951
+ status: z.ZodString;
1952
+ discountAmount: z.ZodNumber;
1953
+ reservedAt: z.ZodString;
1954
+ usedAt: z.ZodNullable<z.ZodString>;
1955
+ releasedAt: z.ZodNullable<z.ZodString>;
1956
+ restoredAt: z.ZodNullable<z.ZodString>;
1957
+ restoreSkippedReason: z.ZodNullable<z.ZodString>;
1958
+ }, z.core.$strip>;
1959
+ export type CouponRedemption = z.infer<typeof couponRedemptionSchema>;
1960
+ export declare const couponRedemptionListQuerySchema: z.ZodObject<{
1961
+ page: z.ZodOptional<z.ZodString>;
1962
+ size: z.ZodOptional<z.ZodString>;
1963
+ status: z.ZodOptional<z.ZodEnum<{
1964
+ RESERVED: "RESERVED";
1965
+ USED: "USED";
1966
+ RELEASED: "RELEASED";
1967
+ RESTORED: "RESTORED";
1968
+ }>>;
1969
+ }, z.core.$strip>;
1970
+ export declare const couponStatsSchema: z.ZodObject<{
1971
+ couponId: z.ZodString;
1972
+ issuedCount: z.ZodNumber;
1973
+ revokedCount: z.ZodNumber;
1974
+ reservedCount: z.ZodNumber;
1975
+ usedCount: z.ZodNumber;
1976
+ restoredCount: z.ZodNumber;
1977
+ releasedCount: z.ZodNumber;
1978
+ discountTotal: z.ZodNumber;
1979
+ orderPaymentTotal: z.ZodNumber;
1980
+ }, z.core.$strip>;
1981
+ export type CouponStats = z.infer<typeof couponStatsSchema>;
1982
+ /** `GET /v1/customers/{customerId}/coupons` 항목 — 발급 쿠폰 + 쿠폰 이름·혜택 */
1983
+ export declare const customerCouponSchema: z.ZodObject<{
1984
+ issueId: z.ZodString;
1985
+ couponId: z.ZodString;
1986
+ customerId: z.ZodString;
1987
+ customerName: z.ZodNullable<z.ZodString>;
1988
+ status: z.ZodString;
1989
+ validFrom: z.ZodString;
1990
+ validUntil: z.ZodNullable<z.ZodString>;
1991
+ usedOrderId: z.ZodNullable<z.ZodString>;
1992
+ issuedAt: z.ZodString;
1993
+ revokedAt: z.ZodNullable<z.ZodString>;
1994
+ couponName: z.ZodString;
1995
+ kind: z.ZodEnum<{
1996
+ ORDER: "ORDER";
1997
+ PRODUCT: "PRODUCT";
1998
+ DELIVERY: "DELIVERY";
1999
+ }>;
2000
+ benefit: z.ZodObject<{
2001
+ type: z.ZodEnum<{
2002
+ RATE: "RATE";
2003
+ AMOUNT: "AMOUNT";
2004
+ }>;
2005
+ value: z.ZodNumber;
2006
+ maxDiscountAmount: z.ZodNullable<z.ZodNumber>;
2007
+ }, z.core.$strip>;
2008
+ }, z.core.$strip>;
2009
+ export type CustomerCoupon = z.infer<typeof customerCouponSchema>;
2010
+ //#endregion
1707
2011
  //#region src/schemas/customer.d.ts
1708
2012
  /** 구매자 목록 정렬 */
1709
2013
  export declare const customerSortSchema: z.ZodEnum<{
@@ -2010,6 +2314,180 @@ export declare const customerWithdrawalBlockedDetailsSchema: z.ZodObject<{
2010
2314
  }, z.core.$strip>;
2011
2315
  export type CustomerWithdrawalBlockedDetails = z.infer<typeof customerWithdrawalBlockedDetailsSchema>;
2012
2316
  //#endregion
2317
+ //#region src/schemas/digital-asset.d.ts
2318
+ /**
2319
+ * 파일 다운로드 상품의 판매 파일 (이슈 #48 단계 3).
2320
+ *
2321
+ * 파일은 CDN **비공개 객체**다. `POST /v1/uploads`(`purpose: "digital-asset"`)로 자리를 받아 응답의 `headers`와 함께 PUT하고,
2322
+ * 응답의 `key`로 상품에 연결한다. 객체 키와 파일 주소는 어떤 응답에도 싣지 않는다 — 구매자는 제공된 주문상품에서
2323
+ * 수명 300초의 서명 주소로만 받는다. 주문은 주문 시점 파일을 스냅샷하므로 파일을 바꿔도 이미 산 구매자는 옛 파일을 받는다.
2324
+ */
2325
+ export declare const digitalAssetAttachRequestSchema: z.ZodObject<{
2326
+ key: z.ZodString;
2327
+ fileName: z.ZodString;
2328
+ sizeBytes: z.ZodOptional<z.ZodNumber>;
2329
+ contentType: z.ZodOptional<z.ZodString>;
2330
+ variantId: z.ZodOptional<z.ZodString>;
2331
+ }, z.core.$strip>;
2332
+ export type DigitalAssetAttachRequest = z.infer<typeof digitalAssetAttachRequestSchema>;
2333
+ /** 판매 파일 — 객체 키·주소는 싣지 않는다 */
2334
+ export declare const digitalAssetSchema: z.ZodObject<{
2335
+ assetId: z.ZodString;
2336
+ productId: z.ZodString;
2337
+ variantId: z.ZodNullable<z.ZodString>;
2338
+ fileName: z.ZodString;
2339
+ contentType: z.ZodNullable<z.ZodString>;
2340
+ sizeBytes: z.ZodNullable<z.ZodNumber>;
2341
+ status: z.ZodString;
2342
+ createdAt: z.ZodString;
2343
+ }, z.core.$strip>;
2344
+ export type DigitalAsset = z.infer<typeof digitalAssetSchema>;
2345
+ /** 셀러 확인용 서명 주소 — `POST /v1/products/{productId}/digital-assets/{assetId}/preview-url` */
2346
+ export declare const digitalAssetPreviewSchema: z.ZodObject<{
2347
+ url: z.ZodURL;
2348
+ expiresAt: z.ZodString;
2349
+ }, z.core.$strip>;
2350
+ export type DigitalAssetPreview = z.infer<typeof digitalAssetPreviewSchema>;
2351
+ /** 주문상품의 다운로드 제공 정보 — 주문 응답의 `fulfillment.download` */
2352
+ export declare const orderItemDownloadSchema: z.ZodObject<{
2353
+ count: z.ZodNumber;
2354
+ limit: z.ZodNumber;
2355
+ expiresAt: z.ZodNullable<z.ZodString>;
2356
+ firstDownloadedAt: z.ZodNullable<z.ZodString>;
2357
+ files: z.ZodArray<z.ZodObject<{
2358
+ assetId: z.ZodString;
2359
+ fileName: z.ZodString;
2360
+ sizeBytes: z.ZodNullable<z.ZodNumber>;
2361
+ }, z.core.$strip>>;
2362
+ }, z.core.$strip>;
2363
+ export type OrderItemDownload = z.infer<typeof orderItemDownloadSchema>;
2364
+ //#endregion
2365
+ //#region src/schemas/fulfillment-code.d.ts
2366
+ /**
2367
+ * 코드 발급 상품의 코드 풀 (이슈 #48 단계 2) — 라이선스 키·기프트 코드처럼 결제 확정과 함께 한 개씩 배정하는 코드다.
2368
+ *
2369
+ * **평문 코드는 두 경로로만 나간다** — 구매자 열람(`POST /storefront/v1/me/order-items/{id}/fulfillment/reveal`)과 셀러 콘솔
2370
+ * 열람(`POST /v1/fulfillment-codes/{codeId}/reveal`, 콘솔 전용). 목록·주문·웹훅·API 로그에는 가린 값(`hint`)만 싣는다.
2371
+ * 코드는 결제 자격 증명과 같은 키링·AES-256-GCM으로 암호화해 저장한다.
2372
+ */
2373
+ /**
2374
+ * 코드 상태.
2375
+ * - `AVAILABLE` 판매 가능 — 재고로 센다
2376
+ * - `ASSIGNED` 주문상품에 배정됨
2377
+ * - `REVOKED` 환불로 회수됨(구매자 화면에서 숨긴다. 코드 자체의 무효화는 셀러 시스템 몫이다)
2378
+ * - `EXPIRED` 유효기간이 지나 배정하지 않음
2379
+ * - `VOID` 셀러가 폐기함
2380
+ */
2381
+ export declare const fulfillmentCodeStatusSchema: z.ZodEnum<{
2382
+ REVOKED: "REVOKED";
2383
+ AVAILABLE: "AVAILABLE";
2384
+ ASSIGNED: "ASSIGNED";
2385
+ EXPIRED: "EXPIRED";
2386
+ VOID: "VOID";
2387
+ }>;
2388
+ export type FulfillmentCodeStatus = z.infer<typeof fulfillmentCodeStatusSchema>;
2389
+ /** 한 번에 올릴 수 있는 코드 수 */
2390
+ export declare const MAX_CODES_PER_UPLOAD = 10000;
2391
+ /** 코드 한 개의 최대 길이 */
2392
+ export declare const MAX_CODE_LENGTH = 200;
2393
+ /**
2394
+ * 코드 일괄 업로드 요청 — `POST /v1/products/{productId}/codes`. `codes`(배열)와 `csv`(본문) 중 하나를 보낸다.
2395
+ * 앞뒤 공백은 지우고 빈 줄은 건너뛴다. 같은 상품에 이미 있는 코드와 요청 안의 중복은 받지 않는다(`duplicates`).
2396
+ */
2397
+ export declare const fulfillmentCodeUploadRequestSchema: z.ZodObject<{
2398
+ variantId: z.ZodOptional<z.ZodString>;
2399
+ codes: z.ZodOptional<z.ZodArray<z.ZodString>>;
2400
+ csv: z.ZodOptional<z.ZodString>;
2401
+ expiresAt: z.ZodOptional<z.ZodISODateTime>;
2402
+ }, z.core.$strip>;
2403
+ export type FulfillmentCodeUploadRequest = z.infer<typeof fulfillmentCodeUploadRequestSchema>;
2404
+ /** 받지 않은 줄 */
2405
+ export declare const fulfillmentCodeRejectionSchema: z.ZodObject<{
2406
+ line: z.ZodNumber;
2407
+ reason: z.ZodString;
2408
+ }, z.core.$strip>;
2409
+ /** 업로드 결과 — 배치 요약 */
2410
+ export declare const fulfillmentCodeBatchSchema: z.ZodObject<{
2411
+ batchId: z.ZodString;
2412
+ productId: z.ZodString;
2413
+ variantId: z.ZodString;
2414
+ total: z.ZodNumber;
2415
+ accepted: z.ZodNumber;
2416
+ duplicates: z.ZodNumber;
2417
+ rejected: z.ZodArray<z.ZodObject<{
2418
+ line: z.ZodNumber;
2419
+ reason: z.ZodString;
2420
+ }, z.core.$strip>>;
2421
+ expiresAt: z.ZodNullable<z.ZodString>;
2422
+ createdAt: z.ZodString;
2423
+ }, z.core.$strip>;
2424
+ export type FulfillmentCodeBatch = z.infer<typeof fulfillmentCodeBatchSchema>;
2425
+ /** 코드 목록의 한 줄 — **가린 값만** 싣는다 */
2426
+ export declare const fulfillmentCodeSchema: z.ZodObject<{
2427
+ codeId: z.ZodString;
2428
+ productId: z.ZodString;
2429
+ variantId: z.ZodString;
2430
+ batchId: z.ZodNullable<z.ZodString>;
2431
+ hint: z.ZodString;
2432
+ status: z.ZodString;
2433
+ orderItemId: z.ZodNullable<z.ZodString>;
2434
+ assignedAt: z.ZodNullable<z.ZodString>;
2435
+ revealedAt: z.ZodNullable<z.ZodString>;
2436
+ expiresAt: z.ZodNullable<z.ZodString>;
2437
+ createdAt: z.ZodString;
2438
+ }, z.core.$strip>;
2439
+ export type FulfillmentCode = z.infer<typeof fulfillmentCodeSchema>;
2440
+ export declare const fulfillmentCodePageSchema: z.ZodObject<{
2441
+ page: z.ZodNumber;
2442
+ size: z.ZodNumber;
2443
+ totalElements: z.ZodNumber;
2444
+ totalPages: z.ZodNumber;
2445
+ contents: z.ZodArray<z.ZodObject<{
2446
+ codeId: z.ZodString;
2447
+ productId: z.ZodString;
2448
+ variantId: z.ZodString;
2449
+ batchId: z.ZodNullable<z.ZodString>;
2450
+ hint: z.ZodString;
2451
+ status: z.ZodString;
2452
+ orderItemId: z.ZodNullable<z.ZodString>;
2453
+ assignedAt: z.ZodNullable<z.ZodString>;
2454
+ revealedAt: z.ZodNullable<z.ZodString>;
2455
+ expiresAt: z.ZodNullable<z.ZodString>;
2456
+ createdAt: z.ZodString;
2457
+ }, z.core.$strip>>;
2458
+ available: z.ZodNumber;
2459
+ }, z.core.$strip>;
2460
+ export type FulfillmentCodePage = z.infer<typeof fulfillmentCodePageSchema>;
2461
+ /** `GET /v1/products/{productId}/codes` 쿼리 */
2462
+ export declare const fulfillmentCodeListQuerySchema: z.ZodObject<{
2463
+ page: z.ZodOptional<z.ZodString>;
2464
+ size: z.ZodOptional<z.ZodString>;
2465
+ status: z.ZodOptional<z.ZodEnum<{
2466
+ REVOKED: "REVOKED";
2467
+ AVAILABLE: "AVAILABLE";
2468
+ ASSIGNED: "ASSIGNED";
2469
+ EXPIRED: "EXPIRED";
2470
+ VOID: "VOID";
2471
+ }>>;
2472
+ variantId: z.ZodOptional<z.ZodString>;
2473
+ batchId: z.ZodOptional<z.ZodString>;
2474
+ orderItemId: z.ZodOptional<z.ZodString>;
2475
+ }, z.core.$strip>;
2476
+ /** 셀러 콘솔 코드 열람 응답 — `POST /v1/fulfillment-codes/{codeId}/reveal` */
2477
+ export declare const fulfillmentCodeRevealSchema: z.ZodObject<{
2478
+ codeId: z.ZodString;
2479
+ code: z.ZodString;
2480
+ }, z.core.$strip>;
2481
+ export type FulfillmentCodeReveal = z.infer<typeof fulfillmentCodeRevealSchema>;
2482
+ /** 주문상품에 배정된 코드의 가린 값 — 주문 응답의 `fulfillment.codes` */
2483
+ export declare const orderItemCodeSchema: z.ZodObject<{
2484
+ codeId: z.ZodString;
2485
+ hint: z.ZodString;
2486
+ status: z.ZodString;
2487
+ revealedAt: z.ZodNullable<z.ZodString>;
2488
+ }, z.core.$strip>;
2489
+ export type OrderItemCode = z.infer<typeof orderItemCodeSchema>;
2490
+ //#endregion
2013
2491
  //#region src/schemas/login.d.ts
2014
2492
  /** 소셜 로그인 공급자 */
2015
2493
  export declare const loginProviderSchema: z.ZodEnum<{
@@ -2093,10 +2571,10 @@ export declare const inquirySchema: z.ZodObject<{
2093
2571
  orderItemId: z.ZodNullable<z.ZodString>;
2094
2572
  category: z.ZodEnum<{
2095
2573
  ETC: "ETC";
2574
+ PRODUCT: "PRODUCT";
2096
2575
  DELIVERY: "DELIVERY";
2097
2576
  RETURN: "RETURN";
2098
2577
  EXCHANGE: "EXCHANGE";
2099
- PRODUCT: "PRODUCT";
2100
2578
  }>;
2101
2579
  content: z.ZodString;
2102
2580
  secret: z.ZodBoolean;
@@ -2273,6 +2751,7 @@ export declare const eventTypeSchema: z.ZodEnum<{
2273
2751
  "ORDER.PURCHASE_DECIDED": "ORDER.PURCHASE_DECIDED";
2274
2752
  "ORDER.ADDRESS_CHANGE_REQUESTED": "ORDER.ADDRESS_CHANGE_REQUESTED";
2275
2753
  "ORDER.CANCELED": "ORDER.CANCELED";
2754
+ "ORDER.FULFILLED": "ORDER.FULFILLED";
2276
2755
  "CLAIM.CANCEL_REQUESTED": "CLAIM.CANCEL_REQUESTED";
2277
2756
  "CLAIM.RETURN_REQUESTED": "CLAIM.RETURN_REQUESTED";
2278
2757
  "CLAIM.EXCHANGE_REQUESTED": "CLAIM.EXCHANGE_REQUESTED";
@@ -2298,6 +2777,7 @@ export declare const webhookSchema: z.ZodObject<{
2298
2777
  "ORDER.PURCHASE_DECIDED": "ORDER.PURCHASE_DECIDED";
2299
2778
  "ORDER.ADDRESS_CHANGE_REQUESTED": "ORDER.ADDRESS_CHANGE_REQUESTED";
2300
2779
  "ORDER.CANCELED": "ORDER.CANCELED";
2780
+ "ORDER.FULFILLED": "ORDER.FULFILLED";
2301
2781
  "CLAIM.CANCEL_REQUESTED": "CLAIM.CANCEL_REQUESTED";
2302
2782
  "CLAIM.RETURN_REQUESTED": "CLAIM.RETURN_REQUESTED";
2303
2783
  "CLAIM.EXCHANGE_REQUESTED": "CLAIM.EXCHANGE_REQUESTED";
@@ -2327,6 +2807,7 @@ export declare const webhookCreatedSchema: z.ZodObject<{
2327
2807
  "ORDER.PURCHASE_DECIDED": "ORDER.PURCHASE_DECIDED";
2328
2808
  "ORDER.ADDRESS_CHANGE_REQUESTED": "ORDER.ADDRESS_CHANGE_REQUESTED";
2329
2809
  "ORDER.CANCELED": "ORDER.CANCELED";
2810
+ "ORDER.FULFILLED": "ORDER.FULFILLED";
2330
2811
  "CLAIM.CANCEL_REQUESTED": "CLAIM.CANCEL_REQUESTED";
2331
2812
  "CLAIM.RETURN_REQUESTED": "CLAIM.RETURN_REQUESTED";
2332
2813
  "CLAIM.EXCHANGE_REQUESTED": "CLAIM.EXCHANGE_REQUESTED";
@@ -2406,6 +2887,7 @@ export declare const webhookDeliverySchema: z.ZodObject<{
2406
2887
  "ORDER.PURCHASE_DECIDED": "ORDER.PURCHASE_DECIDED";
2407
2888
  "ORDER.ADDRESS_CHANGE_REQUESTED": "ORDER.ADDRESS_CHANGE_REQUESTED";
2408
2889
  "ORDER.CANCELED": "ORDER.CANCELED";
2890
+ "ORDER.FULFILLED": "ORDER.FULFILLED";
2409
2891
  "CLAIM.CANCEL_REQUESTED": "CLAIM.CANCEL_REQUESTED";
2410
2892
  "CLAIM.RETURN_REQUESTED": "CLAIM.RETURN_REQUESTED";
2411
2893
  "CLAIM.EXCHANGE_REQUESTED": "CLAIM.EXCHANGE_REQUESTED";
@@ -2458,6 +2940,7 @@ export declare const webhookDeliveryDetailSchema: z.ZodObject<{
2458
2940
  "ORDER.PURCHASE_DECIDED": "ORDER.PURCHASE_DECIDED";
2459
2941
  "ORDER.ADDRESS_CHANGE_REQUESTED": "ORDER.ADDRESS_CHANGE_REQUESTED";
2460
2942
  "ORDER.CANCELED": "ORDER.CANCELED";
2943
+ "ORDER.FULFILLED": "ORDER.FULFILLED";
2461
2944
  "CLAIM.CANCEL_REQUESTED": "CLAIM.CANCEL_REQUESTED";
2462
2945
  "CLAIM.RETURN_REQUESTED": "CLAIM.RETURN_REQUESTED";
2463
2946
  "CLAIM.EXCHANGE_REQUESTED": "CLAIM.EXCHANGE_REQUESTED";
@@ -2519,6 +3002,7 @@ export declare const webhookDeliveryListQuerySchema: z.ZodObject<{
2519
3002
  "ORDER.PURCHASE_DECIDED": "ORDER.PURCHASE_DECIDED";
2520
3003
  "ORDER.ADDRESS_CHANGE_REQUESTED": "ORDER.ADDRESS_CHANGE_REQUESTED";
2521
3004
  "ORDER.CANCELED": "ORDER.CANCELED";
3005
+ "ORDER.FULFILLED": "ORDER.FULFILLED";
2522
3006
  "CLAIM.CANCEL_REQUESTED": "CLAIM.CANCEL_REQUESTED";
2523
3007
  "CLAIM.RETURN_REQUESTED": "CLAIM.RETURN_REQUESTED";
2524
3008
  "CLAIM.EXCHANGE_REQUESTED": "CLAIM.EXCHANGE_REQUESTED";
@@ -2545,6 +3029,7 @@ export declare const webhookTestRequestSchema: z.ZodObject<{
2545
3029
  "ORDER.PURCHASE_DECIDED": "ORDER.PURCHASE_DECIDED";
2546
3030
  "ORDER.ADDRESS_CHANGE_REQUESTED": "ORDER.ADDRESS_CHANGE_REQUESTED";
2547
3031
  "ORDER.CANCELED": "ORDER.CANCELED";
3032
+ "ORDER.FULFILLED": "ORDER.FULFILLED";
2548
3033
  "CLAIM.CANCEL_REQUESTED": "CLAIM.CANCEL_REQUESTED";
2549
3034
  "CLAIM.RETURN_REQUESTED": "CLAIM.RETURN_REQUESTED";
2550
3035
  "CLAIM.EXCHANGE_REQUESTED": "CLAIM.EXCHANGE_REQUESTED";
@@ -2585,6 +3070,7 @@ export declare const webhookRequestSchema: z.ZodObject<{
2585
3070
  "ORDER.PURCHASE_DECIDED": "ORDER.PURCHASE_DECIDED";
2586
3071
  "ORDER.ADDRESS_CHANGE_REQUESTED": "ORDER.ADDRESS_CHANGE_REQUESTED";
2587
3072
  "ORDER.CANCELED": "ORDER.CANCELED";
3073
+ "ORDER.FULFILLED": "ORDER.FULFILLED";
2588
3074
  "CLAIM.CANCEL_REQUESTED": "CLAIM.CANCEL_REQUESTED";
2589
3075
  "CLAIM.RETURN_REQUESTED": "CLAIM.RETURN_REQUESTED";
2590
3076
  "CLAIM.EXCHANGE_REQUESTED": "CLAIM.EXCHANGE_REQUESTED";
@@ -2664,77 +3150,577 @@ export declare const reviewReportResultSchema: z.ZodObject<{
2664
3150
  }, z.core.$strip>;
2665
3151
  export type ReviewReportResult = z.infer<typeof reviewReportResultSchema>;
2666
3152
  //#endregion
2667
- //#region src/schemas/order.d.ts
2668
- export declare const orderSummarySchema: z.ZodObject<{
2669
- orderId: z.ZodString;
2670
- ordererName: z.ZodString;
2671
- itemCount: z.ZodNumber;
2672
- totalAmount: z.ZodNumber;
2673
- representativeStatus: z.ZodEnum<{
2674
- PAID: "PAID";
2675
- CANCELED: "CANCELED";
2676
- PAYMENT_WAITING: "PAYMENT_WAITING";
2677
- CONFIRMED: "CONFIRMED";
2678
- DISPATCHED: "DISPATCHED";
2679
- DELIVERING: "DELIVERING";
2680
- DELIVERED: "DELIVERED";
2681
- PURCHASE_DECIDED: "PURCHASE_DECIDED";
2682
- }>;
2683
- orderedAt: z.ZodString;
2684
- testPayment: z.ZodBoolean;
2685
- }, z.core.$strip>;
2686
- export type OrderSummary = z.infer<typeof orderSummarySchema>;
2687
- export declare const shippingAddressSchema: z.ZodObject<{
2688
- receiverName: z.ZodString;
2689
- phone: z.ZodString;
2690
- zipCode: z.ZodString;
2691
- address1: z.ZodString;
2692
- address2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2693
- deliveryMemo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2694
- entranceCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2695
- }, z.core.$strip>;
2696
- export type ShippingAddress = z.infer<typeof shippingAddressSchema>;
2697
- export declare const orderItemSchema: z.ZodObject<{
2698
- orderItemId: z.ZodString;
2699
- orderId: z.ZodString;
2700
- status: z.ZodEnum<{
2701
- PAID: "PAID";
2702
- CANCELED: "CANCELED";
2703
- PAYMENT_WAITING: "PAYMENT_WAITING";
2704
- CONFIRMED: "CONFIRMED";
2705
- DISPATCHED: "DISPATCHED";
2706
- DELIVERING: "DELIVERING";
2707
- DELIVERED: "DELIVERED";
2708
- PURCHASE_DECIDED: "PURCHASE_DECIDED";
2709
- }>;
2710
- claimStatus: z.ZodNullable<z.ZodEnum<{
2711
- CANCEL_REQUESTED: "CANCEL_REQUESTED";
2712
- RETURN_REQUESTED: "RETURN_REQUESTED";
2713
- EXCHANGE_REQUESTED: "EXCHANGE_REQUESTED";
2714
- }>>;
2715
- productId: z.ZodString;
2716
- productName: z.ZodString;
2717
- optionId: z.ZodNullable<z.ZodString>;
2718
- optionName: z.ZodNullable<z.ZodString>;
2719
- sellerCode: z.ZodNullable<z.ZodString>;
2720
- quantity: z.ZodNumber;
2721
- canceledQuantity: z.ZodNumber;
2722
- activeQuantity: z.ZodNumber;
2723
- unitPrice: z.ZodNumber;
2724
- discountAmount: z.ZodNumber;
2725
- totalPrice: z.ZodNumber;
2726
- hold: z.ZodNullable<z.ZodObject<{
2727
- reason: z.ZodString;
2728
- expectedDispatchDate: z.ZodString;
2729
- }, z.core.$strip>>;
2730
- autoDecisionDate: z.ZodNullable<z.ZodString>;
2731
- sellerMemo: z.ZodNullable<z.ZodString>;
2732
- orderedAt: z.ZodString;
2733
- lastChangedAt: z.ZodString;
2734
- lastChangedType: z.ZodEnum<{
2735
- "ORDER.PAID": "ORDER.PAID";
2736
- "ORDER.CONFIRMED": "ORDER.CONFIRMED";
2737
- "ORDER.DISPATCHED": "ORDER.DISPATCHED";
3153
+ //#region src/schemas/fulfillment.d.ts
3154
+ /**
3155
+ * 상품 유형과 제공 방식 (이슈 #48) — 배송이 필요 없는 상품을 팔기 위한 축이다.
3156
+ *
3157
+ * **상품 유형은 제공 방식 하나로 표현한다.** `fulfillmentType` 한 필드가 배송 필요 여부, 이행 흐름, 재고 의미를 정한다.
3158
+ * 코드 곳곳에서 유형 이름으로 분기하지 않고 이 파일의 판정 함수(`requiresShipping`·`fulfillmentRuleOf`)를 지난다.
3159
+ * 유형이 늘어나도 판정표 한 곳만 고치면 배송비 계산·결제 시작·클레임·콘솔 버튼이 같이 따라온다.
3160
+ *
3161
+ * 주문상품 상태 enum은 바꾸지 않는다. 비실물의 **제공 완료는 `DELIVERED`를 재사용한다** — 새 상태를 더하면 기존 소비자의
3162
+ * 상태 분기(배송완료 뒤 구매확정 대기, 반품 가능 판정)가 새 값을 모른다. 표시는 `fulfillmentType`으로 가른다.
3163
+ */
3164
+ /**
3165
+ * 상품 유형.
3166
+ * - `SHIPPING` 배송 상품(기본, 이 필드 이전의 상품 전부)
3167
+ * - `DOWNLOAD` 파일 다운로드
3168
+ * - `CODE` 코드 발급(라이선스 키·기프트 코드)
3169
+ * - `SERVICE` 이용권·상품권·서비스(예약 없음)
3170
+ * - `PICKUP` 방문 수령 실물
3171
+ */
3172
+ export declare const fulfillmentTypeSchema: z.ZodEnum<{
3173
+ SHIPPING: "SHIPPING";
3174
+ DOWNLOAD: "DOWNLOAD";
3175
+ CODE: "CODE";
3176
+ SERVICE: "SERVICE";
3177
+ PICKUP: "PICKUP";
3178
+ }>;
3179
+ export type FulfillmentType = z.infer<typeof fulfillmentTypeSchema>;
3180
+ /** 제공 방식 — `AUTO`는 결제 확정과 함께 제공하고, `MANUAL`은 셀러가 제공 처리한다 */
3181
+ export declare const fulfillmentModeSchema: z.ZodEnum<{
3182
+ AUTO: "AUTO";
3183
+ MANUAL: "MANUAL";
3184
+ }>;
3185
+ export type FulfillmentMode = z.infer<typeof fulfillmentModeSchema>;
3186
+ /**
3187
+ * 응답 스키마용 유형 — 서버가 나중에 유형을 더해도 옛 SDK가 응답 파싱에서 깨지지 않게 문자열로 받는다.
3188
+ * 요청은 `fulfillmentTypeSchema`(닫힌 enum)로 검증한다.
3189
+ */
3190
+ export declare const fulfillmentTypeResponseSchema: z.ZodString;
3191
+ /** 유형 하나의 규칙 — 배송·제공·재고·클레임이 이 표를 읽는다 */
3192
+ export interface FulfillmentRule {
3193
+ /** 택배 배송이 필요한가 — 배송비·배송지·발송 흐름의 대상인가 */
3194
+ requiresShipping: boolean;
3195
+ /** 허용하는 제공 방식. 배송 상품은 제공 방식이 없다(빈 배열) */
3196
+ modes: readonly FulfillmentMode[];
3197
+ /** 제공 방식을 정하지 않았을 때의 기본값. 배송 상품은 null */
3198
+ defaultMode: FulfillmentMode | null;
3199
+ /** 반품에 수거가 필요한가 — 실물만 수거한다(방문 수령 포함) */
3200
+ requiresCollection: boolean;
3201
+ /** 교환을 받는가 — 실물만 받는다 */
3202
+ exchangeSupported: boolean;
3203
+ }
3204
+ /**
3205
+ * 유형별 규칙표 — **유일한 원천이다.**
3206
+ *
3207
+ * `PICKUP`은 실물이라 반품 수거와 교환을 받지만 택배 배송은 없다. `DOWNLOAD`는 결제 즉시 권한을 발급하므로 `AUTO`만,
3208
+ * `PICKUP`은 셀러가 수령 완료를 누르므로 `MANUAL`만 둔다.
3209
+ */
3210
+ export declare const FULFILLMENT_RULES: Readonly<Record<FulfillmentType, FulfillmentRule>>;
3211
+ /**
3212
+ * 저장된 값 → 유형. null·모르는 값은 `SHIPPING`이다 — 이 필드 이전의 주문상품(`order_items.fulfillment_type` null)과
3213
+ * 상품은 모두 배송 상품이었다.
3214
+ */
3215
+ export declare function fulfillmentTypeOf(value: string | null | undefined): FulfillmentType;
3216
+ /** 유형의 규칙 — 모르는 값은 배송 상품 규칙이다 */
3217
+ export declare function fulfillmentRuleOf(type: string | null | undefined): FulfillmentRule;
3218
+ /** 택배 배송이 필요한가 — 배송비 묶음·배송지·발송 흐름의 판정은 이 함수 하나를 지난다 */
3219
+ export declare function requiresShipping(type: string | null | undefined): boolean;
3220
+ /** 반품에 수거가 필요한가 — 비실물 반품은 수거 등록·수거 완료 없이 승인한다 */
3221
+ export declare function requiresCollection(type: string | null | undefined): boolean;
3222
+ /**
3223
+ * 유효 제공 방식 — 요청 값이 유형에 허용되면 그 값, 생략이면 유형 기본값이다. 배송 상품은 null이다.
3224
+ * 허용되지 않는 값은 `null`을 돌려주지 않고 호출부가 거부하도록 `undefined`를 돌려준다.
3225
+ */
3226
+ export declare function resolveFulfillmentMode(type: FulfillmentType, mode: FulfillmentMode | null | undefined): FulfillmentMode | null | undefined;
3227
+ /**
3228
+ * 배송이 없는 주문상품의 배송 묶음 키 (`order_items.delivery_bundle_key`).
3229
+ *
3230
+ * null로 두면 환불 정산이 #29 이전 주문의 레거시 폴백(「묶음 = 같은 상품」, 상품의 **현재** 배송비)을 탄다.
3231
+ * 이 키를 만나면 배송비 환불·차감이 0이고 `orders.delivery_fee_settlements`에 항목을 만들지 않는다.
3232
+ * 정책 지문 키(`b:…`)와 겹치지 않는다.
3233
+ */
3234
+ export declare const NO_SHIPPING_BUNDLE_KEY = "none";
3235
+ /** 배송비 유형 — 무료·유료·조건부 무료 */
3236
+ export declare const deliveryTypeSchema: z.ZodEnum<{
3237
+ FREE: "FREE";
3238
+ PAID: "PAID";
3239
+ CONDITIONAL_FREE: "CONDITIONAL_FREE";
3240
+ }>;
3241
+ export type DeliveryType = z.infer<typeof deliveryTypeSchema>;
3242
+ /** 파일 다운로드 기본값 — 횟수 5회·기간 30일(#48 결정 8) */
3243
+ export declare const DOWNLOAD_DEFAULTS: {
3244
+ readonly limit: 5;
3245
+ readonly days: 30;
3246
+ };
3247
+ /**
3248
+ * 상품 이행 — 등록(POST). 유형 키를 생략하면 그 유형의 기본값이다(`{ "type": "DOWNLOAD" }`만으로 등록할 수 있다).
3249
+ */
3250
+ export declare const productFulfillmentCreateSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
3251
+ type: z.ZodLiteral<"SHIPPING">;
3252
+ shipping: z.ZodOptional<z.ZodObject<{
3253
+ deliveryType: z.ZodDefault<z.ZodEnum<{
3254
+ FREE: "FREE";
3255
+ PAID: "PAID";
3256
+ CONDITIONAL_FREE: "CONDITIONAL_FREE";
3257
+ }>>;
3258
+ deliveryFee: z.ZodOptional<z.ZodNumber>;
3259
+ conditionalFreeAmount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
3260
+ shippingAddressId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3261
+ returnAddressId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3262
+ }, z.core.$strict>>;
3263
+ }, z.core.$strict>, z.ZodObject<{
3264
+ type: z.ZodLiteral<"DOWNLOAD">;
3265
+ download: z.ZodDefault<z.ZodObject<{
3266
+ limit: z.ZodDefault<z.ZodNumber>;
3267
+ days: z.ZodDefault<z.ZodNumber>;
3268
+ stockTracking: z.ZodDefault<z.ZodBoolean>;
3269
+ withdrawalRestricted: z.ZodDefault<z.ZodBoolean>;
3270
+ }, z.core.$strict>>;
3271
+ }, z.core.$strict>, z.ZodObject<{
3272
+ type: z.ZodLiteral<"CODE">;
3273
+ code: z.ZodDefault<z.ZodObject<{
3274
+ mode: z.ZodDefault<z.ZodEnum<{
3275
+ AUTO: "AUTO";
3276
+ MANUAL: "MANUAL";
3277
+ }>>;
3278
+ withdrawalRestricted: z.ZodDefault<z.ZodBoolean>;
3279
+ }, z.core.$strict>>;
3280
+ }, z.core.$strict>, z.ZodObject<{
3281
+ type: z.ZodLiteral<"SERVICE">;
3282
+ service: z.ZodDefault<z.ZodObject<{
3283
+ mode: z.ZodDefault<z.ZodEnum<{
3284
+ AUTO: "AUTO";
3285
+ MANUAL: "MANUAL";
3286
+ }>>;
3287
+ }, z.core.$strict>>;
3288
+ }, z.core.$strict>, z.ZodObject<{
3289
+ type: z.ZodLiteral<"PICKUP">;
3290
+ pickup: z.ZodDefault<z.ZodObject<{
3291
+ addressId: z.ZodOptional<z.ZodString>;
3292
+ }, z.core.$strict>>;
3293
+ }, z.core.$strict>], "type">;
3294
+ export type ProductFulfillmentCreate = z.infer<typeof productFulfillmentCreateSchema>;
3295
+ /** 등록 요청의 입력 모양 — 기본값이 채워지기 전(생략 가능한 필드가 optional) */
3296
+ export type ProductFulfillmentCreateInput = z.input<typeof productFulfillmentCreateSchema>;
3297
+ /**
3298
+ * 상품 이행 — 수정(PUT·PATCH). 통째 교체이고 유형 키와 그 안의 필드가 **모두 필수**다. 서버는 현재 값과 병합하지 않는다.
3299
+ * `fulfillment` 자체를 생략하면 이행을 바꾸지 않는다.
3300
+ */
3301
+ export declare const productFulfillmentUpdateSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
3302
+ type: z.ZodLiteral<"SHIPPING">;
3303
+ shipping: z.ZodObject<{
3304
+ deliveryType: z.ZodEnum<{
3305
+ FREE: "FREE";
3306
+ PAID: "PAID";
3307
+ CONDITIONAL_FREE: "CONDITIONAL_FREE";
3308
+ }>;
3309
+ deliveryFee: z.ZodNumber;
3310
+ conditionalFreeAmount: z.ZodNullable<z.ZodNumber>;
3311
+ shippingAddressId: z.ZodNullable<z.ZodString>;
3312
+ returnAddressId: z.ZodNullable<z.ZodString>;
3313
+ }, z.core.$strict>;
3314
+ }, z.core.$strict>, z.ZodObject<{
3315
+ type: z.ZodLiteral<"DOWNLOAD">;
3316
+ download: z.ZodObject<{
3317
+ limit: z.ZodNumber;
3318
+ days: z.ZodNumber;
3319
+ stockTracking: z.ZodBoolean;
3320
+ withdrawalRestricted: z.ZodBoolean;
3321
+ }, z.core.$strict>;
3322
+ }, z.core.$strict>, z.ZodObject<{
3323
+ type: z.ZodLiteral<"CODE">;
3324
+ code: z.ZodObject<{
3325
+ mode: z.ZodEnum<{
3326
+ AUTO: "AUTO";
3327
+ MANUAL: "MANUAL";
3328
+ }>;
3329
+ withdrawalRestricted: z.ZodBoolean;
3330
+ }, z.core.$strict>;
3331
+ }, z.core.$strict>, z.ZodObject<{
3332
+ type: z.ZodLiteral<"SERVICE">;
3333
+ service: z.ZodObject<{
3334
+ mode: z.ZodEnum<{
3335
+ AUTO: "AUTO";
3336
+ MANUAL: "MANUAL";
3337
+ }>;
3338
+ }, z.core.$strict>;
3339
+ }, z.core.$strict>, z.ZodObject<{
3340
+ type: z.ZodLiteral<"PICKUP">;
3341
+ pickup: z.ZodObject<{
3342
+ addressId: z.ZodString;
3343
+ }, z.core.$strict>;
3344
+ }, z.core.$strict>], "type">;
3345
+ export type ProductFulfillmentUpdate = z.infer<typeof productFulfillmentUpdateSchema>;
3346
+ /**
3347
+ * 저장된 상품 이행 — 알려진 유형의 닫힌 유니온. 서버의 상품 엔티티와 응답이 이 모양을 쓴다.
3348
+ * 응답 파싱은 `productFulfillmentResponseSchema`(열린 유니온)를 쓴다.
3349
+ */
3350
+ export declare const productFulfillmentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
3351
+ type: z.ZodLiteral<"SHIPPING">;
3352
+ shipping: z.ZodObject<{
3353
+ deliveryType: z.ZodEnum<{
3354
+ FREE: "FREE";
3355
+ PAID: "PAID";
3356
+ CONDITIONAL_FREE: "CONDITIONAL_FREE";
3357
+ }>;
3358
+ deliveryFee: z.ZodNumber;
3359
+ conditionalFreeAmount: z.ZodNullable<z.ZodNumber>;
3360
+ shippingAddressId: z.ZodNullable<z.ZodString>;
3361
+ returnAddressId: z.ZodNullable<z.ZodString>;
3362
+ }, z.core.$strip>;
3363
+ }, z.core.$strip>, z.ZodObject<{
3364
+ type: z.ZodLiteral<"DOWNLOAD">;
3365
+ download: z.ZodObject<{
3366
+ limit: z.ZodNumber;
3367
+ days: z.ZodNumber;
3368
+ stockTracking: z.ZodBoolean;
3369
+ withdrawalRestricted: z.ZodBoolean;
3370
+ }, z.core.$strip>;
3371
+ }, z.core.$strip>, z.ZodObject<{
3372
+ type: z.ZodLiteral<"CODE">;
3373
+ code: z.ZodObject<{
3374
+ mode: z.ZodEnum<{
3375
+ AUTO: "AUTO";
3376
+ MANUAL: "MANUAL";
3377
+ }>;
3378
+ withdrawalRestricted: z.ZodBoolean;
3379
+ }, z.core.$strip>;
3380
+ }, z.core.$strip>, z.ZodObject<{
3381
+ type: z.ZodLiteral<"SERVICE">;
3382
+ service: z.ZodObject<{
3383
+ mode: z.ZodEnum<{
3384
+ AUTO: "AUTO";
3385
+ MANUAL: "MANUAL";
3386
+ }>;
3387
+ }, z.core.$strip>;
3388
+ }, z.core.$strip>, z.ZodObject<{
3389
+ type: z.ZodLiteral<"PICKUP">;
3390
+ pickup: z.ZodObject<{
3391
+ addressId: z.ZodNullable<z.ZodString>;
3392
+ }, z.core.$strip>;
3393
+ }, z.core.$strip>], "type">;
3394
+ export type ProductFulfillment = z.infer<typeof productFulfillmentSchema>;
3395
+ /** 유형 이름 → 그 유형의 저장된 이행 */
3396
+ export type ProductFulfillmentOf<T extends FulfillmentType> = Extract<ProductFulfillment, {
3397
+ type: T;
3398
+ }>;
3399
+ /** 응답이 알려 주는 모르는 유형 — SDK가 아직 모르는 유형(서버가 나중에 더한 유형) */
3400
+ export interface UnknownFulfillment {
3401
+ type: "OTHER";
3402
+ /** 서버가 보낸 유형 이름 */
3403
+ rawType: string;
3404
+ }
3405
+ /**
3406
+ * 열린 응답 유니온 — 알려진 유형은 판별 유니온으로 검사하고, **모르는 유형만** `{ type: "OTHER", rawType }`로 읽는다.
3407
+ *
3408
+ * `type: z.string()` 가지를 그대로 두면 TS가 `type === "SHIPPING"`으로 좁혀도 문자열 가지가 남는다. `OTHER` 리터럴로 바꿔 좁히기를
3409
+ * 지킨다. 알려진 유형의 모양이 틀린 응답은 폴백으로 숨기지 않고 파싱 오류로 둔다.
3410
+ */
3411
+ export declare function openFulfillmentUnion<T extends z.ZodType>(known: T): z.ZodUnion<readonly [T, z.ZodPipe<z.ZodObject<{
3412
+ type: z.ZodString;
3413
+ }, z.core.$loose>, z.ZodTransform<UnknownFulfillment, {
3414
+ [x: string]: unknown;
3415
+ type: string;
3416
+ }>>]>;
3417
+ export declare const productFulfillmentResponseSchema: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
3418
+ type: z.ZodLiteral<"SHIPPING">;
3419
+ shipping: z.ZodObject<{
3420
+ deliveryType: z.ZodEnum<{
3421
+ FREE: "FREE";
3422
+ PAID: "PAID";
3423
+ CONDITIONAL_FREE: "CONDITIONAL_FREE";
3424
+ }>;
3425
+ deliveryFee: z.ZodNumber;
3426
+ conditionalFreeAmount: z.ZodNullable<z.ZodNumber>;
3427
+ shippingAddressId: z.ZodNullable<z.ZodString>;
3428
+ returnAddressId: z.ZodNullable<z.ZodString>;
3429
+ }, z.core.$strip>;
3430
+ }, z.core.$strip>, z.ZodObject<{
3431
+ type: z.ZodLiteral<"DOWNLOAD">;
3432
+ download: z.ZodObject<{
3433
+ limit: z.ZodNumber;
3434
+ days: z.ZodNumber;
3435
+ stockTracking: z.ZodBoolean;
3436
+ withdrawalRestricted: z.ZodBoolean;
3437
+ }, z.core.$strip>;
3438
+ }, z.core.$strip>, z.ZodObject<{
3439
+ type: z.ZodLiteral<"CODE">;
3440
+ code: z.ZodObject<{
3441
+ mode: z.ZodEnum<{
3442
+ AUTO: "AUTO";
3443
+ MANUAL: "MANUAL";
3444
+ }>;
3445
+ withdrawalRestricted: z.ZodBoolean;
3446
+ }, z.core.$strip>;
3447
+ }, z.core.$strip>, z.ZodObject<{
3448
+ type: z.ZodLiteral<"SERVICE">;
3449
+ service: z.ZodObject<{
3450
+ mode: z.ZodEnum<{
3451
+ AUTO: "AUTO";
3452
+ MANUAL: "MANUAL";
3453
+ }>;
3454
+ }, z.core.$strip>;
3455
+ }, z.core.$strip>, z.ZodObject<{
3456
+ type: z.ZodLiteral<"PICKUP">;
3457
+ pickup: z.ZodObject<{
3458
+ addressId: z.ZodNullable<z.ZodString>;
3459
+ }, z.core.$strip>;
3460
+ }, z.core.$strip>], "type">, z.ZodPipe<z.ZodObject<{
3461
+ type: z.ZodString;
3462
+ }, z.core.$loose>, z.ZodTransform<UnknownFulfillment, {
3463
+ [x: string]: unknown;
3464
+ type: string;
3465
+ }>>]>;
3466
+ export type ProductFulfillmentView = z.infer<typeof productFulfillmentResponseSchema>;
3467
+ /** 제공 방식 — CODE·SERVICE는 저장된 값, DOWNLOAD는 AUTO, PICKUP은 MANUAL, 배송 상품은 null */
3468
+ export declare function fulfillmentModeOf(fulfillment: ProductFulfillment): FulfillmentMode | null;
3469
+ /** 재고를 세는가 — 파일 다운로드만 끌 수 있다 */
3470
+ export declare function stockTrackingOf(fulfillment: ProductFulfillment): boolean;
3471
+ /** 청약철회 제한 대상인가 — 파일 다운로드·코드 발급만 켤 수 있다(전자상거래법 제17조 제2항 제5호, 디지털 콘텐츠) */
3472
+ export declare function withdrawalRestrictedOf(fulfillment: ProductFulfillment): boolean;
3473
+ /** 코드 풀을 쓰는가 — 코드 발급 + 자동 제공. 재고가 판매 가능 코드 수다 */
3474
+ export declare function usesCodePool(fulfillment: ProductFulfillment): boolean;
3475
+ /** 결제 확정과 함께 제공까지 끝내는가 — 비실물 + 자동 제공 */
3476
+ export declare function autoFulfillableOf(fulfillment: ProductFulfillment): boolean;
3477
+ /**
3478
+ * 주문상품의 주문 시점 이행 — 결제 확정이 주문서 줄에서 굳힌다. 상품의 현재 값이 아니다. 서버는 주문상품 컬럼
3479
+ * (`fulfillment_type`·`delivery_bundle_key`·`stock_tracked`·`withdrawal_restricted`)과 jsonb(`fulfillment_snapshot`)를 합쳐 이 모양을 만든다.
3480
+ *
3481
+ * `mode`는 **주문 시점 상품의 방식**이다. 실제 제공 방식은 제공 기록(`fulfillment.mode`)에 있고 다를 수 있다(자동 제공 상품의 수동 복구).
3482
+ */
3483
+ export declare const orderItemFulfillmentSnapshotSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
3484
+ type: z.ZodLiteral<"SHIPPING">;
3485
+ shipping: z.ZodObject<{
3486
+ bundleKey: z.ZodNullable<z.ZodString>;
3487
+ returnAddressId: z.ZodNullable<z.ZodString>;
3488
+ }, z.core.$strip>;
3489
+ }, z.core.$strip>, z.ZodObject<{
3490
+ type: z.ZodLiteral<"DOWNLOAD">;
3491
+ download: z.ZodObject<{
3492
+ limit: z.ZodNumber;
3493
+ days: z.ZodNumber;
3494
+ stockTracked: z.ZodBoolean;
3495
+ withdrawalRestricted: z.ZodBoolean;
3496
+ }, z.core.$strip>;
3497
+ }, z.core.$strip>, z.ZodObject<{
3498
+ type: z.ZodLiteral<"CODE">;
3499
+ code: z.ZodObject<{
3500
+ mode: z.ZodString;
3501
+ withdrawalRestricted: z.ZodBoolean;
3502
+ }, z.core.$strip>;
3503
+ }, z.core.$strip>, z.ZodObject<{
3504
+ type: z.ZodLiteral<"SERVICE">;
3505
+ service: z.ZodObject<{
3506
+ mode: z.ZodString;
3507
+ }, z.core.$strip>;
3508
+ }, z.core.$strip>, z.ZodObject<{
3509
+ type: z.ZodLiteral<"PICKUP">;
3510
+ pickup: z.ZodObject<{
3511
+ addressId: z.ZodNullable<z.ZodString>;
3512
+ }, z.core.$strip>;
3513
+ }, z.core.$strip>], "type">;
3514
+ export type OrderItemFulfillmentSnapshot = z.infer<typeof orderItemFulfillmentSnapshotSchema>;
3515
+ export declare const orderItemFulfillmentSnapshotResponseSchema: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
3516
+ type: z.ZodLiteral<"SHIPPING">;
3517
+ shipping: z.ZodObject<{
3518
+ bundleKey: z.ZodNullable<z.ZodString>;
3519
+ returnAddressId: z.ZodNullable<z.ZodString>;
3520
+ }, z.core.$strip>;
3521
+ }, z.core.$strip>, z.ZodObject<{
3522
+ type: z.ZodLiteral<"DOWNLOAD">;
3523
+ download: z.ZodObject<{
3524
+ limit: z.ZodNumber;
3525
+ days: z.ZodNumber;
3526
+ stockTracked: z.ZodBoolean;
3527
+ withdrawalRestricted: z.ZodBoolean;
3528
+ }, z.core.$strip>;
3529
+ }, z.core.$strip>, z.ZodObject<{
3530
+ type: z.ZodLiteral<"CODE">;
3531
+ code: z.ZodObject<{
3532
+ mode: z.ZodString;
3533
+ withdrawalRestricted: z.ZodBoolean;
3534
+ }, z.core.$strip>;
3535
+ }, z.core.$strip>, z.ZodObject<{
3536
+ type: z.ZodLiteral<"SERVICE">;
3537
+ service: z.ZodObject<{
3538
+ mode: z.ZodString;
3539
+ }, z.core.$strip>;
3540
+ }, z.core.$strip>, z.ZodObject<{
3541
+ type: z.ZodLiteral<"PICKUP">;
3542
+ pickup: z.ZodObject<{
3543
+ addressId: z.ZodNullable<z.ZodString>;
3544
+ }, z.core.$strip>;
3545
+ }, z.core.$strip>], "type">, z.ZodPipe<z.ZodObject<{
3546
+ type: z.ZodString;
3547
+ }, z.core.$loose>, z.ZodTransform<UnknownFulfillment, {
3548
+ [x: string]: unknown;
3549
+ type: string;
3550
+ }>>]>;
3551
+ export type OrderItemFulfillmentSnapshotView = z.infer<typeof orderItemFulfillmentSnapshotResponseSchema>;
3552
+ //#endregion
3553
+ //#region src/schemas/order.d.ts
3554
+ export declare const orderSummarySchema: z.ZodObject<{
3555
+ orderId: z.ZodString;
3556
+ ordererName: z.ZodString;
3557
+ itemCount: z.ZodNumber;
3558
+ totalAmount: z.ZodNumber;
3559
+ representativeStatus: z.ZodEnum<{
3560
+ PAID: "PAID";
3561
+ CANCELED: "CANCELED";
3562
+ PAYMENT_WAITING: "PAYMENT_WAITING";
3563
+ CONFIRMED: "CONFIRMED";
3564
+ DISPATCHED: "DISPATCHED";
3565
+ DELIVERING: "DELIVERING";
3566
+ DELIVERED: "DELIVERED";
3567
+ PURCHASE_DECIDED: "PURCHASE_DECIDED";
3568
+ }>;
3569
+ orderedAt: z.ZodString;
3570
+ testPayment: z.ZodBoolean;
3571
+ }, z.core.$strip>;
3572
+ export type OrderSummary = z.infer<typeof orderSummarySchema>;
3573
+ export declare const shippingAddressSchema: z.ZodObject<{
3574
+ receiverName: z.ZodString;
3575
+ phone: z.ZodString;
3576
+ zipCode: z.ZodString;
3577
+ address1: z.ZodString;
3578
+ address2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3579
+ deliveryMemo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3580
+ entranceCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3581
+ }, z.core.$strip>;
3582
+ export type ShippingAddress = z.infer<typeof shippingAddressSchema>;
3583
+ /** 비실물 주문상품의 제공 정보 (이슈 #48) */
3584
+ export declare const orderItemFulfillmentSchema: z.ZodObject<{
3585
+ status: z.ZodString;
3586
+ mode: z.ZodNullable<z.ZodString>;
3587
+ fulfilledAt: z.ZodString;
3588
+ note: z.ZodNullable<z.ZodString>;
3589
+ codes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
3590
+ codeId: z.ZodString;
3591
+ hint: z.ZodString;
3592
+ status: z.ZodString;
3593
+ revealedAt: z.ZodNullable<z.ZodString>;
3594
+ }, z.core.$strip>>>>;
3595
+ download: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodObject<{
3596
+ count: z.ZodNumber;
3597
+ limit: z.ZodNumber;
3598
+ expiresAt: z.ZodNullable<z.ZodString>;
3599
+ firstDownloadedAt: z.ZodNullable<z.ZodString>;
3600
+ files: z.ZodArray<z.ZodObject<{
3601
+ assetId: z.ZodString;
3602
+ fileName: z.ZodString;
3603
+ sizeBytes: z.ZodNullable<z.ZodNumber>;
3604
+ }, z.core.$strip>>;
3605
+ }, z.core.$strip>>>>;
3606
+ mail: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodObject<{
3607
+ status: z.ZodString;
3608
+ sentAt: z.ZodNullable<z.ZodString>;
3609
+ errorCode: z.ZodNullable<z.ZodString>;
3610
+ }, z.core.$strip>>>>;
3611
+ }, z.core.$strip>;
3612
+ /** 제공 안내 메일 재발송 결과 */
3613
+ export declare const fulfillmentMailResendSchema: z.ZodObject<{
3614
+ mailStatus: z.ZodString;
3615
+ }, z.core.$strip>;
3616
+ export type FulfillmentMailResend = z.infer<typeof fulfillmentMailResendSchema>;
3617
+ export type OrderItemFulfillment = z.infer<typeof orderItemFulfillmentSchema>;
3618
+ export declare const orderItemSchema: z.ZodObject<{
3619
+ orderItemId: z.ZodString;
3620
+ orderId: z.ZodString;
3621
+ status: z.ZodEnum<{
3622
+ PAID: "PAID";
3623
+ CANCELED: "CANCELED";
3624
+ PAYMENT_WAITING: "PAYMENT_WAITING";
3625
+ CONFIRMED: "CONFIRMED";
3626
+ DISPATCHED: "DISPATCHED";
3627
+ DELIVERING: "DELIVERING";
3628
+ DELIVERED: "DELIVERED";
3629
+ PURCHASE_DECIDED: "PURCHASE_DECIDED";
3630
+ }>;
3631
+ claimStatus: z.ZodNullable<z.ZodEnum<{
3632
+ CANCEL_REQUESTED: "CANCEL_REQUESTED";
3633
+ RETURN_REQUESTED: "RETURN_REQUESTED";
3634
+ EXCHANGE_REQUESTED: "EXCHANGE_REQUESTED";
3635
+ }>>;
3636
+ productId: z.ZodString;
3637
+ productName: z.ZodString;
3638
+ optionId: z.ZodNullable<z.ZodString>;
3639
+ optionName: z.ZodNullable<z.ZodString>;
3640
+ sellerCode: z.ZodNullable<z.ZodString>;
3641
+ fulfillmentSnapshot: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
3642
+ type: z.ZodLiteral<"SHIPPING">;
3643
+ shipping: z.ZodObject<{
3644
+ bundleKey: z.ZodNullable<z.ZodString>;
3645
+ returnAddressId: z.ZodNullable<z.ZodString>;
3646
+ }, z.core.$strip>;
3647
+ }, z.core.$strip>, z.ZodObject<{
3648
+ type: z.ZodLiteral<"DOWNLOAD">;
3649
+ download: z.ZodObject<{
3650
+ limit: z.ZodNumber;
3651
+ days: z.ZodNumber;
3652
+ stockTracked: z.ZodBoolean;
3653
+ withdrawalRestricted: z.ZodBoolean;
3654
+ }, z.core.$strip>;
3655
+ }, z.core.$strip>, z.ZodObject<{
3656
+ type: z.ZodLiteral<"CODE">;
3657
+ code: z.ZodObject<{
3658
+ mode: z.ZodString;
3659
+ withdrawalRestricted: z.ZodBoolean;
3660
+ }, z.core.$strip>;
3661
+ }, z.core.$strip>, z.ZodObject<{
3662
+ type: z.ZodLiteral<"SERVICE">;
3663
+ service: z.ZodObject<{
3664
+ mode: z.ZodString;
3665
+ }, z.core.$strip>;
3666
+ }, z.core.$strip>, z.ZodObject<{
3667
+ type: z.ZodLiteral<"PICKUP">;
3668
+ pickup: z.ZodObject<{
3669
+ addressId: z.ZodNullable<z.ZodString>;
3670
+ }, z.core.$strip>;
3671
+ }, z.core.$strip>], "type">, z.ZodPipe<z.ZodObject<{
3672
+ type: z.ZodString;
3673
+ }, z.core.$loose>, z.ZodTransform<UnknownFulfillment, {
3674
+ [x: string]: unknown;
3675
+ type: string;
3676
+ }>>]>;
3677
+ quantity: z.ZodNumber;
3678
+ canceledQuantity: z.ZodNumber;
3679
+ activeQuantity: z.ZodNumber;
3680
+ unitPrice: z.ZodNumber;
3681
+ discountAmount: z.ZodNumber;
3682
+ totalPrice: z.ZodNumber;
3683
+ couponDiscountAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3684
+ hold: z.ZodNullable<z.ZodObject<{
3685
+ reason: z.ZodString;
3686
+ expectedDispatchDate: z.ZodString;
3687
+ }, z.core.$strip>>;
3688
+ fulfillment: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodObject<{
3689
+ status: z.ZodString;
3690
+ mode: z.ZodNullable<z.ZodString>;
3691
+ fulfilledAt: z.ZodString;
3692
+ note: z.ZodNullable<z.ZodString>;
3693
+ codes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
3694
+ codeId: z.ZodString;
3695
+ hint: z.ZodString;
3696
+ status: z.ZodString;
3697
+ revealedAt: z.ZodNullable<z.ZodString>;
3698
+ }, z.core.$strip>>>>;
3699
+ download: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodObject<{
3700
+ count: z.ZodNumber;
3701
+ limit: z.ZodNumber;
3702
+ expiresAt: z.ZodNullable<z.ZodString>;
3703
+ firstDownloadedAt: z.ZodNullable<z.ZodString>;
3704
+ files: z.ZodArray<z.ZodObject<{
3705
+ assetId: z.ZodString;
3706
+ fileName: z.ZodString;
3707
+ sizeBytes: z.ZodNullable<z.ZodNumber>;
3708
+ }, z.core.$strip>>;
3709
+ }, z.core.$strip>>>>;
3710
+ mail: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodObject<{
3711
+ status: z.ZodString;
3712
+ sentAt: z.ZodNullable<z.ZodString>;
3713
+ errorCode: z.ZodNullable<z.ZodString>;
3714
+ }, z.core.$strip>>>>;
3715
+ }, z.core.$strip>>>>;
3716
+ autoDecisionDate: z.ZodNullable<z.ZodString>;
3717
+ sellerMemo: z.ZodNullable<z.ZodString>;
3718
+ orderedAt: z.ZodString;
3719
+ lastChangedAt: z.ZodString;
3720
+ lastChangedType: z.ZodEnum<{
3721
+ "ORDER.PAID": "ORDER.PAID";
3722
+ "ORDER.CONFIRMED": "ORDER.CONFIRMED";
3723
+ "ORDER.DISPATCHED": "ORDER.DISPATCHED";
2738
3724
  "ORDER.DELIVERED": "ORDER.DELIVERED";
2739
3725
  "ORDER.PURCHASE_DECIDED": "ORDER.PURCHASE_DECIDED";
2740
3726
  "ORDER.ADDRESS_CHANGE_REQUESTED": "ORDER.ADDRESS_CHANGE_REQUESTED";
@@ -2746,6 +3732,15 @@ export declare const orderItemSchema: z.ZodObject<{
2746
3732
  testPayment: z.ZodBoolean;
2747
3733
  }, z.core.$strip>;
2748
3734
  export type OrderItem = z.infer<typeof orderItemSchema>;
3735
+ /** 주문이 받은 쿠폰 한 장 (이슈 #47) */
3736
+ export declare const orderDiscountSchema: z.ZodObject<{
3737
+ couponId: z.ZodString;
3738
+ name: z.ZodString;
3739
+ kind: z.ZodString;
3740
+ discountAmount: z.ZodNumber;
3741
+ issueId: z.ZodNullable<z.ZodString>;
3742
+ }, z.core.$strip>;
3743
+ export type OrderDiscount = z.infer<typeof orderDiscountSchema>;
2749
3744
  export declare const orderSchema: z.ZodObject<{
2750
3745
  orderId: z.ZodString;
2751
3746
  orderedAt: z.ZodString;
@@ -2754,6 +3749,7 @@ export declare const orderSchema: z.ZodObject<{
2754
3749
  phone: z.ZodString;
2755
3750
  email: z.ZodOptional<z.ZodEmail>;
2756
3751
  }, z.core.$strip>;
3752
+ requiresShipping: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
2757
3753
  shippingAddress: z.ZodObject<{
2758
3754
  receiverName: z.ZodString;
2759
3755
  phone: z.ZodString;
@@ -2777,6 +3773,15 @@ export declare const orderSchema: z.ZodObject<{
2777
3773
  productAmount: z.ZodNumber;
2778
3774
  deliveryFee: z.ZodNumber;
2779
3775
  discountAmount: z.ZodNumber;
3776
+ couponDiscountAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3777
+ deliveryDiscountAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3778
+ discounts: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
3779
+ couponId: z.ZodString;
3780
+ name: z.ZodString;
3781
+ kind: z.ZodString;
3782
+ discountAmount: z.ZodNumber;
3783
+ issueId: z.ZodNullable<z.ZodString>;
3784
+ }, z.core.$strip>>>>;
2780
3785
  totalAmount: z.ZodNumber;
2781
3786
  paidAt: z.ZodNullable<z.ZodString>;
2782
3787
  cashReceipt: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodObject<{
@@ -2802,6 +3807,7 @@ export declare const orderSchema: z.ZodObject<{
2802
3807
  updatedAt: z.ZodString;
2803
3808
  }, z.core.$strip>>>>;
2804
3809
  }, z.core.$strip>;
3810
+ withdrawalAgreedAt: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
2805
3811
  testPayment: z.ZodBoolean;
2806
3812
  items: z.ZodArray<z.ZodObject<{
2807
3813
  orderItemId: z.ZodString;
@@ -2826,16 +3832,81 @@ export declare const orderSchema: z.ZodObject<{
2826
3832
  optionId: z.ZodNullable<z.ZodString>;
2827
3833
  optionName: z.ZodNullable<z.ZodString>;
2828
3834
  sellerCode: z.ZodNullable<z.ZodString>;
3835
+ fulfillmentSnapshot: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
3836
+ type: z.ZodLiteral<"SHIPPING">;
3837
+ shipping: z.ZodObject<{
3838
+ bundleKey: z.ZodNullable<z.ZodString>;
3839
+ returnAddressId: z.ZodNullable<z.ZodString>;
3840
+ }, z.core.$strip>;
3841
+ }, z.core.$strip>, z.ZodObject<{
3842
+ type: z.ZodLiteral<"DOWNLOAD">;
3843
+ download: z.ZodObject<{
3844
+ limit: z.ZodNumber;
3845
+ days: z.ZodNumber;
3846
+ stockTracked: z.ZodBoolean;
3847
+ withdrawalRestricted: z.ZodBoolean;
3848
+ }, z.core.$strip>;
3849
+ }, z.core.$strip>, z.ZodObject<{
3850
+ type: z.ZodLiteral<"CODE">;
3851
+ code: z.ZodObject<{
3852
+ mode: z.ZodString;
3853
+ withdrawalRestricted: z.ZodBoolean;
3854
+ }, z.core.$strip>;
3855
+ }, z.core.$strip>, z.ZodObject<{
3856
+ type: z.ZodLiteral<"SERVICE">;
3857
+ service: z.ZodObject<{
3858
+ mode: z.ZodString;
3859
+ }, z.core.$strip>;
3860
+ }, z.core.$strip>, z.ZodObject<{
3861
+ type: z.ZodLiteral<"PICKUP">;
3862
+ pickup: z.ZodObject<{
3863
+ addressId: z.ZodNullable<z.ZodString>;
3864
+ }, z.core.$strip>;
3865
+ }, z.core.$strip>], "type">, z.ZodPipe<z.ZodObject<{
3866
+ type: z.ZodString;
3867
+ }, z.core.$loose>, z.ZodTransform<UnknownFulfillment, {
3868
+ [x: string]: unknown;
3869
+ type: string;
3870
+ }>>]>;
2829
3871
  quantity: z.ZodNumber;
2830
3872
  canceledQuantity: z.ZodNumber;
2831
3873
  activeQuantity: z.ZodNumber;
2832
3874
  unitPrice: z.ZodNumber;
2833
3875
  discountAmount: z.ZodNumber;
2834
3876
  totalPrice: z.ZodNumber;
3877
+ couponDiscountAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
2835
3878
  hold: z.ZodNullable<z.ZodObject<{
2836
3879
  reason: z.ZodString;
2837
3880
  expectedDispatchDate: z.ZodString;
2838
3881
  }, z.core.$strip>>;
3882
+ fulfillment: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodObject<{
3883
+ status: z.ZodString;
3884
+ mode: z.ZodNullable<z.ZodString>;
3885
+ fulfilledAt: z.ZodString;
3886
+ note: z.ZodNullable<z.ZodString>;
3887
+ codes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
3888
+ codeId: z.ZodString;
3889
+ hint: z.ZodString;
3890
+ status: z.ZodString;
3891
+ revealedAt: z.ZodNullable<z.ZodString>;
3892
+ }, z.core.$strip>>>>;
3893
+ download: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodObject<{
3894
+ count: z.ZodNumber;
3895
+ limit: z.ZodNumber;
3896
+ expiresAt: z.ZodNullable<z.ZodString>;
3897
+ firstDownloadedAt: z.ZodNullable<z.ZodString>;
3898
+ files: z.ZodArray<z.ZodObject<{
3899
+ assetId: z.ZodString;
3900
+ fileName: z.ZodString;
3901
+ sizeBytes: z.ZodNullable<z.ZodNumber>;
3902
+ }, z.core.$strip>>;
3903
+ }, z.core.$strip>>>>;
3904
+ mail: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodObject<{
3905
+ status: z.ZodString;
3906
+ sentAt: z.ZodNullable<z.ZodString>;
3907
+ errorCode: z.ZodNullable<z.ZodString>;
3908
+ }, z.core.$strip>>>>;
3909
+ }, z.core.$strip>>>>;
2839
3910
  autoDecisionDate: z.ZodNullable<z.ZodString>;
2840
3911
  sellerMemo: z.ZodNullable<z.ZodString>;
2841
3912
  orderedAt: z.ZodString;
@@ -2911,16 +3982,81 @@ export declare const orderItemPageSchema: z.ZodObject<{
2911
3982
  optionId: z.ZodNullable<z.ZodString>;
2912
3983
  optionName: z.ZodNullable<z.ZodString>;
2913
3984
  sellerCode: z.ZodNullable<z.ZodString>;
3985
+ fulfillmentSnapshot: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
3986
+ type: z.ZodLiteral<"SHIPPING">;
3987
+ shipping: z.ZodObject<{
3988
+ bundleKey: z.ZodNullable<z.ZodString>;
3989
+ returnAddressId: z.ZodNullable<z.ZodString>;
3990
+ }, z.core.$strip>;
3991
+ }, z.core.$strip>, z.ZodObject<{
3992
+ type: z.ZodLiteral<"DOWNLOAD">;
3993
+ download: z.ZodObject<{
3994
+ limit: z.ZodNumber;
3995
+ days: z.ZodNumber;
3996
+ stockTracked: z.ZodBoolean;
3997
+ withdrawalRestricted: z.ZodBoolean;
3998
+ }, z.core.$strip>;
3999
+ }, z.core.$strip>, z.ZodObject<{
4000
+ type: z.ZodLiteral<"CODE">;
4001
+ code: z.ZodObject<{
4002
+ mode: z.ZodString;
4003
+ withdrawalRestricted: z.ZodBoolean;
4004
+ }, z.core.$strip>;
4005
+ }, z.core.$strip>, z.ZodObject<{
4006
+ type: z.ZodLiteral<"SERVICE">;
4007
+ service: z.ZodObject<{
4008
+ mode: z.ZodString;
4009
+ }, z.core.$strip>;
4010
+ }, z.core.$strip>, z.ZodObject<{
4011
+ type: z.ZodLiteral<"PICKUP">;
4012
+ pickup: z.ZodObject<{
4013
+ addressId: z.ZodNullable<z.ZodString>;
4014
+ }, z.core.$strip>;
4015
+ }, z.core.$strip>], "type">, z.ZodPipe<z.ZodObject<{
4016
+ type: z.ZodString;
4017
+ }, z.core.$loose>, z.ZodTransform<UnknownFulfillment, {
4018
+ [x: string]: unknown;
4019
+ type: string;
4020
+ }>>]>;
2914
4021
  quantity: z.ZodNumber;
2915
4022
  canceledQuantity: z.ZodNumber;
2916
4023
  activeQuantity: z.ZodNumber;
2917
4024
  unitPrice: z.ZodNumber;
2918
4025
  discountAmount: z.ZodNumber;
2919
4026
  totalPrice: z.ZodNumber;
4027
+ couponDiscountAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
2920
4028
  hold: z.ZodNullable<z.ZodObject<{
2921
4029
  reason: z.ZodString;
2922
4030
  expectedDispatchDate: z.ZodString;
2923
4031
  }, z.core.$strip>>;
4032
+ fulfillment: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodObject<{
4033
+ status: z.ZodString;
4034
+ mode: z.ZodNullable<z.ZodString>;
4035
+ fulfilledAt: z.ZodString;
4036
+ note: z.ZodNullable<z.ZodString>;
4037
+ codes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
4038
+ codeId: z.ZodString;
4039
+ hint: z.ZodString;
4040
+ status: z.ZodString;
4041
+ revealedAt: z.ZodNullable<z.ZodString>;
4042
+ }, z.core.$strip>>>>;
4043
+ download: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodObject<{
4044
+ count: z.ZodNumber;
4045
+ limit: z.ZodNumber;
4046
+ expiresAt: z.ZodNullable<z.ZodString>;
4047
+ firstDownloadedAt: z.ZodNullable<z.ZodString>;
4048
+ files: z.ZodArray<z.ZodObject<{
4049
+ assetId: z.ZodString;
4050
+ fileName: z.ZodString;
4051
+ sizeBytes: z.ZodNullable<z.ZodNumber>;
4052
+ }, z.core.$strip>>;
4053
+ }, z.core.$strip>>>>;
4054
+ mail: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodObject<{
4055
+ status: z.ZodString;
4056
+ sentAt: z.ZodNullable<z.ZodString>;
4057
+ errorCode: z.ZodNullable<z.ZodString>;
4058
+ }, z.core.$strip>>>>;
4059
+ }, z.core.$strip>>>>;
2924
4060
  autoDecisionDate: z.ZodNullable<z.ZodString>;
2925
4061
  sellerMemo: z.ZodNullable<z.ZodString>;
2926
4062
  orderedAt: z.ZodString;
@@ -2962,6 +4098,7 @@ export declare const orderListQuerySchema: z.ZodObject<{
2962
4098
  PURCHASE_DECIDED: "PURCHASE_DECIDED";
2963
4099
  }>>;
2964
4100
  keyword: z.ZodOptional<z.ZodString>;
4101
+ fulfillmentType: z.ZodOptional<z.ZodString>;
2965
4102
  testPayment: z.ZodOptional<z.ZodEnum<{
2966
4103
  true: "true";
2967
4104
  false: "false";
@@ -2998,6 +4135,8 @@ export interface OrderListParams extends PageParams {
2998
4135
  orderedTo?: string;
2999
4136
  status?: z.infer<typeof orderItemStatusSchema>;
3000
4137
  keyword?: string;
4138
+ /** 상품 유형 필터 — 이 유형의 주문상품이 하나라도 있는 주문(이슈 #48) */
4139
+ fulfillmentType?: string;
3001
4140
  /** 테스트 결제 필터 — `"true"` 테스트 결제만, `"false"` 실결제만, 생략하면 전부 */
3002
4141
  testPayment?: "true" | "false";
3003
4142
  }
@@ -3122,6 +4261,21 @@ export declare const cancelBySellerRequestSchema: z.ZodObject<{
3122
4261
  quantity: z.ZodOptional<z.ZodNumber>;
3123
4262
  }, z.core.$strip>;
3124
4263
  export type CancelBySellerRequest = z.infer<typeof cancelBySellerRequestSchema>;
4264
+ /**
4265
+ * 제공 처리 요청 (이슈 #48) — `POST /v1/order-items/{orderItemId}/fulfill`. 수동 제공 비실물 주문상품(이용권·방문 수령 등)을
4266
+ * 제공 완료(`DELIVERED`)로 바꾼다.
4267
+ */
4268
+ export declare const fulfillRequestSchema: z.ZodObject<{
4269
+ note: z.ZodOptional<z.ZodString>;
4270
+ codes: z.ZodOptional<z.ZodArray<z.ZodString>>;
4271
+ }, z.core.$strip>;
4272
+ export type FulfillRequest = z.infer<typeof fulfillRequestSchema>;
4273
+ /** 제공 처리 일괄 요청 — `POST /v1/order-items/fulfill` */
4274
+ export declare const fulfillBulkRequestSchema: z.ZodObject<{
4275
+ orderItemIds: z.ZodArray<z.ZodString>;
4276
+ note: z.ZodOptional<z.ZodString>;
4277
+ }, z.core.$strip>;
4278
+ export type FulfillBulkRequest = z.infer<typeof fulfillBulkRequestSchema>;
3125
4279
  /** `POST /v1/order-items/{orderItemId}/cancel` 응답 — 셀러 직권취소 환불 결과 */
3126
4280
  export declare const cancelBySellerResultSchema: z.ZodObject<{
3127
4281
  orderItemId: z.ZodString;
@@ -3130,6 +4284,8 @@ export declare const cancelBySellerResultSchema: z.ZodObject<{
3130
4284
  canceledQuantity: z.ZodNumber;
3131
4285
  deliveryFeeRefundAmount: z.ZodNumber;
3132
4286
  deliveryFeeChargeAmount: z.ZodNumber;
4287
+ couponChargeAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
4288
+ couponChargeRefundAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3133
4289
  refundedAt: z.ZodString;
3134
4290
  }, z.core.$strip>;
3135
4291
  export type CancelBySellerResult = z.infer<typeof cancelBySellerResultSchema>;
@@ -4166,26 +5322,20 @@ export interface PaymentListParams extends PageParams {
4166
5322
  //#endregion
4167
5323
  //#region src/schemas/product.d.ts
4168
5324
  export declare const productStatusSchema: z.ZodEnum<{
4169
- SALE: "SALE";
4170
5325
  SUSPENDED: "SUSPENDED";
4171
- OUT_OF_STOCK: "OUT_OF_STOCK";
4172
5326
  CLOSED: "CLOSED";
5327
+ SALE: "SALE";
5328
+ OUT_OF_STOCK: "OUT_OF_STOCK";
4173
5329
  }>;
4174
5330
  export type ProductStatus = z.infer<typeof productStatusSchema>;
4175
- export declare const deliveryTypeSchema: z.ZodEnum<{
4176
- FREE: "FREE";
4177
- PAID: "PAID";
4178
- CONDITIONAL_FREE: "CONDITIONAL_FREE";
4179
- }>;
4180
- export type DeliveryType = z.infer<typeof deliveryTypeSchema>;
4181
5331
  export declare const productSummarySchema: z.ZodObject<{
4182
5332
  productId: z.ZodString;
4183
5333
  name: z.ZodString;
4184
5334
  status: z.ZodEnum<{
4185
- SALE: "SALE";
4186
5335
  SUSPENDED: "SUSPENDED";
4187
- OUT_OF_STOCK: "OUT_OF_STOCK";
4188
5336
  CLOSED: "CLOSED";
5337
+ SALE: "SALE";
5338
+ OUT_OF_STOCK: "OUT_OF_STOCK";
4189
5339
  }>;
4190
5340
  salePrice: z.ZodNumber;
4191
5341
  discountedPrice: z.ZodNullable<z.ZodNumber>;
@@ -4193,6 +5343,9 @@ export declare const productSummarySchema: z.ZodObject<{
4193
5343
  categoryId: z.ZodNullable<z.ZodString>;
4194
5344
  thumbnailUrl: z.ZodOptional<z.ZodURL>;
4195
5345
  hasOptions: z.ZodBoolean;
5346
+ fulfillment: z.ZodObject<{
5347
+ type: z.ZodString;
5348
+ }, z.core.$strip>;
4196
5349
  updatedAt: z.ZodString;
4197
5350
  }, z.core.$strip>;
4198
5351
  export type ProductSummary = z.infer<typeof productSummarySchema>;
@@ -4233,14 +5386,26 @@ export declare const productVariantSchema: z.ZodObject<{
4233
5386
  usable: z.ZodBoolean;
4234
5387
  }, z.core.$strip>;
4235
5388
  export type ProductVariant = z.infer<typeof productVariantSchema>;
5389
+ export declare const discountSchema: z.ZodObject<{
5390
+ productId: z.ZodString;
5391
+ discountType: z.ZodEnum<{
5392
+ RATE: "RATE";
5393
+ AMOUNT: "AMOUNT";
5394
+ }>;
5395
+ discountValue: z.ZodNumber;
5396
+ discountedPrice: z.ZodNumber;
5397
+ startAt: z.ZodNullable<z.ZodString>;
5398
+ endAt: z.ZodNullable<z.ZodString>;
5399
+ }, z.core.$strip>;
5400
+ export type Discount = z.infer<typeof discountSchema>;
4236
5401
  export declare const productSchema: z.ZodObject<{
4237
5402
  productId: z.ZodString;
4238
5403
  name: z.ZodString;
4239
5404
  status: z.ZodEnum<{
4240
- SALE: "SALE";
4241
5405
  SUSPENDED: "SUSPENDED";
4242
- OUT_OF_STOCK: "OUT_OF_STOCK";
4243
5406
  CLOSED: "CLOSED";
5407
+ SALE: "SALE";
5408
+ OUT_OF_STOCK: "OUT_OF_STOCK";
4244
5409
  }>;
4245
5410
  salePrice: z.ZodNumber;
4246
5411
  discountedPrice: z.ZodNullable<z.ZodNumber>;
@@ -4280,24 +5445,74 @@ export declare const productSchema: z.ZodObject<{
4280
5445
  sellerCode: z.ZodNullable<z.ZodString>;
4281
5446
  usable: z.ZodBoolean;
4282
5447
  }, z.core.$strip>>;
4283
- deliveryType: z.ZodOptional<z.ZodEnum<{
4284
- FREE: "FREE";
4285
- PAID: "PAID";
4286
- CONDITIONAL_FREE: "CONDITIONAL_FREE";
4287
- }>>;
4288
- deliveryFee: z.ZodOptional<z.ZodNumber>;
4289
- conditionalFreeAmount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
4290
- returnFee: z.ZodOptional<z.ZodNumber>;
4291
- exchangeFee: z.ZodOptional<z.ZodNumber>;
4292
- refundPolicy: z.ZodOptional<z.ZodNullable<z.ZodObject<{
5448
+ fulfillment: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
5449
+ type: z.ZodLiteral<"SHIPPING">;
5450
+ shipping: z.ZodObject<{
5451
+ deliveryType: z.ZodEnum<{
5452
+ FREE: "FREE";
5453
+ PAID: "PAID";
5454
+ CONDITIONAL_FREE: "CONDITIONAL_FREE";
5455
+ }>;
5456
+ deliveryFee: z.ZodNumber;
5457
+ conditionalFreeAmount: z.ZodNullable<z.ZodNumber>;
5458
+ shippingAddressId: z.ZodNullable<z.ZodString>;
5459
+ returnAddressId: z.ZodNullable<z.ZodString>;
5460
+ }, z.core.$strip>;
5461
+ }, z.core.$strip>, z.ZodObject<{
5462
+ type: z.ZodLiteral<"DOWNLOAD">;
5463
+ download: z.ZodObject<{
5464
+ limit: z.ZodNumber;
5465
+ days: z.ZodNumber;
5466
+ stockTracking: z.ZodBoolean;
5467
+ withdrawalRestricted: z.ZodBoolean;
5468
+ }, z.core.$strip>;
5469
+ }, z.core.$strip>, z.ZodObject<{
5470
+ type: z.ZodLiteral<"CODE">;
5471
+ code: z.ZodObject<{
5472
+ mode: z.ZodEnum<{
5473
+ AUTO: "AUTO";
5474
+ MANUAL: "MANUAL";
5475
+ }>;
5476
+ withdrawalRestricted: z.ZodBoolean;
5477
+ }, z.core.$strip>;
5478
+ }, z.core.$strip>, z.ZodObject<{
5479
+ type: z.ZodLiteral<"SERVICE">;
5480
+ service: z.ZodObject<{
5481
+ mode: z.ZodEnum<{
5482
+ AUTO: "AUTO";
5483
+ MANUAL: "MANUAL";
5484
+ }>;
5485
+ }, z.core.$strip>;
5486
+ }, z.core.$strip>, z.ZodObject<{
5487
+ type: z.ZodLiteral<"PICKUP">;
5488
+ pickup: z.ZodObject<{
5489
+ addressId: z.ZodNullable<z.ZodString>;
5490
+ }, z.core.$strip>;
5491
+ }, z.core.$strip>], "type">, z.ZodPipe<z.ZodObject<{
5492
+ type: z.ZodString;
5493
+ }, z.core.$loose>, z.ZodTransform<UnknownFulfillment, {
5494
+ [x: string]: unknown;
5495
+ type: string;
5496
+ }>>]>;
5497
+ fulfillmentTypeLocked: z.ZodBoolean;
5498
+ refundPolicy: z.ZodNullable<z.ZodObject<{
4293
5499
  preShipmentDeliveryFeeRefund: z.ZodOptional<z.ZodBoolean>;
4294
5500
  returnDeliveryFee: z.ZodOptional<z.ZodNumber>;
4295
5501
  exchangeDeliveryFee: z.ZodOptional<z.ZodNumber>;
4296
5502
  sellerFaultFreeShipping: z.ZodOptional<z.ZodBoolean>;
4297
5503
  conditionalFreeShortfallCharge: z.ZodOptional<z.ZodBoolean>;
4298
- }, z.core.$strict>>>;
4299
- shippingAddressId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4300
- returnAddressId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5504
+ }, z.core.$strict>>;
5505
+ discount: z.ZodOptional<z.ZodNullable<z.ZodObject<{
5506
+ productId: z.ZodString;
5507
+ discountType: z.ZodEnum<{
5508
+ RATE: "RATE";
5509
+ AMOUNT: "AMOUNT";
5510
+ }>;
5511
+ discountValue: z.ZodNumber;
5512
+ discountedPrice: z.ZodNumber;
5513
+ startAt: z.ZodNullable<z.ZodString>;
5514
+ endAt: z.ZodNullable<z.ZodString>;
5515
+ }, z.core.$strip>>>;
4301
5516
  createdAt: z.ZodOptional<z.ZodString>;
4302
5517
  }, z.core.$strip>;
4303
5518
  export type Product = z.infer<typeof productSchema>;
@@ -4433,6 +5648,70 @@ export declare const variantStockSchema: z.ZodObject<{
4433
5648
  }, z.core.$strip>;
4434
5649
  export type VariantStock = z.infer<typeof variantStockSchema>;
4435
5650
  export declare const productCreateRequestSchema: z.ZodObject<{
5651
+ fulfillment: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
5652
+ type: z.ZodLiteral<"SHIPPING">;
5653
+ shipping: z.ZodOptional<z.ZodObject<{
5654
+ deliveryType: z.ZodDefault<z.ZodEnum<{
5655
+ FREE: "FREE";
5656
+ PAID: "PAID";
5657
+ CONDITIONAL_FREE: "CONDITIONAL_FREE";
5658
+ }>>;
5659
+ deliveryFee: z.ZodOptional<z.ZodNumber>;
5660
+ conditionalFreeAmount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
5661
+ shippingAddressId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5662
+ returnAddressId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5663
+ }, z.core.$strict>>;
5664
+ }, z.core.$strict>, z.ZodObject<{
5665
+ type: z.ZodLiteral<"DOWNLOAD">;
5666
+ download: z.ZodDefault<z.ZodObject<{
5667
+ limit: z.ZodDefault<z.ZodNumber>;
5668
+ days: z.ZodDefault<z.ZodNumber>;
5669
+ stockTracking: z.ZodDefault<z.ZodBoolean>;
5670
+ withdrawalRestricted: z.ZodDefault<z.ZodBoolean>;
5671
+ }, z.core.$strict>>;
5672
+ }, z.core.$strict>, z.ZodObject<{
5673
+ type: z.ZodLiteral<"CODE">;
5674
+ code: z.ZodDefault<z.ZodObject<{
5675
+ mode: z.ZodDefault<z.ZodEnum<{
5676
+ AUTO: "AUTO";
5677
+ MANUAL: "MANUAL";
5678
+ }>>;
5679
+ withdrawalRestricted: z.ZodDefault<z.ZodBoolean>;
5680
+ }, z.core.$strict>>;
5681
+ }, z.core.$strict>, z.ZodObject<{
5682
+ type: z.ZodLiteral<"SERVICE">;
5683
+ service: z.ZodDefault<z.ZodObject<{
5684
+ mode: z.ZodDefault<z.ZodEnum<{
5685
+ AUTO: "AUTO";
5686
+ MANUAL: "MANUAL";
5687
+ }>>;
5688
+ }, z.core.$strict>>;
5689
+ }, z.core.$strict>, z.ZodObject<{
5690
+ type: z.ZodLiteral<"PICKUP">;
5691
+ pickup: z.ZodDefault<z.ZodObject<{
5692
+ addressId: z.ZodOptional<z.ZodString>;
5693
+ }, z.core.$strict>>;
5694
+ }, z.core.$strict>], "type">>;
5695
+ optionGroups: z.ZodDefault<z.ZodArray<z.ZodObject<{
5696
+ groupId: z.ZodOptional<z.ZodString>;
5697
+ name: z.ZodString;
5698
+ values: z.ZodArray<z.ZodObject<{
5699
+ valueId: z.ZodOptional<z.ZodString>;
5700
+ name: z.ZodString;
5701
+ }, z.core.$strip>>;
5702
+ }, z.core.$strip>>>;
5703
+ variants: z.ZodArray<z.ZodObject<{
5704
+ variantId: z.ZodOptional<z.ZodString>;
5705
+ valueNames: z.ZodDefault<z.ZodArray<z.ZodString>>;
5706
+ additionalPrice: z.ZodDefault<z.ZodNumber>;
5707
+ stockQuantity: z.ZodOptional<z.ZodNumber>;
5708
+ sku: z.ZodOptional<z.ZodString>;
5709
+ barcode: z.ZodOptional<z.ZodString>;
5710
+ costPrice: z.ZodOptional<z.ZodNumber>;
5711
+ weightGram: z.ZodOptional<z.ZodNumber>;
5712
+ sellerCode: z.ZodOptional<z.ZodString>;
5713
+ usable: z.ZodDefault<z.ZodBoolean>;
5714
+ }, z.core.$strip>>;
4436
5715
  name: z.ZodString;
4437
5716
  categoryId: z.ZodString;
4438
5717
  salePrice: z.ZodNumber;
@@ -4444,15 +5723,6 @@ export declare const productCreateRequestSchema: z.ZodObject<{
4444
5723
  attributeId: z.ZodString;
4445
5724
  value: z.ZodString;
4446
5725
  }, z.core.$strip>>>;
4447
- deliveryType: z.ZodDefault<z.ZodEnum<{
4448
- FREE: "FREE";
4449
- PAID: "PAID";
4450
- CONDITIONAL_FREE: "CONDITIONAL_FREE";
4451
- }>>;
4452
- deliveryFee: z.ZodOptional<z.ZodNumber>;
4453
- conditionalFreeAmount: z.ZodOptional<z.ZodNumber>;
4454
- returnFee: z.ZodDefault<z.ZodNumber>;
4455
- exchangeFee: z.ZodDefault<z.ZodNumber>;
4456
5726
  refundPolicy: z.ZodOptional<z.ZodNullable<z.ZodObject<{
4457
5727
  preShipmentDeliveryFeeRefund: z.ZodOptional<z.ZodBoolean>;
4458
5728
  returnDeliveryFee: z.ZodOptional<z.ZodNumber>;
@@ -4460,8 +5730,55 @@ export declare const productCreateRequestSchema: z.ZodObject<{
4460
5730
  sellerFaultFreeShipping: z.ZodOptional<z.ZodBoolean>;
4461
5731
  conditionalFreeShortfallCharge: z.ZodOptional<z.ZodBoolean>;
4462
5732
  }, z.core.$strict>>>;
4463
- shippingAddressId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4464
- returnAddressId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5733
+ }, z.core.$strict>;
5734
+ export type ProductCreateRequest = z.infer<typeof productCreateRequestSchema>;
5735
+ export type ProductCreateRequestInput = z.input<typeof productCreateRequestSchema>;
5736
+ /** 전체 수정(PUT) — 공통 필드는 등록과 같고, 이행은 생략하면 현재 값 유지, 주면 필드가 모두 필수다 */
5737
+ export declare const productReplaceRequestSchema: z.ZodObject<{
5738
+ fulfillment: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
5739
+ type: z.ZodLiteral<"SHIPPING">;
5740
+ shipping: z.ZodObject<{
5741
+ deliveryType: z.ZodEnum<{
5742
+ FREE: "FREE";
5743
+ PAID: "PAID";
5744
+ CONDITIONAL_FREE: "CONDITIONAL_FREE";
5745
+ }>;
5746
+ deliveryFee: z.ZodNumber;
5747
+ conditionalFreeAmount: z.ZodNullable<z.ZodNumber>;
5748
+ shippingAddressId: z.ZodNullable<z.ZodString>;
5749
+ returnAddressId: z.ZodNullable<z.ZodString>;
5750
+ }, z.core.$strict>;
5751
+ }, z.core.$strict>, z.ZodObject<{
5752
+ type: z.ZodLiteral<"DOWNLOAD">;
5753
+ download: z.ZodObject<{
5754
+ limit: z.ZodNumber;
5755
+ days: z.ZodNumber;
5756
+ stockTracking: z.ZodBoolean;
5757
+ withdrawalRestricted: z.ZodBoolean;
5758
+ }, z.core.$strict>;
5759
+ }, z.core.$strict>, z.ZodObject<{
5760
+ type: z.ZodLiteral<"CODE">;
5761
+ code: z.ZodObject<{
5762
+ mode: z.ZodEnum<{
5763
+ AUTO: "AUTO";
5764
+ MANUAL: "MANUAL";
5765
+ }>;
5766
+ withdrawalRestricted: z.ZodBoolean;
5767
+ }, z.core.$strict>;
5768
+ }, z.core.$strict>, z.ZodObject<{
5769
+ type: z.ZodLiteral<"SERVICE">;
5770
+ service: z.ZodObject<{
5771
+ mode: z.ZodEnum<{
5772
+ AUTO: "AUTO";
5773
+ MANUAL: "MANUAL";
5774
+ }>;
5775
+ }, z.core.$strict>;
5776
+ }, z.core.$strict>, z.ZodObject<{
5777
+ type: z.ZodLiteral<"PICKUP">;
5778
+ pickup: z.ZodObject<{
5779
+ addressId: z.ZodString;
5780
+ }, z.core.$strict>;
5781
+ }, z.core.$strict>], "type">>;
4465
5782
  optionGroups: z.ZodDefault<z.ZodArray<z.ZodObject<{
4466
5783
  groupId: z.ZodOptional<z.ZodString>;
4467
5784
  name: z.ZodString;
@@ -4482,21 +5799,88 @@ export declare const productCreateRequestSchema: z.ZodObject<{
4482
5799
  sellerCode: z.ZodOptional<z.ZodString>;
4483
5800
  usable: z.ZodDefault<z.ZodBoolean>;
4484
5801
  }, z.core.$strip>>;
4485
- }, z.core.$strip>;
4486
- export type ProductCreateRequest = z.infer<typeof productCreateRequestSchema>;
5802
+ name: z.ZodString;
5803
+ categoryId: z.ZodString;
5804
+ salePrice: z.ZodNumber;
5805
+ originalPrice: z.ZodOptional<z.ZodNumber>;
5806
+ description: z.ZodOptional<z.ZodString>;
5807
+ descriptionJson: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5808
+ images: z.ZodOptional<z.ZodArray<z.ZodURL>>;
5809
+ attributes: z.ZodOptional<z.ZodArray<z.ZodObject<{
5810
+ attributeId: z.ZodString;
5811
+ value: z.ZodString;
5812
+ }, z.core.$strip>>>;
5813
+ refundPolicy: z.ZodOptional<z.ZodNullable<z.ZodObject<{
5814
+ preShipmentDeliveryFeeRefund: z.ZodOptional<z.ZodBoolean>;
5815
+ returnDeliveryFee: z.ZodOptional<z.ZodNumber>;
5816
+ exchangeDeliveryFee: z.ZodOptional<z.ZodNumber>;
5817
+ sellerFaultFreeShipping: z.ZodOptional<z.ZodBoolean>;
5818
+ conditionalFreeShortfallCharge: z.ZodOptional<z.ZodBoolean>;
5819
+ }, z.core.$strict>>>;
5820
+ }, z.core.$strict>;
5821
+ export type ProductReplaceRequest = z.infer<typeof productReplaceRequestSchema>;
5822
+ export type ProductReplaceRequestInput = z.input<typeof productReplaceRequestSchema>;
4487
5823
  export declare const productPatchRequestSchema: z.ZodObject<{
4488
5824
  name: z.ZodOptional<z.ZodString>;
4489
5825
  salePrice: z.ZodOptional<z.ZodNumber>;
4490
5826
  status: z.ZodOptional<z.ZodEnum<{
4491
- SALE: "SALE";
4492
5827
  SUSPENDED: "SUSPENDED";
4493
- OUT_OF_STOCK: "OUT_OF_STOCK";
4494
5828
  CLOSED: "CLOSED";
5829
+ SALE: "SALE";
5830
+ OUT_OF_STOCK: "OUT_OF_STOCK";
4495
5831
  }>>;
4496
- deliveryFee: z.ZodOptional<z.ZodNumber>;
4497
- shippingAddressId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4498
- returnAddressId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4499
- }, z.core.$strip>;
5832
+ fulfillment: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
5833
+ type: z.ZodLiteral<"SHIPPING">;
5834
+ shipping: z.ZodObject<{
5835
+ deliveryType: z.ZodEnum<{
5836
+ FREE: "FREE";
5837
+ PAID: "PAID";
5838
+ CONDITIONAL_FREE: "CONDITIONAL_FREE";
5839
+ }>;
5840
+ deliveryFee: z.ZodNumber;
5841
+ conditionalFreeAmount: z.ZodNullable<z.ZodNumber>;
5842
+ shippingAddressId: z.ZodNullable<z.ZodString>;
5843
+ returnAddressId: z.ZodNullable<z.ZodString>;
5844
+ }, z.core.$strict>;
5845
+ }, z.core.$strict>, z.ZodObject<{
5846
+ type: z.ZodLiteral<"DOWNLOAD">;
5847
+ download: z.ZodObject<{
5848
+ limit: z.ZodNumber;
5849
+ days: z.ZodNumber;
5850
+ stockTracking: z.ZodBoolean;
5851
+ withdrawalRestricted: z.ZodBoolean;
5852
+ }, z.core.$strict>;
5853
+ }, z.core.$strict>, z.ZodObject<{
5854
+ type: z.ZodLiteral<"CODE">;
5855
+ code: z.ZodObject<{
5856
+ mode: z.ZodEnum<{
5857
+ AUTO: "AUTO";
5858
+ MANUAL: "MANUAL";
5859
+ }>;
5860
+ withdrawalRestricted: z.ZodBoolean;
5861
+ }, z.core.$strict>;
5862
+ }, z.core.$strict>, z.ZodObject<{
5863
+ type: z.ZodLiteral<"SERVICE">;
5864
+ service: z.ZodObject<{
5865
+ mode: z.ZodEnum<{
5866
+ AUTO: "AUTO";
5867
+ MANUAL: "MANUAL";
5868
+ }>;
5869
+ }, z.core.$strict>;
5870
+ }, z.core.$strict>, z.ZodObject<{
5871
+ type: z.ZodLiteral<"PICKUP">;
5872
+ pickup: z.ZodObject<{
5873
+ addressId: z.ZodString;
5874
+ }, z.core.$strict>;
5875
+ }, z.core.$strict>], "type">>;
5876
+ refundPolicy: z.ZodOptional<z.ZodNullable<z.ZodObject<{
5877
+ preShipmentDeliveryFeeRefund: z.ZodOptional<z.ZodBoolean>;
5878
+ returnDeliveryFee: z.ZodOptional<z.ZodNumber>;
5879
+ exchangeDeliveryFee: z.ZodOptional<z.ZodNumber>;
5880
+ sellerFaultFreeShipping: z.ZodOptional<z.ZodBoolean>;
5881
+ conditionalFreeShortfallCharge: z.ZodOptional<z.ZodBoolean>;
5882
+ }, z.core.$strict>>>;
5883
+ }, z.core.$strict>;
4500
5884
  export type ProductPatchRequest = z.infer<typeof productPatchRequestSchema>;
4501
5885
  export declare const productSortSchema: z.ZodEnum<{
4502
5886
  "createdAt.desc": "createdAt.desc";
@@ -4518,10 +5902,10 @@ export declare const productListQuerySchema: z.ZodObject<{
4518
5902
  page: z.ZodOptional<z.ZodString>;
4519
5903
  size: z.ZodOptional<z.ZodString>;
4520
5904
  status: z.ZodOptional<z.ZodEnum<{
4521
- SALE: "SALE";
4522
5905
  SUSPENDED: "SUSPENDED";
4523
- OUT_OF_STOCK: "OUT_OF_STOCK";
4524
5906
  CLOSED: "CLOSED";
5907
+ SALE: "SALE";
5908
+ OUT_OF_STOCK: "OUT_OF_STOCK";
4525
5909
  }>>;
4526
5910
  categoryId: z.ZodOptional<z.ZodString>;
4527
5911
  keyword: z.ZodOptional<z.ZodString>;
@@ -4534,18 +5918,6 @@ export declare const productListQuerySchema: z.ZodObject<{
4534
5918
  "updatedAt.desc": "updatedAt.desc";
4535
5919
  }>>;
4536
5920
  }, z.core.$strip>;
4537
- export declare const discountSchema: z.ZodObject<{
4538
- productId: z.ZodString;
4539
- discountType: z.ZodEnum<{
4540
- RATE: "RATE";
4541
- AMOUNT: "AMOUNT";
4542
- }>;
4543
- discountValue: z.ZodNumber;
4544
- discountedPrice: z.ZodNumber;
4545
- startAt: z.ZodNullable<z.ZodString>;
4546
- endAt: z.ZodNullable<z.ZodString>;
4547
- }, z.core.$strip>;
4548
- export type Discount = z.infer<typeof discountSchema>;
4549
5921
  export declare const discountRequestSchema: z.ZodObject<{
4550
5922
  discountType: z.ZodEnum<{
4551
5923
  RATE: "RATE";
@@ -4597,6 +5969,8 @@ export declare const updateStoreRequestSchema: z.ZodObject<{
4597
5969
  analyticsAllowedOrigins: z.ZodOptional<z.ZodArray<z.ZodString>>;
4598
5970
  storefrontOrigins: z.ZodOptional<z.ZodArray<z.ZodString>>;
4599
5971
  guestCheckoutEnabled: z.ZodOptional<z.ZodBoolean>;
5972
+ fulfillmentMailEnabled: z.ZodOptional<z.ZodBoolean>;
5973
+ withdrawalNotice: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4600
5974
  autoDeliverDays: z.ZodOptional<z.ZodNumber>;
4601
5975
  autoConfirmDays: z.ZodOptional<z.ZodNumber>;
4602
5976
  refundPolicy: z.ZodOptional<z.ZodObject<{
@@ -4605,6 +5979,7 @@ export declare const updateStoreRequestSchema: z.ZodObject<{
4605
5979
  exchangeDeliveryFee: z.ZodOptional<z.ZodNumber>;
4606
5980
  sellerFaultFreeShipping: z.ZodOptional<z.ZodBoolean>;
4607
5981
  conditionalFreeShortfallCharge: z.ZodOptional<z.ZodBoolean>;
5982
+ couponShortfallCharge: z.ZodOptional<z.ZodBoolean>;
4608
5983
  }, z.core.$strict>>;
4609
5984
  shippingPolicy: z.ZodOptional<z.ZodObject<{
4610
5985
  baseDeliveryFee: z.ZodOptional<z.ZodNumber>;
@@ -4634,6 +6009,8 @@ export declare const storeSchema: z.ZodObject<{
4634
6009
  analyticsAllowedOrigins: z.ZodArray<z.ZodString>;
4635
6010
  storefrontOrigins: z.ZodArray<z.ZodString>;
4636
6011
  guestCheckoutEnabled: z.ZodBoolean;
6012
+ fulfillmentMailEnabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
6013
+ withdrawalNotice: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
4637
6014
  autoDeliverDays: z.ZodNumber;
4638
6015
  autoConfirmDays: z.ZodNumber;
4639
6016
  refundPolicy: z.ZodObject<{
@@ -4642,6 +6019,7 @@ export declare const storeSchema: z.ZodObject<{
4642
6019
  exchangeDeliveryFee: z.ZodNumber;
4643
6020
  sellerFaultFreeShipping: z.ZodBoolean;
4644
6021
  conditionalFreeShortfallCharge: z.ZodBoolean;
6022
+ couponShortfallCharge: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
4645
6023
  }, z.core.$strip>;
4646
6024
  shippingPolicy: z.ZodObject<{
4647
6025
  baseDeliveryFee: z.ZodNumber;
@@ -4664,9 +6042,9 @@ export declare const storeMemberSchema: z.ZodObject<{
4664
6042
  name: z.ZodString;
4665
6043
  email: z.ZodEmail;
4666
6044
  role: z.ZodEnum<{
6045
+ OWNER: "OWNER";
4667
6046
  ADMIN: "ADMIN";
4668
6047
  STAFF: "STAFF";
4669
- OWNER: "OWNER";
4670
6048
  }>;
4671
6049
  joinedAt: z.ZodString;
4672
6050
  lastActiveAt: z.ZodNullable<z.ZodString>;
@@ -4691,8 +6069,8 @@ export declare const invitationSchema: z.ZodObject<{
4691
6069
  STAFF: "STAFF";
4692
6070
  }>;
4693
6071
  status: z.ZodEnum<{
4694
- PENDING: "PENDING";
4695
6072
  EXPIRED: "EXPIRED";
6073
+ PENDING: "PENDING";
4696
6074
  ACCEPTED: "ACCEPTED";
4697
6075
  CANCELED: "CANCELED";
4698
6076
  }>;
@@ -4731,8 +6109,8 @@ export type UpdateMemberRoleRequest = z.infer<typeof updateMemberRoleRequestSche
4731
6109
  /** `GET /v1/store/invitations` 쿼리 — OpenAPI 문서용 형태 */
4732
6110
  export declare const invitationListQuerySchema: z.ZodObject<{
4733
6111
  status: z.ZodOptional<z.ZodEnum<{
4734
- PENDING: "PENDING";
4735
6112
  EXPIRED: "EXPIRED";
6113
+ PENDING: "PENDING";
4736
6114
  ACCEPTED: "ACCEPTED";
4737
6115
  CANCELED: "CANCELED";
4738
6116
  }>>;
@@ -4746,23 +6124,30 @@ export declare const storeMemberRoleUpdatedSchema: z.ZodObject<{
4746
6124
  }>;
4747
6125
  }, z.core.$strip>;
4748
6126
  export type StoreMemberRoleUpdated = z.infer<typeof storeMemberRoleUpdatedSchema>;
6127
+ /**
6128
+ * 주소 유형 — 출고지·반품지·방문 수령지(이슈 #48). 방문 수령지(`PICKUP`)는 목록에서 `type=PICKUP`으로 조회할 때만 나온다
6129
+ * (이 값을 모르는 옛 SDK의 목록 파싱이 깨지지 않게).
6130
+ */
4749
6131
  export declare const addressTypeSchema: z.ZodEnum<{
4750
- RETURN: "RETURN";
4751
6132
  SHIPPING: "SHIPPING";
6133
+ PICKUP: "PICKUP";
6134
+ RETURN: "RETURN";
4752
6135
  }>;
4753
6136
  export type AddressType = z.infer<typeof addressTypeSchema>;
4754
6137
  /** `GET /v1/seller-addresses` 쿼리 — OpenAPI 문서용 형태. 기본 주소 우선, 그다음 등록순이다 */
4755
6138
  export declare const sellerAddressListQuerySchema: z.ZodObject<{
4756
6139
  type: z.ZodOptional<z.ZodEnum<{
4757
- RETURN: "RETURN";
4758
6140
  SHIPPING: "SHIPPING";
6141
+ PICKUP: "PICKUP";
6142
+ RETURN: "RETURN";
4759
6143
  }>>;
4760
6144
  }, z.core.$strip>;
4761
6145
  export declare const sellerAddressSchema: z.ZodObject<{
4762
6146
  addressId: z.ZodString;
4763
6147
  type: z.ZodEnum<{
4764
- RETURN: "RETURN";
4765
6148
  SHIPPING: "SHIPPING";
6149
+ PICKUP: "PICKUP";
6150
+ RETURN: "RETURN";
4766
6151
  }>;
4767
6152
  name: z.ZodString;
4768
6153
  isDefault: z.ZodBoolean;
@@ -4776,8 +6161,9 @@ export declare const sellerAddressSchema: z.ZodObject<{
4776
6161
  export type SellerAddress = z.infer<typeof sellerAddressSchema>;
4777
6162
  export declare const sellerAddressRequestSchema: z.ZodObject<{
4778
6163
  type: z.ZodEnum<{
4779
- RETURN: "RETURN";
4780
6164
  SHIPPING: "SHIPPING";
6165
+ PICKUP: "PICKUP";
6166
+ RETURN: "RETURN";
4781
6167
  }>;
4782
6168
  name: z.ZodString;
4783
6169
  contactName: z.ZodString;
@@ -4794,10 +6180,13 @@ export type SellerAddressRequest = z.infer<typeof sellerAddressRequestSchema>;
4794
6180
  *
4795
6181
  * - `product-image`: 상품 목록·상세의 상품 이미지. 목록 썸네일로 쓰이므로 정지 이미지만 받는다.
4796
6182
  * - `description`: 상세설명 본문에 삽입하는 미디어. 동영상과 svg도 받는다.
6183
+ * - `digital-asset`: 파일 다운로드 상품의 판매 파일(이슈 #48). **비공개 객체**로 올라가고 공개 주소가 없다 — 구매자는 제공된
6184
+ * 주문상품에서 수명 300초의 서명 주소로만 받는다.
4797
6185
  */
4798
6186
  export declare const uploadPurposeSchema: z.ZodEnum<{
4799
6187
  "product-image": "product-image";
4800
6188
  description: "description";
6189
+ "digital-asset": "digital-asset";
4801
6190
  }>;
4802
6191
  export type UploadPurpose = z.infer<typeof uploadPurposeSchema>;
4803
6192
  export interface UploadPurposeLimit {
@@ -4812,6 +6201,8 @@ export interface UploadPurposeLimit {
4812
6201
  * 직접 PUT되므로 이 검사는 셀러가 올리기 전에 알게 하는 장치이고, 실제 상한은 CDN이 강제한다.
4813
6202
  */
4814
6203
  export declare const UPLOAD_PURPOSE_LIMITS: Record<UploadPurpose, UploadPurposeLimit>;
6204
+ /** 비공개 업로드(판매 파일)의 PUT 필수 헤더 — CDN이 이 값으로 공개 조회를 막는다 */
6205
+ export declare const PRIVATE_UPLOAD_HEADERS: Readonly<Record<string, string>>;
4815
6206
  /** 파일명의 소문자 확장자. 확장자가 없으면 `""` */
4816
6207
  export declare function uploadExtensionOf(filename: string): string;
4817
6208
  export interface UploadRejection {
@@ -4837,6 +6228,7 @@ export declare const uploadRequestSchema: z.ZodObject<{
4837
6228
  purpose: z.ZodDefault<z.ZodEnum<{
4838
6229
  "product-image": "product-image";
4839
6230
  description: "description";
6231
+ "digital-asset": "digital-asset";
4840
6232
  }>>;
4841
6233
  size: z.ZodOptional<z.ZodNumber>;
4842
6234
  }, z.core.$strip>;
@@ -4844,6 +6236,8 @@ export type UploadRequest = z.infer<typeof uploadRequestSchema>;
4844
6236
  export declare const uploadTicketSchema: z.ZodObject<{
4845
6237
  url: z.ZodURL;
4846
6238
  uploadUrl: z.ZodURL;
6239
+ key: z.ZodOptional<z.ZodString>;
6240
+ headers: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>>;
4847
6241
  }, z.core.$strip>;
4848
6242
  export type UploadTicket = z.infer<typeof uploadTicketSchema>;
4849
6243
  //#endregion
@@ -4988,7 +6382,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
4988
6382
  storeId: string;
4989
6383
  storeName: string;
4990
6384
  storeCode: string;
4991
- role: "ADMIN" | "STAFF" | "OWNER";
6385
+ role: "OWNER" | "ADMIN" | "STAFF";
4992
6386
  status: "ACTIVE" | "SUSPENDED" | "CLOSED";
4993
6387
  }[]>;
4994
6388
  /** RFC 7009 — token을 폐기한다 (public client는 client_id만 동반) */
@@ -5125,6 +6519,8 @@ export declare function createStoreClient(options: StoreClientOptions): {
5125
6519
  create: (body: UploadRequest) => Promise<{
5126
6520
  url: string;
5127
6521
  uploadUrl: string;
6522
+ headers: Record<string, string>;
6523
+ key?: string | undefined;
5128
6524
  }>;
5129
6525
  /**
5130
6526
  * 자리 발급 + 바이트 PUT을 한 번에 — 끝나면 `url`이 공개 주소다.
@@ -5146,12 +6542,15 @@ export declare function createStoreClient(options: StoreClientOptions): {
5146
6542
  contents: {
5147
6543
  productId: string;
5148
6544
  name: string;
5149
- status: "SALE" | "SUSPENDED" | "OUT_OF_STOCK" | "CLOSED";
6545
+ status: "SUSPENDED" | "CLOSED" | "SALE" | "OUT_OF_STOCK";
5150
6546
  salePrice: number;
5151
6547
  discountedPrice: number | null;
5152
6548
  stockQuantity: number;
5153
6549
  categoryId: string | null;
5154
6550
  hasOptions: boolean;
6551
+ fulfillment: {
6552
+ type: string;
6553
+ };
5155
6554
  updatedAt: string;
5156
6555
  thumbnailUrl?: string | undefined;
5157
6556
  }[];
@@ -5159,7 +6558,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
5159
6558
  get: (productId: string) => Promise<{
5160
6559
  productId: string;
5161
6560
  name: string;
5162
- status: "SALE" | "SUSPENDED" | "OUT_OF_STOCK" | "CLOSED";
6561
+ status: "SUSPENDED" | "CLOSED" | "SALE" | "OUT_OF_STOCK";
5163
6562
  salePrice: number;
5164
6563
  discountedPrice: number | null;
5165
6564
  stockQuantity: number;
@@ -5189,6 +6588,48 @@ export declare function createStoreClient(options: StoreClientOptions): {
5189
6588
  sellerCode: string | null;
5190
6589
  usable: boolean;
5191
6590
  }[];
6591
+ fulfillment: UnknownFulfillment | {
6592
+ type: "SHIPPING";
6593
+ shipping: {
6594
+ deliveryType: "FREE" | "PAID" | "CONDITIONAL_FREE";
6595
+ deliveryFee: number;
6596
+ conditionalFreeAmount: number | null;
6597
+ shippingAddressId: string | null;
6598
+ returnAddressId: string | null;
6599
+ };
6600
+ } | {
6601
+ type: "DOWNLOAD";
6602
+ download: {
6603
+ limit: number;
6604
+ days: number;
6605
+ stockTracking: boolean;
6606
+ withdrawalRestricted: boolean;
6607
+ };
6608
+ } | {
6609
+ type: "CODE";
6610
+ code: {
6611
+ mode: "AUTO" | "MANUAL";
6612
+ withdrawalRestricted: boolean;
6613
+ };
6614
+ } | {
6615
+ type: "SERVICE";
6616
+ service: {
6617
+ mode: "AUTO" | "MANUAL";
6618
+ };
6619
+ } | {
6620
+ type: "PICKUP";
6621
+ pickup: {
6622
+ addressId: string | null;
6623
+ };
6624
+ };
6625
+ fulfillmentTypeLocked: boolean;
6626
+ refundPolicy: {
6627
+ preShipmentDeliveryFeeRefund?: boolean | undefined;
6628
+ returnDeliveryFee?: number | undefined;
6629
+ exchangeDeliveryFee?: number | undefined;
6630
+ sellerFaultFreeShipping?: boolean | undefined;
6631
+ conditionalFreeShortfallCharge?: boolean | undefined;
6632
+ } | null;
5192
6633
  thumbnailUrl?: string | undefined;
5193
6634
  description?: string | undefined;
5194
6635
  descriptionJson?: string | null | undefined;
@@ -5198,26 +6639,20 @@ export declare function createStoreClient(options: StoreClientOptions): {
5198
6639
  attributeId: string;
5199
6640
  value: string;
5200
6641
  }[] | undefined;
5201
- deliveryType?: "FREE" | "PAID" | "CONDITIONAL_FREE" | undefined;
5202
- deliveryFee?: number | undefined;
5203
- conditionalFreeAmount?: number | null | undefined;
5204
- returnFee?: number | undefined;
5205
- exchangeFee?: number | undefined;
5206
- refundPolicy?: {
5207
- preShipmentDeliveryFeeRefund?: boolean | undefined;
5208
- returnDeliveryFee?: number | undefined;
5209
- exchangeDeliveryFee?: number | undefined;
5210
- sellerFaultFreeShipping?: boolean | undefined;
5211
- conditionalFreeShortfallCharge?: boolean | undefined;
6642
+ discount?: {
6643
+ productId: string;
6644
+ discountType: "RATE" | "AMOUNT";
6645
+ discountValue: number;
6646
+ discountedPrice: number;
6647
+ startAt: string | null;
6648
+ endAt: string | null;
5212
6649
  } | null | undefined;
5213
- shippingAddressId?: string | null | undefined;
5214
- returnAddressId?: string | null | undefined;
5215
6650
  createdAt?: string | undefined;
5216
6651
  }>;
5217
- create: (body: ProductCreateRequest, idempotencyKey?: string) => Promise<{
6652
+ create: (body: ProductCreateRequestInput, idempotencyKey?: string) => Promise<{
5218
6653
  productId: string;
5219
6654
  name: string;
5220
- status: "SALE" | "SUSPENDED" | "OUT_OF_STOCK" | "CLOSED";
6655
+ status: "SUSPENDED" | "CLOSED" | "SALE" | "OUT_OF_STOCK";
5221
6656
  salePrice: number;
5222
6657
  discountedPrice: number | null;
5223
6658
  stockQuantity: number;
@@ -5247,6 +6682,48 @@ export declare function createStoreClient(options: StoreClientOptions): {
5247
6682
  sellerCode: string | null;
5248
6683
  usable: boolean;
5249
6684
  }[];
6685
+ fulfillment: UnknownFulfillment | {
6686
+ type: "SHIPPING";
6687
+ shipping: {
6688
+ deliveryType: "FREE" | "PAID" | "CONDITIONAL_FREE";
6689
+ deliveryFee: number;
6690
+ conditionalFreeAmount: number | null;
6691
+ shippingAddressId: string | null;
6692
+ returnAddressId: string | null;
6693
+ };
6694
+ } | {
6695
+ type: "DOWNLOAD";
6696
+ download: {
6697
+ limit: number;
6698
+ days: number;
6699
+ stockTracking: boolean;
6700
+ withdrawalRestricted: boolean;
6701
+ };
6702
+ } | {
6703
+ type: "CODE";
6704
+ code: {
6705
+ mode: "AUTO" | "MANUAL";
6706
+ withdrawalRestricted: boolean;
6707
+ };
6708
+ } | {
6709
+ type: "SERVICE";
6710
+ service: {
6711
+ mode: "AUTO" | "MANUAL";
6712
+ };
6713
+ } | {
6714
+ type: "PICKUP";
6715
+ pickup: {
6716
+ addressId: string | null;
6717
+ };
6718
+ };
6719
+ fulfillmentTypeLocked: boolean;
6720
+ refundPolicy: {
6721
+ preShipmentDeliveryFeeRefund?: boolean | undefined;
6722
+ returnDeliveryFee?: number | undefined;
6723
+ exchangeDeliveryFee?: number | undefined;
6724
+ sellerFaultFreeShipping?: boolean | undefined;
6725
+ conditionalFreeShortfallCharge?: boolean | undefined;
6726
+ } | null;
5250
6727
  thumbnailUrl?: string | undefined;
5251
6728
  description?: string | undefined;
5252
6729
  descriptionJson?: string | null | undefined;
@@ -5256,26 +6733,20 @@ export declare function createStoreClient(options: StoreClientOptions): {
5256
6733
  attributeId: string;
5257
6734
  value: string;
5258
6735
  }[] | undefined;
5259
- deliveryType?: "FREE" | "PAID" | "CONDITIONAL_FREE" | undefined;
5260
- deliveryFee?: number | undefined;
5261
- conditionalFreeAmount?: number | null | undefined;
5262
- returnFee?: number | undefined;
5263
- exchangeFee?: number | undefined;
5264
- refundPolicy?: {
5265
- preShipmentDeliveryFeeRefund?: boolean | undefined;
5266
- returnDeliveryFee?: number | undefined;
5267
- exchangeDeliveryFee?: number | undefined;
5268
- sellerFaultFreeShipping?: boolean | undefined;
5269
- conditionalFreeShortfallCharge?: boolean | undefined;
6736
+ discount?: {
6737
+ productId: string;
6738
+ discountType: "RATE" | "AMOUNT";
6739
+ discountValue: number;
6740
+ discountedPrice: number;
6741
+ startAt: string | null;
6742
+ endAt: string | null;
5270
6743
  } | null | undefined;
5271
- shippingAddressId?: string | null | undefined;
5272
- returnAddressId?: string | null | undefined;
5273
6744
  createdAt?: string | undefined;
5274
6745
  }>;
5275
- update: (productId: string, body: ProductCreateRequest) => Promise<{
6746
+ update: (productId: string, body: ProductReplaceRequestInput) => Promise<{
5276
6747
  productId: string;
5277
6748
  name: string;
5278
- status: "SALE" | "SUSPENDED" | "OUT_OF_STOCK" | "CLOSED";
6749
+ status: "SUSPENDED" | "CLOSED" | "SALE" | "OUT_OF_STOCK";
5279
6750
  salePrice: number;
5280
6751
  discountedPrice: number | null;
5281
6752
  stockQuantity: number;
@@ -5305,6 +6776,48 @@ export declare function createStoreClient(options: StoreClientOptions): {
5305
6776
  sellerCode: string | null;
5306
6777
  usable: boolean;
5307
6778
  }[];
6779
+ fulfillment: UnknownFulfillment | {
6780
+ type: "SHIPPING";
6781
+ shipping: {
6782
+ deliveryType: "FREE" | "PAID" | "CONDITIONAL_FREE";
6783
+ deliveryFee: number;
6784
+ conditionalFreeAmount: number | null;
6785
+ shippingAddressId: string | null;
6786
+ returnAddressId: string | null;
6787
+ };
6788
+ } | {
6789
+ type: "DOWNLOAD";
6790
+ download: {
6791
+ limit: number;
6792
+ days: number;
6793
+ stockTracking: boolean;
6794
+ withdrawalRestricted: boolean;
6795
+ };
6796
+ } | {
6797
+ type: "CODE";
6798
+ code: {
6799
+ mode: "AUTO" | "MANUAL";
6800
+ withdrawalRestricted: boolean;
6801
+ };
6802
+ } | {
6803
+ type: "SERVICE";
6804
+ service: {
6805
+ mode: "AUTO" | "MANUAL";
6806
+ };
6807
+ } | {
6808
+ type: "PICKUP";
6809
+ pickup: {
6810
+ addressId: string | null;
6811
+ };
6812
+ };
6813
+ fulfillmentTypeLocked: boolean;
6814
+ refundPolicy: {
6815
+ preShipmentDeliveryFeeRefund?: boolean | undefined;
6816
+ returnDeliveryFee?: number | undefined;
6817
+ exchangeDeliveryFee?: number | undefined;
6818
+ sellerFaultFreeShipping?: boolean | undefined;
6819
+ conditionalFreeShortfallCharge?: boolean | undefined;
6820
+ } | null;
5308
6821
  thumbnailUrl?: string | undefined;
5309
6822
  description?: string | undefined;
5310
6823
  descriptionJson?: string | null | undefined;
@@ -5314,20 +6827,14 @@ export declare function createStoreClient(options: StoreClientOptions): {
5314
6827
  attributeId: string;
5315
6828
  value: string;
5316
6829
  }[] | undefined;
5317
- deliveryType?: "FREE" | "PAID" | "CONDITIONAL_FREE" | undefined;
5318
- deliveryFee?: number | undefined;
5319
- conditionalFreeAmount?: number | null | undefined;
5320
- returnFee?: number | undefined;
5321
- exchangeFee?: number | undefined;
5322
- refundPolicy?: {
5323
- preShipmentDeliveryFeeRefund?: boolean | undefined;
5324
- returnDeliveryFee?: number | undefined;
5325
- exchangeDeliveryFee?: number | undefined;
5326
- sellerFaultFreeShipping?: boolean | undefined;
5327
- conditionalFreeShortfallCharge?: boolean | undefined;
6830
+ discount?: {
6831
+ productId: string;
6832
+ discountType: "RATE" | "AMOUNT";
6833
+ discountValue: number;
6834
+ discountedPrice: number;
6835
+ startAt: string | null;
6836
+ endAt: string | null;
5328
6837
  } | null | undefined;
5329
- shippingAddressId?: string | null | undefined;
5330
- returnAddressId?: string | null | undefined;
5331
6838
  createdAt?: string | undefined;
5332
6839
  }>;
5333
6840
  patch: (productId: string, body: ProductPatchRequest) => Promise<void>;
@@ -5419,6 +6926,110 @@ export declare function createStoreClient(options: StoreClientOptions): {
5419
6926
  endAt: string | null;
5420
6927
  }>;
5421
6928
  removeDiscount: (productId: string) => Promise<void>;
6929
+ /**
6930
+ * 코드 일괄 업로드 (이슈 #48) — 코드 발급·자동 제공 상품의 코드 풀에 올린다. `codes`와 `csv` 중 하나만 보낸다.
6931
+ * 받은 코드 수만큼 재고가 는다. 에러: 409 `NOT_CODE_PRODUCT`·`CODE_POOL_NOT_USED`·`CODE_UPLOAD_CONFLICT`, 400 `TOO_MANY_CODES`
6932
+ */
6933
+ uploadCodes: (productId: string, body: FulfillmentCodeUploadRequest, idempotencyKey?: string) => Promise<{
6934
+ batchId: string;
6935
+ productId: string;
6936
+ variantId: string;
6937
+ total: number;
6938
+ accepted: number;
6939
+ duplicates: number;
6940
+ rejected: {
6941
+ line: number;
6942
+ reason: string;
6943
+ }[];
6944
+ expiresAt: string | null;
6945
+ createdAt: string;
6946
+ }>;
6947
+ /** 코드 목록 — 가린 값(`hint`)만 싣는다. `available`은 필터와 무관한 판매 가능 코드 수다 */
6948
+ listCodes: (productId: string, params?: PageParams & Omit<z.input<typeof fulfillmentCodeListQuerySchema>, "page" | "size">) => Promise<{
6949
+ page: number;
6950
+ size: number;
6951
+ totalElements: number;
6952
+ totalPages: number;
6953
+ contents: {
6954
+ codeId: string;
6955
+ productId: string;
6956
+ variantId: string;
6957
+ batchId: string | null;
6958
+ hint: string;
6959
+ status: string;
6960
+ orderItemId: string | null;
6961
+ assignedAt: string | null;
6962
+ revealedAt: string | null;
6963
+ expiresAt: string | null;
6964
+ createdAt: string;
6965
+ }[];
6966
+ available: number;
6967
+ }>;
6968
+ /** 판매 가능 코드 폐기 — 재고가 1 준다. 배정된 코드는 409 `CODE_NOT_AVAILABLE` */
6969
+ voidCode: (productId: string, codeId: string) => Promise<{
6970
+ codeId: string;
6971
+ productId: string;
6972
+ variantId: string;
6973
+ batchId: string | null;
6974
+ hint: string;
6975
+ status: string;
6976
+ orderItemId: string | null;
6977
+ assignedAt: string | null;
6978
+ revealedAt: string | null;
6979
+ expiresAt: string | null;
6980
+ createdAt: string;
6981
+ }>;
6982
+ /**
6983
+ * 판매 파일 연결 (이슈 #48) — `uploads.create({ purpose: "digital-asset" })`로 받은 `key`에 파일을 올린 뒤 연결한다.
6984
+ * 이후 주문부터 이 파일을 준다. 에러: 400 `INVALID_ASSET_KEY`, 409 `NOT_DOWNLOAD_PRODUCT`·`ASSET_ALREADY_ATTACHED`
6985
+ */
6986
+ attachDigitalAsset: (productId: string, body: DigitalAssetAttachRequest) => Promise<{
6987
+ assetId: string;
6988
+ productId: string;
6989
+ variantId: string | null;
6990
+ fileName: string;
6991
+ contentType: string | null;
6992
+ sizeBytes: number | null;
6993
+ status: string;
6994
+ createdAt: string;
6995
+ }>;
6996
+ /** 판매 파일 목록 — 해제한 파일도 싣는다. 객체 키·주소는 없다 */
6997
+ listDigitalAssets: (productId: string) => Promise<{
6998
+ assetId: string;
6999
+ productId: string;
7000
+ variantId: string | null;
7001
+ fileName: string;
7002
+ contentType: string | null;
7003
+ sizeBytes: number | null;
7004
+ status: string;
7005
+ createdAt: string;
7006
+ }[]>;
7007
+ /** 판매 파일 해제 — 새 주문에 주지 않는다. 이미 산 구매자는 계속 받는다 */
7008
+ removeDigitalAsset: (productId: string, assetId: string) => Promise<{
7009
+ assetId: string;
7010
+ productId: string;
7011
+ variantId: string | null;
7012
+ fileName: string;
7013
+ contentType: string | null;
7014
+ sizeBytes: number | null;
7015
+ status: string;
7016
+ createdAt: string;
7017
+ }>;
7018
+ /** 판매 파일 확인 주소 — 수명 300초의 서명 주소 */
7019
+ previewDigitalAsset: (productId: string, assetId: string) => Promise<{
7020
+ url: string;
7021
+ expiresAt: string;
7022
+ }>;
7023
+ };
7024
+ fulfillmentCodes: {
7025
+ /**
7026
+ * 코드 평문 열람 — 콘솔에서 로그인한 OWNER·ADMIN만 된다(403 `INSUFFICIENT_ROLE`). 열람 기록과 감사 로그가 남는다.
7027
+ * 평문은 화면에 보인 뒤 저장하지 않는다
7028
+ */
7029
+ reveal: (codeId: string) => Promise<{
7030
+ codeId: string;
7031
+ code: string;
7032
+ }>;
5422
7033
  };
5423
7034
  categories: {
5424
7035
  list: (params?: {
@@ -5601,6 +7212,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
5601
7212
  phone: string;
5602
7213
  email?: string | undefined;
5603
7214
  };
7215
+ requiresShipping: boolean;
5604
7216
  shippingAddress: {
5605
7217
  receiverName: string;
5606
7218
  phone: string;
@@ -5617,6 +7229,15 @@ export declare function createStoreClient(options: StoreClientOptions): {
5617
7229
  productAmount: number;
5618
7230
  deliveryFee: number;
5619
7231
  discountAmount: number;
7232
+ couponDiscountAmount: number;
7233
+ deliveryDiscountAmount: number;
7234
+ discounts: {
7235
+ couponId: string;
7236
+ name: string;
7237
+ kind: string;
7238
+ discountAmount: number;
7239
+ issueId: string | null;
7240
+ }[];
5620
7241
  totalAmount: number;
5621
7242
  paidAt: string | null;
5622
7243
  cashReceipt: {
@@ -5639,6 +7260,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
5639
7260
  updatedAt: string;
5640
7261
  } | null;
5641
7262
  };
7263
+ withdrawalAgreedAt: string | null;
5642
7264
  testPayment: boolean;
5643
7265
  items: {
5644
7266
  orderItemId: string;
@@ -5650,16 +7272,76 @@ export declare function createStoreClient(options: StoreClientOptions): {
5650
7272
  optionId: string | null;
5651
7273
  optionName: string | null;
5652
7274
  sellerCode: string | null;
7275
+ fulfillmentSnapshot: UnknownFulfillment | {
7276
+ type: "SHIPPING";
7277
+ shipping: {
7278
+ bundleKey: string | null;
7279
+ returnAddressId: string | null;
7280
+ };
7281
+ } | {
7282
+ type: "DOWNLOAD";
7283
+ download: {
7284
+ limit: number;
7285
+ days: number;
7286
+ stockTracked: boolean;
7287
+ withdrawalRestricted: boolean;
7288
+ };
7289
+ } | {
7290
+ type: "CODE";
7291
+ code: {
7292
+ mode: string;
7293
+ withdrawalRestricted: boolean;
7294
+ };
7295
+ } | {
7296
+ type: "SERVICE";
7297
+ service: {
7298
+ mode: string;
7299
+ };
7300
+ } | {
7301
+ type: "PICKUP";
7302
+ pickup: {
7303
+ addressId: string | null;
7304
+ };
7305
+ };
5653
7306
  quantity: number;
5654
7307
  canceledQuantity: number;
5655
7308
  activeQuantity: number;
5656
7309
  unitPrice: number;
5657
7310
  discountAmount: number;
5658
7311
  totalPrice: number;
7312
+ couponDiscountAmount: number;
5659
7313
  hold: {
5660
7314
  reason: string;
5661
7315
  expectedDispatchDate: string;
5662
7316
  } | null;
7317
+ fulfillment: {
7318
+ status: string;
7319
+ mode: string | null;
7320
+ fulfilledAt: string;
7321
+ note: string | null;
7322
+ codes: {
7323
+ codeId: string;
7324
+ hint: string;
7325
+ status: string;
7326
+ revealedAt: string | null;
7327
+ }[];
7328
+ download: {
7329
+ count: number;
7330
+ limit: number;
7331
+ expiresAt: string | null;
7332
+ firstDownloadedAt: string | null;
7333
+ files: {
7334
+ assetId: string;
7335
+ fileName: string;
7336
+ sizeBytes: number | null;
7337
+ }[];
7338
+ } | null;
7339
+ mail: {
7340
+ status: string;
7341
+ sentAt: string | null;
7342
+ errorCode: string | null;
7343
+ } | null;
7344
+ } | null;
5663
7345
  autoDecisionDate: string | null;
5664
7346
  sellerMemo: string | null;
5665
7347
  orderedAt: string;
@@ -5709,16 +7391,76 @@ export declare function createStoreClient(options: StoreClientOptions): {
5709
7391
  optionId: string | null;
5710
7392
  optionName: string | null;
5711
7393
  sellerCode: string | null;
7394
+ fulfillmentSnapshot: UnknownFulfillment | {
7395
+ type: "SHIPPING";
7396
+ shipping: {
7397
+ bundleKey: string | null;
7398
+ returnAddressId: string | null;
7399
+ };
7400
+ } | {
7401
+ type: "DOWNLOAD";
7402
+ download: {
7403
+ limit: number;
7404
+ days: number;
7405
+ stockTracked: boolean;
7406
+ withdrawalRestricted: boolean;
7407
+ };
7408
+ } | {
7409
+ type: "CODE";
7410
+ code: {
7411
+ mode: string;
7412
+ withdrawalRestricted: boolean;
7413
+ };
7414
+ } | {
7415
+ type: "SERVICE";
7416
+ service: {
7417
+ mode: string;
7418
+ };
7419
+ } | {
7420
+ type: "PICKUP";
7421
+ pickup: {
7422
+ addressId: string | null;
7423
+ };
7424
+ };
5712
7425
  quantity: number;
5713
7426
  canceledQuantity: number;
5714
7427
  activeQuantity: number;
5715
7428
  unitPrice: number;
5716
7429
  discountAmount: number;
5717
7430
  totalPrice: number;
7431
+ couponDiscountAmount: number;
5718
7432
  hold: {
5719
7433
  reason: string;
5720
7434
  expectedDispatchDate: string;
5721
7435
  } | null;
7436
+ fulfillment: {
7437
+ status: string;
7438
+ mode: string | null;
7439
+ fulfilledAt: string;
7440
+ note: string | null;
7441
+ codes: {
7442
+ codeId: string;
7443
+ hint: string;
7444
+ status: string;
7445
+ revealedAt: string | null;
7446
+ }[];
7447
+ download: {
7448
+ count: number;
7449
+ limit: number;
7450
+ expiresAt: string | null;
7451
+ firstDownloadedAt: string | null;
7452
+ files: {
7453
+ assetId: string;
7454
+ fileName: string;
7455
+ sizeBytes: number | null;
7456
+ }[];
7457
+ } | null;
7458
+ mail: {
7459
+ status: string;
7460
+ sentAt: string | null;
7461
+ errorCode: string | null;
7462
+ } | null;
7463
+ } | null;
5722
7464
  autoDecisionDate: string | null;
5723
7465
  sellerMemo: string | null;
5724
7466
  orderedAt: string;
@@ -5747,6 +7489,8 @@ export declare function createStoreClient(options: StoreClientOptions): {
5747
7489
  canceledQuantity: number;
5748
7490
  deliveryFeeRefundAmount: number;
5749
7491
  deliveryFeeChargeAmount: number;
7492
+ couponChargeAmount: number;
7493
+ couponChargeRefundAmount: number;
5750
7494
  refundedAt: string;
5751
7495
  }>;
5752
7496
  updateMemo: (orderItemId: string, memo: string) => Promise<void>;
@@ -5794,16 +7538,76 @@ export declare function createStoreClient(options: StoreClientOptions): {
5794
7538
  optionId: string | null;
5795
7539
  optionName: string | null;
5796
7540
  sellerCode: string | null;
7541
+ fulfillmentSnapshot: UnknownFulfillment | {
7542
+ type: "SHIPPING";
7543
+ shipping: {
7544
+ bundleKey: string | null;
7545
+ returnAddressId: string | null;
7546
+ };
7547
+ } | {
7548
+ type: "DOWNLOAD";
7549
+ download: {
7550
+ limit: number;
7551
+ days: number;
7552
+ stockTracked: boolean;
7553
+ withdrawalRestricted: boolean;
7554
+ };
7555
+ } | {
7556
+ type: "CODE";
7557
+ code: {
7558
+ mode: string;
7559
+ withdrawalRestricted: boolean;
7560
+ };
7561
+ } | {
7562
+ type: "SERVICE";
7563
+ service: {
7564
+ mode: string;
7565
+ };
7566
+ } | {
7567
+ type: "PICKUP";
7568
+ pickup: {
7569
+ addressId: string | null;
7570
+ };
7571
+ };
5797
7572
  quantity: number;
5798
7573
  canceledQuantity: number;
5799
7574
  activeQuantity: number;
5800
7575
  unitPrice: number;
5801
7576
  discountAmount: number;
5802
7577
  totalPrice: number;
7578
+ couponDiscountAmount: number;
5803
7579
  hold: {
5804
7580
  reason: string;
5805
7581
  expectedDispatchDate: string;
5806
7582
  } | null;
7583
+ fulfillment: {
7584
+ status: string;
7585
+ mode: string | null;
7586
+ fulfilledAt: string;
7587
+ note: string | null;
7588
+ codes: {
7589
+ codeId: string;
7590
+ hint: string;
7591
+ status: string;
7592
+ revealedAt: string | null;
7593
+ }[];
7594
+ download: {
7595
+ count: number;
7596
+ limit: number;
7597
+ expiresAt: string | null;
7598
+ firstDownloadedAt: string | null;
7599
+ files: {
7600
+ assetId: string;
7601
+ fileName: string;
7602
+ sizeBytes: number | null;
7603
+ }[];
7604
+ } | null;
7605
+ mail: {
7606
+ status: string;
7607
+ sentAt: string | null;
7608
+ errorCode: string | null;
7609
+ } | null;
7610
+ } | null;
5807
7611
  autoDecisionDate: string | null;
5808
7612
  sellerMemo: string | null;
5809
7613
  orderedAt: string;
@@ -5822,6 +7626,115 @@ export declare function createStoreClient(options: StoreClientOptions): {
5822
7626
  orderItemId?: string | undefined;
5823
7627
  }[];
5824
7628
  }>;
7629
+ /**
7630
+ * 제공 안내 메일 재발송 (이슈 #48) — 제공된 주문상품의 안내 메일을 다시 보낸다. 주문상품당 하루 3회(429).
7631
+ * 코드·파일 주소는 메일에 없다
7632
+ */
7633
+ resendFulfillmentMail: (orderItemId: string) => Promise<{
7634
+ mailStatus: string;
7635
+ }>;
7636
+ /**
7637
+ * 제공 처리 (이슈 #48) — 수동 제공 비실물 주문상품(이용권·방문 수령)을 `PAID`·`CONFIRMED`에서 제공 완료(`DELIVERED`)로
7638
+ * 바꾼다. `note`는 구매자 주문 상세에 이용 안내로 실린다. 배송 상품은 409 `SHIPPING_REQUIRED`
7639
+ */
7640
+ fulfill: (orderItemId: string, body?: FulfillRequest, idempotencyKey?: string) => Promise<{
7641
+ orderItemId: string;
7642
+ orderId: string;
7643
+ status: "PAID" | "CANCELED" | "PAYMENT_WAITING" | "CONFIRMED" | "DISPATCHED" | "DELIVERING" | "DELIVERED" | "PURCHASE_DECIDED";
7644
+ claimStatus: "CANCEL_REQUESTED" | "RETURN_REQUESTED" | "EXCHANGE_REQUESTED" | null;
7645
+ productId: string;
7646
+ productName: string;
7647
+ optionId: string | null;
7648
+ optionName: string | null;
7649
+ sellerCode: string | null;
7650
+ fulfillmentSnapshot: UnknownFulfillment | {
7651
+ type: "SHIPPING";
7652
+ shipping: {
7653
+ bundleKey: string | null;
7654
+ returnAddressId: string | null;
7655
+ };
7656
+ } | {
7657
+ type: "DOWNLOAD";
7658
+ download: {
7659
+ limit: number;
7660
+ days: number;
7661
+ stockTracked: boolean;
7662
+ withdrawalRestricted: boolean;
7663
+ };
7664
+ } | {
7665
+ type: "CODE";
7666
+ code: {
7667
+ mode: string;
7668
+ withdrawalRestricted: boolean;
7669
+ };
7670
+ } | {
7671
+ type: "SERVICE";
7672
+ service: {
7673
+ mode: string;
7674
+ };
7675
+ } | {
7676
+ type: "PICKUP";
7677
+ pickup: {
7678
+ addressId: string | null;
7679
+ };
7680
+ };
7681
+ quantity: number;
7682
+ canceledQuantity: number;
7683
+ activeQuantity: number;
7684
+ unitPrice: number;
7685
+ discountAmount: number;
7686
+ totalPrice: number;
7687
+ couponDiscountAmount: number;
7688
+ hold: {
7689
+ reason: string;
7690
+ expectedDispatchDate: string;
7691
+ } | null;
7692
+ fulfillment: {
7693
+ status: string;
7694
+ mode: string | null;
7695
+ fulfilledAt: string;
7696
+ note: string | null;
7697
+ codes: {
7698
+ codeId: string;
7699
+ hint: string;
7700
+ status: string;
7701
+ revealedAt: string | null;
7702
+ }[];
7703
+ download: {
7704
+ count: number;
7705
+ limit: number;
7706
+ expiresAt: string | null;
7707
+ firstDownloadedAt: string | null;
7708
+ files: {
7709
+ assetId: string;
7710
+ fileName: string;
7711
+ sizeBytes: number | null;
7712
+ }[];
7713
+ } | null;
7714
+ mail: {
7715
+ status: string;
7716
+ sentAt: string | null;
7717
+ errorCode: string | null;
7718
+ } | null;
7719
+ } | null;
7720
+ autoDecisionDate: string | null;
7721
+ sellerMemo: string | null;
7722
+ orderedAt: string;
7723
+ lastChangedAt: string;
7724
+ lastChangedType: "ORDER.PAID" | "ORDER.CONFIRMED" | "ORDER.DISPATCHED" | "ORDER.DELIVERED" | "ORDER.PURCHASE_DECIDED" | "ORDER.ADDRESS_CHANGE_REQUESTED" | "CLAIM.CANCEL_REQUESTED" | "CLAIM.RETURN_REQUESTED" | "CLAIM.EXCHANGE_REQUESTED" | "CLAIM.COMPLETED";
7725
+ testPayment: boolean;
7726
+ }>;
7727
+ /** 제공 처리 일괄 — 항목별 부분 성공이다 */
7728
+ fulfillBulk: (orderItemIds: string[], body?: FulfillRequest, idempotencyKey?: string) => Promise<{
7729
+ succeeded: string[];
7730
+ failed: {
7731
+ code: string;
7732
+ message: string;
7733
+ id?: string | undefined;
7734
+ productId?: string | undefined;
7735
+ orderItemId?: string | undefined;
7736
+ }[];
7737
+ }>;
5825
7738
  getDelivery: (orderItemId: string) => Promise<{
5826
7739
  orderItemId: string;
5827
7740
  deliveryMethod: "COURIER" | "DIRECT" | "QUICK" | "NOTHING";
@@ -5882,6 +7795,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
5882
7795
  carrierCode: string | null;
5883
7796
  trackingNumber: string | null;
5884
7797
  } | null;
7798
+ fulfillmentType: string;
5885
7799
  requestedAt: string;
5886
7800
  completedAt: string | null;
5887
7801
  holdExpiresAt: string | null;
@@ -5919,6 +7833,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
5919
7833
  carrierCode: string | null;
5920
7834
  trackingNumber: string | null;
5921
7835
  } | null;
7836
+ fulfillmentType: string;
5922
7837
  requestedAt: string;
5923
7838
  completedAt: string | null;
5924
7839
  holdExpiresAt: string | null;
@@ -5944,6 +7859,8 @@ export declare function createStoreClient(options: StoreClientOptions): {
5944
7859
  quantity: number;
5945
7860
  deliveryFeeRefundAmount: number;
5946
7861
  deliveryFeeChargeAmount: number;
7862
+ couponChargeAmount: number;
7863
+ couponChargeRefundAmount: number;
5947
7864
  refundedAt: string;
5948
7865
  }>;
5949
7866
  reject: (claimId: string, body: RejectClaimRequest) => Promise<void>;
@@ -5982,6 +7899,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
5982
7899
  carrierCode: string | null;
5983
7900
  trackingNumber: string | null;
5984
7901
  } | null;
7902
+ fulfillmentType: string;
5985
7903
  requestedAt: string;
5986
7904
  completedAt: string | null;
5987
7905
  holdExpiresAt: string | null;
@@ -6011,7 +7929,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
6011
7929
  productId: string;
6012
7930
  productName: string;
6013
7931
  orderItemId: string | null;
6014
- category: "ETC" | "DELIVERY" | "RETURN" | "EXCHANGE" | "PRODUCT";
7932
+ category: "ETC" | "PRODUCT" | "DELIVERY" | "RETURN" | "EXCHANGE";
6015
7933
  content: string;
6016
7934
  secret: boolean;
6017
7935
  writerMaskedName: string;
@@ -6029,7 +7947,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
6029
7947
  productId: string;
6030
7948
  productName: string;
6031
7949
  orderItemId: string | null;
6032
- category: "ETC" | "DELIVERY" | "RETURN" | "EXCHANGE" | "PRODUCT";
7950
+ category: "ETC" | "PRODUCT" | "DELIVERY" | "RETURN" | "EXCHANGE";
6033
7951
  content: string;
6034
7952
  secret: boolean;
6035
7953
  writerMaskedName: string;
@@ -6222,45 +8140,432 @@ export declare function createStoreClient(options: StoreClientOptions): {
6222
8140
  inquiryCount: number;
6223
8141
  };
6224
8142
  }>;
6225
- orders: (customerId: string, params?: PageParams) => Promise<{
8143
+ orders: (customerId: string, params?: PageParams) => Promise<{
8144
+ page: number;
8145
+ size: number;
8146
+ totalElements: number;
8147
+ totalPages: number;
8148
+ contents: {
8149
+ orderId: string;
8150
+ orderedAt: string;
8151
+ totalAmount: number;
8152
+ testPayment: boolean;
8153
+ items: {
8154
+ orderItemId: string;
8155
+ productName: string;
8156
+ optionName: string | null;
8157
+ quantity: number;
8158
+ status: "PAID" | "CANCELED" | "PAYMENT_WAITING" | "CONFIRMED" | "DISPATCHED" | "DELIVERING" | "DELIVERED" | "PURCHASE_DECIDED";
8159
+ claimStatus: "CANCEL_REQUESTED" | "RETURN_REQUESTED" | "EXCHANGE_REQUESTED" | null;
8160
+ }[];
8161
+ }[];
8162
+ }>;
8163
+ /** 동의 이력 — 최근 순. 가입·재동의·마케팅 변경이 한 줄씩 남는다 */
8164
+ consents: (customerId: string, params?: PageParams & {
8165
+ kind?: ConsentKind;
8166
+ }) => Promise<{
8167
+ page: number;
8168
+ size: number;
8169
+ totalElements: number;
8170
+ totalPages: number;
8171
+ contents: {
8172
+ consentId: string;
8173
+ kind: "TERMS" | "PRIVACY" | "MARKETING";
8174
+ version: string | null;
8175
+ documentUrl: string | null;
8176
+ action: "WITHDRAWN" | "AGREED";
8177
+ source: "SELLER" | "SIGNUP" | "SOCIAL_SIGNUP" | "DELEGATED" | "RECONSENT" | "MEMBER_UPDATE";
8178
+ occurredAt: string;
8179
+ }[];
8180
+ }>;
8181
+ /** 보유 쿠폰 (이슈 #47) — 최근 지급 순, 최대 500장 */
8182
+ coupons: (customerId: string) => Promise<{
8183
+ issueId: string;
8184
+ couponId: string;
8185
+ customerId: string;
8186
+ customerName: string | null;
8187
+ status: string;
8188
+ validFrom: string;
8189
+ validUntil: string | null;
8190
+ usedOrderId: string | null;
8191
+ issuedAt: string;
8192
+ revokedAt: string | null;
8193
+ couponName: string;
8194
+ kind: "ORDER" | "PRODUCT" | "DELIVERY";
8195
+ benefit: {
8196
+ type: "RATE" | "AMOUNT";
8197
+ value: number;
8198
+ maxDiscountAmount: number | null;
8199
+ };
8200
+ }[]>;
8201
+ withdraw: (customerId: string, body: WithdrawCustomerRequest) => Promise<void>;
8202
+ };
8203
+ /** 쿠폰 (이슈 #47) — 조회 `promotion:r`, 쓰기 `promotion:rw` */
8204
+ coupons: {
8205
+ list: (params?: PageParams & Omit<z.input<typeof couponListQuerySchema>, "page" | "size">) => Promise<{
8206
+ page: number;
8207
+ size: number;
8208
+ totalElements: number;
8209
+ totalPages: number;
8210
+ contents: {
8211
+ couponId: string;
8212
+ name: string;
8213
+ description: string | null;
8214
+ kind: "ORDER" | "PRODUCT" | "DELIVERY";
8215
+ benefit: {
8216
+ type: "RATE" | "AMOUNT";
8217
+ value: number;
8218
+ maxDiscountAmount: number | null;
8219
+ };
8220
+ conditions: {
8221
+ minOrderAmount: number;
8222
+ firstOrderOnly: boolean;
8223
+ memberOnly: boolean;
8224
+ stackWithInstantDiscount: boolean;
8225
+ };
8226
+ target: {
8227
+ includeProductIds: string[];
8228
+ includeCategoryIds: string[];
8229
+ excludeProductIds: string[];
8230
+ excludeCategoryIds: string[];
8231
+ };
8232
+ issueMethod: string;
8233
+ code: string | null;
8234
+ startsAt: string | null;
8235
+ endsAt: string | null;
8236
+ validDaysAfterIssue: number | null;
8237
+ totalIssueLimit: number | null;
8238
+ totalUseLimit: number | null;
8239
+ perMemberIssueLimit: number | null;
8240
+ perMemberUseLimit: number | null;
8241
+ issuedCount: number;
8242
+ reservedCount: number;
8243
+ usedCount: number;
8244
+ status: "ACTIVE" | "PAUSED" | "ENDED";
8245
+ locked: boolean;
8246
+ lockedAt: string | null;
8247
+ createdAt: string;
8248
+ updatedAt: string;
8249
+ }[];
8250
+ }>;
8251
+ create: (body: CreateCouponRequest, idempotencyKey?: string) => Promise<{
8252
+ couponId: string;
8253
+ name: string;
8254
+ description: string | null;
8255
+ kind: "ORDER" | "PRODUCT" | "DELIVERY";
8256
+ benefit: {
8257
+ type: "RATE" | "AMOUNT";
8258
+ value: number;
8259
+ maxDiscountAmount: number | null;
8260
+ };
8261
+ conditions: {
8262
+ minOrderAmount: number;
8263
+ firstOrderOnly: boolean;
8264
+ memberOnly: boolean;
8265
+ stackWithInstantDiscount: boolean;
8266
+ };
8267
+ target: {
8268
+ includeProductIds: string[];
8269
+ includeCategoryIds: string[];
8270
+ excludeProductIds: string[];
8271
+ excludeCategoryIds: string[];
8272
+ };
8273
+ issueMethod: string;
8274
+ code: string | null;
8275
+ startsAt: string | null;
8276
+ endsAt: string | null;
8277
+ validDaysAfterIssue: number | null;
8278
+ totalIssueLimit: number | null;
8279
+ totalUseLimit: number | null;
8280
+ perMemberIssueLimit: number | null;
8281
+ perMemberUseLimit: number | null;
8282
+ issuedCount: number;
8283
+ reservedCount: number;
8284
+ usedCount: number;
8285
+ status: "ACTIVE" | "PAUSED" | "ENDED";
8286
+ locked: boolean;
8287
+ lockedAt: string | null;
8288
+ createdAt: string;
8289
+ updatedAt: string;
8290
+ }>;
8291
+ get: (couponId: string) => Promise<{
8292
+ couponId: string;
8293
+ name: string;
8294
+ description: string | null;
8295
+ kind: "ORDER" | "PRODUCT" | "DELIVERY";
8296
+ benefit: {
8297
+ type: "RATE" | "AMOUNT";
8298
+ value: number;
8299
+ maxDiscountAmount: number | null;
8300
+ };
8301
+ conditions: {
8302
+ minOrderAmount: number;
8303
+ firstOrderOnly: boolean;
8304
+ memberOnly: boolean;
8305
+ stackWithInstantDiscount: boolean;
8306
+ };
8307
+ target: {
8308
+ includeProductIds: string[];
8309
+ includeCategoryIds: string[];
8310
+ excludeProductIds: string[];
8311
+ excludeCategoryIds: string[];
8312
+ };
8313
+ issueMethod: string;
8314
+ code: string | null;
8315
+ startsAt: string | null;
8316
+ endsAt: string | null;
8317
+ validDaysAfterIssue: number | null;
8318
+ totalIssueLimit: number | null;
8319
+ totalUseLimit: number | null;
8320
+ perMemberIssueLimit: number | null;
8321
+ perMemberUseLimit: number | null;
8322
+ issuedCount: number;
8323
+ reservedCount: number;
8324
+ usedCount: number;
8325
+ status: "ACTIVE" | "PAUSED" | "ENDED";
8326
+ locked: boolean;
8327
+ lockedAt: string | null;
8328
+ createdAt: string;
8329
+ updatedAt: string;
8330
+ }>;
8331
+ update: (couponId: string, body: UpdateCouponRequest) => Promise<{
8332
+ couponId: string;
8333
+ name: string;
8334
+ description: string | null;
8335
+ kind: "ORDER" | "PRODUCT" | "DELIVERY";
8336
+ benefit: {
8337
+ type: "RATE" | "AMOUNT";
8338
+ value: number;
8339
+ maxDiscountAmount: number | null;
8340
+ };
8341
+ conditions: {
8342
+ minOrderAmount: number;
8343
+ firstOrderOnly: boolean;
8344
+ memberOnly: boolean;
8345
+ stackWithInstantDiscount: boolean;
8346
+ };
8347
+ target: {
8348
+ includeProductIds: string[];
8349
+ includeCategoryIds: string[];
8350
+ excludeProductIds: string[];
8351
+ excludeCategoryIds: string[];
8352
+ };
8353
+ issueMethod: string;
8354
+ code: string | null;
8355
+ startsAt: string | null;
8356
+ endsAt: string | null;
8357
+ validDaysAfterIssue: number | null;
8358
+ totalIssueLimit: number | null;
8359
+ totalUseLimit: number | null;
8360
+ perMemberIssueLimit: number | null;
8361
+ perMemberUseLimit: number | null;
8362
+ issuedCount: number;
8363
+ reservedCount: number;
8364
+ usedCount: number;
8365
+ status: "ACTIVE" | "PAUSED" | "ENDED";
8366
+ locked: boolean;
8367
+ lockedAt: string | null;
8368
+ createdAt: string;
8369
+ updatedAt: string;
8370
+ }>;
8371
+ pause: (couponId: string) => Promise<{
8372
+ couponId: string;
8373
+ name: string;
8374
+ description: string | null;
8375
+ kind: "ORDER" | "PRODUCT" | "DELIVERY";
8376
+ benefit: {
8377
+ type: "RATE" | "AMOUNT";
8378
+ value: number;
8379
+ maxDiscountAmount: number | null;
8380
+ };
8381
+ conditions: {
8382
+ minOrderAmount: number;
8383
+ firstOrderOnly: boolean;
8384
+ memberOnly: boolean;
8385
+ stackWithInstantDiscount: boolean;
8386
+ };
8387
+ target: {
8388
+ includeProductIds: string[];
8389
+ includeCategoryIds: string[];
8390
+ excludeProductIds: string[];
8391
+ excludeCategoryIds: string[];
8392
+ };
8393
+ issueMethod: string;
8394
+ code: string | null;
8395
+ startsAt: string | null;
8396
+ endsAt: string | null;
8397
+ validDaysAfterIssue: number | null;
8398
+ totalIssueLimit: number | null;
8399
+ totalUseLimit: number | null;
8400
+ perMemberIssueLimit: number | null;
8401
+ perMemberUseLimit: number | null;
8402
+ issuedCount: number;
8403
+ reservedCount: number;
8404
+ usedCount: number;
8405
+ status: "ACTIVE" | "PAUSED" | "ENDED";
8406
+ locked: boolean;
8407
+ lockedAt: string | null;
8408
+ createdAt: string;
8409
+ updatedAt: string;
8410
+ }>;
8411
+ resume: (couponId: string) => Promise<{
8412
+ couponId: string;
8413
+ name: string;
8414
+ description: string | null;
8415
+ kind: "ORDER" | "PRODUCT" | "DELIVERY";
8416
+ benefit: {
8417
+ type: "RATE" | "AMOUNT";
8418
+ value: number;
8419
+ maxDiscountAmount: number | null;
8420
+ };
8421
+ conditions: {
8422
+ minOrderAmount: number;
8423
+ firstOrderOnly: boolean;
8424
+ memberOnly: boolean;
8425
+ stackWithInstantDiscount: boolean;
8426
+ };
8427
+ target: {
8428
+ includeProductIds: string[];
8429
+ includeCategoryIds: string[];
8430
+ excludeProductIds: string[];
8431
+ excludeCategoryIds: string[];
8432
+ };
8433
+ issueMethod: string;
8434
+ code: string | null;
8435
+ startsAt: string | null;
8436
+ endsAt: string | null;
8437
+ validDaysAfterIssue: number | null;
8438
+ totalIssueLimit: number | null;
8439
+ totalUseLimit: number | null;
8440
+ perMemberIssueLimit: number | null;
8441
+ perMemberUseLimit: number | null;
8442
+ issuedCount: number;
8443
+ reservedCount: number;
8444
+ usedCount: number;
8445
+ status: "ACTIVE" | "PAUSED" | "ENDED";
8446
+ locked: boolean;
8447
+ lockedAt: string | null;
8448
+ createdAt: string;
8449
+ updatedAt: string;
8450
+ }>;
8451
+ end: (couponId: string) => Promise<{
8452
+ couponId: string;
8453
+ name: string;
8454
+ description: string | null;
8455
+ kind: "ORDER" | "PRODUCT" | "DELIVERY";
8456
+ benefit: {
8457
+ type: "RATE" | "AMOUNT";
8458
+ value: number;
8459
+ maxDiscountAmount: number | null;
8460
+ };
8461
+ conditions: {
8462
+ minOrderAmount: number;
8463
+ firstOrderOnly: boolean;
8464
+ memberOnly: boolean;
8465
+ stackWithInstantDiscount: boolean;
8466
+ };
8467
+ target: {
8468
+ includeProductIds: string[];
8469
+ includeCategoryIds: string[];
8470
+ excludeProductIds: string[];
8471
+ excludeCategoryIds: string[];
8472
+ };
8473
+ issueMethod: string;
8474
+ code: string | null;
8475
+ startsAt: string | null;
8476
+ endsAt: string | null;
8477
+ validDaysAfterIssue: number | null;
8478
+ totalIssueLimit: number | null;
8479
+ totalUseLimit: number | null;
8480
+ perMemberIssueLimit: number | null;
8481
+ perMemberUseLimit: number | null;
8482
+ issuedCount: number;
8483
+ reservedCount: number;
8484
+ usedCount: number;
8485
+ status: "ACTIVE" | "PAUSED" | "ENDED";
8486
+ locked: boolean;
8487
+ lockedAt: string | null;
8488
+ createdAt: string;
8489
+ updatedAt: string;
8490
+ }>;
8491
+ /** 셀러 지급 — 한 번에 1,000명까지. 한도에 걸린 구매자는 `failed`에 담긴다 */
8492
+ issue: (couponId: string, body: IssueCouponRequest, idempotencyKey?: string) => Promise<{
8493
+ issued: {
8494
+ customerId: string;
8495
+ issueId: string;
8496
+ }[];
8497
+ failed: {
8498
+ customerId: string;
8499
+ code: string;
8500
+ message: string;
8501
+ }[];
8502
+ }>;
8503
+ issues: (couponId: string, params?: PageParams & {
8504
+ status?: "AVAILABLE" | "RESERVED" | "USED" | "REVOKED";
8505
+ }) => Promise<{
6226
8506
  page: number;
6227
8507
  size: number;
6228
8508
  totalElements: number;
6229
8509
  totalPages: number;
6230
8510
  contents: {
6231
- orderId: string;
6232
- orderedAt: string;
6233
- totalAmount: number;
6234
- testPayment: boolean;
6235
- items: {
6236
- orderItemId: string;
6237
- productName: string;
6238
- optionName: string | null;
6239
- quantity: number;
6240
- status: "PAID" | "CANCELED" | "PAYMENT_WAITING" | "CONFIRMED" | "DISPATCHED" | "DELIVERING" | "DELIVERED" | "PURCHASE_DECIDED";
6241
- claimStatus: "CANCEL_REQUESTED" | "RETURN_REQUESTED" | "EXCHANGE_REQUESTED" | null;
6242
- }[];
8511
+ issueId: string;
8512
+ couponId: string;
8513
+ customerId: string;
8514
+ customerName: string | null;
8515
+ status: string;
8516
+ validFrom: string;
8517
+ validUntil: string | null;
8518
+ usedOrderId: string | null;
8519
+ issuedAt: string;
8520
+ revokedAt: string | null;
6243
8521
  }[];
6244
8522
  }>;
6245
- /** 동의 이력 — 최근 순. 가입·재동의·마케팅 변경이 한 줄씩 남는다 */
6246
- consents: (customerId: string, params?: PageParams & {
6247
- kind?: ConsentKind;
8523
+ redemptions: (couponId: string, params?: PageParams & {
8524
+ status?: "RESERVED" | "USED" | "RELEASED" | "RESTORED";
6248
8525
  }) => Promise<{
6249
8526
  page: number;
6250
8527
  size: number;
6251
8528
  totalElements: number;
6252
8529
  totalPages: number;
6253
8530
  contents: {
6254
- consentId: string;
6255
- kind: "TERMS" | "PRIVACY" | "MARKETING";
6256
- version: string | null;
6257
- documentUrl: string | null;
6258
- action: "WITHDRAWN" | "AGREED";
6259
- source: "SELLER" | "SIGNUP" | "SOCIAL_SIGNUP" | "DELEGATED" | "RECONSENT" | "MEMBER_UPDATE";
6260
- occurredAt: string;
8531
+ redemptionId: string;
8532
+ couponId: string;
8533
+ issueId: string | null;
8534
+ customerId: string | null;
8535
+ orderId: string | null;
8536
+ status: string;
8537
+ discountAmount: number;
8538
+ reservedAt: string;
8539
+ usedAt: string | null;
8540
+ releasedAt: string | null;
8541
+ restoredAt: string | null;
8542
+ restoreSkippedReason: string | null;
6261
8543
  }[];
6262
8544
  }>;
6263
- withdraw: (customerId: string, body: WithdrawCustomerRequest) => Promise<void>;
8545
+ stats: (couponId: string) => Promise<{
8546
+ couponId: string;
8547
+ issuedCount: number;
8548
+ revokedCount: number;
8549
+ reservedCount: number;
8550
+ usedCount: number;
8551
+ restoredCount: number;
8552
+ releasedCount: number;
8553
+ discountTotal: number;
8554
+ orderPaymentTotal: number;
8555
+ }>;
8556
+ /** 발급 쿠폰 회수 — 사용 가능한 발급 쿠폰만 */
8557
+ revokeIssue: (issueId: string) => Promise<{
8558
+ issueId: string;
8559
+ couponId: string;
8560
+ customerId: string;
8561
+ customerName: string | null;
8562
+ status: string;
8563
+ validFrom: string;
8564
+ validUntil: string | null;
8565
+ usedOrderId: string | null;
8566
+ issuedAt: string;
8567
+ revokedAt: string | null;
8568
+ }>;
6264
8569
  };
6265
8570
  customerInquiries: {
6266
8571
  list: (params?: PageParams & {
@@ -7431,7 +9736,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
7431
9736
  list: () => Promise<{
7432
9737
  webhookId: string;
7433
9738
  url: string;
7434
- eventTypes: ("ORDER.PAID" | "ORDER.CONFIRMED" | "ORDER.DISPATCHED" | "ORDER.DELIVERED" | "ORDER.PURCHASE_DECIDED" | "ORDER.ADDRESS_CHANGE_REQUESTED" | "ORDER.CANCELED" | "CLAIM.CANCEL_REQUESTED" | "CLAIM.RETURN_REQUESTED" | "CLAIM.EXCHANGE_REQUESTED" | "CLAIM.COMPLETED" | "INQUIRY.CREATED" | "REVIEW.CREATED" | "PRODUCT.OUT_OF_STOCK")[];
9739
+ eventTypes: ("ORDER.PAID" | "ORDER.CONFIRMED" | "ORDER.DISPATCHED" | "ORDER.DELIVERED" | "ORDER.PURCHASE_DECIDED" | "ORDER.ADDRESS_CHANGE_REQUESTED" | "ORDER.CANCELED" | "ORDER.FULFILLED" | "CLAIM.CANCEL_REQUESTED" | "CLAIM.RETURN_REQUESTED" | "CLAIM.EXCHANGE_REQUESTED" | "CLAIM.COMPLETED" | "INQUIRY.CREATED" | "REVIEW.CREATED" | "PRODUCT.OUT_OF_STOCK")[];
7435
9740
  status: "ACTIVE" | "SUSPENDED";
7436
9741
  secretPrefix: string;
7437
9742
  suspendedAt: string | null;
@@ -7441,7 +9746,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
7441
9746
  create: (body: WebhookRequest) => Promise<{
7442
9747
  webhookId: string;
7443
9748
  url: string;
7444
- eventTypes: ("ORDER.PAID" | "ORDER.CONFIRMED" | "ORDER.DISPATCHED" | "ORDER.DELIVERED" | "ORDER.PURCHASE_DECIDED" | "ORDER.ADDRESS_CHANGE_REQUESTED" | "ORDER.CANCELED" | "CLAIM.CANCEL_REQUESTED" | "CLAIM.RETURN_REQUESTED" | "CLAIM.EXCHANGE_REQUESTED" | "CLAIM.COMPLETED" | "INQUIRY.CREATED" | "REVIEW.CREATED" | "PRODUCT.OUT_OF_STOCK")[];
9749
+ eventTypes: ("ORDER.PAID" | "ORDER.CONFIRMED" | "ORDER.DISPATCHED" | "ORDER.DELIVERED" | "ORDER.PURCHASE_DECIDED" | "ORDER.ADDRESS_CHANGE_REQUESTED" | "ORDER.CANCELED" | "ORDER.FULFILLED" | "CLAIM.CANCEL_REQUESTED" | "CLAIM.RETURN_REQUESTED" | "CLAIM.EXCHANGE_REQUESTED" | "CLAIM.COMPLETED" | "INQUIRY.CREATED" | "REVIEW.CREATED" | "PRODUCT.OUT_OF_STOCK")[];
7445
9750
  status: "ACTIVE" | "SUSPENDED";
7446
9751
  secretPrefix: string;
7447
9752
  suspendedAt: string | null;
@@ -7451,7 +9756,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
7451
9756
  get: (webhookId: string) => Promise<{
7452
9757
  webhookId: string;
7453
9758
  url: string;
7454
- eventTypes: ("ORDER.PAID" | "ORDER.CONFIRMED" | "ORDER.DISPATCHED" | "ORDER.DELIVERED" | "ORDER.PURCHASE_DECIDED" | "ORDER.ADDRESS_CHANGE_REQUESTED" | "ORDER.CANCELED" | "CLAIM.CANCEL_REQUESTED" | "CLAIM.RETURN_REQUESTED" | "CLAIM.EXCHANGE_REQUESTED" | "CLAIM.COMPLETED" | "INQUIRY.CREATED" | "REVIEW.CREATED" | "PRODUCT.OUT_OF_STOCK")[];
9759
+ eventTypes: ("ORDER.PAID" | "ORDER.CONFIRMED" | "ORDER.DISPATCHED" | "ORDER.DELIVERED" | "ORDER.PURCHASE_DECIDED" | "ORDER.ADDRESS_CHANGE_REQUESTED" | "ORDER.CANCELED" | "ORDER.FULFILLED" | "CLAIM.CANCEL_REQUESTED" | "CLAIM.RETURN_REQUESTED" | "CLAIM.EXCHANGE_REQUESTED" | "CLAIM.COMPLETED" | "INQUIRY.CREATED" | "REVIEW.CREATED" | "PRODUCT.OUT_OF_STOCK")[];
7455
9760
  status: "ACTIVE" | "SUSPENDED";
7456
9761
  secretPrefix: string;
7457
9762
  suspendedAt: string | null;
@@ -7461,7 +9766,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
7461
9766
  update: (webhookId: string, body: WebhookRequest) => Promise<{
7462
9767
  webhookId: string;
7463
9768
  url: string;
7464
- eventTypes: ("ORDER.PAID" | "ORDER.CONFIRMED" | "ORDER.DISPATCHED" | "ORDER.DELIVERED" | "ORDER.PURCHASE_DECIDED" | "ORDER.ADDRESS_CHANGE_REQUESTED" | "ORDER.CANCELED" | "CLAIM.CANCEL_REQUESTED" | "CLAIM.RETURN_REQUESTED" | "CLAIM.EXCHANGE_REQUESTED" | "CLAIM.COMPLETED" | "INQUIRY.CREATED" | "REVIEW.CREATED" | "PRODUCT.OUT_OF_STOCK")[];
9769
+ eventTypes: ("ORDER.PAID" | "ORDER.CONFIRMED" | "ORDER.DISPATCHED" | "ORDER.DELIVERED" | "ORDER.PURCHASE_DECIDED" | "ORDER.ADDRESS_CHANGE_REQUESTED" | "ORDER.CANCELED" | "ORDER.FULFILLED" | "CLAIM.CANCEL_REQUESTED" | "CLAIM.RETURN_REQUESTED" | "CLAIM.EXCHANGE_REQUESTED" | "CLAIM.COMPLETED" | "INQUIRY.CREATED" | "REVIEW.CREATED" | "PRODUCT.OUT_OF_STOCK")[];
7465
9770
  status: "ACTIVE" | "SUSPENDED";
7466
9771
  secretPrefix: string;
7467
9772
  suspendedAt: string | null;
@@ -7476,7 +9781,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
7476
9781
  resume: (webhookId: string) => Promise<{
7477
9782
  webhookId: string;
7478
9783
  url: string;
7479
- eventTypes: ("ORDER.PAID" | "ORDER.CONFIRMED" | "ORDER.DISPATCHED" | "ORDER.DELIVERED" | "ORDER.PURCHASE_DECIDED" | "ORDER.ADDRESS_CHANGE_REQUESTED" | "ORDER.CANCELED" | "CLAIM.CANCEL_REQUESTED" | "CLAIM.RETURN_REQUESTED" | "CLAIM.EXCHANGE_REQUESTED" | "CLAIM.COMPLETED" | "INQUIRY.CREATED" | "REVIEW.CREATED" | "PRODUCT.OUT_OF_STOCK")[];
9784
+ eventTypes: ("ORDER.PAID" | "ORDER.CONFIRMED" | "ORDER.DISPATCHED" | "ORDER.DELIVERED" | "ORDER.PURCHASE_DECIDED" | "ORDER.ADDRESS_CHANGE_REQUESTED" | "ORDER.CANCELED" | "ORDER.FULFILLED" | "CLAIM.CANCEL_REQUESTED" | "CLAIM.RETURN_REQUESTED" | "CLAIM.EXCHANGE_REQUESTED" | "CLAIM.COMPLETED" | "INQUIRY.CREATED" | "REVIEW.CREATED" | "PRODUCT.OUT_OF_STOCK")[];
7480
9785
  status: "ACTIVE" | "SUSPENDED";
7481
9786
  secretPrefix: string;
7482
9787
  suspendedAt: string | null;
@@ -7486,7 +9791,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
7486
9791
  listDeliveries: (webhookId: string, params?: WebhookDeliveryListParams) => Promise<{
7487
9792
  deliveryId: string;
7488
9793
  eventId: string;
7489
- eventType: "ORDER.PAID" | "ORDER.CONFIRMED" | "ORDER.DISPATCHED" | "ORDER.DELIVERED" | "ORDER.PURCHASE_DECIDED" | "ORDER.ADDRESS_CHANGE_REQUESTED" | "ORDER.CANCELED" | "CLAIM.CANCEL_REQUESTED" | "CLAIM.RETURN_REQUESTED" | "CLAIM.EXCHANGE_REQUESTED" | "CLAIM.COMPLETED" | "INQUIRY.CREATED" | "REVIEW.CREATED" | "PRODUCT.OUT_OF_STOCK";
9794
+ eventType: "ORDER.PAID" | "ORDER.CONFIRMED" | "ORDER.DISPATCHED" | "ORDER.DELIVERED" | "ORDER.PURCHASE_DECIDED" | "ORDER.ADDRESS_CHANGE_REQUESTED" | "ORDER.CANCELED" | "ORDER.FULFILLED" | "CLAIM.CANCEL_REQUESTED" | "CLAIM.RETURN_REQUESTED" | "CLAIM.EXCHANGE_REQUESTED" | "CLAIM.COMPLETED" | "INQUIRY.CREATED" | "REVIEW.CREATED" | "PRODUCT.OUT_OF_STOCK";
7490
9795
  url: string;
7491
9796
  status: "PENDING" | "PENDING_RETRY" | "SUCCESS" | "FAILED";
7492
9797
  responseStatusCode: number | null;
@@ -7513,7 +9818,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
7513
9818
  getDelivery: (webhookId: string, deliveryId: string) => Promise<{
7514
9819
  deliveryId: string;
7515
9820
  eventId: string;
7516
- eventType: "ORDER.PAID" | "ORDER.CONFIRMED" | "ORDER.DISPATCHED" | "ORDER.DELIVERED" | "ORDER.PURCHASE_DECIDED" | "ORDER.ADDRESS_CHANGE_REQUESTED" | "ORDER.CANCELED" | "CLAIM.CANCEL_REQUESTED" | "CLAIM.RETURN_REQUESTED" | "CLAIM.EXCHANGE_REQUESTED" | "CLAIM.COMPLETED" | "INQUIRY.CREATED" | "REVIEW.CREATED" | "PRODUCT.OUT_OF_STOCK";
9821
+ eventType: "ORDER.PAID" | "ORDER.CONFIRMED" | "ORDER.DISPATCHED" | "ORDER.DELIVERED" | "ORDER.PURCHASE_DECIDED" | "ORDER.ADDRESS_CHANGE_REQUESTED" | "ORDER.CANCELED" | "ORDER.FULFILLED" | "CLAIM.CANCEL_REQUESTED" | "CLAIM.RETURN_REQUESTED" | "CLAIM.EXCHANGE_REQUESTED" | "CLAIM.COMPLETED" | "INQUIRY.CREATED" | "REVIEW.CREATED" | "PRODUCT.OUT_OF_STOCK";
7517
9822
  url: string;
7518
9823
  status: "PENDING" | "PENDING_RETRY" | "SUCCESS" | "FAILED";
7519
9824
  responseStatusCode: number | null;
@@ -7548,7 +9853,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
7548
9853
  redeliver: (webhookId: string, deliveryId: string) => Promise<{
7549
9854
  deliveryId: string;
7550
9855
  eventId: string;
7551
- eventType: "ORDER.PAID" | "ORDER.CONFIRMED" | "ORDER.DISPATCHED" | "ORDER.DELIVERED" | "ORDER.PURCHASE_DECIDED" | "ORDER.ADDRESS_CHANGE_REQUESTED" | "ORDER.CANCELED" | "CLAIM.CANCEL_REQUESTED" | "CLAIM.RETURN_REQUESTED" | "CLAIM.EXCHANGE_REQUESTED" | "CLAIM.COMPLETED" | "INQUIRY.CREATED" | "REVIEW.CREATED" | "PRODUCT.OUT_OF_STOCK";
9856
+ eventType: "ORDER.PAID" | "ORDER.CONFIRMED" | "ORDER.DISPATCHED" | "ORDER.DELIVERED" | "ORDER.PURCHASE_DECIDED" | "ORDER.ADDRESS_CHANGE_REQUESTED" | "ORDER.CANCELED" | "ORDER.FULFILLED" | "CLAIM.CANCEL_REQUESTED" | "CLAIM.RETURN_REQUESTED" | "CLAIM.EXCHANGE_REQUESTED" | "CLAIM.COMPLETED" | "INQUIRY.CREATED" | "REVIEW.CREATED" | "PRODUCT.OUT_OF_STOCK";
7552
9857
  url: string;
7553
9858
  status: "PENDING" | "PENDING_RETRY" | "SUCCESS" | "FAILED";
7554
9859
  responseStatusCode: number | null;
@@ -7664,7 +9969,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
7664
9969
  list: (params?: ApprovalListOptions) => Promise<{
7665
9970
  items: {
7666
9971
  approvalId: string;
7667
- status: "PENDING" | "FAILED" | "SUCCEEDED" | "EXECUTING" | "UNKNOWN" | "REJECTED" | "EXPIRED";
9972
+ status: "EXPIRED" | "PENDING" | "FAILED" | "SUCCEEDED" | "EXECUTING" | "UNKNOWN" | "REJECTED";
7668
9973
  operationId: string;
7669
9974
  method: string;
7670
9975
  path: string;
@@ -7714,7 +10019,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
7714
10019
  }>;
7715
10020
  get: (approvalId: string) => Promise<{
7716
10021
  approvalId: string;
7717
- status: "PENDING" | "FAILED" | "SUCCEEDED" | "EXECUTING" | "UNKNOWN" | "REJECTED" | "EXPIRED";
10022
+ status: "EXPIRED" | "PENDING" | "FAILED" | "SUCCEEDED" | "EXECUTING" | "UNKNOWN" | "REJECTED";
7718
10023
  operationId: string;
7719
10024
  method: string;
7720
10025
  path: string;
@@ -7766,7 +10071,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
7766
10071
  */
7767
10072
  approve: (approvalId: string, body?: ApprovalDecisionRequest) => Promise<{
7768
10073
  approvalId: string;
7769
- status: "PENDING" | "FAILED" | "SUCCEEDED" | "EXECUTING" | "UNKNOWN" | "REJECTED" | "EXPIRED";
10074
+ status: "EXPIRED" | "PENDING" | "FAILED" | "SUCCEEDED" | "EXECUTING" | "UNKNOWN" | "REJECTED";
7770
10075
  operationId: string;
7771
10076
  method: string;
7772
10077
  path: string;
@@ -7814,7 +10119,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
7814
10119
  }>;
7815
10120
  reject: (approvalId: string, body?: ApprovalDecisionRequest) => Promise<{
7816
10121
  approvalId: string;
7817
- status: "PENDING" | "FAILED" | "SUCCEEDED" | "EXECUTING" | "UNKNOWN" | "REJECTED" | "EXPIRED";
10122
+ status: "EXPIRED" | "PENDING" | "FAILED" | "SUCCEEDED" | "EXECUTING" | "UNKNOWN" | "REJECTED";
7818
10123
  operationId: string;
7819
10124
  method: string;
7820
10125
  path: string;
@@ -7911,7 +10216,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
7911
10216
  sellerAddresses: {
7912
10217
  list: (type?: AddressType) => Promise<{
7913
10218
  addressId: string;
7914
- type: "RETURN" | "SHIPPING";
10219
+ type: "SHIPPING" | "PICKUP" | "RETURN";
7915
10220
  name: string;
7916
10221
  isDefault: boolean;
7917
10222
  contactName: string;
@@ -7939,6 +10244,8 @@ export declare function createStoreClient(options: StoreClientOptions): {
7939
10244
  analyticsAllowedOrigins: string[];
7940
10245
  storefrontOrigins: string[];
7941
10246
  guestCheckoutEnabled: boolean;
10247
+ fulfillmentMailEnabled: boolean;
10248
+ withdrawalNotice: string | null;
7942
10249
  autoDeliverDays: number;
7943
10250
  autoConfirmDays: number;
7944
10251
  refundPolicy: {
@@ -7947,6 +10254,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
7947
10254
  exchangeDeliveryFee: number;
7948
10255
  sellerFaultFreeShipping: boolean;
7949
10256
  conditionalFreeShortfallCharge: boolean;
10257
+ couponShortfallCharge: boolean;
7950
10258
  };
7951
10259
  shippingPolicy: {
7952
10260
  baseDeliveryFee: number;
@@ -7979,6 +10287,8 @@ export declare function createStoreClient(options: StoreClientOptions): {
7979
10287
  analyticsAllowedOrigins: string[];
7980
10288
  storefrontOrigins: string[];
7981
10289
  guestCheckoutEnabled: boolean;
10290
+ fulfillmentMailEnabled: boolean;
10291
+ withdrawalNotice: string | null;
7982
10292
  autoDeliverDays: number;
7983
10293
  autoConfirmDays: number;
7984
10294
  refundPolicy: {
@@ -7987,6 +10297,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
7987
10297
  exchangeDeliveryFee: number;
7988
10298
  sellerFaultFreeShipping: boolean;
7989
10299
  conditionalFreeShortfallCharge: boolean;
10300
+ couponShortfallCharge: boolean;
7990
10301
  };
7991
10302
  shippingPolicy: {
7992
10303
  baseDeliveryFee: number;
@@ -8007,7 +10318,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
8007
10318
  userId: string;
8008
10319
  name: string;
8009
10320
  email: string;
8010
- role: "ADMIN" | "STAFF" | "OWNER";
10321
+ role: "OWNER" | "ADMIN" | "STAFF";
8011
10322
  joinedAt: string;
8012
10323
  lastActiveAt: string | null;
8013
10324
  }[]>;
@@ -8024,7 +10335,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
8024
10335
  invitationId: string;
8025
10336
  email: string;
8026
10337
  role: "ADMIN" | "STAFF";
8027
- status: "PENDING" | "EXPIRED" | "ACCEPTED" | "CANCELED";
10338
+ status: "EXPIRED" | "PENDING" | "ACCEPTED" | "CANCELED";
8028
10339
  invitedBy: string;
8029
10340
  expiresAt: string;
8030
10341
  createdAt: string;
@@ -8042,7 +10353,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
8042
10353
  invitationId: string;
8043
10354
  email: string;
8044
10355
  role: "ADMIN" | "STAFF";
8045
- status: "PENDING" | "EXPIRED" | "ACCEPTED" | "CANCELED";
10356
+ status: "EXPIRED" | "PENDING" | "ACCEPTED" | "CANCELED";
8046
10357
  invitedBy: string;
8047
10358
  expiresAt: string;
8048
10359
  createdAt: string;
@@ -8057,7 +10368,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
8057
10368
  invitationId: string;
8058
10369
  email: string;
8059
10370
  role: "ADMIN" | "STAFF";
8060
- status: "PENDING" | "EXPIRED" | "ACCEPTED" | "CANCELED";
10371
+ status: "EXPIRED" | "PENDING" | "ACCEPTED" | "CANCELED";
8061
10372
  invitedBy: string;
8062
10373
  expiresAt: string;
8063
10374
  createdAt: string;
@@ -8132,6 +10443,333 @@ export declare function exchangeStoreTokenViaOAuth(options: {
8132
10443
  role?: string;
8133
10444
  }>;
8134
10445
  //#endregion
10446
+ //#region src/schemas/promotion.d.ts
10447
+ /** 쿠폰 종류 */
10448
+ export declare const couponKindSchema: z.ZodEnum<{
10449
+ ORDER: "ORDER";
10450
+ PRODUCT: "PRODUCT";
10451
+ DELIVERY: "DELIVERY";
10452
+ }>;
10453
+ export type CouponKind = z.infer<typeof couponKindSchema>;
10454
+ /** 쿠폰 혜택 — 정률은 1~100%, 최대 할인액을 둘 수 있다. 정액은 최대 할인액이 없다 */
10455
+ export declare const couponBenefitSchema: z.ZodObject<{
10456
+ type: z.ZodEnum<{
10457
+ RATE: "RATE";
10458
+ AMOUNT: "AMOUNT";
10459
+ }>;
10460
+ value: z.ZodNumber;
10461
+ maxDiscountAmount: z.ZodNullable<z.ZodNumber>;
10462
+ }, z.core.$strip>;
10463
+ export type CouponBenefit = z.infer<typeof couponBenefitSchema>;
10464
+ /** 쿠폰 사용 조건 */
10465
+ export declare const couponConditionsSchema: z.ZodObject<{
10466
+ minOrderAmount: z.ZodNumber;
10467
+ firstOrderOnly: z.ZodBoolean;
10468
+ memberOnly: z.ZodBoolean;
10469
+ stackWithInstantDiscount: z.ZodBoolean;
10470
+ }, z.core.$strip>;
10471
+ export type CouponConditions = z.infer<typeof couponConditionsSchema>;
10472
+ /** 조건을 생략했을 때의 값 */
10473
+ export declare const COUPON_CONDITIONS_DEFAULTS: CouponConditions;
10474
+ /** 상한 — 대상 목록은 규칙 스냅샷에 통째로 복사되므로 크기를 제한한다 */
10475
+ export declare const COUPON_TARGET_LIST_MAX = 500;
10476
+ /** 쿠폰 대상 — 포함 목록이 모두 비면 전 상품이다. 제외가 포함보다 우선한다 */
10477
+ export declare const couponTargetSchema: z.ZodObject<{
10478
+ includeProductIds: z.ZodArray<z.ZodString>;
10479
+ includeCategoryIds: z.ZodArray<z.ZodString>;
10480
+ excludeProductIds: z.ZodArray<z.ZodString>;
10481
+ excludeCategoryIds: z.ZodArray<z.ZodString>;
10482
+ }, z.core.$strip>;
10483
+ export type CouponTarget = z.infer<typeof couponTargetSchema>;
10484
+ export declare const COUPON_TARGET_ALL: CouponTarget;
10485
+ /**
10486
+ * 쿠폰 규칙 스냅샷 — 계산에 필요한 값만 담는다. 결제 시작이 쿠폰을 읽어 이 형태로 결제 세션에 굳히고,
10487
+ * 주문 생성·환불 정산은 이 스냅샷만 읽는다. 결제 도중·주문 뒤 셀러가 쿠폰을 바꿔도 그 주문의 금액은 움직이지 않는다.
10488
+ */
10489
+ export declare const couponRuleSchema: z.ZodObject<{
10490
+ couponId: z.ZodString;
10491
+ name: z.ZodString;
10492
+ kind: z.ZodEnum<{
10493
+ ORDER: "ORDER";
10494
+ PRODUCT: "PRODUCT";
10495
+ DELIVERY: "DELIVERY";
10496
+ }>;
10497
+ benefit: z.ZodObject<{
10498
+ type: z.ZodEnum<{
10499
+ RATE: "RATE";
10500
+ AMOUNT: "AMOUNT";
10501
+ }>;
10502
+ value: z.ZodNumber;
10503
+ maxDiscountAmount: z.ZodNullable<z.ZodNumber>;
10504
+ }, z.core.$strip>;
10505
+ conditions: z.ZodObject<{
10506
+ minOrderAmount: z.ZodNumber;
10507
+ firstOrderOnly: z.ZodBoolean;
10508
+ memberOnly: z.ZodBoolean;
10509
+ stackWithInstantDiscount: z.ZodBoolean;
10510
+ }, z.core.$strip>;
10511
+ target: z.ZodObject<{
10512
+ includeProductIds: z.ZodArray<z.ZodString>;
10513
+ includeCategoryIds: z.ZodArray<z.ZodString>;
10514
+ excludeProductIds: z.ZodArray<z.ZodString>;
10515
+ excludeCategoryIds: z.ZodArray<z.ZodString>;
10516
+ }, z.core.$strip>;
10517
+ startsAt: z.ZodNullable<z.ZodISODateTime>;
10518
+ endsAt: z.ZodNullable<z.ZodISODateTime>;
10519
+ }, z.core.$strip>;
10520
+ export type CouponRule = z.infer<typeof couponRuleSchema>;
10521
+ /** 쿠폰을 적용하지 못한 사유 */
10522
+ export declare const couponRejectReasonSchema: z.ZodEnum<{
10523
+ EXPIRED: "EXPIRED";
10524
+ DUPLICATE_COUPON: "DUPLICATE_COUPON";
10525
+ STACK_LIMIT: "STACK_LIMIT";
10526
+ NOT_STARTED: "NOT_STARTED";
10527
+ MEMBER_ONLY: "MEMBER_ONLY";
10528
+ FIRST_ORDER_ONLY: "FIRST_ORDER_ONLY";
10529
+ NO_ELIGIBLE_ITEMS: "NO_ELIGIBLE_ITEMS";
10530
+ MIN_ORDER_AMOUNT: "MIN_ORDER_AMOUNT";
10531
+ LINE_NOT_ELIGIBLE: "LINE_NOT_ELIGIBLE";
10532
+ NO_DISCOUNT: "NO_DISCOUNT";
10533
+ }>;
10534
+ export type CouponRejectReason = z.infer<typeof couponRejectReasonSchema>;
10535
+ /** 쿠폰 적용 뒤 결제 금액의 하한 — 0원 결제 경로가 없어 이보다 작으면 결제를 시작하지 않는다(400 `PAYMENT_AMOUNT_TOO_LOW`) */
10536
+ export declare const MIN_PAYMENT_AMOUNT = 100;
10537
+ /** 계산에 넣는 주문상품 한 줄 */
10538
+ export interface PricingLine {
10539
+ /** 줄 식별자 — 주문서는 항목 순번, 주문은 주문상품 id. 배분 결과가 이 키로 나온다 */
10540
+ lineId: string;
10541
+ productId: string;
10542
+ /** 상품 카테고리 경로(`/조상/…/자신/`). 없으면 카테고리 대상에 걸리지 않는다 */
10543
+ categoryPath?: string | null;
10544
+ /** 수량 — 계산에는 쓰지 않는다(금액이 이미 수량을 반영한다). 화면·로그용이다 */
10545
+ quantity: number;
10546
+ /** 즉시할인 전 금액 (정가 단가 × 수량) */
10547
+ baseAmount: number;
10548
+ /** 즉시할인 반영 금액 (할인 단가 × 수량) — 쿠폰 계산의 기준이다 */
10549
+ amount: number;
10550
+ }
10551
+ /** 계산에 넣는 쿠폰 한 장 */
10552
+ export interface PricingCoupon {
10553
+ rule: CouponRule;
10554
+ /** 결과·배분의 키. 생략하면 `rule.couponId` */
10555
+ couponKey?: string;
10556
+ /**
10557
+ * 상품 쿠폰을 걸 줄. 생략하면 계산이 고른다 — 줄을 지정한 쿠폰을 먼저 걸고, 나머지는 대상 줄이 적은 쿠폰부터
10558
+ * 할인이 가장 큰 남은 줄(같으면 앞 줄)에 건다
10559
+ */
10560
+ lineId?: string | null;
10561
+ /**
10562
+ * 대상 줄을 이미 정했으면 그 목록 — 환불 정산의 재계산이 쓴다. 주어지면 `target`·즉시할인 조건을 다시
10563
+ * 판정하지 않는다(주문 뒤 상품의 카테고리·즉시할인이 바뀌어도 주문 시점 대상이 그대로다).
10564
+ */
10565
+ eligibleLineIds?: readonly string[] | null;
10566
+ /** 발급 쿠폰의 유효 시작·종료 — 쿠폰 사용 기간과 둘 중 좁은 쪽이 적용된다 */
10567
+ validFrom?: string | null;
10568
+ validUntil?: string | null;
10569
+ }
10570
+ /**
10571
+ * 배송비 쿠폰이 보는 배송비 견적 — `quoteDelivery` 결과의 묶음 내역이다. 배송비 총액은 묶음의
10572
+ * `fee + remoteSurcharge` 합으로 계산한다(총액을 따로 받으면 묶음과 어긋날 수 있다).
10573
+ */
10574
+ export interface PricingDelivery {
10575
+ bundles: ReadonlyArray<{
10576
+ bundleKey: string;
10577
+ fee: number;
10578
+ remoteSurcharge: number;
10579
+ }>;
10580
+ }
10581
+ export interface PricingInput {
10582
+ lines: readonly PricingLine[];
10583
+ coupons: readonly PricingCoupon[];
10584
+ /** 배송비 견적. 없으면 배송비 0으로 계산하고 배송비 쿠폰은 할인할 금액이 없다 */
10585
+ delivery?: PricingDelivery | null;
10586
+ /** 이 스토어에서 결제 완료 주문이 없는 회원인가 */
10587
+ firstOrder: boolean;
10588
+ /** 회원 주문인가 */
10589
+ isMember: boolean;
10590
+ /** 사용 기간 판정 시각 */
10591
+ now: Date;
10592
+ /**
10593
+ * 사용 기간·회원·첫 구매 조건을 다시 보지 않는다 — **환불 정산의 재계산 전용이다.** 그 조건은 결제 시작에서
10594
+ * 이미 통과했다. 주문 시각(승인 시각)으로 기간을 다시 보면 결제 시작과 승인 사이에 끝난 쿠폰이 조건을 잃은
10595
+ * 것처럼 보이고, 탈퇴한 회원의 반품이 회원 전용 조건에 떨어진다. 대상과 최소 금액만 본다.
10596
+ */
10597
+ ignoreEligibility?: boolean;
10598
+ }
10599
+ /** 줄 하나에 들어간 쿠폰별 할인 */
10600
+ export interface CouponAllocation {
10601
+ couponKey: string;
10602
+ amount: number;
10603
+ }
10604
+ export interface PricingLineResult {
10605
+ lineId: string;
10606
+ /** 즉시할인 반영 금액 (쿠폰 전) */
10607
+ amount: number;
10608
+ /** 이 줄에 들어간 쿠폰 할인 합계 — 상품 쿠폰 + 주문 쿠폰 배분 */
10609
+ couponDiscount: number;
10610
+ allocations: CouponAllocation[];
10611
+ }
10612
+ export interface PricingCouponResult {
10613
+ couponKey: string;
10614
+ couponId: string;
10615
+ kind: CouponKind;
10616
+ applied: boolean;
10617
+ /** 이 쿠폰의 할인액. 적용하지 못했으면 0 */
10618
+ discount: number;
10619
+ rejectReason: CouponRejectReason | null;
10620
+ /** 상품 쿠폰이 걸린 줄. 그 밖은 null */
10621
+ lineId: string | null;
10622
+ /** 이 쿠폰의 대상 줄 — 판정에 쓴 순서 그대로다. 환불 정산이 주문 시점 대상을 되살리는 데 쓴다 */
10623
+ eligibleLineIds: string[];
10624
+ }
10625
+ export interface PricingBundleResult {
10626
+ bundleKey: string;
10627
+ couponDiscount: number;
10628
+ }
10629
+ export interface PricingResult {
10630
+ lines: PricingLineResult[];
10631
+ coupons: PricingCouponResult[];
10632
+ /** 배송비 쿠폰의 묶음별 배분 */
10633
+ bundles: PricingBundleResult[];
10634
+ /** 상품 금액 합 (즉시할인 반영, 쿠폰 전) */
10635
+ productAmount: number;
10636
+ /** 상품·주문 쿠폰 할인 합계 */
10637
+ couponDiscountAmount: number;
10638
+ /** 배송비 (쿠폰 전) */
10639
+ deliveryFee: number;
10640
+ /** 배송비 쿠폰 할인 */
10641
+ deliveryDiscountAmount: number;
10642
+ /** 결제 금액 = productAmount − couponDiscountAmount + deliveryFee − deliveryDiscountAmount */
10643
+ totalAmount: number;
10644
+ }
10645
+ /**
10646
+ * 할인액 — 정률은 10원 단위 내림, 최대 할인액과 기준 금액을 넘지 않는다. 기준 금액이 0 이하면 0이다.
10647
+ *
10648
+ * 곱셈을 먼저 하고 나눈다. `base × 율 ÷ 1000`을 내려 10을 곱하면 `floor(base × 율 / 100 / 10) × 10`과 같고
10649
+ * 부동소수 오차가 끼지 않는다.
10650
+ */
10651
+ export declare function couponDiscountOf(benefit: CouponBenefit, base: number): number;
10652
+ /**
10653
+ * 금액을 가중치 비율로 나눈다 — **누적 내림의 차분**이다.
10654
+ *
10655
+ * `i`번째 몫 = `floor(total × W_i / W) − floor(total × W_{i−1} / W)`(`W_i`는 앞에서부터 누적 가중치).
10656
+ * 합이 `total`과 정확히 같고, 입력 순서가 같으면 결과도 같다. `total ≤ W`이면 몫이 가중치를 넘지 않는다.
10657
+ * 곱이 2^53을 넘을 수 있어 BigInt로 계산한다.
10658
+ */
10659
+ export declare function allocateByWeight(total: number, weights: readonly number[]): number[];
10660
+ /** 줄이 쿠폰 대상인가 — 제외가 포함보다 우선하고, 포함 목록이 모두 비면 전 상품이다 */
10661
+ export declare function isCouponTargetLine(rule: Pick<CouponRule, "target" | "conditions">, line: Pick<PricingLine, "productId" | "categoryPath" | "baseAmount" | "amount">): boolean;
10662
+ /**
10663
+ * 쿠폰 금액 계산 — **순수 함수다.** DB를 읽지 않는다. 규칙 스냅샷을 만드는 조회와 한도·보유 판정
10664
+ * (발급 쿠폰 상태, 1인 한도)은 호출부 몫이다.
10665
+ *
10666
+ * 종류별로 상품 쿠폰 → 주문 쿠폰 → 배송비 쿠폰 순으로 적용한다. 같은 종류의 자리와 같은 쿠폰 id는
10667
+ * **적용된** 쿠폰만 차지한다 — 앞선 주문 쿠폰이 최소 금액 미달이면 뒤의 주문 쿠폰이 쓰이고, 같은 쿠폰의 발급
10668
+ * 사본 중 앞 장이 만료됐으면 뒤 장이 쓰인다. 결과의 `coupons`는 입력 순서 그대로다. 입력이 같으면 결과도 같다.
10669
+ */
10670
+ export declare function quotePricing(input: PricingInput): PricingResult;
10671
+ /**
10672
+ * 주문이 받은 쿠폰 한 장 — 주문 시점 규칙과 대상 줄을 굳힌 값이다(`orders.discounts`의 항목).
10673
+ * 환불 정산은 이 값만 읽는다. 셀러가 쿠폰을 바꾸거나 상품의 카테고리가 바뀌어도 결과가 같다.
10674
+ */
10675
+ export interface AppliedCouponSnapshot {
10676
+ couponKey: string;
10677
+ rule: CouponRule;
10678
+ /** 상품 쿠폰이 걸린 주문상품 id. 그 밖은 null */
10679
+ lineId: string | null;
10680
+ /** 주문 시점 대상 주문상품 id — 주문서 항목 순서 그대로다 */
10681
+ eligibleLineIds: string[];
10682
+ /** 주문 시점 할인액 */
10683
+ discount: number;
10684
+ }
10685
+ /** 정산이 보는 주문상품 한 줄 — 이번 취소를 **반영한 뒤**의 활성 수량이다 */
10686
+ export interface CouponSettlementLine {
10687
+ lineId: string;
10688
+ productId: string;
10689
+ quantity: number;
10690
+ /** 남은 활성 수량 (이번 취소 반영 뒤) */
10691
+ activeQuantity: number;
10692
+ /** 주문상품 금액 (즉시할인 반영 단가 × 전체 수량, 쿠폰 전) */
10693
+ totalPrice: number;
10694
+ /** 주문 시점 쿠폰별 배분 */
10695
+ allocations: readonly CouponAllocation[];
10696
+ }
10697
+ /** 쿠폰 한 장의 정산 누적 — `orders.coupon_settlements[couponKey]` */
10698
+ export interface CouponSettlementState {
10699
+ /** 지금까지 환불에서 뺀 조건 미달 차감 (되돌린 금액을 뺀 값) */
10700
+ charged: number;
10701
+ /** 판매자 귀책·정책 꺼짐으로 받지 않기로 한 미달분 — 뒤의 환불이 다시 청구하지 않게 남긴다 */
10702
+ waived: number;
10703
+ }
10704
+ export interface CouponSettlementInput {
10705
+ coupons: readonly AppliedCouponSnapshot[];
10706
+ lines: readonly CouponSettlementLine[];
10707
+ settlements: Readonly<Record<string, Partial<CouponSettlementState> | undefined>>;
10708
+ /** 스토어 환불 정책 `couponShortfallCharge` */
10709
+ shortfallCharge: boolean;
10710
+ /** 판매자 귀책(직권취소, 불량·오배송 반품) — 미달분을 청구하지 않는다 */
10711
+ sellerFault: boolean;
10712
+ /**
10713
+ * 이번 환불에서 실제로 뺄 수 있는 금액 — 차감의 상한이다. 넘겨 차감하면 환불은 0원으로 잘리는데 기록에는
10714
+ * 전액이 남아, 뒤에 되돌릴 때 받지 않은 돈을 돌려준다(배송비 미달 차감의 `chargeableAmount`와 같은 이유).
10715
+ */
10716
+ chargeableAmount: number;
10717
+ }
10718
+ export interface CouponSettlementEntry {
10719
+ couponKey: string;
10720
+ /** 남은 주문상품에 배분된 할인 */
10721
+ allocatedRemaining: number;
10722
+ /** 남은 주문상품으로 다시 계산한 할인 — 쿠폰 조건을 잃었으면 0 */
10723
+ recomputed: number;
10724
+ /** 누적 미달분 목표 = 조건을 잃었으면 `allocatedRemaining`, 아니면 0 */
10725
+ target: number;
10726
+ charge: number;
10727
+ refund: number;
10728
+ waive: number;
10729
+ next: CouponSettlementState;
10730
+ }
10731
+ export interface CouponSettlementResult {
10732
+ /** 이번 환불에서 뺄 금액 — 조건 미달 차감 */
10733
+ chargeAmount: number;
10734
+ /** 이번 환불에 더할 금액 — 앞선 환불에서 뺀 차감을 되돌린 몫 */
10735
+ refundAmount: number;
10736
+ entries: CouponSettlementEntry[];
10737
+ }
10738
+ export declare const NO_COUPON_SETTLEMENT: CouponSettlementResult;
10739
+ /**
10740
+ * 쿠폰 조건 미달 차감 — **순수 함수다.** 부분 취소·반품으로 남은 주문상품이 쿠폰 조건을 잃으면,
10741
+ * 남은 주문상품이 받던 할인만큼을 이번 환불에서 뺀다.
10742
+ *
10743
+ * 쿠폰마다
10744
+ * - `allocatedRemaining` = 남은 수량에 배분된 할인(`proratedRefundBase`로 수량 비율)
10745
+ * - `recomputed` = 주문 시점 규칙 스냅샷과 주문 시점 대상 줄로, 남은 금액만 넣어 `quotePricing`을 다시 돌린 할인
10746
+ * - 쿠폰이 **여전히 적용되면 목표 0**, 조건을 잃었으면 목표 = `allocatedRemaining`이다. 적용되는 쿠폰의
10747
+ * 정률 10원 내림 차이까지 차감하면 조건을 지킨 구매자가 몇 원씩 잃는다 — 조건을 잃은 경우만 본다.
10748
+ * 재계산 할인이 더 커지는 경우(정률 최대 할인액)도 차감하지 않고 더 돌려주지도 않는다.
10749
+ * - `delta` = 목표 − (이미 차감 + 이미 면제). 양수면 청구하고(판매자 귀책·정책 꺼짐이면 면제로 기록),
10750
+ * 음수면 앞서 뺀 차감부터 돌려준다. 마지막 활성 수량까지 취소되면 목표가 0이라 누적 차감이 모두 되돌아가고,
10751
+ * 전량 취소의 환불 합계가 결제액과 같아진다.
10752
+ * - 청구는 이번 환불에서 실제로 뺄 수 있는 금액(`chargeableAmount` + 이번에 되돌린 금액)을 넘지 않고,
10753
+ * **실제로 뺀 금액만** 기록한다. 못 뺀 나머지는 기록하지 않아 다음 환불이 다시 본다.
10754
+ *
10755
+ * 배송비 쿠폰은 여기서 다루지 않는다. 배송비 쿠폰을 발급하게 되면(3단계) 묶음 배송비 환불
10756
+ * (`computeDeliveryFeeSettlement`)이 그 묶음의 `couponDiscount`를 빼야 한다 — 빼지 않으면 받지 않은 배송비를 돌려준다.
10757
+ */
10758
+ export declare function settleCouponShortfall(input: CouponSettlementInput): CouponSettlementResult;
10759
+ /**
10760
+ * 주문상품의 실결제 금액 중 이번 취소 수량의 몫 — **실결제 금액(`totalPrice − couponDiscountAmount`)을
10761
+ * 누적 내림의 차분으로 나눈다.**
10762
+ *
10763
+ * 상품 금액과 쿠폰 배분을 따로 나눠 빼면 합은 같지만 한 번의 몫이 −1원이 되는 경우가 있다
10764
+ * (예: 금액 3원·할인 2원·수량 5개에서 셋째 개). 음수를 0으로 자르면 합이 1원 넘친다. 실결제 금액을
10765
+ * 바로 나누면 몫이 항상 0 이상이고 전량 취소의 합이 실결제 금액과 정확히 같다.
10766
+ */
10767
+ export declare function proratedPaidRefundBase(item: {
10768
+ totalPrice: number;
10769
+ couponDiscountAmount?: number | null;
10770
+ quantity: number;
10771
+ }, settledQuantity: number, cancelQuantity: number): number;
10772
+ //#endregion
8135
10773
  //#region src/schemas/refund-policy.d.ts
8136
10774
  /** 유효 환불 정책 — 스토어 기본 + 상품별 덮어쓰기를 합친 결과 */
8137
10775
  export declare const refundPolicySchema: z.ZodObject<{
@@ -8140,6 +10778,7 @@ export declare const refundPolicySchema: z.ZodObject<{
8140
10778
  exchangeDeliveryFee: z.ZodNumber;
8141
10779
  sellerFaultFreeShipping: z.ZodBoolean;
8142
10780
  conditionalFreeShortfallCharge: z.ZodBoolean;
10781
+ couponShortfallCharge: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
8143
10782
  }, z.core.$strip>;
8144
10783
  export type RefundPolicy = z.infer<typeof refundPolicySchema>;
8145
10784
  /**
@@ -8161,40 +10800,49 @@ export declare const refundPolicyPatchSchema: z.ZodObject<{
8161
10800
  exchangeDeliveryFee: z.ZodOptional<z.ZodNumber>;
8162
10801
  sellerFaultFreeShipping: z.ZodOptional<z.ZodBoolean>;
8163
10802
  conditionalFreeShortfallCharge: z.ZodOptional<z.ZodBoolean>;
10803
+ couponShortfallCharge: z.ZodOptional<z.ZodBoolean>;
8164
10804
  }, z.core.$strict>;
8165
10805
  export type RefundPolicyPatch = z.infer<typeof refundPolicyPatchSchema>;
8166
- /** 정책 해석에 쓰는 상품 값 — 상품별 덮어쓰기와 레거시 배송비 필드 */
10806
+ /**
10807
+ * 상품별 덮어쓰기 — 쿠폰 조건 미달 차감(`couponShortfallCharge`)은 주문 단위 규칙이라 상품이 정하지 않는다.
10808
+ * 스토어 정책만 읽는다(이슈 #47).
10809
+ */
10810
+ export declare const productRefundPolicyPatchSchema: z.ZodObject<{
10811
+ preShipmentDeliveryFeeRefund: z.ZodOptional<z.ZodBoolean>;
10812
+ returnDeliveryFee: z.ZodOptional<z.ZodNumber>;
10813
+ exchangeDeliveryFee: z.ZodOptional<z.ZodNumber>;
10814
+ sellerFaultFreeShipping: z.ZodOptional<z.ZodBoolean>;
10815
+ conditionalFreeShortfallCharge: z.ZodOptional<z.ZodBoolean>;
10816
+ }, z.core.$strict>;
10817
+ /** 정책 해석에 쓰는 상품 값 — 상품별 덮어쓰기 */
8167
10818
  export interface RefundPolicyProductInput {
8168
10819
  /** 상품별 덮어쓰기. 없으면 스토어 기본을 그대로 쓴다 */
8169
10820
  refundPolicy?: RefundPolicyPatch | null;
8170
- /** @deprecated 레거시 상품 반품비 — `refundPolicy`가 없는 옛 상품의 값이다 */
8171
- returnFee?: number | null;
8172
- /** @deprecated 레거시 상품 교환비 — `refundPolicy`가 없는 옛 상품의 값이다 */
8173
- exchangeFee?: number | null;
8174
10821
  }
8175
10822
  /**
8176
10823
  * 유효 정책 해석 — 상품별 덮어쓰기 → 스토어 기본 → `REFUND_POLICY_DEFAULTS` 순이다.
8177
10824
  *
8178
- * 반품비·교환비는 레거시 필드(`products.returnFee`·`exchangeFee`)와 **연결**한다. 상품이
8179
- * `refundPolicy.returnDeliveryFee`를 정하면 그 값이 원천이고(서버가 `returnFee`도 같은 값으로 맞춘다),
8180
- * 정하지 않았으면 레거시 값이 0보다 클 때 그 값을 쓴다. 0이면 스토어 기본을 따른다 —
8181
- * 정책이 생기기 전에 만든 상품(반품비 0)이 스토어 기본을 물려받게 하는 규칙이다.
10825
+ * 반품·교환 배송비의 원천은 정책 하나다(이슈 #57 결정 3). 상품의 레거시 반품비·교환비 필드와의 연결은 없앴고,
10826
+ * 레거시 값은 마이그레이션이 상품별 정책으로 옮겼다.
8182
10827
  */
8183
10828
  export declare function resolveRefundPolicy(storePolicy?: RefundPolicyPatch | null, product?: RefundPolicyProductInput | null): RefundPolicy;
8184
10829
  /**
8185
- * 상품의 **덮어쓰기 자체** — 레거시 반품비·교환비를 같은 형태로 승격한 값이다. 덮어쓰기가 없으면 null.
10830
+ * 상품의 **덮어쓰기 자체** — 덮어쓰기가 없으면 null.
8186
10831
  *
8187
10832
  * `resolveRefundPolicy`가 합친 결과로는 "상품이 정한 값"과 "스토어 기본을 물려받은 값"을 가를 수 없다.
8188
10833
  * 관리 API 응답의 `refundPolicy`와 콘솔 폼의 덮어쓰기 스위치가 이 함수를 원천으로 쓴다 — 가르지 못하면
8189
- * 스토어 기본을 쓰는 상품을 저장할 때 그 순간의 기본값이 상품에 박히거나, 레거시 값이 조용히 사라진다.
10834
+ * 스토어 기본을 쓰는 상품을 저장할 때 그 순간의 기본값이 상품에 박힌다.
8190
10835
  */
8191
10836
  export declare function productRefundPolicyOverride(product?: RefundPolicyProductInput | null): RefundPolicyPatch | null;
10837
+ /** 반품·교환 배송비 키 — 배송이 없는 상품의 정책에는 두지 않는다 */
10838
+ export declare const REFUND_POLICY_DELIVERY_FEE_KEYS: readonly ["returnDeliveryFee", "exchangeDeliveryFee"];
8192
10839
  /**
8193
10840
  * 수량 단위 부분 취소의 환불 기준액 — **누적 내림의 차분**이다.
8194
10841
  *
8195
10842
  * 원 단위 반올림 규칙: `floor(주문상품 금액 × 누적 수량 ÷ 전체 수량)`을 두 번 구해 그 차를 쓴다.
8196
10843
  * 부분 취소를 몇 번 나눠도 합이 주문상품 금액과 정확히 같아서 1원이 남거나 넘치지 않는다.
8197
- * 할인은 이미 단가에 들어 있어(주문 단위 쿠폰이 없다) 별도 안분이 없다.
10844
+ * 즉시할인은 이미 단가에 들어 있다. 쿠폰 할인은 단가에 들어가지 않으므로 환불은 실결제 금액을 나누는
10845
+ * `proratedPaidRefundBase`(promotion.ts)를 쓴다(이슈 #47).
8198
10846
  *
8199
10847
  * @param totalPrice 주문상품 금액 (할인 반영 단가 × 전체 수량)
8200
10848
  * @param quantity 주문상품 전체 수량
@@ -8231,6 +10879,7 @@ export declare const STORE_SCOPE_RESOURCES: {
8231
10879
  readonly member: readonly ["r", "rw"];
8232
10880
  readonly customer: readonly ["r", "rw"];
8233
10881
  readonly audit: readonly ["r"];
10882
+ readonly promotion: readonly ["r", "rw"];
8234
10883
  };
8235
10884
  export type StoreScopeResource = keyof typeof STORE_SCOPE_RESOURCES;
8236
10885
  export declare const storeScopeResourceSchema: z.ZodEnum<{
@@ -8247,6 +10896,7 @@ export declare const storeScopeResourceSchema: z.ZodEnum<{
8247
10896
  member: "member";
8248
10897
  customer: "customer";
8249
10898
  audit: "audit";
10899
+ promotion: "promotion";
8250
10900
  }>;
8251
10901
  /** 카탈로그상 존재하는 스코프 문자열인가 (예: `settlement:rw`는 false) */
8252
10902
  export declare function isStoreScope(scope: string): boolean;
@@ -8256,9 +10906,9 @@ export declare function isStoreScope(scope: string): boolean;
8256
10906
  * 발급 시 지정한 스코프만 갖는다(발급자 보유 스코프 이내).
8257
10907
  */
8258
10908
  export declare const STORE_ROLE_SCOPES: {
8259
- readonly OWNER: readonly ["product:rw", "category:rw", "order:rw", "claim:rw", "inquiry:rw", "review:rw", "settlement:r", "analytics:r", "webhook:rw", "store:rw", "member:rw", "customer:rw", "audit:r"];
8260
- readonly ADMIN: readonly ["product:rw", "category:rw", "order:rw", "claim:rw", "inquiry:rw", "review:rw", "analytics:r", "webhook:rw", "store:rw", "member:rw", "customer:rw", "audit:r"];
8261
- readonly STAFF: readonly ["product:rw", "category:rw", "order:rw", "claim:rw", "inquiry:rw", "review:rw", "customer:r"];
10909
+ readonly OWNER: readonly ["product:rw", "category:rw", "order:rw", "claim:rw", "inquiry:rw", "review:rw", "settlement:r", "analytics:r", "webhook:rw", "store:rw", "member:rw", "customer:rw", "audit:r", "promotion:rw"];
10910
+ readonly ADMIN: readonly ["product:rw", "category:rw", "order:rw", "claim:rw", "inquiry:rw", "review:rw", "analytics:r", "webhook:rw", "store:rw", "member:rw", "customer:rw", "audit:r", "promotion:rw"];
10911
+ readonly STAFF: readonly ["product:rw", "category:rw", "order:rw", "claim:rw", "inquiry:rw", "review:rw", "customer:r", "promotion:r"];
8262
10912
  };
8263
10913
  //#endregion
8264
10914
  //#region src/schemas/shipping-policy.d.ts
@@ -8369,6 +11019,11 @@ export interface DeliveryBundleProduct {
8369
11019
  conditionalFreeAmount: number | null;
8370
11020
  /** 출고지 주소 id(`seller_addresses`). null이면 스토어 기본 출고지를 쓰는 상품끼리 한 묶음이다 */
8371
11021
  shippingAddressId?: string | null;
11022
+ /**
11023
+ * 상품 유형 (이슈 #48). 생략·null이면 배송 상품이다. 배송이 필요 없는 유형은 묶음을 만들지 않는다.
11024
+ * 줄(`DeliveryFeeLine.fulfillmentType`)에 값이 있으면 그 값이 이긴다.
11025
+ */
11026
+ fulfillmentType?: FulfillmentType | null;
8372
11027
  }
8373
11028
  /**
8374
11029
  * 배송 묶음 키 — **같은 출고지 + 같은 배송 정책이면 같은 키다.**
@@ -8386,6 +11041,11 @@ export interface DeliveryFeeLine {
8386
11041
  productId: string;
8387
11042
  /** 상품 금액 (할인 반영 단가 × 수량) */
8388
11043
  amount: number;
11044
+ /**
11045
+ * 이 줄의 상품 유형 — 주문서 스냅샷 값이다(이슈 #48). 주면 상품의 현재 유형보다 우선한다. 주문서를 만든 뒤 셀러가
11046
+ * 유형을 바꿔도 결제 시작의 견적과 주문상품 스냅샷이 같은 유형을 보게 한다. 생략하면 상품 값을 쓴다.
11047
+ */
11048
+ fulfillmentType?: FulfillmentType | null;
8389
11049
  }
8390
11050
  /**
8391
11051
  * 기본 배송비를 면제한 근거 — 면제하지 않았으면 null이다.
@@ -8430,6 +11090,13 @@ export interface DeliveryQuote {
8430
11090
  remoteArea: RemoteArea;
8431
11091
  /** 스토어 전체 무료 기준(`freeThreshold`) 충족으로 기본 배송비를 면제했는가 */
8432
11092
  freeByThreshold: boolean;
11093
+ /**
11094
+ * 배송이 필요한 줄의 상품 금액 합 — 스토어 전체 무료 기준의 판정 금액이다(이슈 #48). 비실물 줄은 빠진다.
11095
+ * 주문 상품 금액 합(`productAmount`)과 다를 수 있다.
11096
+ */
11097
+ shippableAmount: number;
11098
+ /** 배송이 필요한 줄이 하나라도 있는가 — 배송 묶음이 하나라도 있는가다. false면 배송지를 받지 않는다 */
11099
+ requiresShipping: boolean;
8433
11100
  }
8434
11101
  export interface DeliveryQuoteInput {
8435
11102
  lines: DeliveryFeeLine[];
@@ -8513,8 +11180,107 @@ export declare const orderWebhookEventDataSchema: z.ZodObject<{
8513
11180
  PURCHASE_DECIDED: "PURCHASE_DECIDED";
8514
11181
  }>;
8515
11182
  testPayment: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
11183
+ couponDiscountAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
11184
+ orderItemId: z.ZodOptional<z.ZodString>;
11185
+ fulfillmentSnapshot: z.ZodOptional<z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
11186
+ type: z.ZodLiteral<"SHIPPING">;
11187
+ shipping: z.ZodObject<{
11188
+ bundleKey: z.ZodNullable<z.ZodString>;
11189
+ returnAddressId: z.ZodNullable<z.ZodString>;
11190
+ }, z.core.$strip>;
11191
+ }, z.core.$strip>, z.ZodObject<{
11192
+ type: z.ZodLiteral<"DOWNLOAD">;
11193
+ download: z.ZodObject<{
11194
+ limit: z.ZodNumber;
11195
+ days: z.ZodNumber;
11196
+ stockTracked: z.ZodBoolean;
11197
+ withdrawalRestricted: z.ZodBoolean;
11198
+ }, z.core.$strip>;
11199
+ }, z.core.$strip>, z.ZodObject<{
11200
+ type: z.ZodLiteral<"CODE">;
11201
+ code: z.ZodObject<{
11202
+ mode: z.ZodString;
11203
+ withdrawalRestricted: z.ZodBoolean;
11204
+ }, z.core.$strip>;
11205
+ }, z.core.$strip>, z.ZodObject<{
11206
+ type: z.ZodLiteral<"SERVICE">;
11207
+ service: z.ZodObject<{
11208
+ mode: z.ZodString;
11209
+ }, z.core.$strip>;
11210
+ }, z.core.$strip>, z.ZodObject<{
11211
+ type: z.ZodLiteral<"PICKUP">;
11212
+ pickup: z.ZodObject<{
11213
+ addressId: z.ZodNullable<z.ZodString>;
11214
+ }, z.core.$strip>;
11215
+ }, z.core.$strip>], "type">, z.ZodPipe<z.ZodObject<{
11216
+ type: z.ZodString;
11217
+ }, z.core.$loose>, z.ZodTransform<UnknownFulfillment, {
11218
+ [x: string]: unknown;
11219
+ type: string;
11220
+ }>>]>>;
8516
11221
  }, z.core.$strip>;
8517
11222
  export type OrderWebhookEventData = z.infer<typeof orderWebhookEventDataSchema>;
11223
+ /**
11224
+ * `ORDER.FULFILLED` — 비실물 주문상품(파일·코드·이용권·방문 수령)을 제공했다(이슈 #48). 자동 제공은 결제 확정과 함께,
11225
+ * 수동 제공은 셀러의 제공 처리(`POST /v1/order-items/{orderItemId}/fulfill`)로 온다. 기존 구독자를 위해 같은 순간
11226
+ * `ORDER.DELIVERED`도 함께 보낸다. **코드·파일 주소는 싣지 않는다** — 관리 API로 조회한다.
11227
+ */
11228
+ export declare const orderFulfilledWebhookEventDataSchema: z.ZodObject<{
11229
+ orderId: z.ZodString;
11230
+ orderItemId: z.ZodString;
11231
+ status: z.ZodEnum<{
11232
+ PAID: "PAID";
11233
+ CANCELED: "CANCELED";
11234
+ PAYMENT_WAITING: "PAYMENT_WAITING";
11235
+ CONFIRMED: "CONFIRMED";
11236
+ DISPATCHED: "DISPATCHED";
11237
+ DELIVERING: "DELIVERING";
11238
+ DELIVERED: "DELIVERED";
11239
+ PURCHASE_DECIDED: "PURCHASE_DECIDED";
11240
+ }>;
11241
+ fulfillmentSnapshot: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
11242
+ type: z.ZodLiteral<"SHIPPING">;
11243
+ shipping: z.ZodObject<{
11244
+ bundleKey: z.ZodNullable<z.ZodString>;
11245
+ returnAddressId: z.ZodNullable<z.ZodString>;
11246
+ }, z.core.$strip>;
11247
+ }, z.core.$strip>, z.ZodObject<{
11248
+ type: z.ZodLiteral<"DOWNLOAD">;
11249
+ download: z.ZodObject<{
11250
+ limit: z.ZodNumber;
11251
+ days: z.ZodNumber;
11252
+ stockTracked: z.ZodBoolean;
11253
+ withdrawalRestricted: z.ZodBoolean;
11254
+ }, z.core.$strip>;
11255
+ }, z.core.$strip>, z.ZodObject<{
11256
+ type: z.ZodLiteral<"CODE">;
11257
+ code: z.ZodObject<{
11258
+ mode: z.ZodString;
11259
+ withdrawalRestricted: z.ZodBoolean;
11260
+ }, z.core.$strip>;
11261
+ }, z.core.$strip>, z.ZodObject<{
11262
+ type: z.ZodLiteral<"SERVICE">;
11263
+ service: z.ZodObject<{
11264
+ mode: z.ZodString;
11265
+ }, z.core.$strip>;
11266
+ }, z.core.$strip>, z.ZodObject<{
11267
+ type: z.ZodLiteral<"PICKUP">;
11268
+ pickup: z.ZodObject<{
11269
+ addressId: z.ZodNullable<z.ZodString>;
11270
+ }, z.core.$strip>;
11271
+ }, z.core.$strip>], "type">, z.ZodPipe<z.ZodObject<{
11272
+ type: z.ZodString;
11273
+ }, z.core.$loose>, z.ZodTransform<UnknownFulfillment, {
11274
+ [x: string]: unknown;
11275
+ type: string;
11276
+ }>>]>;
11277
+ fulfillment: z.ZodObject<{
11278
+ mode: z.ZodString;
11279
+ }, z.core.$strip>;
11280
+ fulfilledAt: z.ZodString;
11281
+ testPayment: z.ZodBoolean;
11282
+ }, z.core.$strip>;
11283
+ export type OrderFulfilledWebhookEventData = z.infer<typeof orderFulfilledWebhookEventDataSchema>;
8518
11284
  /**
8519
11285
  * `ORDER.CANCELED` — 셀러 직권취소(`POST /v1/order-items/{orderItemId}/cancel`)로 주문상품이 취소됐다.
8520
11286
  * 수량 단위 부분 취소도 이 이벤트다(`quantity` < 주문 수량이면 주문상품 상태가 그대로다).
@@ -8549,6 +11315,8 @@ export declare const orderCanceledWebhookEventDataSchema: z.ZodObject<{
8549
11315
  refundAmount: z.ZodNumber;
8550
11316
  deliveryFeeRefundAmount: z.ZodNumber;
8551
11317
  deliveryFeeChargeAmount: z.ZodNumber;
11318
+ couponChargeAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
11319
+ couponChargeRefundAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
8552
11320
  testPayment: z.ZodBoolean;
8553
11321
  }, z.core.$strip>;
8554
11322
  export type OrderCanceledWebhookEventData = z.infer<typeof orderCanceledWebhookEventDataSchema>;
@@ -8577,6 +11345,8 @@ export declare const claimWebhookEventDataSchema: z.ZodObject<{
8577
11345
  deliveryFeeRefundAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
8578
11346
  deliveryFeeChargeAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
8579
11347
  deductAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
11348
+ couponChargeAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
11349
+ couponChargeRefundAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
8580
11350
  testPayment: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
8581
11351
  }, z.core.$strip>;
8582
11352
  export type ClaimWebhookEventData = z.infer<typeof claimWebhookEventDataSchema>;
@@ -8618,10 +11388,111 @@ export declare const orderWebhookEventSchema: z.ZodObject<{
8618
11388
  PURCHASE_DECIDED: "PURCHASE_DECIDED";
8619
11389
  }>;
8620
11390
  testPayment: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
11391
+ couponDiscountAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
11392
+ orderItemId: z.ZodOptional<z.ZodString>;
11393
+ fulfillmentSnapshot: z.ZodOptional<z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
11394
+ type: z.ZodLiteral<"SHIPPING">;
11395
+ shipping: z.ZodObject<{
11396
+ bundleKey: z.ZodNullable<z.ZodString>;
11397
+ returnAddressId: z.ZodNullable<z.ZodString>;
11398
+ }, z.core.$strip>;
11399
+ }, z.core.$strip>, z.ZodObject<{
11400
+ type: z.ZodLiteral<"DOWNLOAD">;
11401
+ download: z.ZodObject<{
11402
+ limit: z.ZodNumber;
11403
+ days: z.ZodNumber;
11404
+ stockTracked: z.ZodBoolean;
11405
+ withdrawalRestricted: z.ZodBoolean;
11406
+ }, z.core.$strip>;
11407
+ }, z.core.$strip>, z.ZodObject<{
11408
+ type: z.ZodLiteral<"CODE">;
11409
+ code: z.ZodObject<{
11410
+ mode: z.ZodString;
11411
+ withdrawalRestricted: z.ZodBoolean;
11412
+ }, z.core.$strip>;
11413
+ }, z.core.$strip>, z.ZodObject<{
11414
+ type: z.ZodLiteral<"SERVICE">;
11415
+ service: z.ZodObject<{
11416
+ mode: z.ZodString;
11417
+ }, z.core.$strip>;
11418
+ }, z.core.$strip>, z.ZodObject<{
11419
+ type: z.ZodLiteral<"PICKUP">;
11420
+ pickup: z.ZodObject<{
11421
+ addressId: z.ZodNullable<z.ZodString>;
11422
+ }, z.core.$strip>;
11423
+ }, z.core.$strip>], "type">, z.ZodPipe<z.ZodObject<{
11424
+ type: z.ZodString;
11425
+ }, z.core.$loose>, z.ZodTransform<UnknownFulfillment, {
11426
+ [x: string]: unknown;
11427
+ type: string;
11428
+ }>>]>>;
11429
+ }, z.core.$strip>;
11430
+ id: z.ZodString;
11431
+ createdAt: z.ZodString;
11432
+ storeId: z.ZodString;
11433
+ sequence: z.ZodOptional<z.ZodNumber>;
11434
+ }, z.core.$strip>;
11435
+ export declare const orderFulfilledWebhookEventSchema: z.ZodObject<{
11436
+ type: z.ZodLiteral<"ORDER.FULFILLED">;
11437
+ data: z.ZodObject<{
11438
+ orderId: z.ZodString;
11439
+ orderItemId: z.ZodString;
11440
+ status: z.ZodEnum<{
11441
+ PAID: "PAID";
11442
+ CANCELED: "CANCELED";
11443
+ PAYMENT_WAITING: "PAYMENT_WAITING";
11444
+ CONFIRMED: "CONFIRMED";
11445
+ DISPATCHED: "DISPATCHED";
11446
+ DELIVERING: "DELIVERING";
11447
+ DELIVERED: "DELIVERED";
11448
+ PURCHASE_DECIDED: "PURCHASE_DECIDED";
11449
+ }>;
11450
+ fulfillmentSnapshot: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
11451
+ type: z.ZodLiteral<"SHIPPING">;
11452
+ shipping: z.ZodObject<{
11453
+ bundleKey: z.ZodNullable<z.ZodString>;
11454
+ returnAddressId: z.ZodNullable<z.ZodString>;
11455
+ }, z.core.$strip>;
11456
+ }, z.core.$strip>, z.ZodObject<{
11457
+ type: z.ZodLiteral<"DOWNLOAD">;
11458
+ download: z.ZodObject<{
11459
+ limit: z.ZodNumber;
11460
+ days: z.ZodNumber;
11461
+ stockTracked: z.ZodBoolean;
11462
+ withdrawalRestricted: z.ZodBoolean;
11463
+ }, z.core.$strip>;
11464
+ }, z.core.$strip>, z.ZodObject<{
11465
+ type: z.ZodLiteral<"CODE">;
11466
+ code: z.ZodObject<{
11467
+ mode: z.ZodString;
11468
+ withdrawalRestricted: z.ZodBoolean;
11469
+ }, z.core.$strip>;
11470
+ }, z.core.$strip>, z.ZodObject<{
11471
+ type: z.ZodLiteral<"SERVICE">;
11472
+ service: z.ZodObject<{
11473
+ mode: z.ZodString;
11474
+ }, z.core.$strip>;
11475
+ }, z.core.$strip>, z.ZodObject<{
11476
+ type: z.ZodLiteral<"PICKUP">;
11477
+ pickup: z.ZodObject<{
11478
+ addressId: z.ZodNullable<z.ZodString>;
11479
+ }, z.core.$strip>;
11480
+ }, z.core.$strip>], "type">, z.ZodPipe<z.ZodObject<{
11481
+ type: z.ZodString;
11482
+ }, z.core.$loose>, z.ZodTransform<UnknownFulfillment, {
11483
+ [x: string]: unknown;
11484
+ type: string;
11485
+ }>>]>;
11486
+ fulfillment: z.ZodObject<{
11487
+ mode: z.ZodString;
11488
+ }, z.core.$strip>;
11489
+ fulfilledAt: z.ZodString;
11490
+ testPayment: z.ZodBoolean;
8621
11491
  }, z.core.$strip>;
8622
11492
  id: z.ZodString;
8623
11493
  createdAt: z.ZodString;
8624
11494
  storeId: z.ZodString;
11495
+ sequence: z.ZodOptional<z.ZodNumber>;
8625
11496
  }, z.core.$strip>;
8626
11497
  export declare const orderCanceledWebhookEventSchema: z.ZodObject<{
8627
11498
  type: z.ZodLiteral<"ORDER.CANCELED">;
@@ -8654,11 +11525,14 @@ export declare const orderCanceledWebhookEventSchema: z.ZodObject<{
8654
11525
  refundAmount: z.ZodNumber;
8655
11526
  deliveryFeeRefundAmount: z.ZodNumber;
8656
11527
  deliveryFeeChargeAmount: z.ZodNumber;
11528
+ couponChargeAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
11529
+ couponChargeRefundAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
8657
11530
  testPayment: z.ZodBoolean;
8658
11531
  }, z.core.$strip>;
8659
11532
  id: z.ZodString;
8660
11533
  createdAt: z.ZodString;
8661
11534
  storeId: z.ZodString;
11535
+ sequence: z.ZodOptional<z.ZodNumber>;
8662
11536
  }, z.core.$strip>;
8663
11537
  export declare const claimWebhookEventSchema: z.ZodObject<{
8664
11538
  type: z.ZodEnum<{
@@ -8692,11 +11566,14 @@ export declare const claimWebhookEventSchema: z.ZodObject<{
8692
11566
  deliveryFeeRefundAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
8693
11567
  deliveryFeeChargeAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
8694
11568
  deductAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
11569
+ couponChargeAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
11570
+ couponChargeRefundAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
8695
11571
  testPayment: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
8696
11572
  }, z.core.$strip>;
8697
11573
  id: z.ZodString;
8698
11574
  createdAt: z.ZodString;
8699
11575
  storeId: z.ZodString;
11576
+ sequence: z.ZodOptional<z.ZodNumber>;
8700
11577
  }, z.core.$strip>;
8701
11578
  export declare const inquiryWebhookEventSchema: z.ZodObject<{
8702
11579
  type: z.ZodLiteral<"INQUIRY.CREATED">;
@@ -8707,6 +11584,7 @@ export declare const inquiryWebhookEventSchema: z.ZodObject<{
8707
11584
  id: z.ZodString;
8708
11585
  createdAt: z.ZodString;
8709
11586
  storeId: z.ZodString;
11587
+ sequence: z.ZodOptional<z.ZodNumber>;
8710
11588
  }, z.core.$strip>;
8711
11589
  export declare const reviewWebhookEventSchema: z.ZodObject<{
8712
11590
  type: z.ZodLiteral<"REVIEW.CREATED">;
@@ -8718,6 +11596,7 @@ export declare const reviewWebhookEventSchema: z.ZodObject<{
8718
11596
  id: z.ZodString;
8719
11597
  createdAt: z.ZodString;
8720
11598
  storeId: z.ZodString;
11599
+ sequence: z.ZodOptional<z.ZodNumber>;
8721
11600
  }, z.core.$strip>;
8722
11601
  export declare const productOutOfStockWebhookEventSchema: z.ZodObject<{
8723
11602
  type: z.ZodLiteral<"PRODUCT.OUT_OF_STOCK">;
@@ -8728,6 +11607,7 @@ export declare const productOutOfStockWebhookEventSchema: z.ZodObject<{
8728
11607
  id: z.ZodString;
8729
11608
  createdAt: z.ZodString;
8730
11609
  storeId: z.ZodString;
11610
+ sequence: z.ZodOptional<z.ZodNumber>;
8731
11611
  }, z.core.$strip>;
8732
11612
  /** 웹훅 요청 본문. `type`으로 판별하며 `data` 형태가 타입별로 다르다 */
8733
11613
  export declare const webhookEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -8752,10 +11632,110 @@ export declare const webhookEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
8752
11632
  PURCHASE_DECIDED: "PURCHASE_DECIDED";
8753
11633
  }>;
8754
11634
  testPayment: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
11635
+ couponDiscountAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
11636
+ orderItemId: z.ZodOptional<z.ZodString>;
11637
+ fulfillmentSnapshot: z.ZodOptional<z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
11638
+ type: z.ZodLiteral<"SHIPPING">;
11639
+ shipping: z.ZodObject<{
11640
+ bundleKey: z.ZodNullable<z.ZodString>;
11641
+ returnAddressId: z.ZodNullable<z.ZodString>;
11642
+ }, z.core.$strip>;
11643
+ }, z.core.$strip>, z.ZodObject<{
11644
+ type: z.ZodLiteral<"DOWNLOAD">;
11645
+ download: z.ZodObject<{
11646
+ limit: z.ZodNumber;
11647
+ days: z.ZodNumber;
11648
+ stockTracked: z.ZodBoolean;
11649
+ withdrawalRestricted: z.ZodBoolean;
11650
+ }, z.core.$strip>;
11651
+ }, z.core.$strip>, z.ZodObject<{
11652
+ type: z.ZodLiteral<"CODE">;
11653
+ code: z.ZodObject<{
11654
+ mode: z.ZodString;
11655
+ withdrawalRestricted: z.ZodBoolean;
11656
+ }, z.core.$strip>;
11657
+ }, z.core.$strip>, z.ZodObject<{
11658
+ type: z.ZodLiteral<"SERVICE">;
11659
+ service: z.ZodObject<{
11660
+ mode: z.ZodString;
11661
+ }, z.core.$strip>;
11662
+ }, z.core.$strip>, z.ZodObject<{
11663
+ type: z.ZodLiteral<"PICKUP">;
11664
+ pickup: z.ZodObject<{
11665
+ addressId: z.ZodNullable<z.ZodString>;
11666
+ }, z.core.$strip>;
11667
+ }, z.core.$strip>], "type">, z.ZodPipe<z.ZodObject<{
11668
+ type: z.ZodString;
11669
+ }, z.core.$loose>, z.ZodTransform<UnknownFulfillment, {
11670
+ [x: string]: unknown;
11671
+ type: string;
11672
+ }>>]>>;
11673
+ }, z.core.$strip>;
11674
+ id: z.ZodString;
11675
+ createdAt: z.ZodString;
11676
+ storeId: z.ZodString;
11677
+ sequence: z.ZodOptional<z.ZodNumber>;
11678
+ }, z.core.$strip>, z.ZodObject<{
11679
+ type: z.ZodLiteral<"ORDER.FULFILLED">;
11680
+ data: z.ZodObject<{
11681
+ orderId: z.ZodString;
11682
+ orderItemId: z.ZodString;
11683
+ status: z.ZodEnum<{
11684
+ PAID: "PAID";
11685
+ CANCELED: "CANCELED";
11686
+ PAYMENT_WAITING: "PAYMENT_WAITING";
11687
+ CONFIRMED: "CONFIRMED";
11688
+ DISPATCHED: "DISPATCHED";
11689
+ DELIVERING: "DELIVERING";
11690
+ DELIVERED: "DELIVERED";
11691
+ PURCHASE_DECIDED: "PURCHASE_DECIDED";
11692
+ }>;
11693
+ fulfillmentSnapshot: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
11694
+ type: z.ZodLiteral<"SHIPPING">;
11695
+ shipping: z.ZodObject<{
11696
+ bundleKey: z.ZodNullable<z.ZodString>;
11697
+ returnAddressId: z.ZodNullable<z.ZodString>;
11698
+ }, z.core.$strip>;
11699
+ }, z.core.$strip>, z.ZodObject<{
11700
+ type: z.ZodLiteral<"DOWNLOAD">;
11701
+ download: z.ZodObject<{
11702
+ limit: z.ZodNumber;
11703
+ days: z.ZodNumber;
11704
+ stockTracked: z.ZodBoolean;
11705
+ withdrawalRestricted: z.ZodBoolean;
11706
+ }, z.core.$strip>;
11707
+ }, z.core.$strip>, z.ZodObject<{
11708
+ type: z.ZodLiteral<"CODE">;
11709
+ code: z.ZodObject<{
11710
+ mode: z.ZodString;
11711
+ withdrawalRestricted: z.ZodBoolean;
11712
+ }, z.core.$strip>;
11713
+ }, z.core.$strip>, z.ZodObject<{
11714
+ type: z.ZodLiteral<"SERVICE">;
11715
+ service: z.ZodObject<{
11716
+ mode: z.ZodString;
11717
+ }, z.core.$strip>;
11718
+ }, z.core.$strip>, z.ZodObject<{
11719
+ type: z.ZodLiteral<"PICKUP">;
11720
+ pickup: z.ZodObject<{
11721
+ addressId: z.ZodNullable<z.ZodString>;
11722
+ }, z.core.$strip>;
11723
+ }, z.core.$strip>], "type">, z.ZodPipe<z.ZodObject<{
11724
+ type: z.ZodString;
11725
+ }, z.core.$loose>, z.ZodTransform<UnknownFulfillment, {
11726
+ [x: string]: unknown;
11727
+ type: string;
11728
+ }>>]>;
11729
+ fulfillment: z.ZodObject<{
11730
+ mode: z.ZodString;
11731
+ }, z.core.$strip>;
11732
+ fulfilledAt: z.ZodString;
11733
+ testPayment: z.ZodBoolean;
8755
11734
  }, z.core.$strip>;
8756
11735
  id: z.ZodString;
8757
11736
  createdAt: z.ZodString;
8758
11737
  storeId: z.ZodString;
11738
+ sequence: z.ZodOptional<z.ZodNumber>;
8759
11739
  }, z.core.$strip>, z.ZodObject<{
8760
11740
  type: z.ZodLiteral<"ORDER.CANCELED">;
8761
11741
  data: z.ZodObject<{
@@ -8787,11 +11767,14 @@ export declare const webhookEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
8787
11767
  refundAmount: z.ZodNumber;
8788
11768
  deliveryFeeRefundAmount: z.ZodNumber;
8789
11769
  deliveryFeeChargeAmount: z.ZodNumber;
11770
+ couponChargeAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
11771
+ couponChargeRefundAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
8790
11772
  testPayment: z.ZodBoolean;
8791
11773
  }, z.core.$strip>;
8792
11774
  id: z.ZodString;
8793
11775
  createdAt: z.ZodString;
8794
11776
  storeId: z.ZodString;
11777
+ sequence: z.ZodOptional<z.ZodNumber>;
8795
11778
  }, z.core.$strip>, z.ZodObject<{
8796
11779
  type: z.ZodEnum<{
8797
11780
  "CLAIM.CANCEL_REQUESTED": "CLAIM.CANCEL_REQUESTED";
@@ -8824,11 +11807,14 @@ export declare const webhookEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
8824
11807
  deliveryFeeRefundAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
8825
11808
  deliveryFeeChargeAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
8826
11809
  deductAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
11810
+ couponChargeAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
11811
+ couponChargeRefundAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
8827
11812
  testPayment: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
8828
11813
  }, z.core.$strip>;
8829
11814
  id: z.ZodString;
8830
11815
  createdAt: z.ZodString;
8831
11816
  storeId: z.ZodString;
11817
+ sequence: z.ZodOptional<z.ZodNumber>;
8832
11818
  }, z.core.$strip>, z.ZodObject<{
8833
11819
  type: z.ZodLiteral<"INQUIRY.CREATED">;
8834
11820
  data: z.ZodObject<{
@@ -8838,6 +11824,7 @@ export declare const webhookEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
8838
11824
  id: z.ZodString;
8839
11825
  createdAt: z.ZodString;
8840
11826
  storeId: z.ZodString;
11827
+ sequence: z.ZodOptional<z.ZodNumber>;
8841
11828
  }, z.core.$strip>, z.ZodObject<{
8842
11829
  type: z.ZodLiteral<"REVIEW.CREATED">;
8843
11830
  data: z.ZodObject<{
@@ -8848,6 +11835,7 @@ export declare const webhookEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
8848
11835
  id: z.ZodString;
8849
11836
  createdAt: z.ZodString;
8850
11837
  storeId: z.ZodString;
11838
+ sequence: z.ZodOptional<z.ZodNumber>;
8851
11839
  }, z.core.$strip>, z.ZodObject<{
8852
11840
  type: z.ZodLiteral<"PRODUCT.OUT_OF_STOCK">;
8853
11841
  data: z.ZodObject<{
@@ -8857,6 +11845,7 @@ export declare const webhookEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
8857
11845
  id: z.ZodString;
8858
11846
  createdAt: z.ZodString;
8859
11847
  storeId: z.ZodString;
11848
+ sequence: z.ZodOptional<z.ZodNumber>;
8860
11849
  }, z.core.$strip>], "type">;
8861
11850
  export type WebhookEvent = z.infer<typeof webhookEventSchema>;
8862
11851
  export type WebhookEventType = WebhookEvent["type"];