@sayren/store-sdk 0.15.1 → 0.17.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
@@ -33,8 +33,8 @@ export declare const auditLogSourceSchema: z.ZodEnum<{
33
33
  }>;
34
34
  export type AuditLogSource = z.infer<typeof auditLogSourceSchema>;
35
35
  export declare const auditLogOutcomeSchema: z.ZodEnum<{
36
- FAILED: "FAILED";
37
36
  SUCCEEDED: "SUCCEEDED";
37
+ FAILED: "FAILED";
38
38
  PENDING_APPROVAL: "PENDING_APPROVAL";
39
39
  DENIED: "DENIED";
40
40
  DRY_RUN: "DRY_RUN";
@@ -69,8 +69,8 @@ export declare const auditLogSchema: z.ZodObject<{
69
69
  path: z.ZodNullable<z.ZodString>;
70
70
  statusCode: z.ZodNullable<z.ZodNumber>;
71
71
  outcome: z.ZodNullable<z.ZodEnum<{
72
- FAILED: "FAILED";
73
72
  SUCCEEDED: "SUCCEEDED";
73
+ FAILED: "FAILED";
74
74
  PENDING_APPROVAL: "PENDING_APPROVAL";
75
75
  DENIED: "DENIED";
76
76
  DRY_RUN: "DRY_RUN";
@@ -102,8 +102,8 @@ export declare const auditLogListQuerySchema: z.ZodObject<{
102
102
  DOMAIN: "DOMAIN";
103
103
  }>>;
104
104
  outcome: z.ZodOptional<z.ZodEnum<{
105
- FAILED: "FAILED";
106
105
  SUCCEEDED: "SUCCEEDED";
106
+ FAILED: "FAILED";
107
107
  PENDING_APPROVAL: "PENDING_APPROVAL";
108
108
  DENIED: "DENIED";
109
109
  DRY_RUN: "DRY_RUN";
@@ -149,8 +149,8 @@ export declare const auditLogPageSchema: z.ZodObject<{
149
149
  path: z.ZodNullable<z.ZodString>;
150
150
  statusCode: z.ZodNullable<z.ZodNumber>;
151
151
  outcome: z.ZodNullable<z.ZodEnum<{
152
- FAILED: "FAILED";
153
152
  SUCCEEDED: "SUCCEEDED";
153
+ FAILED: "FAILED";
154
154
  PENDING_APPROVAL: "PENDING_APPROVAL";
155
155
  DENIED: "DENIED";
156
156
  DRY_RUN: "DRY_RUN";
@@ -213,9 +213,9 @@ 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
- PENDING: "PENDING";
217
- FAILED: "FAILED";
218
216
  SUCCEEDED: "SUCCEEDED";
217
+ FAILED: "FAILED";
218
+ PENDING: "PENDING";
219
219
  EXECUTING: "EXECUTING";
220
220
  UNKNOWN: "UNKNOWN";
221
221
  REJECTED: "REJECTED";
@@ -225,9 +225,9 @@ 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
- PENDING: "PENDING";
229
- FAILED: "FAILED";
230
228
  SUCCEEDED: "SUCCEEDED";
229
+ FAILED: "FAILED";
230
+ PENDING: "PENDING";
231
231
  EXECUTING: "EXECUTING";
232
232
  UNKNOWN: "UNKNOWN";
233
233
  REJECTED: "REJECTED";
@@ -287,9 +287,9 @@ 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
- PENDING: "PENDING";
291
- FAILED: "FAILED";
292
290
  SUCCEEDED: "SUCCEEDED";
291
+ FAILED: "FAILED";
292
+ PENDING: "PENDING";
293
293
  EXECUTING: "EXECUTING";
294
294
  UNKNOWN: "UNKNOWN";
295
295
  REJECTED: "REJECTED";
@@ -306,9 +306,9 @@ export declare const approvalPageSchema: z.ZodObject<{
306
306
  items: z.ZodArray<z.ZodObject<{
307
307
  approvalId: z.ZodString;
308
308
  status: z.ZodEnum<{
309
- PENDING: "PENDING";
310
- FAILED: "FAILED";
311
309
  SUCCEEDED: "SUCCEEDED";
310
+ FAILED: "FAILED";
311
+ PENDING: "PENDING";
312
312
  EXECUTING: "EXECUTING";
313
313
  UNKNOWN: "UNKNOWN";
314
314
  REJECTED: "REJECTED";
@@ -581,10 +581,10 @@ export declare const analyticsProductsSchema: z.ZodObject<{
581
581
  }, z.core.$strip>;
582
582
  export type AnalyticsProducts = z.infer<typeof analyticsProductsSchema>;
583
583
  export declare const analyticsChannelSchema: z.ZodEnum<{
584
+ UNKNOWN: "UNKNOWN";
584
585
  PAID: "PAID";
585
586
  DIRECT: "DIRECT";
586
587
  CAMPAIGN: "CAMPAIGN";
587
- UNKNOWN: "UNKNOWN";
588
588
  ORGANIC_SEARCH: "ORGANIC_SEARCH";
589
589
  SOCIAL: "SOCIAL";
590
590
  EMAIL: "EMAIL";
@@ -615,10 +615,10 @@ export declare const analyticsSourcesQuerySchema: z.ZodObject<{
615
615
  export type AnalyticsSourcesParams = z.infer<typeof analyticsSourcesQuerySchema>;
616
616
  export declare const analyticsSourceRowSchema: z.ZodObject<{
617
617
  channel: z.ZodNullable<z.ZodEnum<{
618
+ UNKNOWN: "UNKNOWN";
618
619
  PAID: "PAID";
619
620
  DIRECT: "DIRECT";
620
621
  CAMPAIGN: "CAMPAIGN";
621
- UNKNOWN: "UNKNOWN";
622
622
  ORGANIC_SEARCH: "ORGANIC_SEARCH";
623
623
  SOCIAL: "SOCIAL";
624
624
  EMAIL: "EMAIL";
@@ -651,10 +651,10 @@ export declare const analyticsSourcesSchema: z.ZodObject<{
651
651
  }>;
652
652
  rows: z.ZodArray<z.ZodObject<{
653
653
  channel: z.ZodNullable<z.ZodEnum<{
654
+ UNKNOWN: "UNKNOWN";
654
655
  PAID: "PAID";
655
656
  DIRECT: "DIRECT";
656
657
  CAMPAIGN: "CAMPAIGN";
657
- UNKNOWN: "UNKNOWN";
658
658
  ORGANIC_SEARCH: "ORGANIC_SEARCH";
659
659
  SOCIAL: "SOCIAL";
660
660
  EMAIL: "EMAIL";
@@ -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
+ EXPIRED: "EXPIRED";
2383
+ REVOKED: "REVOKED";
2384
+ AVAILABLE: "AVAILABLE";
2385
+ ASSIGNED: "ASSIGNED";
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
+ EXPIRED: "EXPIRED";
2467
+ REVOKED: "REVOKED";
2468
+ AVAILABLE: "AVAILABLE";
2469
+ ASSIGNED: "ASSIGNED";
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;
@@ -2272,6 +2750,8 @@ export declare const eventTypeSchema: z.ZodEnum<{
2272
2750
  "ORDER.DELIVERED": "ORDER.DELIVERED";
2273
2751
  "ORDER.PURCHASE_DECIDED": "ORDER.PURCHASE_DECIDED";
2274
2752
  "ORDER.ADDRESS_CHANGE_REQUESTED": "ORDER.ADDRESS_CHANGE_REQUESTED";
2753
+ "ORDER.CANCELED": "ORDER.CANCELED";
2754
+ "ORDER.FULFILLED": "ORDER.FULFILLED";
2275
2755
  "CLAIM.CANCEL_REQUESTED": "CLAIM.CANCEL_REQUESTED";
2276
2756
  "CLAIM.RETURN_REQUESTED": "CLAIM.RETURN_REQUESTED";
2277
2757
  "CLAIM.EXCHANGE_REQUESTED": "CLAIM.EXCHANGE_REQUESTED";
@@ -2296,6 +2776,8 @@ export declare const webhookSchema: z.ZodObject<{
2296
2776
  "ORDER.DELIVERED": "ORDER.DELIVERED";
2297
2777
  "ORDER.PURCHASE_DECIDED": "ORDER.PURCHASE_DECIDED";
2298
2778
  "ORDER.ADDRESS_CHANGE_REQUESTED": "ORDER.ADDRESS_CHANGE_REQUESTED";
2779
+ "ORDER.CANCELED": "ORDER.CANCELED";
2780
+ "ORDER.FULFILLED": "ORDER.FULFILLED";
2299
2781
  "CLAIM.CANCEL_REQUESTED": "CLAIM.CANCEL_REQUESTED";
2300
2782
  "CLAIM.RETURN_REQUESTED": "CLAIM.RETURN_REQUESTED";
2301
2783
  "CLAIM.EXCHANGE_REQUESTED": "CLAIM.EXCHANGE_REQUESTED";
@@ -2324,6 +2806,8 @@ export declare const webhookCreatedSchema: z.ZodObject<{
2324
2806
  "ORDER.DELIVERED": "ORDER.DELIVERED";
2325
2807
  "ORDER.PURCHASE_DECIDED": "ORDER.PURCHASE_DECIDED";
2326
2808
  "ORDER.ADDRESS_CHANGE_REQUESTED": "ORDER.ADDRESS_CHANGE_REQUESTED";
2809
+ "ORDER.CANCELED": "ORDER.CANCELED";
2810
+ "ORDER.FULFILLED": "ORDER.FULFILLED";
2327
2811
  "CLAIM.CANCEL_REQUESTED": "CLAIM.CANCEL_REQUESTED";
2328
2812
  "CLAIM.RETURN_REQUESTED": "CLAIM.RETURN_REQUESTED";
2329
2813
  "CLAIM.EXCHANGE_REQUESTED": "CLAIM.EXCHANGE_REQUESTED";
@@ -2349,10 +2833,10 @@ export declare const webhookSecretRotatedSchema: z.ZodObject<{
2349
2833
  }, z.core.$strip>;
2350
2834
  export type WebhookSecretRotated = z.infer<typeof webhookSecretRotatedSchema>;
2351
2835
  export declare const webhookDeliveryStatusSchema: z.ZodEnum<{
2836
+ FAILED: "FAILED";
2352
2837
  PENDING: "PENDING";
2353
2838
  PENDING_RETRY: "PENDING_RETRY";
2354
2839
  SUCCESS: "SUCCESS";
2355
- FAILED: "FAILED";
2356
2840
  }>;
2357
2841
  export type WebhookDeliveryStatus = z.infer<typeof webhookDeliveryStatusSchema>;
2358
2842
  export declare const webhookDeliveryErrorCodeSchema: z.ZodEnum<{
@@ -2402,6 +2886,8 @@ export declare const webhookDeliverySchema: z.ZodObject<{
2402
2886
  "ORDER.DELIVERED": "ORDER.DELIVERED";
2403
2887
  "ORDER.PURCHASE_DECIDED": "ORDER.PURCHASE_DECIDED";
2404
2888
  "ORDER.ADDRESS_CHANGE_REQUESTED": "ORDER.ADDRESS_CHANGE_REQUESTED";
2889
+ "ORDER.CANCELED": "ORDER.CANCELED";
2890
+ "ORDER.FULFILLED": "ORDER.FULFILLED";
2405
2891
  "CLAIM.CANCEL_REQUESTED": "CLAIM.CANCEL_REQUESTED";
2406
2892
  "CLAIM.RETURN_REQUESTED": "CLAIM.RETURN_REQUESTED";
2407
2893
  "CLAIM.EXCHANGE_REQUESTED": "CLAIM.EXCHANGE_REQUESTED";
@@ -2412,10 +2898,10 @@ export declare const webhookDeliverySchema: z.ZodObject<{
2412
2898
  }>;
2413
2899
  url: z.ZodString;
2414
2900
  status: z.ZodEnum<{
2901
+ FAILED: "FAILED";
2415
2902
  PENDING: "PENDING";
2416
2903
  PENDING_RETRY: "PENDING_RETRY";
2417
2904
  SUCCESS: "SUCCESS";
2418
- FAILED: "FAILED";
2419
2905
  }>;
2420
2906
  responseStatusCode: z.ZodNullable<z.ZodNumber>;
2421
2907
  responseTimeMs: z.ZodNullable<z.ZodNumber>;
@@ -2453,6 +2939,8 @@ export declare const webhookDeliveryDetailSchema: z.ZodObject<{
2453
2939
  "ORDER.DELIVERED": "ORDER.DELIVERED";
2454
2940
  "ORDER.PURCHASE_DECIDED": "ORDER.PURCHASE_DECIDED";
2455
2941
  "ORDER.ADDRESS_CHANGE_REQUESTED": "ORDER.ADDRESS_CHANGE_REQUESTED";
2942
+ "ORDER.CANCELED": "ORDER.CANCELED";
2943
+ "ORDER.FULFILLED": "ORDER.FULFILLED";
2456
2944
  "CLAIM.CANCEL_REQUESTED": "CLAIM.CANCEL_REQUESTED";
2457
2945
  "CLAIM.RETURN_REQUESTED": "CLAIM.RETURN_REQUESTED";
2458
2946
  "CLAIM.EXCHANGE_REQUESTED": "CLAIM.EXCHANGE_REQUESTED";
@@ -2463,10 +2951,10 @@ export declare const webhookDeliveryDetailSchema: z.ZodObject<{
2463
2951
  }>;
2464
2952
  url: z.ZodString;
2465
2953
  status: z.ZodEnum<{
2954
+ FAILED: "FAILED";
2466
2955
  PENDING: "PENDING";
2467
2956
  PENDING_RETRY: "PENDING_RETRY";
2468
2957
  SUCCESS: "SUCCESS";
2469
- FAILED: "FAILED";
2470
2958
  }>;
2471
2959
  responseStatusCode: z.ZodNullable<z.ZodNumber>;
2472
2960
  responseTimeMs: z.ZodNullable<z.ZodNumber>;
@@ -2501,10 +2989,10 @@ export type WebhookDeliveryDetail = z.infer<typeof webhookDeliveryDetailSchema>;
2501
2989
  /** 전송 기록 조회 쿼리 — `GET /webhooks/{id}/deliveries` */
2502
2990
  export declare const webhookDeliveryListQuerySchema: z.ZodObject<{
2503
2991
  status: z.ZodOptional<z.ZodEnum<{
2992
+ FAILED: "FAILED";
2504
2993
  PENDING: "PENDING";
2505
2994
  PENDING_RETRY: "PENDING_RETRY";
2506
2995
  SUCCESS: "SUCCESS";
2507
- FAILED: "FAILED";
2508
2996
  }>>;
2509
2997
  eventType: z.ZodOptional<z.ZodEnum<{
2510
2998
  "ORDER.PAID": "ORDER.PAID";
@@ -2513,6 +3001,8 @@ export declare const webhookDeliveryListQuerySchema: z.ZodObject<{
2513
3001
  "ORDER.DELIVERED": "ORDER.DELIVERED";
2514
3002
  "ORDER.PURCHASE_DECIDED": "ORDER.PURCHASE_DECIDED";
2515
3003
  "ORDER.ADDRESS_CHANGE_REQUESTED": "ORDER.ADDRESS_CHANGE_REQUESTED";
3004
+ "ORDER.CANCELED": "ORDER.CANCELED";
3005
+ "ORDER.FULFILLED": "ORDER.FULFILLED";
2516
3006
  "CLAIM.CANCEL_REQUESTED": "CLAIM.CANCEL_REQUESTED";
2517
3007
  "CLAIM.RETURN_REQUESTED": "CLAIM.RETURN_REQUESTED";
2518
3008
  "CLAIM.EXCHANGE_REQUESTED": "CLAIM.EXCHANGE_REQUESTED";
@@ -2538,6 +3028,8 @@ export declare const webhookTestRequestSchema: z.ZodObject<{
2538
3028
  "ORDER.DELIVERED": "ORDER.DELIVERED";
2539
3029
  "ORDER.PURCHASE_DECIDED": "ORDER.PURCHASE_DECIDED";
2540
3030
  "ORDER.ADDRESS_CHANGE_REQUESTED": "ORDER.ADDRESS_CHANGE_REQUESTED";
3031
+ "ORDER.CANCELED": "ORDER.CANCELED";
3032
+ "ORDER.FULFILLED": "ORDER.FULFILLED";
2541
3033
  "CLAIM.CANCEL_REQUESTED": "CLAIM.CANCEL_REQUESTED";
2542
3034
  "CLAIM.RETURN_REQUESTED": "CLAIM.RETURN_REQUESTED";
2543
3035
  "CLAIM.EXCHANGE_REQUESTED": "CLAIM.EXCHANGE_REQUESTED";
@@ -2577,6 +3069,8 @@ export declare const webhookRequestSchema: z.ZodObject<{
2577
3069
  "ORDER.DELIVERED": "ORDER.DELIVERED";
2578
3070
  "ORDER.PURCHASE_DECIDED": "ORDER.PURCHASE_DECIDED";
2579
3071
  "ORDER.ADDRESS_CHANGE_REQUESTED": "ORDER.ADDRESS_CHANGE_REQUESTED";
3072
+ "ORDER.CANCELED": "ORDER.CANCELED";
3073
+ "ORDER.FULFILLED": "ORDER.FULFILLED";
2580
3074
  "CLAIM.CANCEL_REQUESTED": "CLAIM.CANCEL_REQUESTED";
2581
3075
  "CLAIM.RETURN_REQUESTED": "CLAIM.RETURN_REQUESTED";
2582
3076
  "CLAIM.EXCHANGE_REQUESTED": "CLAIM.EXCHANGE_REQUESTED";
@@ -2656,6 +3150,89 @@ export declare const reviewReportResultSchema: z.ZodObject<{
2656
3150
  }, z.core.$strip>;
2657
3151
  export type ReviewReportResult = z.infer<typeof reviewReportResultSchema>;
2658
3152
  //#endregion
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
+ //#endregion
2659
3236
  //#region src/schemas/order.d.ts
2660
3237
  export declare const orderSummarySchema: z.ZodObject<{
2661
3238
  orderId: z.ZodString;
@@ -2686,6 +3263,41 @@ export declare const shippingAddressSchema: z.ZodObject<{
2686
3263
  entranceCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2687
3264
  }, z.core.$strip>;
2688
3265
  export type ShippingAddress = z.infer<typeof shippingAddressSchema>;
3266
+ /** 비실물 주문상품의 제공 정보 (이슈 #48) */
3267
+ export declare const orderItemFulfillmentSchema: z.ZodObject<{
3268
+ status: z.ZodString;
3269
+ mode: z.ZodNullable<z.ZodString>;
3270
+ fulfilledAt: z.ZodString;
3271
+ note: z.ZodNullable<z.ZodString>;
3272
+ codes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
3273
+ codeId: z.ZodString;
3274
+ hint: z.ZodString;
3275
+ status: z.ZodString;
3276
+ revealedAt: z.ZodNullable<z.ZodString>;
3277
+ }, z.core.$strip>>>>;
3278
+ download: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodObject<{
3279
+ count: z.ZodNumber;
3280
+ limit: z.ZodNumber;
3281
+ expiresAt: z.ZodNullable<z.ZodString>;
3282
+ firstDownloadedAt: z.ZodNullable<z.ZodString>;
3283
+ files: z.ZodArray<z.ZodObject<{
3284
+ assetId: z.ZodString;
3285
+ fileName: z.ZodString;
3286
+ sizeBytes: z.ZodNullable<z.ZodNumber>;
3287
+ }, z.core.$strip>>;
3288
+ }, z.core.$strip>>>>;
3289
+ mail: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodObject<{
3290
+ status: z.ZodString;
3291
+ sentAt: z.ZodNullable<z.ZodString>;
3292
+ errorCode: z.ZodNullable<z.ZodString>;
3293
+ }, z.core.$strip>>>>;
3294
+ }, z.core.$strip>;
3295
+ /** 제공 안내 메일 재발송 결과 */
3296
+ export declare const fulfillmentMailResendSchema: z.ZodObject<{
3297
+ mailStatus: z.ZodString;
3298
+ }, z.core.$strip>;
3299
+ export type FulfillmentMailResend = z.infer<typeof fulfillmentMailResendSchema>;
3300
+ export type OrderItemFulfillment = z.infer<typeof orderItemFulfillmentSchema>;
2689
3301
  export declare const orderItemSchema: z.ZodObject<{
2690
3302
  orderItemId: z.ZodString;
2691
3303
  orderId: z.ZodString;
@@ -2709,16 +3321,46 @@ export declare const orderItemSchema: z.ZodObject<{
2709
3321
  optionId: z.ZodNullable<z.ZodString>;
2710
3322
  optionName: z.ZodNullable<z.ZodString>;
2711
3323
  sellerCode: z.ZodNullable<z.ZodString>;
3324
+ fulfillmentType: z.ZodDefault<z.ZodOptional<z.ZodString>>;
2712
3325
  quantity: z.ZodNumber;
2713
3326
  canceledQuantity: z.ZodNumber;
2714
3327
  activeQuantity: z.ZodNumber;
2715
3328
  unitPrice: z.ZodNumber;
2716
3329
  discountAmount: z.ZodNumber;
2717
3330
  totalPrice: z.ZodNumber;
3331
+ couponDiscountAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
2718
3332
  hold: z.ZodNullable<z.ZodObject<{
2719
3333
  reason: z.ZodString;
2720
3334
  expectedDispatchDate: z.ZodString;
2721
3335
  }, z.core.$strip>>;
3336
+ fulfillment: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodObject<{
3337
+ status: z.ZodString;
3338
+ mode: z.ZodNullable<z.ZodString>;
3339
+ fulfilledAt: z.ZodString;
3340
+ note: z.ZodNullable<z.ZodString>;
3341
+ codes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
3342
+ codeId: z.ZodString;
3343
+ hint: z.ZodString;
3344
+ status: z.ZodString;
3345
+ revealedAt: z.ZodNullable<z.ZodString>;
3346
+ }, z.core.$strip>>>>;
3347
+ download: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodObject<{
3348
+ count: z.ZodNumber;
3349
+ limit: z.ZodNumber;
3350
+ expiresAt: z.ZodNullable<z.ZodString>;
3351
+ firstDownloadedAt: z.ZodNullable<z.ZodString>;
3352
+ files: z.ZodArray<z.ZodObject<{
3353
+ assetId: z.ZodString;
3354
+ fileName: z.ZodString;
3355
+ sizeBytes: z.ZodNullable<z.ZodNumber>;
3356
+ }, z.core.$strip>>;
3357
+ }, z.core.$strip>>>>;
3358
+ mail: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodObject<{
3359
+ status: z.ZodString;
3360
+ sentAt: z.ZodNullable<z.ZodString>;
3361
+ errorCode: z.ZodNullable<z.ZodString>;
3362
+ }, z.core.$strip>>>>;
3363
+ }, z.core.$strip>>>>;
2722
3364
  autoDecisionDate: z.ZodNullable<z.ZodString>;
2723
3365
  sellerMemo: z.ZodNullable<z.ZodString>;
2724
3366
  orderedAt: z.ZodString;
@@ -2735,9 +3377,19 @@ export declare const orderItemSchema: z.ZodObject<{
2735
3377
  "CLAIM.EXCHANGE_REQUESTED": "CLAIM.EXCHANGE_REQUESTED";
2736
3378
  "CLAIM.COMPLETED": "CLAIM.COMPLETED";
2737
3379
  }>;
3380
+ withdrawalRestricted: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
2738
3381
  testPayment: z.ZodBoolean;
2739
3382
  }, z.core.$strip>;
2740
3383
  export type OrderItem = z.infer<typeof orderItemSchema>;
3384
+ /** 주문이 받은 쿠폰 한 장 (이슈 #47) */
3385
+ export declare const orderDiscountSchema: z.ZodObject<{
3386
+ couponId: z.ZodString;
3387
+ name: z.ZodString;
3388
+ kind: z.ZodString;
3389
+ discountAmount: z.ZodNumber;
3390
+ issueId: z.ZodNullable<z.ZodString>;
3391
+ }, z.core.$strip>;
3392
+ export type OrderDiscount = z.infer<typeof orderDiscountSchema>;
2741
3393
  export declare const orderSchema: z.ZodObject<{
2742
3394
  orderId: z.ZodString;
2743
3395
  orderedAt: z.ZodString;
@@ -2746,6 +3398,7 @@ export declare const orderSchema: z.ZodObject<{
2746
3398
  phone: z.ZodString;
2747
3399
  email: z.ZodOptional<z.ZodEmail>;
2748
3400
  }, z.core.$strip>;
3401
+ requiresShipping: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
2749
3402
  shippingAddress: z.ZodObject<{
2750
3403
  receiverName: z.ZodString;
2751
3404
  phone: z.ZodString;
@@ -2769,6 +3422,15 @@ export declare const orderSchema: z.ZodObject<{
2769
3422
  productAmount: z.ZodNumber;
2770
3423
  deliveryFee: z.ZodNumber;
2771
3424
  discountAmount: z.ZodNumber;
3425
+ couponDiscountAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3426
+ deliveryDiscountAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3427
+ discounts: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
3428
+ couponId: z.ZodString;
3429
+ name: z.ZodString;
3430
+ kind: z.ZodString;
3431
+ discountAmount: z.ZodNumber;
3432
+ issueId: z.ZodNullable<z.ZodString>;
3433
+ }, z.core.$strip>>>>;
2772
3434
  totalAmount: z.ZodNumber;
2773
3435
  paidAt: z.ZodNullable<z.ZodString>;
2774
3436
  cashReceipt: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodObject<{
@@ -2794,6 +3456,7 @@ export declare const orderSchema: z.ZodObject<{
2794
3456
  updatedAt: z.ZodString;
2795
3457
  }, z.core.$strip>>>>;
2796
3458
  }, z.core.$strip>;
3459
+ withdrawalAgreedAt: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
2797
3460
  testPayment: z.ZodBoolean;
2798
3461
  items: z.ZodArray<z.ZodObject<{
2799
3462
  orderItemId: z.ZodString;
@@ -2818,16 +3481,46 @@ export declare const orderSchema: z.ZodObject<{
2818
3481
  optionId: z.ZodNullable<z.ZodString>;
2819
3482
  optionName: z.ZodNullable<z.ZodString>;
2820
3483
  sellerCode: z.ZodNullable<z.ZodString>;
3484
+ fulfillmentType: z.ZodDefault<z.ZodOptional<z.ZodString>>;
2821
3485
  quantity: z.ZodNumber;
2822
3486
  canceledQuantity: z.ZodNumber;
2823
3487
  activeQuantity: z.ZodNumber;
2824
3488
  unitPrice: z.ZodNumber;
2825
3489
  discountAmount: z.ZodNumber;
2826
3490
  totalPrice: z.ZodNumber;
3491
+ couponDiscountAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
2827
3492
  hold: z.ZodNullable<z.ZodObject<{
2828
3493
  reason: z.ZodString;
2829
3494
  expectedDispatchDate: z.ZodString;
2830
3495
  }, z.core.$strip>>;
3496
+ fulfillment: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodObject<{
3497
+ status: z.ZodString;
3498
+ mode: z.ZodNullable<z.ZodString>;
3499
+ fulfilledAt: z.ZodString;
3500
+ note: z.ZodNullable<z.ZodString>;
3501
+ codes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
3502
+ codeId: z.ZodString;
3503
+ hint: z.ZodString;
3504
+ status: z.ZodString;
3505
+ revealedAt: z.ZodNullable<z.ZodString>;
3506
+ }, z.core.$strip>>>>;
3507
+ download: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodObject<{
3508
+ count: z.ZodNumber;
3509
+ limit: z.ZodNumber;
3510
+ expiresAt: z.ZodNullable<z.ZodString>;
3511
+ firstDownloadedAt: z.ZodNullable<z.ZodString>;
3512
+ files: z.ZodArray<z.ZodObject<{
3513
+ assetId: z.ZodString;
3514
+ fileName: z.ZodString;
3515
+ sizeBytes: z.ZodNullable<z.ZodNumber>;
3516
+ }, z.core.$strip>>;
3517
+ }, z.core.$strip>>>>;
3518
+ mail: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodObject<{
3519
+ status: z.ZodString;
3520
+ sentAt: z.ZodNullable<z.ZodString>;
3521
+ errorCode: z.ZodNullable<z.ZodString>;
3522
+ }, z.core.$strip>>>>;
3523
+ }, z.core.$strip>>>>;
2831
3524
  autoDecisionDate: z.ZodNullable<z.ZodString>;
2832
3525
  sellerMemo: z.ZodNullable<z.ZodString>;
2833
3526
  orderedAt: z.ZodString;
@@ -2844,6 +3537,7 @@ export declare const orderSchema: z.ZodObject<{
2844
3537
  "CLAIM.EXCHANGE_REQUESTED": "CLAIM.EXCHANGE_REQUESTED";
2845
3538
  "CLAIM.COMPLETED": "CLAIM.COMPLETED";
2846
3539
  }>;
3540
+ withdrawalRestricted: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
2847
3541
  testPayment: z.ZodBoolean;
2848
3542
  }, z.core.$strip>>;
2849
3543
  }, z.core.$strip>;
@@ -2903,16 +3597,46 @@ export declare const orderItemPageSchema: z.ZodObject<{
2903
3597
  optionId: z.ZodNullable<z.ZodString>;
2904
3598
  optionName: z.ZodNullable<z.ZodString>;
2905
3599
  sellerCode: z.ZodNullable<z.ZodString>;
3600
+ fulfillmentType: z.ZodDefault<z.ZodOptional<z.ZodString>>;
2906
3601
  quantity: z.ZodNumber;
2907
3602
  canceledQuantity: z.ZodNumber;
2908
3603
  activeQuantity: z.ZodNumber;
2909
3604
  unitPrice: z.ZodNumber;
2910
3605
  discountAmount: z.ZodNumber;
2911
3606
  totalPrice: z.ZodNumber;
3607
+ couponDiscountAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
2912
3608
  hold: z.ZodNullable<z.ZodObject<{
2913
3609
  reason: z.ZodString;
2914
3610
  expectedDispatchDate: z.ZodString;
2915
3611
  }, z.core.$strip>>;
3612
+ fulfillment: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodObject<{
3613
+ status: z.ZodString;
3614
+ mode: z.ZodNullable<z.ZodString>;
3615
+ fulfilledAt: z.ZodString;
3616
+ note: z.ZodNullable<z.ZodString>;
3617
+ codes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
3618
+ codeId: z.ZodString;
3619
+ hint: z.ZodString;
3620
+ status: z.ZodString;
3621
+ revealedAt: z.ZodNullable<z.ZodString>;
3622
+ }, z.core.$strip>>>>;
3623
+ download: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodObject<{
3624
+ count: z.ZodNumber;
3625
+ limit: z.ZodNumber;
3626
+ expiresAt: z.ZodNullable<z.ZodString>;
3627
+ firstDownloadedAt: z.ZodNullable<z.ZodString>;
3628
+ files: z.ZodArray<z.ZodObject<{
3629
+ assetId: z.ZodString;
3630
+ fileName: z.ZodString;
3631
+ sizeBytes: z.ZodNullable<z.ZodNumber>;
3632
+ }, z.core.$strip>>;
3633
+ }, z.core.$strip>>>>;
3634
+ mail: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodObject<{
3635
+ status: z.ZodString;
3636
+ sentAt: z.ZodNullable<z.ZodString>;
3637
+ errorCode: z.ZodNullable<z.ZodString>;
3638
+ }, z.core.$strip>>>>;
3639
+ }, z.core.$strip>>>>;
2916
3640
  autoDecisionDate: z.ZodNullable<z.ZodString>;
2917
3641
  sellerMemo: z.ZodNullable<z.ZodString>;
2918
3642
  orderedAt: z.ZodString;
@@ -2929,6 +3653,7 @@ export declare const orderItemPageSchema: z.ZodObject<{
2929
3653
  "CLAIM.EXCHANGE_REQUESTED": "CLAIM.EXCHANGE_REQUESTED";
2930
3654
  "CLAIM.COMPLETED": "CLAIM.COMPLETED";
2931
3655
  }>;
3656
+ withdrawalRestricted: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
2932
3657
  testPayment: z.ZodBoolean;
2933
3658
  }, z.core.$strip>>;
2934
3659
  }, z.core.$strip>;
@@ -2954,6 +3679,7 @@ export declare const orderListQuerySchema: z.ZodObject<{
2954
3679
  PURCHASE_DECIDED: "PURCHASE_DECIDED";
2955
3680
  }>>;
2956
3681
  keyword: z.ZodOptional<z.ZodString>;
3682
+ fulfillmentType: z.ZodOptional<z.ZodString>;
2957
3683
  testPayment: z.ZodOptional<z.ZodEnum<{
2958
3684
  true: "true";
2959
3685
  false: "false";
@@ -2990,6 +3716,8 @@ export interface OrderListParams extends PageParams {
2990
3716
  orderedTo?: string;
2991
3717
  status?: z.infer<typeof orderItemStatusSchema>;
2992
3718
  keyword?: string;
3719
+ /** 상품 유형 필터 — 이 유형의 주문상품이 하나라도 있는 주문(이슈 #48) */
3720
+ fulfillmentType?: z.infer<typeof fulfillmentTypeResponseSchema>;
2993
3721
  /** 테스트 결제 필터 — `"true"` 테스트 결제만, `"false"` 실결제만, 생략하면 전부 */
2994
3722
  testPayment?: "true" | "false";
2995
3723
  }
@@ -3114,6 +3842,21 @@ export declare const cancelBySellerRequestSchema: z.ZodObject<{
3114
3842
  quantity: z.ZodOptional<z.ZodNumber>;
3115
3843
  }, z.core.$strip>;
3116
3844
  export type CancelBySellerRequest = z.infer<typeof cancelBySellerRequestSchema>;
3845
+ /**
3846
+ * 제공 처리 요청 (이슈 #48) — `POST /v1/order-items/{orderItemId}/fulfill`. 수동 제공 비실물 주문상품(이용권·방문 수령 등)을
3847
+ * 제공 완료(`DELIVERED`)로 바꾼다.
3848
+ */
3849
+ export declare const fulfillRequestSchema: z.ZodObject<{
3850
+ note: z.ZodOptional<z.ZodString>;
3851
+ codes: z.ZodOptional<z.ZodArray<z.ZodString>>;
3852
+ }, z.core.$strip>;
3853
+ export type FulfillRequest = z.infer<typeof fulfillRequestSchema>;
3854
+ /** 제공 처리 일괄 요청 — `POST /v1/order-items/fulfill` */
3855
+ export declare const fulfillBulkRequestSchema: z.ZodObject<{
3856
+ orderItemIds: z.ZodArray<z.ZodString>;
3857
+ note: z.ZodOptional<z.ZodString>;
3858
+ }, z.core.$strip>;
3859
+ export type FulfillBulkRequest = z.infer<typeof fulfillBulkRequestSchema>;
3117
3860
  /** `POST /v1/order-items/{orderItemId}/cancel` 응답 — 셀러 직권취소 환불 결과 */
3118
3861
  export declare const cancelBySellerResultSchema: z.ZodObject<{
3119
3862
  orderItemId: z.ZodString;
@@ -3122,6 +3865,8 @@ export declare const cancelBySellerResultSchema: z.ZodObject<{
3122
3865
  canceledQuantity: z.ZodNumber;
3123
3866
  deliveryFeeRefundAmount: z.ZodNumber;
3124
3867
  deliveryFeeChargeAmount: z.ZodNumber;
3868
+ couponChargeAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3869
+ couponChargeRefundAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3125
3870
  refundedAt: z.ZodString;
3126
3871
  }, z.core.$strip>;
3127
3872
  export type CancelBySellerResult = z.infer<typeof cancelBySellerResultSchema>;
@@ -3194,8 +3939,8 @@ export declare const pgEnvironmentSchema: z.ZodEnum<{
3194
3939
  }>;
3195
3940
  export type PgEnvironment = z.infer<typeof pgEnvironmentSchema>;
3196
3941
  export declare const pgVerificationResultSchema: z.ZodEnum<{
3197
- SUCCESS: "SUCCESS";
3198
3942
  FAILED: "FAILED";
3943
+ SUCCESS: "SUCCESS";
3199
3944
  }>;
3200
3945
  export type PgVerificationResult = z.infer<typeof pgVerificationResultSchema>;
3201
3946
  /**
@@ -3344,8 +4089,8 @@ export declare const paymentCredentialSetSchema: z.ZodObject<{
3344
4089
  }, z.core.$strip>>;
3345
4090
  lastVerification: z.ZodNullable<z.ZodObject<{
3346
4091
  result: z.ZodEnum<{
3347
- SUCCESS: "SUCCESS";
3348
4092
  FAILED: "FAILED";
4093
+ SUCCESS: "SUCCESS";
3349
4094
  }>;
3350
4095
  message: z.ZodNullable<z.ZodString>;
3351
4096
  checkedAt: z.ZodString;
@@ -3446,8 +4191,8 @@ export declare const paymentProviderSchema: z.ZodObject<{
3446
4191
  }, z.core.$strip>>;
3447
4192
  lastVerification: z.ZodNullable<z.ZodObject<{
3448
4193
  result: z.ZodEnum<{
3449
- SUCCESS: "SUCCESS";
3450
4194
  FAILED: "FAILED";
4195
+ SUCCESS: "SUCCESS";
3451
4196
  }>;
3452
4197
  message: z.ZodNullable<z.ZodString>;
3453
4198
  checkedAt: z.ZodString;
@@ -3483,8 +4228,8 @@ export declare const paymentProviderSchema: z.ZodObject<{
3483
4228
  }, z.core.$strip>>;
3484
4229
  lastVerification: z.ZodNullable<z.ZodObject<{
3485
4230
  result: z.ZodEnum<{
3486
- SUCCESS: "SUCCESS";
3487
4231
  FAILED: "FAILED";
4232
+ SUCCESS: "SUCCESS";
3488
4233
  }>;
3489
4234
  message: z.ZodNullable<z.ZodString>;
3490
4235
  checkedAt: z.ZodString;
@@ -3519,8 +4264,8 @@ export declare const paymentProviderSchema: z.ZodObject<{
3519
4264
  }, z.core.$strip>>;
3520
4265
  lastVerification: z.ZodNullable<z.ZodObject<{
3521
4266
  result: z.ZodEnum<{
3522
- SUCCESS: "SUCCESS";
3523
4267
  FAILED: "FAILED";
4268
+ SUCCESS: "SUCCESS";
3524
4269
  }>;
3525
4270
  message: z.ZodNullable<z.ZodString>;
3526
4271
  checkedAt: z.ZodString;
@@ -3595,8 +4340,8 @@ export declare const paymentSettingsSchema: z.ZodObject<{
3595
4340
  }, z.core.$strip>>;
3596
4341
  lastVerification: z.ZodNullable<z.ZodObject<{
3597
4342
  result: z.ZodEnum<{
3598
- SUCCESS: "SUCCESS";
3599
4343
  FAILED: "FAILED";
4344
+ SUCCESS: "SUCCESS";
3600
4345
  }>;
3601
4346
  message: z.ZodNullable<z.ZodString>;
3602
4347
  checkedAt: z.ZodString;
@@ -3632,8 +4377,8 @@ export declare const paymentSettingsSchema: z.ZodObject<{
3632
4377
  }, z.core.$strip>>;
3633
4378
  lastVerification: z.ZodNullable<z.ZodObject<{
3634
4379
  result: z.ZodEnum<{
3635
- SUCCESS: "SUCCESS";
3636
4380
  FAILED: "FAILED";
4381
+ SUCCESS: "SUCCESS";
3637
4382
  }>;
3638
4383
  message: z.ZodNullable<z.ZodString>;
3639
4384
  checkedAt: z.ZodString;
@@ -3668,8 +4413,8 @@ export declare const paymentSettingsSchema: z.ZodObject<{
3668
4413
  }, z.core.$strip>>;
3669
4414
  lastVerification: z.ZodNullable<z.ZodObject<{
3670
4415
  result: z.ZodEnum<{
3671
- SUCCESS: "SUCCESS";
3672
4416
  FAILED: "FAILED";
4417
+ SUCCESS: "SUCCESS";
3673
4418
  }>;
3674
4419
  message: z.ZodNullable<z.ZodString>;
3675
4420
  checkedAt: z.ZodString;
@@ -3716,8 +4461,8 @@ export declare const paymentProviderVerificationSchema: z.ZodObject<{
3716
4461
  LIVE: "LIVE";
3717
4462
  }>;
3718
4463
  result: z.ZodEnum<{
3719
- SUCCESS: "SUCCESS";
3720
4464
  FAILED: "FAILED";
4465
+ SUCCESS: "SUCCESS";
3721
4466
  }>;
3722
4467
  message: z.ZodNullable<z.ZodString>;
3723
4468
  checkedAt: z.ZodString;
@@ -3847,8 +4592,8 @@ export type SalesReport = z.infer<typeof salesReportSchema>;
3847
4592
  * - `FAILED`: 승인되지 않고 끝났다(거절·준비 장애·구매자 취소·만료)
3848
4593
  */
3849
4594
  export declare const paymentRecordStatusSchema: z.ZodEnum<{
3850
- PENDING: "PENDING";
3851
4595
  FAILED: "FAILED";
4596
+ PENDING: "PENDING";
3852
4597
  APPROVED: "APPROVED";
3853
4598
  PARTIALLY_REFUNDED: "PARTIALLY_REFUNDED";
3854
4599
  REFUNDED: "REFUNDED";
@@ -3895,8 +4640,8 @@ export declare const paymentRecordSchema: z.ZodObject<{
3895
4640
  orderName: z.ZodString;
3896
4641
  customerName: z.ZodString;
3897
4642
  status: z.ZodEnum<{
3898
- PENDING: "PENDING";
3899
4643
  FAILED: "FAILED";
4644
+ PENDING: "PENDING";
3900
4645
  APPROVED: "APPROVED";
3901
4646
  PARTIALLY_REFUNDED: "PARTIALLY_REFUNDED";
3902
4647
  REFUNDED: "REFUNDED";
@@ -3941,8 +4686,8 @@ export declare const paymentRecordPageSchema: z.ZodObject<{
3941
4686
  orderName: z.ZodString;
3942
4687
  customerName: z.ZodString;
3943
4688
  status: z.ZodEnum<{
3944
- PENDING: "PENDING";
3945
4689
  FAILED: "FAILED";
4690
+ PENDING: "PENDING";
3946
4691
  APPROVED: "APPROVED";
3947
4692
  PARTIALLY_REFUNDED: "PARTIALLY_REFUNDED";
3948
4693
  REFUNDED: "REFUNDED";
@@ -4030,8 +4775,8 @@ export declare const paymentRecordDetailSchema: z.ZodObject<{
4030
4775
  orderName: z.ZodString;
4031
4776
  customerName: z.ZodString;
4032
4777
  status: z.ZodEnum<{
4033
- PENDING: "PENDING";
4034
4778
  FAILED: "FAILED";
4779
+ PENDING: "PENDING";
4035
4780
  APPROVED: "APPROVED";
4036
4781
  PARTIALLY_REFUNDED: "PARTIALLY_REFUNDED";
4037
4782
  REFUNDED: "REFUNDED";
@@ -4185,6 +4930,7 @@ export declare const productSummarySchema: z.ZodObject<{
4185
4930
  categoryId: z.ZodNullable<z.ZodString>;
4186
4931
  thumbnailUrl: z.ZodOptional<z.ZodURL>;
4187
4932
  hasOptions: z.ZodBoolean;
4933
+ fulfillmentType: z.ZodDefault<z.ZodOptional<z.ZodString>>;
4188
4934
  updatedAt: z.ZodString;
4189
4935
  }, z.core.$strip>;
4190
4936
  export type ProductSummary = z.infer<typeof productSummarySchema>;
@@ -4225,6 +4971,18 @@ export declare const productVariantSchema: z.ZodObject<{
4225
4971
  usable: z.ZodBoolean;
4226
4972
  }, z.core.$strip>;
4227
4973
  export type ProductVariant = z.infer<typeof productVariantSchema>;
4974
+ export declare const discountSchema: z.ZodObject<{
4975
+ productId: z.ZodString;
4976
+ discountType: z.ZodEnum<{
4977
+ RATE: "RATE";
4978
+ AMOUNT: "AMOUNT";
4979
+ }>;
4980
+ discountValue: z.ZodNumber;
4981
+ discountedPrice: z.ZodNumber;
4982
+ startAt: z.ZodNullable<z.ZodString>;
4983
+ endAt: z.ZodNullable<z.ZodString>;
4984
+ }, z.core.$strip>;
4985
+ export type Discount = z.infer<typeof discountSchema>;
4228
4986
  export declare const productSchema: z.ZodObject<{
4229
4987
  productId: z.ZodString;
4230
4988
  name: z.ZodString;
@@ -4241,6 +4999,25 @@ export declare const productSchema: z.ZodObject<{
4241
4999
  thumbnailUrl: z.ZodOptional<z.ZodURL>;
4242
5000
  hasOptions: z.ZodBoolean;
4243
5001
  updatedAt: z.ZodString;
5002
+ discount: z.ZodOptional<z.ZodNullable<z.ZodObject<{
5003
+ productId: z.ZodString;
5004
+ discountType: z.ZodEnum<{
5005
+ RATE: "RATE";
5006
+ AMOUNT: "AMOUNT";
5007
+ }>;
5008
+ discountValue: z.ZodNumber;
5009
+ discountedPrice: z.ZodNumber;
5010
+ startAt: z.ZodNullable<z.ZodString>;
5011
+ endAt: z.ZodNullable<z.ZodString>;
5012
+ }, z.core.$strip>>>;
5013
+ createdAt: z.ZodOptional<z.ZodString>;
5014
+ fulfillmentType: z.ZodDefault<z.ZodOptional<z.ZodString>>;
5015
+ fulfillmentMode: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
5016
+ stockTracking: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
5017
+ downloadLimit: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
5018
+ downloadDays: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
5019
+ withdrawalRestricted: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
5020
+ pickupAddressId: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
4244
5021
  description: z.ZodOptional<z.ZodString>;
4245
5022
  descriptionJson: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4246
5023
  originalPrice: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
@@ -4290,7 +5067,6 @@ export declare const productSchema: z.ZodObject<{
4290
5067
  }, z.core.$strict>>>;
4291
5068
  shippingAddressId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4292
5069
  returnAddressId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4293
- createdAt: z.ZodOptional<z.ZodString>;
4294
5070
  }, z.core.$strip>;
4295
5071
  export type Product = z.infer<typeof productSchema>;
4296
5072
  /** 상품 하나에 등록할 수 있는 이미지 최대 장수 — 첫 장이 대표(썸네일)다 */
@@ -4425,6 +5201,22 @@ export declare const variantStockSchema: z.ZodObject<{
4425
5201
  }, z.core.$strip>;
4426
5202
  export type VariantStock = z.infer<typeof variantStockSchema>;
4427
5203
  export declare const productCreateRequestSchema: z.ZodObject<{
5204
+ fulfillmentType: z.ZodOptional<z.ZodEnum<{
5205
+ SHIPPING: "SHIPPING";
5206
+ DOWNLOAD: "DOWNLOAD";
5207
+ CODE: "CODE";
5208
+ SERVICE: "SERVICE";
5209
+ PICKUP: "PICKUP";
5210
+ }>>;
5211
+ fulfillmentMode: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
5212
+ AUTO: "AUTO";
5213
+ MANUAL: "MANUAL";
5214
+ }>>>;
5215
+ stockTracking: z.ZodOptional<z.ZodBoolean>;
5216
+ downloadLimit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
5217
+ downloadDays: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
5218
+ withdrawalRestricted: z.ZodOptional<z.ZodBoolean>;
5219
+ pickupAddressId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4428
5220
  name: z.ZodString;
4429
5221
  categoryId: z.ZodString;
4430
5222
  salePrice: z.ZodNumber;
@@ -4477,6 +5269,22 @@ export declare const productCreateRequestSchema: z.ZodObject<{
4477
5269
  }, z.core.$strip>;
4478
5270
  export type ProductCreateRequest = z.infer<typeof productCreateRequestSchema>;
4479
5271
  export declare const productPatchRequestSchema: z.ZodObject<{
5272
+ fulfillmentType: z.ZodOptional<z.ZodEnum<{
5273
+ SHIPPING: "SHIPPING";
5274
+ DOWNLOAD: "DOWNLOAD";
5275
+ CODE: "CODE";
5276
+ SERVICE: "SERVICE";
5277
+ PICKUP: "PICKUP";
5278
+ }>>;
5279
+ fulfillmentMode: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
5280
+ AUTO: "AUTO";
5281
+ MANUAL: "MANUAL";
5282
+ }>>>;
5283
+ stockTracking: z.ZodOptional<z.ZodBoolean>;
5284
+ downloadLimit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
5285
+ downloadDays: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
5286
+ withdrawalRestricted: z.ZodOptional<z.ZodBoolean>;
5287
+ pickupAddressId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4480
5288
  name: z.ZodOptional<z.ZodString>;
4481
5289
  salePrice: z.ZodOptional<z.ZodNumber>;
4482
5290
  status: z.ZodOptional<z.ZodEnum<{
@@ -4526,18 +5334,6 @@ export declare const productListQuerySchema: z.ZodObject<{
4526
5334
  "updatedAt.desc": "updatedAt.desc";
4527
5335
  }>>;
4528
5336
  }, z.core.$strip>;
4529
- export declare const discountSchema: z.ZodObject<{
4530
- productId: z.ZodString;
4531
- discountType: z.ZodEnum<{
4532
- RATE: "RATE";
4533
- AMOUNT: "AMOUNT";
4534
- }>;
4535
- discountValue: z.ZodNumber;
4536
- discountedPrice: z.ZodNumber;
4537
- startAt: z.ZodNullable<z.ZodString>;
4538
- endAt: z.ZodNullable<z.ZodString>;
4539
- }, z.core.$strip>;
4540
- export type Discount = z.infer<typeof discountSchema>;
4541
5337
  export declare const discountRequestSchema: z.ZodObject<{
4542
5338
  discountType: z.ZodEnum<{
4543
5339
  RATE: "RATE";
@@ -4589,6 +5385,8 @@ export declare const updateStoreRequestSchema: z.ZodObject<{
4589
5385
  analyticsAllowedOrigins: z.ZodOptional<z.ZodArray<z.ZodString>>;
4590
5386
  storefrontOrigins: z.ZodOptional<z.ZodArray<z.ZodString>>;
4591
5387
  guestCheckoutEnabled: z.ZodOptional<z.ZodBoolean>;
5388
+ fulfillmentMailEnabled: z.ZodOptional<z.ZodBoolean>;
5389
+ withdrawalNotice: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4592
5390
  autoDeliverDays: z.ZodOptional<z.ZodNumber>;
4593
5391
  autoConfirmDays: z.ZodOptional<z.ZodNumber>;
4594
5392
  refundPolicy: z.ZodOptional<z.ZodObject<{
@@ -4597,6 +5395,7 @@ export declare const updateStoreRequestSchema: z.ZodObject<{
4597
5395
  exchangeDeliveryFee: z.ZodOptional<z.ZodNumber>;
4598
5396
  sellerFaultFreeShipping: z.ZodOptional<z.ZodBoolean>;
4599
5397
  conditionalFreeShortfallCharge: z.ZodOptional<z.ZodBoolean>;
5398
+ couponShortfallCharge: z.ZodOptional<z.ZodBoolean>;
4600
5399
  }, z.core.$strict>>;
4601
5400
  shippingPolicy: z.ZodOptional<z.ZodObject<{
4602
5401
  baseDeliveryFee: z.ZodOptional<z.ZodNumber>;
@@ -4626,6 +5425,8 @@ export declare const storeSchema: z.ZodObject<{
4626
5425
  analyticsAllowedOrigins: z.ZodArray<z.ZodString>;
4627
5426
  storefrontOrigins: z.ZodArray<z.ZodString>;
4628
5427
  guestCheckoutEnabled: z.ZodBoolean;
5428
+ fulfillmentMailEnabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
5429
+ withdrawalNotice: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
4629
5430
  autoDeliverDays: z.ZodNumber;
4630
5431
  autoConfirmDays: z.ZodNumber;
4631
5432
  refundPolicy: z.ZodObject<{
@@ -4634,6 +5435,7 @@ export declare const storeSchema: z.ZodObject<{
4634
5435
  exchangeDeliveryFee: z.ZodNumber;
4635
5436
  sellerFaultFreeShipping: z.ZodBoolean;
4636
5437
  conditionalFreeShortfallCharge: z.ZodBoolean;
5438
+ couponShortfallCharge: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
4637
5439
  }, z.core.$strip>;
4638
5440
  shippingPolicy: z.ZodObject<{
4639
5441
  baseDeliveryFee: z.ZodNumber;
@@ -4738,23 +5540,30 @@ export declare const storeMemberRoleUpdatedSchema: z.ZodObject<{
4738
5540
  }>;
4739
5541
  }, z.core.$strip>;
4740
5542
  export type StoreMemberRoleUpdated = z.infer<typeof storeMemberRoleUpdatedSchema>;
5543
+ /**
5544
+ * 주소 유형 — 출고지·반품지·방문 수령지(이슈 #48). 방문 수령지(`PICKUP`)는 목록에서 `type=PICKUP`으로 조회할 때만 나온다
5545
+ * (이 값을 모르는 옛 SDK의 목록 파싱이 깨지지 않게).
5546
+ */
4741
5547
  export declare const addressTypeSchema: z.ZodEnum<{
4742
- RETURN: "RETURN";
4743
5548
  SHIPPING: "SHIPPING";
5549
+ PICKUP: "PICKUP";
5550
+ RETURN: "RETURN";
4744
5551
  }>;
4745
5552
  export type AddressType = z.infer<typeof addressTypeSchema>;
4746
5553
  /** `GET /v1/seller-addresses` 쿼리 — OpenAPI 문서용 형태. 기본 주소 우선, 그다음 등록순이다 */
4747
5554
  export declare const sellerAddressListQuerySchema: z.ZodObject<{
4748
5555
  type: z.ZodOptional<z.ZodEnum<{
4749
- RETURN: "RETURN";
4750
5556
  SHIPPING: "SHIPPING";
5557
+ PICKUP: "PICKUP";
5558
+ RETURN: "RETURN";
4751
5559
  }>>;
4752
5560
  }, z.core.$strip>;
4753
5561
  export declare const sellerAddressSchema: z.ZodObject<{
4754
5562
  addressId: z.ZodString;
4755
5563
  type: z.ZodEnum<{
4756
- RETURN: "RETURN";
4757
5564
  SHIPPING: "SHIPPING";
5565
+ PICKUP: "PICKUP";
5566
+ RETURN: "RETURN";
4758
5567
  }>;
4759
5568
  name: z.ZodString;
4760
5569
  isDefault: z.ZodBoolean;
@@ -4768,8 +5577,9 @@ export declare const sellerAddressSchema: z.ZodObject<{
4768
5577
  export type SellerAddress = z.infer<typeof sellerAddressSchema>;
4769
5578
  export declare const sellerAddressRequestSchema: z.ZodObject<{
4770
5579
  type: z.ZodEnum<{
4771
- RETURN: "RETURN";
4772
5580
  SHIPPING: "SHIPPING";
5581
+ PICKUP: "PICKUP";
5582
+ RETURN: "RETURN";
4773
5583
  }>;
4774
5584
  name: z.ZodString;
4775
5585
  contactName: z.ZodString;
@@ -4786,10 +5596,13 @@ export type SellerAddressRequest = z.infer<typeof sellerAddressRequestSchema>;
4786
5596
  *
4787
5597
  * - `product-image`: 상품 목록·상세의 상품 이미지. 목록 썸네일로 쓰이므로 정지 이미지만 받는다.
4788
5598
  * - `description`: 상세설명 본문에 삽입하는 미디어. 동영상과 svg도 받는다.
5599
+ * - `digital-asset`: 파일 다운로드 상품의 판매 파일(이슈 #48). **비공개 객체**로 올라가고 공개 주소가 없다 — 구매자는 제공된
5600
+ * 주문상품에서 수명 300초의 서명 주소로만 받는다.
4789
5601
  */
4790
5602
  export declare const uploadPurposeSchema: z.ZodEnum<{
4791
5603
  "product-image": "product-image";
4792
5604
  description: "description";
5605
+ "digital-asset": "digital-asset";
4793
5606
  }>;
4794
5607
  export type UploadPurpose = z.infer<typeof uploadPurposeSchema>;
4795
5608
  export interface UploadPurposeLimit {
@@ -4804,6 +5617,8 @@ export interface UploadPurposeLimit {
4804
5617
  * 직접 PUT되므로 이 검사는 셀러가 올리기 전에 알게 하는 장치이고, 실제 상한은 CDN이 강제한다.
4805
5618
  */
4806
5619
  export declare const UPLOAD_PURPOSE_LIMITS: Record<UploadPurpose, UploadPurposeLimit>;
5620
+ /** 비공개 업로드(판매 파일)의 PUT 필수 헤더 — CDN이 이 값으로 공개 조회를 막는다 */
5621
+ export declare const PRIVATE_UPLOAD_HEADERS: Readonly<Record<string, string>>;
4807
5622
  /** 파일명의 소문자 확장자. 확장자가 없으면 `""` */
4808
5623
  export declare function uploadExtensionOf(filename: string): string;
4809
5624
  export interface UploadRejection {
@@ -4829,6 +5644,7 @@ export declare const uploadRequestSchema: z.ZodObject<{
4829
5644
  purpose: z.ZodDefault<z.ZodEnum<{
4830
5645
  "product-image": "product-image";
4831
5646
  description: "description";
5647
+ "digital-asset": "digital-asset";
4832
5648
  }>>;
4833
5649
  size: z.ZodOptional<z.ZodNumber>;
4834
5650
  }, z.core.$strip>;
@@ -4836,6 +5652,8 @@ export type UploadRequest = z.infer<typeof uploadRequestSchema>;
4836
5652
  export declare const uploadTicketSchema: z.ZodObject<{
4837
5653
  url: z.ZodURL;
4838
5654
  uploadUrl: z.ZodURL;
5655
+ key: z.ZodOptional<z.ZodString>;
5656
+ headers: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>>;
4839
5657
  }, z.core.$strip>;
4840
5658
  export type UploadTicket = z.infer<typeof uploadTicketSchema>;
4841
5659
  //#endregion
@@ -5117,6 +5935,8 @@ export declare function createStoreClient(options: StoreClientOptions): {
5117
5935
  create: (body: UploadRequest) => Promise<{
5118
5936
  url: string;
5119
5937
  uploadUrl: string;
5938
+ headers: Record<string, string>;
5939
+ key?: string | undefined;
5120
5940
  }>;
5121
5941
  /**
5122
5942
  * 자리 발급 + 바이트 PUT을 한 번에 — 끝나면 `url`이 공개 주소다.
@@ -5144,6 +5964,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
5144
5964
  stockQuantity: number;
5145
5965
  categoryId: string | null;
5146
5966
  hasOptions: boolean;
5967
+ fulfillmentType: string;
5147
5968
  updatedAt: string;
5148
5969
  thumbnailUrl?: string | undefined;
5149
5970
  }[];
@@ -5158,6 +5979,13 @@ export declare function createStoreClient(options: StoreClientOptions): {
5158
5979
  categoryId: string | null;
5159
5980
  hasOptions: boolean;
5160
5981
  updatedAt: string;
5982
+ fulfillmentType: string;
5983
+ fulfillmentMode: string | null;
5984
+ stockTracking: boolean;
5985
+ downloadLimit: number | null;
5986
+ downloadDays: number | null;
5987
+ withdrawalRestricted: boolean;
5988
+ pickupAddressId: string | null;
5161
5989
  optionGroups: {
5162
5990
  groupId: string;
5163
5991
  name: string;
@@ -5182,6 +6010,15 @@ export declare function createStoreClient(options: StoreClientOptions): {
5182
6010
  usable: boolean;
5183
6011
  }[];
5184
6012
  thumbnailUrl?: string | undefined;
6013
+ discount?: {
6014
+ productId: string;
6015
+ discountType: "RATE" | "AMOUNT";
6016
+ discountValue: number;
6017
+ discountedPrice: number;
6018
+ startAt: string | null;
6019
+ endAt: string | null;
6020
+ } | null | undefined;
6021
+ createdAt?: string | undefined;
5185
6022
  description?: string | undefined;
5186
6023
  descriptionJson?: string | null | undefined;
5187
6024
  originalPrice?: number | null | undefined;
@@ -5204,7 +6041,6 @@ export declare function createStoreClient(options: StoreClientOptions): {
5204
6041
  } | null | undefined;
5205
6042
  shippingAddressId?: string | null | undefined;
5206
6043
  returnAddressId?: string | null | undefined;
5207
- createdAt?: string | undefined;
5208
6044
  }>;
5209
6045
  create: (body: ProductCreateRequest, idempotencyKey?: string) => Promise<{
5210
6046
  productId: string;
@@ -5216,6 +6052,13 @@ export declare function createStoreClient(options: StoreClientOptions): {
5216
6052
  categoryId: string | null;
5217
6053
  hasOptions: boolean;
5218
6054
  updatedAt: string;
6055
+ fulfillmentType: string;
6056
+ fulfillmentMode: string | null;
6057
+ stockTracking: boolean;
6058
+ downloadLimit: number | null;
6059
+ downloadDays: number | null;
6060
+ withdrawalRestricted: boolean;
6061
+ pickupAddressId: string | null;
5219
6062
  optionGroups: {
5220
6063
  groupId: string;
5221
6064
  name: string;
@@ -5240,6 +6083,15 @@ export declare function createStoreClient(options: StoreClientOptions): {
5240
6083
  usable: boolean;
5241
6084
  }[];
5242
6085
  thumbnailUrl?: string | undefined;
6086
+ discount?: {
6087
+ productId: string;
6088
+ discountType: "RATE" | "AMOUNT";
6089
+ discountValue: number;
6090
+ discountedPrice: number;
6091
+ startAt: string | null;
6092
+ endAt: string | null;
6093
+ } | null | undefined;
6094
+ createdAt?: string | undefined;
5243
6095
  description?: string | undefined;
5244
6096
  descriptionJson?: string | null | undefined;
5245
6097
  originalPrice?: number | null | undefined;
@@ -5262,7 +6114,6 @@ export declare function createStoreClient(options: StoreClientOptions): {
5262
6114
  } | null | undefined;
5263
6115
  shippingAddressId?: string | null | undefined;
5264
6116
  returnAddressId?: string | null | undefined;
5265
- createdAt?: string | undefined;
5266
6117
  }>;
5267
6118
  update: (productId: string, body: ProductCreateRequest) => Promise<{
5268
6119
  productId: string;
@@ -5274,6 +6125,13 @@ export declare function createStoreClient(options: StoreClientOptions): {
5274
6125
  categoryId: string | null;
5275
6126
  hasOptions: boolean;
5276
6127
  updatedAt: string;
6128
+ fulfillmentType: string;
6129
+ fulfillmentMode: string | null;
6130
+ stockTracking: boolean;
6131
+ downloadLimit: number | null;
6132
+ downloadDays: number | null;
6133
+ withdrawalRestricted: boolean;
6134
+ pickupAddressId: string | null;
5277
6135
  optionGroups: {
5278
6136
  groupId: string;
5279
6137
  name: string;
@@ -5298,6 +6156,15 @@ export declare function createStoreClient(options: StoreClientOptions): {
5298
6156
  usable: boolean;
5299
6157
  }[];
5300
6158
  thumbnailUrl?: string | undefined;
6159
+ discount?: {
6160
+ productId: string;
6161
+ discountType: "RATE" | "AMOUNT";
6162
+ discountValue: number;
6163
+ discountedPrice: number;
6164
+ startAt: string | null;
6165
+ endAt: string | null;
6166
+ } | null | undefined;
6167
+ createdAt?: string | undefined;
5301
6168
  description?: string | undefined;
5302
6169
  descriptionJson?: string | null | undefined;
5303
6170
  originalPrice?: number | null | undefined;
@@ -5320,7 +6187,6 @@ export declare function createStoreClient(options: StoreClientOptions): {
5320
6187
  } | null | undefined;
5321
6188
  shippingAddressId?: string | null | undefined;
5322
6189
  returnAddressId?: string | null | undefined;
5323
- createdAt?: string | undefined;
5324
6190
  }>;
5325
6191
  patch: (productId: string, body: ProductPatchRequest) => Promise<void>;
5326
6192
  remove: (productId: string) => Promise<void>;
@@ -5411,6 +6277,110 @@ export declare function createStoreClient(options: StoreClientOptions): {
5411
6277
  endAt: string | null;
5412
6278
  }>;
5413
6279
  removeDiscount: (productId: string) => Promise<void>;
6280
+ /**
6281
+ * 코드 일괄 업로드 (이슈 #48) — 코드 발급·자동 제공 상품의 코드 풀에 올린다. `codes`와 `csv` 중 하나만 보낸다.
6282
+ * 받은 코드 수만큼 재고가 는다. 에러: 409 `NOT_CODE_PRODUCT`·`CODE_POOL_NOT_USED`·`CODE_UPLOAD_CONFLICT`, 400 `TOO_MANY_CODES`
6283
+ */
6284
+ uploadCodes: (productId: string, body: FulfillmentCodeUploadRequest, idempotencyKey?: string) => Promise<{
6285
+ batchId: string;
6286
+ productId: string;
6287
+ variantId: string;
6288
+ total: number;
6289
+ accepted: number;
6290
+ duplicates: number;
6291
+ rejected: {
6292
+ line: number;
6293
+ reason: string;
6294
+ }[];
6295
+ expiresAt: string | null;
6296
+ createdAt: string;
6297
+ }>;
6298
+ /** 코드 목록 — 가린 값(`hint`)만 싣는다. `available`은 필터와 무관한 판매 가능 코드 수다 */
6299
+ listCodes: (productId: string, params?: PageParams & Omit<z.input<typeof fulfillmentCodeListQuerySchema>, "page" | "size">) => Promise<{
6300
+ page: number;
6301
+ size: number;
6302
+ totalElements: number;
6303
+ totalPages: number;
6304
+ contents: {
6305
+ codeId: string;
6306
+ productId: string;
6307
+ variantId: string;
6308
+ batchId: string | null;
6309
+ hint: string;
6310
+ status: string;
6311
+ orderItemId: string | null;
6312
+ assignedAt: string | null;
6313
+ revealedAt: string | null;
6314
+ expiresAt: string | null;
6315
+ createdAt: string;
6316
+ }[];
6317
+ available: number;
6318
+ }>;
6319
+ /** 판매 가능 코드 폐기 — 재고가 1 준다. 배정된 코드는 409 `CODE_NOT_AVAILABLE` */
6320
+ voidCode: (productId: string, codeId: string) => Promise<{
6321
+ codeId: string;
6322
+ productId: string;
6323
+ variantId: string;
6324
+ batchId: string | null;
6325
+ hint: string;
6326
+ status: string;
6327
+ orderItemId: string | null;
6328
+ assignedAt: string | null;
6329
+ revealedAt: string | null;
6330
+ expiresAt: string | null;
6331
+ createdAt: string;
6332
+ }>;
6333
+ /**
6334
+ * 판매 파일 연결 (이슈 #48) — `uploads.create({ purpose: "digital-asset" })`로 받은 `key`에 파일을 올린 뒤 연결한다.
6335
+ * 이후 주문부터 이 파일을 준다. 에러: 400 `INVALID_ASSET_KEY`, 409 `NOT_DOWNLOAD_PRODUCT`·`ASSET_ALREADY_ATTACHED`
6336
+ */
6337
+ attachDigitalAsset: (productId: string, body: DigitalAssetAttachRequest) => Promise<{
6338
+ assetId: string;
6339
+ productId: string;
6340
+ variantId: string | null;
6341
+ fileName: string;
6342
+ contentType: string | null;
6343
+ sizeBytes: number | null;
6344
+ status: string;
6345
+ createdAt: string;
6346
+ }>;
6347
+ /** 판매 파일 목록 — 해제한 파일도 싣는다. 객체 키·주소는 없다 */
6348
+ listDigitalAssets: (productId: string) => Promise<{
6349
+ assetId: string;
6350
+ productId: string;
6351
+ variantId: string | null;
6352
+ fileName: string;
6353
+ contentType: string | null;
6354
+ sizeBytes: number | null;
6355
+ status: string;
6356
+ createdAt: string;
6357
+ }[]>;
6358
+ /** 판매 파일 해제 — 새 주문에 주지 않는다. 이미 산 구매자는 계속 받는다 */
6359
+ removeDigitalAsset: (productId: string, assetId: string) => Promise<{
6360
+ assetId: string;
6361
+ productId: string;
6362
+ variantId: string | null;
6363
+ fileName: string;
6364
+ contentType: string | null;
6365
+ sizeBytes: number | null;
6366
+ status: string;
6367
+ createdAt: string;
6368
+ }>;
6369
+ /** 판매 파일 확인 주소 — 수명 300초의 서명 주소 */
6370
+ previewDigitalAsset: (productId: string, assetId: string) => Promise<{
6371
+ url: string;
6372
+ expiresAt: string;
6373
+ }>;
6374
+ };
6375
+ fulfillmentCodes: {
6376
+ /**
6377
+ * 코드 평문 열람 — 콘솔에서 로그인한 OWNER·ADMIN만 된다(403 `INSUFFICIENT_ROLE`). 열람 기록과 감사 로그가 남는다.
6378
+ * 평문은 화면에 보인 뒤 저장하지 않는다
6379
+ */
6380
+ reveal: (codeId: string) => Promise<{
6381
+ codeId: string;
6382
+ code: string;
6383
+ }>;
5414
6384
  };
5415
6385
  categories: {
5416
6386
  list: (params?: {
@@ -5593,6 +6563,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
5593
6563
  phone: string;
5594
6564
  email?: string | undefined;
5595
6565
  };
6566
+ requiresShipping: boolean;
5596
6567
  shippingAddress: {
5597
6568
  receiverName: string;
5598
6569
  phone: string;
@@ -5609,6 +6580,15 @@ export declare function createStoreClient(options: StoreClientOptions): {
5609
6580
  productAmount: number;
5610
6581
  deliveryFee: number;
5611
6582
  discountAmount: number;
6583
+ couponDiscountAmount: number;
6584
+ deliveryDiscountAmount: number;
6585
+ discounts: {
6586
+ couponId: string;
6587
+ name: string;
6588
+ kind: string;
6589
+ discountAmount: number;
6590
+ issueId: string | null;
6591
+ }[];
5612
6592
  totalAmount: number;
5613
6593
  paidAt: string | null;
5614
6594
  cashReceipt: {
@@ -5631,6 +6611,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
5631
6611
  updatedAt: string;
5632
6612
  } | null;
5633
6613
  };
6614
+ withdrawalAgreedAt: string | null;
5634
6615
  testPayment: boolean;
5635
6616
  items: {
5636
6617
  orderItemId: string;
@@ -5642,21 +6623,52 @@ export declare function createStoreClient(options: StoreClientOptions): {
5642
6623
  optionId: string | null;
5643
6624
  optionName: string | null;
5644
6625
  sellerCode: string | null;
6626
+ fulfillmentType: string;
5645
6627
  quantity: number;
5646
6628
  canceledQuantity: number;
5647
6629
  activeQuantity: number;
5648
6630
  unitPrice: number;
5649
6631
  discountAmount: number;
5650
6632
  totalPrice: number;
6633
+ couponDiscountAmount: number;
5651
6634
  hold: {
5652
6635
  reason: string;
5653
6636
  expectedDispatchDate: string;
5654
6637
  } | null;
6638
+ fulfillment: {
6639
+ status: string;
6640
+ mode: string | null;
6641
+ fulfilledAt: string;
6642
+ note: string | null;
6643
+ codes: {
6644
+ codeId: string;
6645
+ hint: string;
6646
+ status: string;
6647
+ revealedAt: string | null;
6648
+ }[];
6649
+ download: {
6650
+ count: number;
6651
+ limit: number;
6652
+ expiresAt: string | null;
6653
+ firstDownloadedAt: string | null;
6654
+ files: {
6655
+ assetId: string;
6656
+ fileName: string;
6657
+ sizeBytes: number | null;
6658
+ }[];
6659
+ } | null;
6660
+ mail: {
6661
+ status: string;
6662
+ sentAt: string | null;
6663
+ errorCode: string | null;
6664
+ } | null;
6665
+ } | null;
5655
6666
  autoDecisionDate: string | null;
5656
6667
  sellerMemo: string | null;
5657
6668
  orderedAt: string;
5658
6669
  lastChangedAt: string;
5659
6670
  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";
6671
+ withdrawalRestricted: boolean;
5660
6672
  testPayment: boolean;
5661
6673
  }[];
5662
6674
  }>;
@@ -5701,21 +6713,52 @@ export declare function createStoreClient(options: StoreClientOptions): {
5701
6713
  optionId: string | null;
5702
6714
  optionName: string | null;
5703
6715
  sellerCode: string | null;
6716
+ fulfillmentType: string;
5704
6717
  quantity: number;
5705
6718
  canceledQuantity: number;
5706
6719
  activeQuantity: number;
5707
6720
  unitPrice: number;
5708
6721
  discountAmount: number;
5709
6722
  totalPrice: number;
6723
+ couponDiscountAmount: number;
5710
6724
  hold: {
5711
6725
  reason: string;
5712
6726
  expectedDispatchDate: string;
5713
6727
  } | null;
6728
+ fulfillment: {
6729
+ status: string;
6730
+ mode: string | null;
6731
+ fulfilledAt: string;
6732
+ note: string | null;
6733
+ codes: {
6734
+ codeId: string;
6735
+ hint: string;
6736
+ status: string;
6737
+ revealedAt: string | null;
6738
+ }[];
6739
+ download: {
6740
+ count: number;
6741
+ limit: number;
6742
+ expiresAt: string | null;
6743
+ firstDownloadedAt: string | null;
6744
+ files: {
6745
+ assetId: string;
6746
+ fileName: string;
6747
+ sizeBytes: number | null;
6748
+ }[];
6749
+ } | null;
6750
+ mail: {
6751
+ status: string;
6752
+ sentAt: string | null;
6753
+ errorCode: string | null;
6754
+ } | null;
6755
+ } | null;
5714
6756
  autoDecisionDate: string | null;
5715
6757
  sellerMemo: string | null;
5716
6758
  orderedAt: string;
5717
6759
  lastChangedAt: string;
5718
6760
  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";
6761
+ withdrawalRestricted: boolean;
5719
6762
  testPayment: boolean;
5720
6763
  }[];
5721
6764
  }>;
@@ -5739,6 +6782,8 @@ export declare function createStoreClient(options: StoreClientOptions): {
5739
6782
  canceledQuantity: number;
5740
6783
  deliveryFeeRefundAmount: number;
5741
6784
  deliveryFeeChargeAmount: number;
6785
+ couponChargeAmount: number;
6786
+ couponChargeRefundAmount: number;
5742
6787
  refundedAt: string;
5743
6788
  }>;
5744
6789
  updateMemo: (orderItemId: string, memo: string) => Promise<void>;
@@ -5786,21 +6831,52 @@ export declare function createStoreClient(options: StoreClientOptions): {
5786
6831
  optionId: string | null;
5787
6832
  optionName: string | null;
5788
6833
  sellerCode: string | null;
6834
+ fulfillmentType: string;
5789
6835
  quantity: number;
5790
6836
  canceledQuantity: number;
5791
6837
  activeQuantity: number;
5792
6838
  unitPrice: number;
5793
6839
  discountAmount: number;
5794
6840
  totalPrice: number;
6841
+ couponDiscountAmount: number;
5795
6842
  hold: {
5796
6843
  reason: string;
5797
6844
  expectedDispatchDate: string;
5798
6845
  } | null;
6846
+ fulfillment: {
6847
+ status: string;
6848
+ mode: string | null;
6849
+ fulfilledAt: string;
6850
+ note: string | null;
6851
+ codes: {
6852
+ codeId: string;
6853
+ hint: string;
6854
+ status: string;
6855
+ revealedAt: string | null;
6856
+ }[];
6857
+ download: {
6858
+ count: number;
6859
+ limit: number;
6860
+ expiresAt: string | null;
6861
+ firstDownloadedAt: string | null;
6862
+ files: {
6863
+ assetId: string;
6864
+ fileName: string;
6865
+ sizeBytes: number | null;
6866
+ }[];
6867
+ } | null;
6868
+ mail: {
6869
+ status: string;
6870
+ sentAt: string | null;
6871
+ errorCode: string | null;
6872
+ } | null;
6873
+ } | null;
5799
6874
  autoDecisionDate: string | null;
5800
6875
  sellerMemo: string | null;
5801
6876
  orderedAt: string;
5802
6877
  lastChangedAt: string;
5803
6878
  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";
6879
+ withdrawalRestricted: boolean;
5804
6880
  testPayment: boolean;
5805
6881
  }>;
5806
6882
  /** 배송완료 일괄 처리 — 항목별 부분 성공이다 */
@@ -5814,6 +6890,86 @@ export declare function createStoreClient(options: StoreClientOptions): {
5814
6890
  orderItemId?: string | undefined;
5815
6891
  }[];
5816
6892
  }>;
6893
+ /**
6894
+ * 제공 안내 메일 재발송 (이슈 #48) — 제공된 주문상품의 안내 메일을 다시 보낸다. 주문상품당 하루 3회(429).
6895
+ * 코드·파일 주소는 메일에 없다
6896
+ */
6897
+ resendFulfillmentMail: (orderItemId: string) => Promise<{
6898
+ mailStatus: string;
6899
+ }>;
6900
+ /**
6901
+ * 제공 처리 (이슈 #48) — 수동 제공 비실물 주문상품(이용권·방문 수령)을 `PAID`·`CONFIRMED`에서 제공 완료(`DELIVERED`)로
6902
+ * 바꾼다. `note`는 구매자 주문 상세에 이용 안내로 실린다. 배송 상품은 409 `SHIPPING_REQUIRED`
6903
+ */
6904
+ fulfill: (orderItemId: string, body?: FulfillRequest, idempotencyKey?: string) => Promise<{
6905
+ orderItemId: string;
6906
+ orderId: string;
6907
+ status: "PAID" | "CANCELED" | "PAYMENT_WAITING" | "CONFIRMED" | "DISPATCHED" | "DELIVERING" | "DELIVERED" | "PURCHASE_DECIDED";
6908
+ claimStatus: "CANCEL_REQUESTED" | "RETURN_REQUESTED" | "EXCHANGE_REQUESTED" | null;
6909
+ productId: string;
6910
+ productName: string;
6911
+ optionId: string | null;
6912
+ optionName: string | null;
6913
+ sellerCode: string | null;
6914
+ fulfillmentType: string;
6915
+ quantity: number;
6916
+ canceledQuantity: number;
6917
+ activeQuantity: number;
6918
+ unitPrice: number;
6919
+ discountAmount: number;
6920
+ totalPrice: number;
6921
+ couponDiscountAmount: number;
6922
+ hold: {
6923
+ reason: string;
6924
+ expectedDispatchDate: string;
6925
+ } | null;
6926
+ fulfillment: {
6927
+ status: string;
6928
+ mode: string | null;
6929
+ fulfilledAt: string;
6930
+ note: string | null;
6931
+ codes: {
6932
+ codeId: string;
6933
+ hint: string;
6934
+ status: string;
6935
+ revealedAt: string | null;
6936
+ }[];
6937
+ download: {
6938
+ count: number;
6939
+ limit: number;
6940
+ expiresAt: string | null;
6941
+ firstDownloadedAt: string | null;
6942
+ files: {
6943
+ assetId: string;
6944
+ fileName: string;
6945
+ sizeBytes: number | null;
6946
+ }[];
6947
+ } | null;
6948
+ mail: {
6949
+ status: string;
6950
+ sentAt: string | null;
6951
+ errorCode: string | null;
6952
+ } | null;
6953
+ } | null;
6954
+ autoDecisionDate: string | null;
6955
+ sellerMemo: string | null;
6956
+ orderedAt: string;
6957
+ lastChangedAt: string;
6958
+ 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";
6959
+ withdrawalRestricted: boolean;
6960
+ testPayment: boolean;
6961
+ }>;
6962
+ /** 제공 처리 일괄 — 항목별 부분 성공이다 */
6963
+ fulfillBulk: (orderItemIds: string[], body?: FulfillRequest, idempotencyKey?: string) => Promise<{
6964
+ succeeded: string[];
6965
+ failed: {
6966
+ code: string;
6967
+ message: string;
6968
+ id?: string | undefined;
6969
+ productId?: string | undefined;
6970
+ orderItemId?: string | undefined;
6971
+ }[];
6972
+ }>;
5817
6973
  getDelivery: (orderItemId: string) => Promise<{
5818
6974
  orderItemId: string;
5819
6975
  deliveryMethod: "COURIER" | "DIRECT" | "QUICK" | "NOTHING";
@@ -5874,6 +7030,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
5874
7030
  carrierCode: string | null;
5875
7031
  trackingNumber: string | null;
5876
7032
  } | null;
7033
+ fulfillmentType: string;
5877
7034
  requestedAt: string;
5878
7035
  completedAt: string | null;
5879
7036
  holdExpiresAt: string | null;
@@ -5911,6 +7068,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
5911
7068
  carrierCode: string | null;
5912
7069
  trackingNumber: string | null;
5913
7070
  } | null;
7071
+ fulfillmentType: string;
5914
7072
  requestedAt: string;
5915
7073
  completedAt: string | null;
5916
7074
  holdExpiresAt: string | null;
@@ -5936,6 +7094,8 @@ export declare function createStoreClient(options: StoreClientOptions): {
5936
7094
  quantity: number;
5937
7095
  deliveryFeeRefundAmount: number;
5938
7096
  deliveryFeeChargeAmount: number;
7097
+ couponChargeAmount: number;
7098
+ couponChargeRefundAmount: number;
5939
7099
  refundedAt: string;
5940
7100
  }>;
5941
7101
  reject: (claimId: string, body: RejectClaimRequest) => Promise<void>;
@@ -5974,6 +7134,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
5974
7134
  carrierCode: string | null;
5975
7135
  trackingNumber: string | null;
5976
7136
  } | null;
7137
+ fulfillmentType: string;
5977
7138
  requestedAt: string;
5978
7139
  completedAt: string | null;
5979
7140
  holdExpiresAt: string | null;
@@ -6003,7 +7164,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
6003
7164
  productId: string;
6004
7165
  productName: string;
6005
7166
  orderItemId: string | null;
6006
- category: "ETC" | "DELIVERY" | "RETURN" | "EXCHANGE" | "PRODUCT";
7167
+ category: "ETC" | "PRODUCT" | "DELIVERY" | "RETURN" | "EXCHANGE";
6007
7168
  content: string;
6008
7169
  secret: boolean;
6009
7170
  writerMaskedName: string;
@@ -6021,7 +7182,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
6021
7182
  productId: string;
6022
7183
  productName: string;
6023
7184
  orderItemId: string | null;
6024
- category: "ETC" | "DELIVERY" | "RETURN" | "EXCHANGE" | "PRODUCT";
7185
+ category: "ETC" | "PRODUCT" | "DELIVERY" | "RETURN" | "EXCHANGE";
6025
7186
  content: string;
6026
7187
  secret: boolean;
6027
7188
  writerMaskedName: string;
@@ -6252,49 +7413,436 @@ export declare function createStoreClient(options: StoreClientOptions): {
6252
7413
  occurredAt: string;
6253
7414
  }[];
6254
7415
  }>;
7416
+ /** 보유 쿠폰 (이슈 #47) — 최근 지급 순, 최대 500장 */
7417
+ coupons: (customerId: string) => Promise<{
7418
+ issueId: string;
7419
+ couponId: string;
7420
+ customerId: string;
7421
+ customerName: string | null;
7422
+ status: string;
7423
+ validFrom: string;
7424
+ validUntil: string | null;
7425
+ usedOrderId: string | null;
7426
+ issuedAt: string;
7427
+ revokedAt: string | null;
7428
+ couponName: string;
7429
+ kind: "ORDER" | "PRODUCT" | "DELIVERY";
7430
+ benefit: {
7431
+ type: "RATE" | "AMOUNT";
7432
+ value: number;
7433
+ maxDiscountAmount: number | null;
7434
+ };
7435
+ }[]>;
6255
7436
  withdraw: (customerId: string, body: WithdrawCustomerRequest) => Promise<void>;
6256
7437
  };
6257
- customerInquiries: {
6258
- list: (params?: PageParams & {
6259
- answered?: boolean;
6260
- category?: CustomerInquiryCategory;
6261
- from?: string;
6262
- }) => Promise<{
7438
+ /** 쿠폰 (이슈 #47) — 조회 `promotion:r`, 쓰기 `promotion:rw` */
7439
+ coupons: {
7440
+ list: (params?: PageParams & Omit<z.input<typeof couponListQuerySchema>, "page" | "size">) => Promise<{
6263
7441
  page: number;
6264
7442
  size: number;
6265
7443
  totalElements: number;
6266
7444
  totalPages: number;
6267
7445
  contents: {
6268
- inquiryId: string;
6269
- memberMaskedName: string;
6270
- category: "ETC" | "DELIVERY" | "RETURN" | "EXCHANGE" | "PAYMENT";
6271
- title: string;
6272
- content: string;
6273
- orderItemId: string | null;
6274
- answered: boolean;
6275
- answer: {
6276
- content: string;
6277
- answeredAt: string;
6278
- modifiedCount: number;
6279
- } | null;
7446
+ couponId: string;
7447
+ name: string;
7448
+ description: string | null;
7449
+ kind: "ORDER" | "PRODUCT" | "DELIVERY";
7450
+ benefit: {
7451
+ type: "RATE" | "AMOUNT";
7452
+ value: number;
7453
+ maxDiscountAmount: number | null;
7454
+ };
7455
+ conditions: {
7456
+ minOrderAmount: number;
7457
+ firstOrderOnly: boolean;
7458
+ memberOnly: boolean;
7459
+ stackWithInstantDiscount: boolean;
7460
+ };
7461
+ target: {
7462
+ includeProductIds: string[];
7463
+ includeCategoryIds: string[];
7464
+ excludeProductIds: string[];
7465
+ excludeCategoryIds: string[];
7466
+ };
7467
+ issueMethod: string;
7468
+ code: string | null;
7469
+ startsAt: string | null;
7470
+ endsAt: string | null;
7471
+ validDaysAfterIssue: number | null;
7472
+ totalIssueLimit: number | null;
7473
+ totalUseLimit: number | null;
7474
+ perMemberIssueLimit: number | null;
7475
+ perMemberUseLimit: number | null;
7476
+ issuedCount: number;
7477
+ reservedCount: number;
7478
+ usedCount: number;
7479
+ status: "ACTIVE" | "PAUSED" | "ENDED";
7480
+ locked: boolean;
7481
+ lockedAt: string | null;
6280
7482
  createdAt: string;
7483
+ updatedAt: string;
6281
7484
  }[];
6282
7485
  }>;
6283
- get: (inquiryId: string) => Promise<{
6284
- inquiryId: string;
6285
- memberMaskedName: string;
6286
- category: "ETC" | "DELIVERY" | "RETURN" | "EXCHANGE" | "PAYMENT";
6287
- title: string;
6288
- content: string;
6289
- orderItemId: string | null;
6290
- answered: boolean;
6291
- answer: {
6292
- content: string;
6293
- answeredAt: string;
6294
- modifiedCount: number;
6295
- } | null;
6296
- createdAt: string;
6297
- }>;
7486
+ create: (body: CreateCouponRequest, idempotencyKey?: string) => Promise<{
7487
+ couponId: string;
7488
+ name: string;
7489
+ description: string | null;
7490
+ kind: "ORDER" | "PRODUCT" | "DELIVERY";
7491
+ benefit: {
7492
+ type: "RATE" | "AMOUNT";
7493
+ value: number;
7494
+ maxDiscountAmount: number | null;
7495
+ };
7496
+ conditions: {
7497
+ minOrderAmount: number;
7498
+ firstOrderOnly: boolean;
7499
+ memberOnly: boolean;
7500
+ stackWithInstantDiscount: boolean;
7501
+ };
7502
+ target: {
7503
+ includeProductIds: string[];
7504
+ includeCategoryIds: string[];
7505
+ excludeProductIds: string[];
7506
+ excludeCategoryIds: string[];
7507
+ };
7508
+ issueMethod: string;
7509
+ code: string | null;
7510
+ startsAt: string | null;
7511
+ endsAt: string | null;
7512
+ validDaysAfterIssue: number | null;
7513
+ totalIssueLimit: number | null;
7514
+ totalUseLimit: number | null;
7515
+ perMemberIssueLimit: number | null;
7516
+ perMemberUseLimit: number | null;
7517
+ issuedCount: number;
7518
+ reservedCount: number;
7519
+ usedCount: number;
7520
+ status: "ACTIVE" | "PAUSED" | "ENDED";
7521
+ locked: boolean;
7522
+ lockedAt: string | null;
7523
+ createdAt: string;
7524
+ updatedAt: string;
7525
+ }>;
7526
+ get: (couponId: string) => Promise<{
7527
+ couponId: string;
7528
+ name: string;
7529
+ description: string | null;
7530
+ kind: "ORDER" | "PRODUCT" | "DELIVERY";
7531
+ benefit: {
7532
+ type: "RATE" | "AMOUNT";
7533
+ value: number;
7534
+ maxDiscountAmount: number | null;
7535
+ };
7536
+ conditions: {
7537
+ minOrderAmount: number;
7538
+ firstOrderOnly: boolean;
7539
+ memberOnly: boolean;
7540
+ stackWithInstantDiscount: boolean;
7541
+ };
7542
+ target: {
7543
+ includeProductIds: string[];
7544
+ includeCategoryIds: string[];
7545
+ excludeProductIds: string[];
7546
+ excludeCategoryIds: string[];
7547
+ };
7548
+ issueMethod: string;
7549
+ code: string | null;
7550
+ startsAt: string | null;
7551
+ endsAt: string | null;
7552
+ validDaysAfterIssue: number | null;
7553
+ totalIssueLimit: number | null;
7554
+ totalUseLimit: number | null;
7555
+ perMemberIssueLimit: number | null;
7556
+ perMemberUseLimit: number | null;
7557
+ issuedCount: number;
7558
+ reservedCount: number;
7559
+ usedCount: number;
7560
+ status: "ACTIVE" | "PAUSED" | "ENDED";
7561
+ locked: boolean;
7562
+ lockedAt: string | null;
7563
+ createdAt: string;
7564
+ updatedAt: string;
7565
+ }>;
7566
+ update: (couponId: string, body: UpdateCouponRequest) => Promise<{
7567
+ couponId: string;
7568
+ name: string;
7569
+ description: string | null;
7570
+ kind: "ORDER" | "PRODUCT" | "DELIVERY";
7571
+ benefit: {
7572
+ type: "RATE" | "AMOUNT";
7573
+ value: number;
7574
+ maxDiscountAmount: number | null;
7575
+ };
7576
+ conditions: {
7577
+ minOrderAmount: number;
7578
+ firstOrderOnly: boolean;
7579
+ memberOnly: boolean;
7580
+ stackWithInstantDiscount: boolean;
7581
+ };
7582
+ target: {
7583
+ includeProductIds: string[];
7584
+ includeCategoryIds: string[];
7585
+ excludeProductIds: string[];
7586
+ excludeCategoryIds: string[];
7587
+ };
7588
+ issueMethod: string;
7589
+ code: string | null;
7590
+ startsAt: string | null;
7591
+ endsAt: string | null;
7592
+ validDaysAfterIssue: number | null;
7593
+ totalIssueLimit: number | null;
7594
+ totalUseLimit: number | null;
7595
+ perMemberIssueLimit: number | null;
7596
+ perMemberUseLimit: number | null;
7597
+ issuedCount: number;
7598
+ reservedCount: number;
7599
+ usedCount: number;
7600
+ status: "ACTIVE" | "PAUSED" | "ENDED";
7601
+ locked: boolean;
7602
+ lockedAt: string | null;
7603
+ createdAt: string;
7604
+ updatedAt: string;
7605
+ }>;
7606
+ pause: (couponId: string) => Promise<{
7607
+ couponId: string;
7608
+ name: string;
7609
+ description: string | null;
7610
+ kind: "ORDER" | "PRODUCT" | "DELIVERY";
7611
+ benefit: {
7612
+ type: "RATE" | "AMOUNT";
7613
+ value: number;
7614
+ maxDiscountAmount: number | null;
7615
+ };
7616
+ conditions: {
7617
+ minOrderAmount: number;
7618
+ firstOrderOnly: boolean;
7619
+ memberOnly: boolean;
7620
+ stackWithInstantDiscount: boolean;
7621
+ };
7622
+ target: {
7623
+ includeProductIds: string[];
7624
+ includeCategoryIds: string[];
7625
+ excludeProductIds: string[];
7626
+ excludeCategoryIds: string[];
7627
+ };
7628
+ issueMethod: string;
7629
+ code: string | null;
7630
+ startsAt: string | null;
7631
+ endsAt: string | null;
7632
+ validDaysAfterIssue: number | null;
7633
+ totalIssueLimit: number | null;
7634
+ totalUseLimit: number | null;
7635
+ perMemberIssueLimit: number | null;
7636
+ perMemberUseLimit: number | null;
7637
+ issuedCount: number;
7638
+ reservedCount: number;
7639
+ usedCount: number;
7640
+ status: "ACTIVE" | "PAUSED" | "ENDED";
7641
+ locked: boolean;
7642
+ lockedAt: string | null;
7643
+ createdAt: string;
7644
+ updatedAt: string;
7645
+ }>;
7646
+ resume: (couponId: string) => Promise<{
7647
+ couponId: string;
7648
+ name: string;
7649
+ description: string | null;
7650
+ kind: "ORDER" | "PRODUCT" | "DELIVERY";
7651
+ benefit: {
7652
+ type: "RATE" | "AMOUNT";
7653
+ value: number;
7654
+ maxDiscountAmount: number | null;
7655
+ };
7656
+ conditions: {
7657
+ minOrderAmount: number;
7658
+ firstOrderOnly: boolean;
7659
+ memberOnly: boolean;
7660
+ stackWithInstantDiscount: boolean;
7661
+ };
7662
+ target: {
7663
+ includeProductIds: string[];
7664
+ includeCategoryIds: string[];
7665
+ excludeProductIds: string[];
7666
+ excludeCategoryIds: string[];
7667
+ };
7668
+ issueMethod: string;
7669
+ code: string | null;
7670
+ startsAt: string | null;
7671
+ endsAt: string | null;
7672
+ validDaysAfterIssue: number | null;
7673
+ totalIssueLimit: number | null;
7674
+ totalUseLimit: number | null;
7675
+ perMemberIssueLimit: number | null;
7676
+ perMemberUseLimit: number | null;
7677
+ issuedCount: number;
7678
+ reservedCount: number;
7679
+ usedCount: number;
7680
+ status: "ACTIVE" | "PAUSED" | "ENDED";
7681
+ locked: boolean;
7682
+ lockedAt: string | null;
7683
+ createdAt: string;
7684
+ updatedAt: string;
7685
+ }>;
7686
+ end: (couponId: string) => Promise<{
7687
+ couponId: string;
7688
+ name: string;
7689
+ description: string | null;
7690
+ kind: "ORDER" | "PRODUCT" | "DELIVERY";
7691
+ benefit: {
7692
+ type: "RATE" | "AMOUNT";
7693
+ value: number;
7694
+ maxDiscountAmount: number | null;
7695
+ };
7696
+ conditions: {
7697
+ minOrderAmount: number;
7698
+ firstOrderOnly: boolean;
7699
+ memberOnly: boolean;
7700
+ stackWithInstantDiscount: boolean;
7701
+ };
7702
+ target: {
7703
+ includeProductIds: string[];
7704
+ includeCategoryIds: string[];
7705
+ excludeProductIds: string[];
7706
+ excludeCategoryIds: string[];
7707
+ };
7708
+ issueMethod: string;
7709
+ code: string | null;
7710
+ startsAt: string | null;
7711
+ endsAt: string | null;
7712
+ validDaysAfterIssue: number | null;
7713
+ totalIssueLimit: number | null;
7714
+ totalUseLimit: number | null;
7715
+ perMemberIssueLimit: number | null;
7716
+ perMemberUseLimit: number | null;
7717
+ issuedCount: number;
7718
+ reservedCount: number;
7719
+ usedCount: number;
7720
+ status: "ACTIVE" | "PAUSED" | "ENDED";
7721
+ locked: boolean;
7722
+ lockedAt: string | null;
7723
+ createdAt: string;
7724
+ updatedAt: string;
7725
+ }>;
7726
+ /** 셀러 지급 — 한 번에 1,000명까지. 한도에 걸린 구매자는 `failed`에 담긴다 */
7727
+ issue: (couponId: string, body: IssueCouponRequest, idempotencyKey?: string) => Promise<{
7728
+ issued: {
7729
+ customerId: string;
7730
+ issueId: string;
7731
+ }[];
7732
+ failed: {
7733
+ customerId: string;
7734
+ code: string;
7735
+ message: string;
7736
+ }[];
7737
+ }>;
7738
+ issues: (couponId: string, params?: PageParams & {
7739
+ status?: "AVAILABLE" | "RESERVED" | "USED" | "REVOKED";
7740
+ }) => Promise<{
7741
+ page: number;
7742
+ size: number;
7743
+ totalElements: number;
7744
+ totalPages: number;
7745
+ contents: {
7746
+ issueId: string;
7747
+ couponId: string;
7748
+ customerId: string;
7749
+ customerName: string | null;
7750
+ status: string;
7751
+ validFrom: string;
7752
+ validUntil: string | null;
7753
+ usedOrderId: string | null;
7754
+ issuedAt: string;
7755
+ revokedAt: string | null;
7756
+ }[];
7757
+ }>;
7758
+ redemptions: (couponId: string, params?: PageParams & {
7759
+ status?: "RESERVED" | "USED" | "RELEASED" | "RESTORED";
7760
+ }) => Promise<{
7761
+ page: number;
7762
+ size: number;
7763
+ totalElements: number;
7764
+ totalPages: number;
7765
+ contents: {
7766
+ redemptionId: string;
7767
+ couponId: string;
7768
+ issueId: string | null;
7769
+ customerId: string | null;
7770
+ orderId: string | null;
7771
+ status: string;
7772
+ discountAmount: number;
7773
+ reservedAt: string;
7774
+ usedAt: string | null;
7775
+ releasedAt: string | null;
7776
+ restoredAt: string | null;
7777
+ restoreSkippedReason: string | null;
7778
+ }[];
7779
+ }>;
7780
+ stats: (couponId: string) => Promise<{
7781
+ couponId: string;
7782
+ issuedCount: number;
7783
+ revokedCount: number;
7784
+ reservedCount: number;
7785
+ usedCount: number;
7786
+ restoredCount: number;
7787
+ releasedCount: number;
7788
+ discountTotal: number;
7789
+ orderPaymentTotal: number;
7790
+ }>;
7791
+ /** 발급 쿠폰 회수 — 사용 가능한 발급 쿠폰만 */
7792
+ revokeIssue: (issueId: string) => Promise<{
7793
+ issueId: string;
7794
+ couponId: string;
7795
+ customerId: string;
7796
+ customerName: string | null;
7797
+ status: string;
7798
+ validFrom: string;
7799
+ validUntil: string | null;
7800
+ usedOrderId: string | null;
7801
+ issuedAt: string;
7802
+ revokedAt: string | null;
7803
+ }>;
7804
+ };
7805
+ customerInquiries: {
7806
+ list: (params?: PageParams & {
7807
+ answered?: boolean;
7808
+ category?: CustomerInquiryCategory;
7809
+ from?: string;
7810
+ }) => Promise<{
7811
+ page: number;
7812
+ size: number;
7813
+ totalElements: number;
7814
+ totalPages: number;
7815
+ contents: {
7816
+ inquiryId: string;
7817
+ memberMaskedName: string;
7818
+ category: "ETC" | "DELIVERY" | "RETURN" | "EXCHANGE" | "PAYMENT";
7819
+ title: string;
7820
+ content: string;
7821
+ orderItemId: string | null;
7822
+ answered: boolean;
7823
+ answer: {
7824
+ content: string;
7825
+ answeredAt: string;
7826
+ modifiedCount: number;
7827
+ } | null;
7828
+ createdAt: string;
7829
+ }[];
7830
+ }>;
7831
+ get: (inquiryId: string) => Promise<{
7832
+ inquiryId: string;
7833
+ memberMaskedName: string;
7834
+ category: "ETC" | "DELIVERY" | "RETURN" | "EXCHANGE" | "PAYMENT";
7835
+ title: string;
7836
+ content: string;
7837
+ orderItemId: string | null;
7838
+ answered: boolean;
7839
+ answer: {
7840
+ content: string;
7841
+ answeredAt: string;
7842
+ modifiedCount: number;
7843
+ } | null;
7844
+ createdAt: string;
7845
+ }>;
6298
7846
  answer: (inquiryId: string, content: string) => Promise<void>;
6299
7847
  updateAnswer: (inquiryId: string, content: string) => Promise<void>;
6300
7848
  };
@@ -6469,7 +8017,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
6469
8017
  sources: (params: AnalyticsSourcesParams) => Promise<{
6470
8018
  groupBy: "CHANNEL" | "SOURCE" | "CAMPAIGN" | "DEVICE";
6471
8019
  rows: {
6472
- channel: "PAID" | "DIRECT" | "CAMPAIGN" | "UNKNOWN" | "ORGANIC_SEARCH" | "SOCIAL" | "EMAIL" | "REFERRAL" | null;
8020
+ channel: "UNKNOWN" | "PAID" | "DIRECT" | "CAMPAIGN" | "ORGANIC_SEARCH" | "SOCIAL" | "EMAIL" | "REFERRAL" | null;
6473
8021
  source: string | null;
6474
8022
  medium: string | null;
6475
8023
  campaign: string | null;
@@ -6604,7 +8152,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
6604
8152
  orderId: string | null;
6605
8153
  orderName: string;
6606
8154
  customerName: string;
6607
- status: "PENDING" | "FAILED" | "APPROVED" | "PARTIALLY_REFUNDED" | "REFUNDED";
8155
+ status: "FAILED" | "PENDING" | "APPROVED" | "PARTIALLY_REFUNDED" | "REFUNDED";
6608
8156
  amount: number;
6609
8157
  refundedAmount: number;
6610
8158
  provider: "tosspayments" | "portone" | null;
@@ -6628,7 +8176,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
6628
8176
  orderId: string | null;
6629
8177
  orderName: string;
6630
8178
  customerName: string;
6631
- status: "PENDING" | "FAILED" | "APPROVED" | "PARTIALLY_REFUNDED" | "REFUNDED";
8179
+ status: "FAILED" | "PENDING" | "APPROVED" | "PARTIALLY_REFUNDED" | "REFUNDED";
6632
8180
  amount: number;
6633
8181
  refundedAmount: number;
6634
8182
  provider: "tosspayments" | "portone" | null;
@@ -6727,7 +8275,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
6727
8275
  masked: string | null;
6728
8276
  }[];
6729
8277
  lastVerification: {
6730
- result: "SUCCESS" | "FAILED";
8278
+ result: "FAILED" | "SUCCESS";
6731
8279
  message: string | null;
6732
8280
  checkedAt: string;
6733
8281
  } | null;
@@ -6752,7 +8300,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
6752
8300
  masked: string | null;
6753
8301
  }[];
6754
8302
  lastVerification: {
6755
- result: "SUCCESS" | "FAILED";
8303
+ result: "FAILED" | "SUCCESS";
6756
8304
  message: string | null;
6757
8305
  checkedAt: string;
6758
8306
  } | null;
@@ -6776,7 +8324,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
6776
8324
  masked: string | null;
6777
8325
  }[];
6778
8326
  lastVerification: {
6779
- result: "SUCCESS" | "FAILED";
8327
+ result: "FAILED" | "SUCCESS";
6780
8328
  message: string | null;
6781
8329
  checkedAt: string;
6782
8330
  } | null;
@@ -6828,7 +8376,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
6828
8376
  masked: string | null;
6829
8377
  }[];
6830
8378
  lastVerification: {
6831
- result: "SUCCESS" | "FAILED";
8379
+ result: "FAILED" | "SUCCESS";
6832
8380
  message: string | null;
6833
8381
  checkedAt: string;
6834
8382
  } | null;
@@ -6853,7 +8401,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
6853
8401
  masked: string | null;
6854
8402
  }[];
6855
8403
  lastVerification: {
6856
- result: "SUCCESS" | "FAILED";
8404
+ result: "FAILED" | "SUCCESS";
6857
8405
  message: string | null;
6858
8406
  checkedAt: string;
6859
8407
  } | null;
@@ -6877,7 +8425,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
6877
8425
  masked: string | null;
6878
8426
  }[];
6879
8427
  lastVerification: {
6880
- result: "SUCCESS" | "FAILED";
8428
+ result: "FAILED" | "SUCCESS";
6881
8429
  message: string | null;
6882
8430
  checkedAt: string;
6883
8431
  } | null;
@@ -6934,7 +8482,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
6934
8482
  masked: string | null;
6935
8483
  }[];
6936
8484
  lastVerification: {
6937
- result: "SUCCESS" | "FAILED";
8485
+ result: "FAILED" | "SUCCESS";
6938
8486
  message: string | null;
6939
8487
  checkedAt: string;
6940
8488
  } | null;
@@ -6959,7 +8507,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
6959
8507
  masked: string | null;
6960
8508
  }[];
6961
8509
  lastVerification: {
6962
- result: "SUCCESS" | "FAILED";
8510
+ result: "FAILED" | "SUCCESS";
6963
8511
  message: string | null;
6964
8512
  checkedAt: string;
6965
8513
  } | null;
@@ -6983,7 +8531,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
6983
8531
  masked: string | null;
6984
8532
  }[];
6985
8533
  lastVerification: {
6986
- result: "SUCCESS" | "FAILED";
8534
+ result: "FAILED" | "SUCCESS";
6987
8535
  message: string | null;
6988
8536
  checkedAt: string;
6989
8537
  } | null;
@@ -7030,7 +8578,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
7030
8578
  masked: string | null;
7031
8579
  }[];
7032
8580
  lastVerification: {
7033
- result: "SUCCESS" | "FAILED";
8581
+ result: "FAILED" | "SUCCESS";
7034
8582
  message: string | null;
7035
8583
  checkedAt: string;
7036
8584
  } | null;
@@ -7055,7 +8603,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
7055
8603
  masked: string | null;
7056
8604
  }[];
7057
8605
  lastVerification: {
7058
- result: "SUCCESS" | "FAILED";
8606
+ result: "FAILED" | "SUCCESS";
7059
8607
  message: string | null;
7060
8608
  checkedAt: string;
7061
8609
  } | null;
@@ -7079,7 +8627,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
7079
8627
  masked: string | null;
7080
8628
  }[];
7081
8629
  lastVerification: {
7082
- result: "SUCCESS" | "FAILED";
8630
+ result: "FAILED" | "SUCCESS";
7083
8631
  message: string | null;
7084
8632
  checkedAt: string;
7085
8633
  } | null;
@@ -7136,7 +8684,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
7136
8684
  masked: string | null;
7137
8685
  }[];
7138
8686
  lastVerification: {
7139
- result: "SUCCESS" | "FAILED";
8687
+ result: "FAILED" | "SUCCESS";
7140
8688
  message: string | null;
7141
8689
  checkedAt: string;
7142
8690
  } | null;
@@ -7161,7 +8709,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
7161
8709
  masked: string | null;
7162
8710
  }[];
7163
8711
  lastVerification: {
7164
- result: "SUCCESS" | "FAILED";
8712
+ result: "FAILED" | "SUCCESS";
7165
8713
  message: string | null;
7166
8714
  checkedAt: string;
7167
8715
  } | null;
@@ -7185,7 +8733,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
7185
8733
  masked: string | null;
7186
8734
  }[];
7187
8735
  lastVerification: {
7188
- result: "SUCCESS" | "FAILED";
8736
+ result: "FAILED" | "SUCCESS";
7189
8737
  message: string | null;
7190
8738
  checkedAt: string;
7191
8739
  } | null;
@@ -7232,7 +8780,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
7232
8780
  masked: string | null;
7233
8781
  }[];
7234
8782
  lastVerification: {
7235
- result: "SUCCESS" | "FAILED";
8783
+ result: "FAILED" | "SUCCESS";
7236
8784
  message: string | null;
7237
8785
  checkedAt: string;
7238
8786
  } | null;
@@ -7257,7 +8805,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
7257
8805
  masked: string | null;
7258
8806
  }[];
7259
8807
  lastVerification: {
7260
- result: "SUCCESS" | "FAILED";
8808
+ result: "FAILED" | "SUCCESS";
7261
8809
  message: string | null;
7262
8810
  checkedAt: string;
7263
8811
  } | null;
@@ -7281,7 +8829,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
7281
8829
  masked: string | null;
7282
8830
  }[];
7283
8831
  lastVerification: {
7284
- result: "SUCCESS" | "FAILED";
8832
+ result: "FAILED" | "SUCCESS";
7285
8833
  message: string | null;
7286
8834
  checkedAt: string;
7287
8835
  } | null;
@@ -7337,7 +8885,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
7337
8885
  masked: string | null;
7338
8886
  }[];
7339
8887
  lastVerification: {
7340
- result: "SUCCESS" | "FAILED";
8888
+ result: "FAILED" | "SUCCESS";
7341
8889
  message: string | null;
7342
8890
  checkedAt: string;
7343
8891
  } | null;
@@ -7362,7 +8910,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
7362
8910
  masked: string | null;
7363
8911
  }[];
7364
8912
  lastVerification: {
7365
- result: "SUCCESS" | "FAILED";
8913
+ result: "FAILED" | "SUCCESS";
7366
8914
  message: string | null;
7367
8915
  checkedAt: string;
7368
8916
  } | null;
@@ -7386,7 +8934,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
7386
8934
  masked: string | null;
7387
8935
  }[];
7388
8936
  lastVerification: {
7389
- result: "SUCCESS" | "FAILED";
8937
+ result: "FAILED" | "SUCCESS";
7390
8938
  message: string | null;
7391
8939
  checkedAt: string;
7392
8940
  } | null;
@@ -7414,7 +8962,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
7414
8962
  verify: (provider: PgProvider, body?: VerifyPaymentProviderRequest) => Promise<{
7415
8963
  provider: "tosspayments" | "portone";
7416
8964
  environment: "TEST" | "LIVE";
7417
- result: "SUCCESS" | "FAILED";
8965
+ result: "FAILED" | "SUCCESS";
7418
8966
  message: string | null;
7419
8967
  checkedAt: string;
7420
8968
  }>;
@@ -7423,7 +8971,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
7423
8971
  list: () => Promise<{
7424
8972
  webhookId: string;
7425
8973
  url: string;
7426
- eventTypes: ("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" | "INQUIRY.CREATED" | "REVIEW.CREATED" | "PRODUCT.OUT_OF_STOCK")[];
8974
+ 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")[];
7427
8975
  status: "ACTIVE" | "SUSPENDED";
7428
8976
  secretPrefix: string;
7429
8977
  suspendedAt: string | null;
@@ -7433,7 +8981,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
7433
8981
  create: (body: WebhookRequest) => Promise<{
7434
8982
  webhookId: string;
7435
8983
  url: string;
7436
- eventTypes: ("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" | "INQUIRY.CREATED" | "REVIEW.CREATED" | "PRODUCT.OUT_OF_STOCK")[];
8984
+ 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")[];
7437
8985
  status: "ACTIVE" | "SUSPENDED";
7438
8986
  secretPrefix: string;
7439
8987
  suspendedAt: string | null;
@@ -7443,7 +8991,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
7443
8991
  get: (webhookId: string) => Promise<{
7444
8992
  webhookId: string;
7445
8993
  url: string;
7446
- eventTypes: ("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" | "INQUIRY.CREATED" | "REVIEW.CREATED" | "PRODUCT.OUT_OF_STOCK")[];
8994
+ 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")[];
7447
8995
  status: "ACTIVE" | "SUSPENDED";
7448
8996
  secretPrefix: string;
7449
8997
  suspendedAt: string | null;
@@ -7453,7 +9001,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
7453
9001
  update: (webhookId: string, body: WebhookRequest) => Promise<{
7454
9002
  webhookId: string;
7455
9003
  url: string;
7456
- eventTypes: ("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" | "INQUIRY.CREATED" | "REVIEW.CREATED" | "PRODUCT.OUT_OF_STOCK")[];
9004
+ 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")[];
7457
9005
  status: "ACTIVE" | "SUSPENDED";
7458
9006
  secretPrefix: string;
7459
9007
  suspendedAt: string | null;
@@ -7468,7 +9016,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
7468
9016
  resume: (webhookId: string) => Promise<{
7469
9017
  webhookId: string;
7470
9018
  url: string;
7471
- eventTypes: ("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" | "INQUIRY.CREATED" | "REVIEW.CREATED" | "PRODUCT.OUT_OF_STOCK")[];
9019
+ 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")[];
7472
9020
  status: "ACTIVE" | "SUSPENDED";
7473
9021
  secretPrefix: string;
7474
9022
  suspendedAt: string | null;
@@ -7478,9 +9026,9 @@ export declare function createStoreClient(options: StoreClientOptions): {
7478
9026
  listDeliveries: (webhookId: string, params?: WebhookDeliveryListParams) => Promise<{
7479
9027
  deliveryId: string;
7480
9028
  eventId: string;
7481
- eventType: "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" | "INQUIRY.CREATED" | "REVIEW.CREATED" | "PRODUCT.OUT_OF_STOCK";
9029
+ 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";
7482
9030
  url: string;
7483
- status: "PENDING" | "PENDING_RETRY" | "SUCCESS" | "FAILED";
9031
+ status: "FAILED" | "PENDING" | "PENDING_RETRY" | "SUCCESS";
7484
9032
  responseStatusCode: number | null;
7485
9033
  responseTimeMs: number | null;
7486
9034
  responseBodyExcerpt: string | null;
@@ -7505,9 +9053,9 @@ export declare function createStoreClient(options: StoreClientOptions): {
7505
9053
  getDelivery: (webhookId: string, deliveryId: string) => Promise<{
7506
9054
  deliveryId: string;
7507
9055
  eventId: string;
7508
- eventType: "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" | "INQUIRY.CREATED" | "REVIEW.CREATED" | "PRODUCT.OUT_OF_STOCK";
9056
+ 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";
7509
9057
  url: string;
7510
- status: "PENDING" | "PENDING_RETRY" | "SUCCESS" | "FAILED";
9058
+ status: "FAILED" | "PENDING" | "PENDING_RETRY" | "SUCCESS";
7511
9059
  responseStatusCode: number | null;
7512
9060
  responseTimeMs: number | null;
7513
9061
  responseBodyExcerpt: string | null;
@@ -7540,9 +9088,9 @@ export declare function createStoreClient(options: StoreClientOptions): {
7540
9088
  redeliver: (webhookId: string, deliveryId: string) => Promise<{
7541
9089
  deliveryId: string;
7542
9090
  eventId: string;
7543
- eventType: "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" | "INQUIRY.CREATED" | "REVIEW.CREATED" | "PRODUCT.OUT_OF_STOCK";
9091
+ 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";
7544
9092
  url: string;
7545
- status: "PENDING" | "PENDING_RETRY" | "SUCCESS" | "FAILED";
9093
+ status: "FAILED" | "PENDING" | "PENDING_RETRY" | "SUCCESS";
7546
9094
  responseStatusCode: number | null;
7547
9095
  responseTimeMs: number | null;
7548
9096
  responseBodyExcerpt: string | null;
@@ -7638,7 +9186,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
7638
9186
  method: string | null;
7639
9187
  path: string | null;
7640
9188
  statusCode: number | null;
7641
- outcome: "FAILED" | "SUCCEEDED" | "PENDING_APPROVAL" | "DENIED" | "DRY_RUN" | null;
9189
+ outcome: "SUCCEEDED" | "FAILED" | "PENDING_APPROVAL" | "DENIED" | "DRY_RUN" | null;
7642
9190
  errorCode: string | null;
7643
9191
  traceId: string | null;
7644
9192
  idempotencyKey: string | null;
@@ -7656,7 +9204,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
7656
9204
  list: (params?: ApprovalListOptions) => Promise<{
7657
9205
  items: {
7658
9206
  approvalId: string;
7659
- status: "PENDING" | "FAILED" | "SUCCEEDED" | "EXECUTING" | "UNKNOWN" | "REJECTED" | "EXPIRED";
9207
+ status: "SUCCEEDED" | "FAILED" | "PENDING" | "EXECUTING" | "UNKNOWN" | "REJECTED" | "EXPIRED";
7660
9208
  operationId: string;
7661
9209
  method: string;
7662
9210
  path: string;
@@ -7706,7 +9254,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
7706
9254
  }>;
7707
9255
  get: (approvalId: string) => Promise<{
7708
9256
  approvalId: string;
7709
- status: "PENDING" | "FAILED" | "SUCCEEDED" | "EXECUTING" | "UNKNOWN" | "REJECTED" | "EXPIRED";
9257
+ status: "SUCCEEDED" | "FAILED" | "PENDING" | "EXECUTING" | "UNKNOWN" | "REJECTED" | "EXPIRED";
7710
9258
  operationId: string;
7711
9259
  method: string;
7712
9260
  path: string;
@@ -7758,7 +9306,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
7758
9306
  */
7759
9307
  approve: (approvalId: string, body?: ApprovalDecisionRequest) => Promise<{
7760
9308
  approvalId: string;
7761
- status: "PENDING" | "FAILED" | "SUCCEEDED" | "EXECUTING" | "UNKNOWN" | "REJECTED" | "EXPIRED";
9309
+ status: "SUCCEEDED" | "FAILED" | "PENDING" | "EXECUTING" | "UNKNOWN" | "REJECTED" | "EXPIRED";
7762
9310
  operationId: string;
7763
9311
  method: string;
7764
9312
  path: string;
@@ -7806,7 +9354,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
7806
9354
  }>;
7807
9355
  reject: (approvalId: string, body?: ApprovalDecisionRequest) => Promise<{
7808
9356
  approvalId: string;
7809
- status: "PENDING" | "FAILED" | "SUCCEEDED" | "EXECUTING" | "UNKNOWN" | "REJECTED" | "EXPIRED";
9357
+ status: "SUCCEEDED" | "FAILED" | "PENDING" | "EXECUTING" | "UNKNOWN" | "REJECTED" | "EXPIRED";
7810
9358
  operationId: string;
7811
9359
  method: string;
7812
9360
  path: string;
@@ -7903,7 +9451,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
7903
9451
  sellerAddresses: {
7904
9452
  list: (type?: AddressType) => Promise<{
7905
9453
  addressId: string;
7906
- type: "RETURN" | "SHIPPING";
9454
+ type: "SHIPPING" | "PICKUP" | "RETURN";
7907
9455
  name: string;
7908
9456
  isDefault: boolean;
7909
9457
  contactName: string;
@@ -7931,6 +9479,8 @@ export declare function createStoreClient(options: StoreClientOptions): {
7931
9479
  analyticsAllowedOrigins: string[];
7932
9480
  storefrontOrigins: string[];
7933
9481
  guestCheckoutEnabled: boolean;
9482
+ fulfillmentMailEnabled: boolean;
9483
+ withdrawalNotice: string | null;
7934
9484
  autoDeliverDays: number;
7935
9485
  autoConfirmDays: number;
7936
9486
  refundPolicy: {
@@ -7939,6 +9489,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
7939
9489
  exchangeDeliveryFee: number;
7940
9490
  sellerFaultFreeShipping: boolean;
7941
9491
  conditionalFreeShortfallCharge: boolean;
9492
+ couponShortfallCharge: boolean;
7942
9493
  };
7943
9494
  shippingPolicy: {
7944
9495
  baseDeliveryFee: number;
@@ -7971,6 +9522,8 @@ export declare function createStoreClient(options: StoreClientOptions): {
7971
9522
  analyticsAllowedOrigins: string[];
7972
9523
  storefrontOrigins: string[];
7973
9524
  guestCheckoutEnabled: boolean;
9525
+ fulfillmentMailEnabled: boolean;
9526
+ withdrawalNotice: string | null;
7974
9527
  autoDeliverDays: number;
7975
9528
  autoConfirmDays: number;
7976
9529
  refundPolicy: {
@@ -7979,6 +9532,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
7979
9532
  exchangeDeliveryFee: number;
7980
9533
  sellerFaultFreeShipping: boolean;
7981
9534
  conditionalFreeShortfallCharge: boolean;
9535
+ couponShortfallCharge: boolean;
7982
9536
  };
7983
9537
  shippingPolicy: {
7984
9538
  baseDeliveryFee: number;
@@ -8124,6 +9678,333 @@ export declare function exchangeStoreTokenViaOAuth(options: {
8124
9678
  role?: string;
8125
9679
  }>;
8126
9680
  //#endregion
9681
+ //#region src/schemas/promotion.d.ts
9682
+ /** 쿠폰 종류 */
9683
+ export declare const couponKindSchema: z.ZodEnum<{
9684
+ ORDER: "ORDER";
9685
+ PRODUCT: "PRODUCT";
9686
+ DELIVERY: "DELIVERY";
9687
+ }>;
9688
+ export type CouponKind = z.infer<typeof couponKindSchema>;
9689
+ /** 쿠폰 혜택 — 정률은 1~100%, 최대 할인액을 둘 수 있다. 정액은 최대 할인액이 없다 */
9690
+ export declare const couponBenefitSchema: z.ZodObject<{
9691
+ type: z.ZodEnum<{
9692
+ RATE: "RATE";
9693
+ AMOUNT: "AMOUNT";
9694
+ }>;
9695
+ value: z.ZodNumber;
9696
+ maxDiscountAmount: z.ZodNullable<z.ZodNumber>;
9697
+ }, z.core.$strip>;
9698
+ export type CouponBenefit = z.infer<typeof couponBenefitSchema>;
9699
+ /** 쿠폰 사용 조건 */
9700
+ export declare const couponConditionsSchema: z.ZodObject<{
9701
+ minOrderAmount: z.ZodNumber;
9702
+ firstOrderOnly: z.ZodBoolean;
9703
+ memberOnly: z.ZodBoolean;
9704
+ stackWithInstantDiscount: z.ZodBoolean;
9705
+ }, z.core.$strip>;
9706
+ export type CouponConditions = z.infer<typeof couponConditionsSchema>;
9707
+ /** 조건을 생략했을 때의 값 */
9708
+ export declare const COUPON_CONDITIONS_DEFAULTS: CouponConditions;
9709
+ /** 상한 — 대상 목록은 규칙 스냅샷에 통째로 복사되므로 크기를 제한한다 */
9710
+ export declare const COUPON_TARGET_LIST_MAX = 500;
9711
+ /** 쿠폰 대상 — 포함 목록이 모두 비면 전 상품이다. 제외가 포함보다 우선한다 */
9712
+ export declare const couponTargetSchema: z.ZodObject<{
9713
+ includeProductIds: z.ZodArray<z.ZodString>;
9714
+ includeCategoryIds: z.ZodArray<z.ZodString>;
9715
+ excludeProductIds: z.ZodArray<z.ZodString>;
9716
+ excludeCategoryIds: z.ZodArray<z.ZodString>;
9717
+ }, z.core.$strip>;
9718
+ export type CouponTarget = z.infer<typeof couponTargetSchema>;
9719
+ export declare const COUPON_TARGET_ALL: CouponTarget;
9720
+ /**
9721
+ * 쿠폰 규칙 스냅샷 — 계산에 필요한 값만 담는다. 결제 시작이 쿠폰을 읽어 이 형태로 결제 세션에 굳히고,
9722
+ * 주문 생성·환불 정산은 이 스냅샷만 읽는다. 결제 도중·주문 뒤 셀러가 쿠폰을 바꿔도 그 주문의 금액은 움직이지 않는다.
9723
+ */
9724
+ export declare const couponRuleSchema: z.ZodObject<{
9725
+ couponId: z.ZodString;
9726
+ name: z.ZodString;
9727
+ kind: z.ZodEnum<{
9728
+ ORDER: "ORDER";
9729
+ PRODUCT: "PRODUCT";
9730
+ DELIVERY: "DELIVERY";
9731
+ }>;
9732
+ benefit: z.ZodObject<{
9733
+ type: z.ZodEnum<{
9734
+ RATE: "RATE";
9735
+ AMOUNT: "AMOUNT";
9736
+ }>;
9737
+ value: z.ZodNumber;
9738
+ maxDiscountAmount: z.ZodNullable<z.ZodNumber>;
9739
+ }, z.core.$strip>;
9740
+ conditions: z.ZodObject<{
9741
+ minOrderAmount: z.ZodNumber;
9742
+ firstOrderOnly: z.ZodBoolean;
9743
+ memberOnly: z.ZodBoolean;
9744
+ stackWithInstantDiscount: z.ZodBoolean;
9745
+ }, z.core.$strip>;
9746
+ target: z.ZodObject<{
9747
+ includeProductIds: z.ZodArray<z.ZodString>;
9748
+ includeCategoryIds: z.ZodArray<z.ZodString>;
9749
+ excludeProductIds: z.ZodArray<z.ZodString>;
9750
+ excludeCategoryIds: z.ZodArray<z.ZodString>;
9751
+ }, z.core.$strip>;
9752
+ startsAt: z.ZodNullable<z.ZodISODateTime>;
9753
+ endsAt: z.ZodNullable<z.ZodISODateTime>;
9754
+ }, z.core.$strip>;
9755
+ export type CouponRule = z.infer<typeof couponRuleSchema>;
9756
+ /** 쿠폰을 적용하지 못한 사유 */
9757
+ export declare const couponRejectReasonSchema: z.ZodEnum<{
9758
+ EXPIRED: "EXPIRED";
9759
+ DUPLICATE_COUPON: "DUPLICATE_COUPON";
9760
+ STACK_LIMIT: "STACK_LIMIT";
9761
+ NOT_STARTED: "NOT_STARTED";
9762
+ MEMBER_ONLY: "MEMBER_ONLY";
9763
+ FIRST_ORDER_ONLY: "FIRST_ORDER_ONLY";
9764
+ NO_ELIGIBLE_ITEMS: "NO_ELIGIBLE_ITEMS";
9765
+ MIN_ORDER_AMOUNT: "MIN_ORDER_AMOUNT";
9766
+ LINE_NOT_ELIGIBLE: "LINE_NOT_ELIGIBLE";
9767
+ NO_DISCOUNT: "NO_DISCOUNT";
9768
+ }>;
9769
+ export type CouponRejectReason = z.infer<typeof couponRejectReasonSchema>;
9770
+ /** 쿠폰 적용 뒤 결제 금액의 하한 — 0원 결제 경로가 없어 이보다 작으면 결제를 시작하지 않는다(400 `PAYMENT_AMOUNT_TOO_LOW`) */
9771
+ export declare const MIN_PAYMENT_AMOUNT = 100;
9772
+ /** 계산에 넣는 주문상품 한 줄 */
9773
+ export interface PricingLine {
9774
+ /** 줄 식별자 — 주문서는 항목 순번, 주문은 주문상품 id. 배분 결과가 이 키로 나온다 */
9775
+ lineId: string;
9776
+ productId: string;
9777
+ /** 상품 카테고리 경로(`/조상/…/자신/`). 없으면 카테고리 대상에 걸리지 않는다 */
9778
+ categoryPath?: string | null;
9779
+ /** 수량 — 계산에는 쓰지 않는다(금액이 이미 수량을 반영한다). 화면·로그용이다 */
9780
+ quantity: number;
9781
+ /** 즉시할인 전 금액 (정가 단가 × 수량) */
9782
+ baseAmount: number;
9783
+ /** 즉시할인 반영 금액 (할인 단가 × 수량) — 쿠폰 계산의 기준이다 */
9784
+ amount: number;
9785
+ }
9786
+ /** 계산에 넣는 쿠폰 한 장 */
9787
+ export interface PricingCoupon {
9788
+ rule: CouponRule;
9789
+ /** 결과·배분의 키. 생략하면 `rule.couponId` */
9790
+ couponKey?: string;
9791
+ /**
9792
+ * 상품 쿠폰을 걸 줄. 생략하면 계산이 고른다 — 줄을 지정한 쿠폰을 먼저 걸고, 나머지는 대상 줄이 적은 쿠폰부터
9793
+ * 할인이 가장 큰 남은 줄(같으면 앞 줄)에 건다
9794
+ */
9795
+ lineId?: string | null;
9796
+ /**
9797
+ * 대상 줄을 이미 정했으면 그 목록 — 환불 정산의 재계산이 쓴다. 주어지면 `target`·즉시할인 조건을 다시
9798
+ * 판정하지 않는다(주문 뒤 상품의 카테고리·즉시할인이 바뀌어도 주문 시점 대상이 그대로다).
9799
+ */
9800
+ eligibleLineIds?: readonly string[] | null;
9801
+ /** 발급 쿠폰의 유효 시작·종료 — 쿠폰 사용 기간과 둘 중 좁은 쪽이 적용된다 */
9802
+ validFrom?: string | null;
9803
+ validUntil?: string | null;
9804
+ }
9805
+ /**
9806
+ * 배송비 쿠폰이 보는 배송비 견적 — `quoteDelivery` 결과의 묶음 내역이다. 배송비 총액은 묶음의
9807
+ * `fee + remoteSurcharge` 합으로 계산한다(총액을 따로 받으면 묶음과 어긋날 수 있다).
9808
+ */
9809
+ export interface PricingDelivery {
9810
+ bundles: ReadonlyArray<{
9811
+ bundleKey: string;
9812
+ fee: number;
9813
+ remoteSurcharge: number;
9814
+ }>;
9815
+ }
9816
+ export interface PricingInput {
9817
+ lines: readonly PricingLine[];
9818
+ coupons: readonly PricingCoupon[];
9819
+ /** 배송비 견적. 없으면 배송비 0으로 계산하고 배송비 쿠폰은 할인할 금액이 없다 */
9820
+ delivery?: PricingDelivery | null;
9821
+ /** 이 스토어에서 결제 완료 주문이 없는 회원인가 */
9822
+ firstOrder: boolean;
9823
+ /** 회원 주문인가 */
9824
+ isMember: boolean;
9825
+ /** 사용 기간 판정 시각 */
9826
+ now: Date;
9827
+ /**
9828
+ * 사용 기간·회원·첫 구매 조건을 다시 보지 않는다 — **환불 정산의 재계산 전용이다.** 그 조건은 결제 시작에서
9829
+ * 이미 통과했다. 주문 시각(승인 시각)으로 기간을 다시 보면 결제 시작과 승인 사이에 끝난 쿠폰이 조건을 잃은
9830
+ * 것처럼 보이고, 탈퇴한 회원의 반품이 회원 전용 조건에 떨어진다. 대상과 최소 금액만 본다.
9831
+ */
9832
+ ignoreEligibility?: boolean;
9833
+ }
9834
+ /** 줄 하나에 들어간 쿠폰별 할인 */
9835
+ export interface CouponAllocation {
9836
+ couponKey: string;
9837
+ amount: number;
9838
+ }
9839
+ export interface PricingLineResult {
9840
+ lineId: string;
9841
+ /** 즉시할인 반영 금액 (쿠폰 전) */
9842
+ amount: number;
9843
+ /** 이 줄에 들어간 쿠폰 할인 합계 — 상품 쿠폰 + 주문 쿠폰 배분 */
9844
+ couponDiscount: number;
9845
+ allocations: CouponAllocation[];
9846
+ }
9847
+ export interface PricingCouponResult {
9848
+ couponKey: string;
9849
+ couponId: string;
9850
+ kind: CouponKind;
9851
+ applied: boolean;
9852
+ /** 이 쿠폰의 할인액. 적용하지 못했으면 0 */
9853
+ discount: number;
9854
+ rejectReason: CouponRejectReason | null;
9855
+ /** 상품 쿠폰이 걸린 줄. 그 밖은 null */
9856
+ lineId: string | null;
9857
+ /** 이 쿠폰의 대상 줄 — 판정에 쓴 순서 그대로다. 환불 정산이 주문 시점 대상을 되살리는 데 쓴다 */
9858
+ eligibleLineIds: string[];
9859
+ }
9860
+ export interface PricingBundleResult {
9861
+ bundleKey: string;
9862
+ couponDiscount: number;
9863
+ }
9864
+ export interface PricingResult {
9865
+ lines: PricingLineResult[];
9866
+ coupons: PricingCouponResult[];
9867
+ /** 배송비 쿠폰의 묶음별 배분 */
9868
+ bundles: PricingBundleResult[];
9869
+ /** 상품 금액 합 (즉시할인 반영, 쿠폰 전) */
9870
+ productAmount: number;
9871
+ /** 상품·주문 쿠폰 할인 합계 */
9872
+ couponDiscountAmount: number;
9873
+ /** 배송비 (쿠폰 전) */
9874
+ deliveryFee: number;
9875
+ /** 배송비 쿠폰 할인 */
9876
+ deliveryDiscountAmount: number;
9877
+ /** 결제 금액 = productAmount − couponDiscountAmount + deliveryFee − deliveryDiscountAmount */
9878
+ totalAmount: number;
9879
+ }
9880
+ /**
9881
+ * 할인액 — 정률은 10원 단위 내림, 최대 할인액과 기준 금액을 넘지 않는다. 기준 금액이 0 이하면 0이다.
9882
+ *
9883
+ * 곱셈을 먼저 하고 나눈다. `base × 율 ÷ 1000`을 내려 10을 곱하면 `floor(base × 율 / 100 / 10) × 10`과 같고
9884
+ * 부동소수 오차가 끼지 않는다.
9885
+ */
9886
+ export declare function couponDiscountOf(benefit: CouponBenefit, base: number): number;
9887
+ /**
9888
+ * 금액을 가중치 비율로 나눈다 — **누적 내림의 차분**이다.
9889
+ *
9890
+ * `i`번째 몫 = `floor(total × W_i / W) − floor(total × W_{i−1} / W)`(`W_i`는 앞에서부터 누적 가중치).
9891
+ * 합이 `total`과 정확히 같고, 입력 순서가 같으면 결과도 같다. `total ≤ W`이면 몫이 가중치를 넘지 않는다.
9892
+ * 곱이 2^53을 넘을 수 있어 BigInt로 계산한다.
9893
+ */
9894
+ export declare function allocateByWeight(total: number, weights: readonly number[]): number[];
9895
+ /** 줄이 쿠폰 대상인가 — 제외가 포함보다 우선하고, 포함 목록이 모두 비면 전 상품이다 */
9896
+ export declare function isCouponTargetLine(rule: Pick<CouponRule, "target" | "conditions">, line: Pick<PricingLine, "productId" | "categoryPath" | "baseAmount" | "amount">): boolean;
9897
+ /**
9898
+ * 쿠폰 금액 계산 — **순수 함수다.** DB를 읽지 않는다. 규칙 스냅샷을 만드는 조회와 한도·보유 판정
9899
+ * (발급 쿠폰 상태, 1인 한도)은 호출부 몫이다.
9900
+ *
9901
+ * 종류별로 상품 쿠폰 → 주문 쿠폰 → 배송비 쿠폰 순으로 적용한다. 같은 종류의 자리와 같은 쿠폰 id는
9902
+ * **적용된** 쿠폰만 차지한다 — 앞선 주문 쿠폰이 최소 금액 미달이면 뒤의 주문 쿠폰이 쓰이고, 같은 쿠폰의 발급
9903
+ * 사본 중 앞 장이 만료됐으면 뒤 장이 쓰인다. 결과의 `coupons`는 입력 순서 그대로다. 입력이 같으면 결과도 같다.
9904
+ */
9905
+ export declare function quotePricing(input: PricingInput): PricingResult;
9906
+ /**
9907
+ * 주문이 받은 쿠폰 한 장 — 주문 시점 규칙과 대상 줄을 굳힌 값이다(`orders.discounts`의 항목).
9908
+ * 환불 정산은 이 값만 읽는다. 셀러가 쿠폰을 바꾸거나 상품의 카테고리가 바뀌어도 결과가 같다.
9909
+ */
9910
+ export interface AppliedCouponSnapshot {
9911
+ couponKey: string;
9912
+ rule: CouponRule;
9913
+ /** 상품 쿠폰이 걸린 주문상품 id. 그 밖은 null */
9914
+ lineId: string | null;
9915
+ /** 주문 시점 대상 주문상품 id — 주문서 항목 순서 그대로다 */
9916
+ eligibleLineIds: string[];
9917
+ /** 주문 시점 할인액 */
9918
+ discount: number;
9919
+ }
9920
+ /** 정산이 보는 주문상품 한 줄 — 이번 취소를 **반영한 뒤**의 활성 수량이다 */
9921
+ export interface CouponSettlementLine {
9922
+ lineId: string;
9923
+ productId: string;
9924
+ quantity: number;
9925
+ /** 남은 활성 수량 (이번 취소 반영 뒤) */
9926
+ activeQuantity: number;
9927
+ /** 주문상품 금액 (즉시할인 반영 단가 × 전체 수량, 쿠폰 전) */
9928
+ totalPrice: number;
9929
+ /** 주문 시점 쿠폰별 배분 */
9930
+ allocations: readonly CouponAllocation[];
9931
+ }
9932
+ /** 쿠폰 한 장의 정산 누적 — `orders.coupon_settlements[couponKey]` */
9933
+ export interface CouponSettlementState {
9934
+ /** 지금까지 환불에서 뺀 조건 미달 차감 (되돌린 금액을 뺀 값) */
9935
+ charged: number;
9936
+ /** 판매자 귀책·정책 꺼짐으로 받지 않기로 한 미달분 — 뒤의 환불이 다시 청구하지 않게 남긴다 */
9937
+ waived: number;
9938
+ }
9939
+ export interface CouponSettlementInput {
9940
+ coupons: readonly AppliedCouponSnapshot[];
9941
+ lines: readonly CouponSettlementLine[];
9942
+ settlements: Readonly<Record<string, Partial<CouponSettlementState> | undefined>>;
9943
+ /** 스토어 환불 정책 `couponShortfallCharge` */
9944
+ shortfallCharge: boolean;
9945
+ /** 판매자 귀책(직권취소, 불량·오배송 반품) — 미달분을 청구하지 않는다 */
9946
+ sellerFault: boolean;
9947
+ /**
9948
+ * 이번 환불에서 실제로 뺄 수 있는 금액 — 차감의 상한이다. 넘겨 차감하면 환불은 0원으로 잘리는데 기록에는
9949
+ * 전액이 남아, 뒤에 되돌릴 때 받지 않은 돈을 돌려준다(배송비 미달 차감의 `chargeableAmount`와 같은 이유).
9950
+ */
9951
+ chargeableAmount: number;
9952
+ }
9953
+ export interface CouponSettlementEntry {
9954
+ couponKey: string;
9955
+ /** 남은 주문상품에 배분된 할인 */
9956
+ allocatedRemaining: number;
9957
+ /** 남은 주문상품으로 다시 계산한 할인 — 쿠폰 조건을 잃었으면 0 */
9958
+ recomputed: number;
9959
+ /** 누적 미달분 목표 = 조건을 잃었으면 `allocatedRemaining`, 아니면 0 */
9960
+ target: number;
9961
+ charge: number;
9962
+ refund: number;
9963
+ waive: number;
9964
+ next: CouponSettlementState;
9965
+ }
9966
+ export interface CouponSettlementResult {
9967
+ /** 이번 환불에서 뺄 금액 — 조건 미달 차감 */
9968
+ chargeAmount: number;
9969
+ /** 이번 환불에 더할 금액 — 앞선 환불에서 뺀 차감을 되돌린 몫 */
9970
+ refundAmount: number;
9971
+ entries: CouponSettlementEntry[];
9972
+ }
9973
+ export declare const NO_COUPON_SETTLEMENT: CouponSettlementResult;
9974
+ /**
9975
+ * 쿠폰 조건 미달 차감 — **순수 함수다.** 부분 취소·반품으로 남은 주문상품이 쿠폰 조건을 잃으면,
9976
+ * 남은 주문상품이 받던 할인만큼을 이번 환불에서 뺀다.
9977
+ *
9978
+ * 쿠폰마다
9979
+ * - `allocatedRemaining` = 남은 수량에 배분된 할인(`proratedRefundBase`로 수량 비율)
9980
+ * - `recomputed` = 주문 시점 규칙 스냅샷과 주문 시점 대상 줄로, 남은 금액만 넣어 `quotePricing`을 다시 돌린 할인
9981
+ * - 쿠폰이 **여전히 적용되면 목표 0**, 조건을 잃었으면 목표 = `allocatedRemaining`이다. 적용되는 쿠폰의
9982
+ * 정률 10원 내림 차이까지 차감하면 조건을 지킨 구매자가 몇 원씩 잃는다 — 조건을 잃은 경우만 본다.
9983
+ * 재계산 할인이 더 커지는 경우(정률 최대 할인액)도 차감하지 않고 더 돌려주지도 않는다.
9984
+ * - `delta` = 목표 − (이미 차감 + 이미 면제). 양수면 청구하고(판매자 귀책·정책 꺼짐이면 면제로 기록),
9985
+ * 음수면 앞서 뺀 차감부터 돌려준다. 마지막 활성 수량까지 취소되면 목표가 0이라 누적 차감이 모두 되돌아가고,
9986
+ * 전량 취소의 환불 합계가 결제액과 같아진다.
9987
+ * - 청구는 이번 환불에서 실제로 뺄 수 있는 금액(`chargeableAmount` + 이번에 되돌린 금액)을 넘지 않고,
9988
+ * **실제로 뺀 금액만** 기록한다. 못 뺀 나머지는 기록하지 않아 다음 환불이 다시 본다.
9989
+ *
9990
+ * 배송비 쿠폰은 여기서 다루지 않는다. 배송비 쿠폰을 발급하게 되면(3단계) 묶음 배송비 환불
9991
+ * (`computeDeliveryFeeSettlement`)이 그 묶음의 `couponDiscount`를 빼야 한다 — 빼지 않으면 받지 않은 배송비를 돌려준다.
9992
+ */
9993
+ export declare function settleCouponShortfall(input: CouponSettlementInput): CouponSettlementResult;
9994
+ /**
9995
+ * 주문상품의 실결제 금액 중 이번 취소 수량의 몫 — **실결제 금액(`totalPrice − couponDiscountAmount`)을
9996
+ * 누적 내림의 차분으로 나눈다.**
9997
+ *
9998
+ * 상품 금액과 쿠폰 배분을 따로 나눠 빼면 합은 같지만 한 번의 몫이 −1원이 되는 경우가 있다
9999
+ * (예: 금액 3원·할인 2원·수량 5개에서 셋째 개). 음수를 0으로 자르면 합이 1원 넘친다. 실결제 금액을
10000
+ * 바로 나누면 몫이 항상 0 이상이고 전량 취소의 합이 실결제 금액과 정확히 같다.
10001
+ */
10002
+ export declare function proratedPaidRefundBase(item: {
10003
+ totalPrice: number;
10004
+ couponDiscountAmount?: number | null;
10005
+ quantity: number;
10006
+ }, settledQuantity: number, cancelQuantity: number): number;
10007
+ //#endregion
8127
10008
  //#region src/schemas/refund-policy.d.ts
8128
10009
  /** 유효 환불 정책 — 스토어 기본 + 상품별 덮어쓰기를 합친 결과 */
8129
10010
  export declare const refundPolicySchema: z.ZodObject<{
@@ -8132,6 +10013,7 @@ export declare const refundPolicySchema: z.ZodObject<{
8132
10013
  exchangeDeliveryFee: z.ZodNumber;
8133
10014
  sellerFaultFreeShipping: z.ZodBoolean;
8134
10015
  conditionalFreeShortfallCharge: z.ZodBoolean;
10016
+ couponShortfallCharge: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
8135
10017
  }, z.core.$strip>;
8136
10018
  export type RefundPolicy = z.infer<typeof refundPolicySchema>;
8137
10019
  /**
@@ -8153,8 +10035,20 @@ export declare const refundPolicyPatchSchema: z.ZodObject<{
8153
10035
  exchangeDeliveryFee: z.ZodOptional<z.ZodNumber>;
8154
10036
  sellerFaultFreeShipping: z.ZodOptional<z.ZodBoolean>;
8155
10037
  conditionalFreeShortfallCharge: z.ZodOptional<z.ZodBoolean>;
10038
+ couponShortfallCharge: z.ZodOptional<z.ZodBoolean>;
8156
10039
  }, z.core.$strict>;
8157
10040
  export type RefundPolicyPatch = z.infer<typeof refundPolicyPatchSchema>;
10041
+ /**
10042
+ * 상품별 덮어쓰기 — 쿠폰 조건 미달 차감(`couponShortfallCharge`)은 주문 단위 규칙이라 상품이 정하지 않는다.
10043
+ * 스토어 정책만 읽는다(이슈 #47).
10044
+ */
10045
+ export declare const productRefundPolicyPatchSchema: z.ZodObject<{
10046
+ preShipmentDeliveryFeeRefund: z.ZodOptional<z.ZodBoolean>;
10047
+ returnDeliveryFee: z.ZodOptional<z.ZodNumber>;
10048
+ exchangeDeliveryFee: z.ZodOptional<z.ZodNumber>;
10049
+ sellerFaultFreeShipping: z.ZodOptional<z.ZodBoolean>;
10050
+ conditionalFreeShortfallCharge: z.ZodOptional<z.ZodBoolean>;
10051
+ }, z.core.$strict>;
8158
10052
  /** 정책 해석에 쓰는 상품 값 — 상품별 덮어쓰기와 레거시 배송비 필드 */
8159
10053
  export interface RefundPolicyProductInput {
8160
10054
  /** 상품별 덮어쓰기. 없으면 스토어 기본을 그대로 쓴다 */
@@ -8186,7 +10080,8 @@ export declare function productRefundPolicyOverride(product?: RefundPolicyProduc
8186
10080
  *
8187
10081
  * 원 단위 반올림 규칙: `floor(주문상품 금액 × 누적 수량 ÷ 전체 수량)`을 두 번 구해 그 차를 쓴다.
8188
10082
  * 부분 취소를 몇 번 나눠도 합이 주문상품 금액과 정확히 같아서 1원이 남거나 넘치지 않는다.
8189
- * 할인은 이미 단가에 들어 있어(주문 단위 쿠폰이 없다) 별도 안분이 없다.
10083
+ * 즉시할인은 이미 단가에 들어 있다. 쿠폰 할인은 단가에 들어가지 않으므로 환불은 실결제 금액을 나누는
10084
+ * `proratedPaidRefundBase`(promotion.ts)를 쓴다(이슈 #47).
8190
10085
  *
8191
10086
  * @param totalPrice 주문상품 금액 (할인 반영 단가 × 전체 수량)
8192
10087
  * @param quantity 주문상품 전체 수량
@@ -8223,6 +10118,7 @@ export declare const STORE_SCOPE_RESOURCES: {
8223
10118
  readonly member: readonly ["r", "rw"];
8224
10119
  readonly customer: readonly ["r", "rw"];
8225
10120
  readonly audit: readonly ["r"];
10121
+ readonly promotion: readonly ["r", "rw"];
8226
10122
  };
8227
10123
  export type StoreScopeResource = keyof typeof STORE_SCOPE_RESOURCES;
8228
10124
  export declare const storeScopeResourceSchema: z.ZodEnum<{
@@ -8239,6 +10135,7 @@ export declare const storeScopeResourceSchema: z.ZodEnum<{
8239
10135
  member: "member";
8240
10136
  customer: "customer";
8241
10137
  audit: "audit";
10138
+ promotion: "promotion";
8242
10139
  }>;
8243
10140
  /** 카탈로그상 존재하는 스코프 문자열인가 (예: `settlement:rw`는 false) */
8244
10141
  export declare function isStoreScope(scope: string): boolean;
@@ -8248,9 +10145,9 @@ export declare function isStoreScope(scope: string): boolean;
8248
10145
  * 발급 시 지정한 스코프만 갖는다(발급자 보유 스코프 이내).
8249
10146
  */
8250
10147
  export declare const STORE_ROLE_SCOPES: {
8251
- 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"];
8252
- 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"];
8253
- readonly STAFF: readonly ["product:rw", "category:rw", "order:rw", "claim:rw", "inquiry:rw", "review:rw", "customer:r"];
10148
+ 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"];
10149
+ 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"];
10150
+ readonly STAFF: readonly ["product:rw", "category:rw", "order:rw", "claim:rw", "inquiry:rw", "review:rw", "customer:r", "promotion:r"];
8254
10151
  };
8255
10152
  //#endregion
8256
10153
  //#region src/schemas/shipping-policy.d.ts
@@ -8361,6 +10258,11 @@ export interface DeliveryBundleProduct {
8361
10258
  conditionalFreeAmount: number | null;
8362
10259
  /** 출고지 주소 id(`seller_addresses`). null이면 스토어 기본 출고지를 쓰는 상품끼리 한 묶음이다 */
8363
10260
  shippingAddressId?: string | null;
10261
+ /**
10262
+ * 상품 유형 (이슈 #48). 생략·null이면 배송 상품이다. 배송이 필요 없는 유형은 묶음을 만들지 않는다.
10263
+ * 줄(`DeliveryFeeLine.fulfillmentType`)에 값이 있으면 그 값이 이긴다.
10264
+ */
10265
+ fulfillmentType?: FulfillmentType | null;
8364
10266
  }
8365
10267
  /**
8366
10268
  * 배송 묶음 키 — **같은 출고지 + 같은 배송 정책이면 같은 키다.**
@@ -8378,6 +10280,11 @@ export interface DeliveryFeeLine {
8378
10280
  productId: string;
8379
10281
  /** 상품 금액 (할인 반영 단가 × 수량) */
8380
10282
  amount: number;
10283
+ /**
10284
+ * 이 줄의 상품 유형 — 주문서 스냅샷 값이다(이슈 #48). 주면 상품의 현재 유형보다 우선한다. 주문서를 만든 뒤 셀러가
10285
+ * 유형을 바꿔도 결제 시작의 견적과 주문상품 스냅샷이 같은 유형을 보게 한다. 생략하면 상품 값을 쓴다.
10286
+ */
10287
+ fulfillmentType?: FulfillmentType | null;
8381
10288
  }
8382
10289
  /**
8383
10290
  * 기본 배송비를 면제한 근거 — 면제하지 않았으면 null이다.
@@ -8422,6 +10329,13 @@ export interface DeliveryQuote {
8422
10329
  remoteArea: RemoteArea;
8423
10330
  /** 스토어 전체 무료 기준(`freeThreshold`) 충족으로 기본 배송비를 면제했는가 */
8424
10331
  freeByThreshold: boolean;
10332
+ /**
10333
+ * 배송이 필요한 줄의 상품 금액 합 — 스토어 전체 무료 기준의 판정 금액이다(이슈 #48). 비실물 줄은 빠진다.
10334
+ * 주문 상품 금액 합(`productAmount`)과 다를 수 있다.
10335
+ */
10336
+ shippableAmount: number;
10337
+ /** 배송이 필요한 줄이 하나라도 있는가 — 배송 묶음이 하나라도 있는가다. false면 배송지를 받지 않는다 */
10338
+ requiresShipping: boolean;
8425
10339
  }
8426
10340
  export interface DeliveryQuoteInput {
8427
10341
  lines: DeliveryFeeLine[];
@@ -8505,8 +10419,74 @@ export declare const orderWebhookEventDataSchema: z.ZodObject<{
8505
10419
  PURCHASE_DECIDED: "PURCHASE_DECIDED";
8506
10420
  }>;
8507
10421
  testPayment: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
10422
+ couponDiscountAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
10423
+ orderItemId: z.ZodOptional<z.ZodString>;
10424
+ fulfillmentType: z.ZodOptional<z.ZodString>;
8508
10425
  }, z.core.$strip>;
8509
10426
  export type OrderWebhookEventData = z.infer<typeof orderWebhookEventDataSchema>;
10427
+ /**
10428
+ * `ORDER.FULFILLED` — 비실물 주문상품(파일·코드·이용권·방문 수령)을 제공했다(이슈 #48). 자동 제공은 결제 확정과 함께,
10429
+ * 수동 제공은 셀러의 제공 처리(`POST /v1/order-items/{orderItemId}/fulfill`)로 온다. 기존 구독자를 위해 같은 순간
10430
+ * `ORDER.DELIVERED`도 함께 보낸다. **코드·파일 주소는 싣지 않는다** — 관리 API로 조회한다.
10431
+ */
10432
+ export declare const orderFulfilledWebhookEventDataSchema: z.ZodObject<{
10433
+ orderId: z.ZodString;
10434
+ orderItemId: z.ZodString;
10435
+ status: z.ZodEnum<{
10436
+ PAID: "PAID";
10437
+ CANCELED: "CANCELED";
10438
+ PAYMENT_WAITING: "PAYMENT_WAITING";
10439
+ CONFIRMED: "CONFIRMED";
10440
+ DISPATCHED: "DISPATCHED";
10441
+ DELIVERING: "DELIVERING";
10442
+ DELIVERED: "DELIVERED";
10443
+ PURCHASE_DECIDED: "PURCHASE_DECIDED";
10444
+ }>;
10445
+ fulfillmentType: z.ZodString;
10446
+ fulfillmentMode: z.ZodNullable<z.ZodString>;
10447
+ fulfilledAt: z.ZodString;
10448
+ testPayment: z.ZodBoolean;
10449
+ }, z.core.$strip>;
10450
+ export type OrderFulfilledWebhookEventData = z.infer<typeof orderFulfilledWebhookEventDataSchema>;
10451
+ /**
10452
+ * `ORDER.CANCELED` — 셀러 직권취소(`POST /v1/order-items/{orderItemId}/cancel`)로 주문상품이 취소됐다.
10453
+ * 수량 단위 부분 취소도 이 이벤트다(`quantity` < 주문 수량이면 주문상품 상태가 그대로다).
10454
+ * 구매자가 신청한 취소·반품은 `CLAIM.*` 이벤트로 온다.
10455
+ */
10456
+ export declare const orderCanceledWebhookEventDataSchema: z.ZodObject<{
10457
+ orderId: z.ZodString;
10458
+ orderItemId: z.ZodString;
10459
+ status: z.ZodEnum<{
10460
+ PAID: "PAID";
10461
+ CANCELED: "CANCELED";
10462
+ PAYMENT_WAITING: "PAYMENT_WAITING";
10463
+ CONFIRMED: "CONFIRMED";
10464
+ DISPATCHED: "DISPATCHED";
10465
+ DELIVERING: "DELIVERING";
10466
+ DELIVERED: "DELIVERED";
10467
+ PURCHASE_DECIDED: "PURCHASE_DECIDED";
10468
+ }>;
10469
+ itemStatus: z.ZodEnum<{
10470
+ PAID: "PAID";
10471
+ CANCELED: "CANCELED";
10472
+ PAYMENT_WAITING: "PAYMENT_WAITING";
10473
+ CONFIRMED: "CONFIRMED";
10474
+ DISPATCHED: "DISPATCHED";
10475
+ DELIVERING: "DELIVERING";
10476
+ DELIVERED: "DELIVERED";
10477
+ PURCHASE_DECIDED: "PURCHASE_DECIDED";
10478
+ }>;
10479
+ reason: z.ZodString;
10480
+ quantity: z.ZodNumber;
10481
+ canceledQuantity: z.ZodNumber;
10482
+ refundAmount: z.ZodNumber;
10483
+ deliveryFeeRefundAmount: z.ZodNumber;
10484
+ deliveryFeeChargeAmount: z.ZodNumber;
10485
+ couponChargeAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
10486
+ couponChargeRefundAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
10487
+ testPayment: z.ZodBoolean;
10488
+ }, z.core.$strip>;
10489
+ export type OrderCanceledWebhookEventData = z.infer<typeof orderCanceledWebhookEventDataSchema>;
8510
10490
  export declare const claimWebhookEventDataSchema: z.ZodObject<{
8511
10491
  claimId: z.ZodString;
8512
10492
  orderId: z.ZodString;
@@ -8532,6 +10512,8 @@ export declare const claimWebhookEventDataSchema: z.ZodObject<{
8532
10512
  deliveryFeeRefundAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
8533
10513
  deliveryFeeChargeAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
8534
10514
  deductAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
10515
+ couponChargeAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
10516
+ couponChargeRefundAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
8535
10517
  testPayment: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
8536
10518
  }, z.core.$strip>;
8537
10519
  export type ClaimWebhookEventData = z.infer<typeof claimWebhookEventDataSchema>;
@@ -8573,10 +10555,79 @@ export declare const orderWebhookEventSchema: z.ZodObject<{
8573
10555
  PURCHASE_DECIDED: "PURCHASE_DECIDED";
8574
10556
  }>;
8575
10557
  testPayment: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
10558
+ couponDiscountAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
10559
+ orderItemId: z.ZodOptional<z.ZodString>;
10560
+ fulfillmentType: z.ZodOptional<z.ZodString>;
10561
+ }, z.core.$strip>;
10562
+ id: z.ZodString;
10563
+ createdAt: z.ZodString;
10564
+ storeId: z.ZodString;
10565
+ sequence: z.ZodOptional<z.ZodNumber>;
10566
+ }, z.core.$strip>;
10567
+ export declare const orderFulfilledWebhookEventSchema: z.ZodObject<{
10568
+ type: z.ZodLiteral<"ORDER.FULFILLED">;
10569
+ data: z.ZodObject<{
10570
+ orderId: z.ZodString;
10571
+ orderItemId: z.ZodString;
10572
+ status: z.ZodEnum<{
10573
+ PAID: "PAID";
10574
+ CANCELED: "CANCELED";
10575
+ PAYMENT_WAITING: "PAYMENT_WAITING";
10576
+ CONFIRMED: "CONFIRMED";
10577
+ DISPATCHED: "DISPATCHED";
10578
+ DELIVERING: "DELIVERING";
10579
+ DELIVERED: "DELIVERED";
10580
+ PURCHASE_DECIDED: "PURCHASE_DECIDED";
10581
+ }>;
10582
+ fulfillmentType: z.ZodString;
10583
+ fulfillmentMode: z.ZodNullable<z.ZodString>;
10584
+ fulfilledAt: z.ZodString;
10585
+ testPayment: z.ZodBoolean;
8576
10586
  }, z.core.$strip>;
8577
10587
  id: z.ZodString;
8578
10588
  createdAt: z.ZodString;
8579
10589
  storeId: z.ZodString;
10590
+ sequence: z.ZodOptional<z.ZodNumber>;
10591
+ }, z.core.$strip>;
10592
+ export declare const orderCanceledWebhookEventSchema: z.ZodObject<{
10593
+ type: z.ZodLiteral<"ORDER.CANCELED">;
10594
+ data: z.ZodObject<{
10595
+ orderId: z.ZodString;
10596
+ orderItemId: z.ZodString;
10597
+ status: z.ZodEnum<{
10598
+ PAID: "PAID";
10599
+ CANCELED: "CANCELED";
10600
+ PAYMENT_WAITING: "PAYMENT_WAITING";
10601
+ CONFIRMED: "CONFIRMED";
10602
+ DISPATCHED: "DISPATCHED";
10603
+ DELIVERING: "DELIVERING";
10604
+ DELIVERED: "DELIVERED";
10605
+ PURCHASE_DECIDED: "PURCHASE_DECIDED";
10606
+ }>;
10607
+ itemStatus: z.ZodEnum<{
10608
+ PAID: "PAID";
10609
+ CANCELED: "CANCELED";
10610
+ PAYMENT_WAITING: "PAYMENT_WAITING";
10611
+ CONFIRMED: "CONFIRMED";
10612
+ DISPATCHED: "DISPATCHED";
10613
+ DELIVERING: "DELIVERING";
10614
+ DELIVERED: "DELIVERED";
10615
+ PURCHASE_DECIDED: "PURCHASE_DECIDED";
10616
+ }>;
10617
+ reason: z.ZodString;
10618
+ quantity: z.ZodNumber;
10619
+ canceledQuantity: z.ZodNumber;
10620
+ refundAmount: z.ZodNumber;
10621
+ deliveryFeeRefundAmount: z.ZodNumber;
10622
+ deliveryFeeChargeAmount: z.ZodNumber;
10623
+ couponChargeAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
10624
+ couponChargeRefundAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
10625
+ testPayment: z.ZodBoolean;
10626
+ }, z.core.$strip>;
10627
+ id: z.ZodString;
10628
+ createdAt: z.ZodString;
10629
+ storeId: z.ZodString;
10630
+ sequence: z.ZodOptional<z.ZodNumber>;
8580
10631
  }, z.core.$strip>;
8581
10632
  export declare const claimWebhookEventSchema: z.ZodObject<{
8582
10633
  type: z.ZodEnum<{
@@ -8610,11 +10661,14 @@ export declare const claimWebhookEventSchema: z.ZodObject<{
8610
10661
  deliveryFeeRefundAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
8611
10662
  deliveryFeeChargeAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
8612
10663
  deductAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
10664
+ couponChargeAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
10665
+ couponChargeRefundAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
8613
10666
  testPayment: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
8614
10667
  }, z.core.$strip>;
8615
10668
  id: z.ZodString;
8616
10669
  createdAt: z.ZodString;
8617
10670
  storeId: z.ZodString;
10671
+ sequence: z.ZodOptional<z.ZodNumber>;
8618
10672
  }, z.core.$strip>;
8619
10673
  export declare const inquiryWebhookEventSchema: z.ZodObject<{
8620
10674
  type: z.ZodLiteral<"INQUIRY.CREATED">;
@@ -8625,6 +10679,7 @@ export declare const inquiryWebhookEventSchema: z.ZodObject<{
8625
10679
  id: z.ZodString;
8626
10680
  createdAt: z.ZodString;
8627
10681
  storeId: z.ZodString;
10682
+ sequence: z.ZodOptional<z.ZodNumber>;
8628
10683
  }, z.core.$strip>;
8629
10684
  export declare const reviewWebhookEventSchema: z.ZodObject<{
8630
10685
  type: z.ZodLiteral<"REVIEW.CREATED">;
@@ -8636,6 +10691,7 @@ export declare const reviewWebhookEventSchema: z.ZodObject<{
8636
10691
  id: z.ZodString;
8637
10692
  createdAt: z.ZodString;
8638
10693
  storeId: z.ZodString;
10694
+ sequence: z.ZodOptional<z.ZodNumber>;
8639
10695
  }, z.core.$strip>;
8640
10696
  export declare const productOutOfStockWebhookEventSchema: z.ZodObject<{
8641
10697
  type: z.ZodLiteral<"PRODUCT.OUT_OF_STOCK">;
@@ -8646,6 +10702,7 @@ export declare const productOutOfStockWebhookEventSchema: z.ZodObject<{
8646
10702
  id: z.ZodString;
8647
10703
  createdAt: z.ZodString;
8648
10704
  storeId: z.ZodString;
10705
+ sequence: z.ZodOptional<z.ZodNumber>;
8649
10706
  }, z.core.$strip>;
8650
10707
  /** 웹훅 요청 본문. `type`으로 판별하며 `data` 형태가 타입별로 다르다 */
8651
10708
  export declare const webhookEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -8670,10 +10727,77 @@ export declare const webhookEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
8670
10727
  PURCHASE_DECIDED: "PURCHASE_DECIDED";
8671
10728
  }>;
8672
10729
  testPayment: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
10730
+ couponDiscountAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
10731
+ orderItemId: z.ZodOptional<z.ZodString>;
10732
+ fulfillmentType: z.ZodOptional<z.ZodString>;
10733
+ }, z.core.$strip>;
10734
+ id: z.ZodString;
10735
+ createdAt: z.ZodString;
10736
+ storeId: z.ZodString;
10737
+ sequence: z.ZodOptional<z.ZodNumber>;
10738
+ }, z.core.$strip>, z.ZodObject<{
10739
+ type: z.ZodLiteral<"ORDER.FULFILLED">;
10740
+ data: z.ZodObject<{
10741
+ orderId: z.ZodString;
10742
+ orderItemId: z.ZodString;
10743
+ status: z.ZodEnum<{
10744
+ PAID: "PAID";
10745
+ CANCELED: "CANCELED";
10746
+ PAYMENT_WAITING: "PAYMENT_WAITING";
10747
+ CONFIRMED: "CONFIRMED";
10748
+ DISPATCHED: "DISPATCHED";
10749
+ DELIVERING: "DELIVERING";
10750
+ DELIVERED: "DELIVERED";
10751
+ PURCHASE_DECIDED: "PURCHASE_DECIDED";
10752
+ }>;
10753
+ fulfillmentType: z.ZodString;
10754
+ fulfillmentMode: z.ZodNullable<z.ZodString>;
10755
+ fulfilledAt: z.ZodString;
10756
+ testPayment: z.ZodBoolean;
10757
+ }, z.core.$strip>;
10758
+ id: z.ZodString;
10759
+ createdAt: z.ZodString;
10760
+ storeId: z.ZodString;
10761
+ sequence: z.ZodOptional<z.ZodNumber>;
10762
+ }, z.core.$strip>, z.ZodObject<{
10763
+ type: z.ZodLiteral<"ORDER.CANCELED">;
10764
+ data: z.ZodObject<{
10765
+ orderId: z.ZodString;
10766
+ orderItemId: z.ZodString;
10767
+ status: z.ZodEnum<{
10768
+ PAID: "PAID";
10769
+ CANCELED: "CANCELED";
10770
+ PAYMENT_WAITING: "PAYMENT_WAITING";
10771
+ CONFIRMED: "CONFIRMED";
10772
+ DISPATCHED: "DISPATCHED";
10773
+ DELIVERING: "DELIVERING";
10774
+ DELIVERED: "DELIVERED";
10775
+ PURCHASE_DECIDED: "PURCHASE_DECIDED";
10776
+ }>;
10777
+ itemStatus: z.ZodEnum<{
10778
+ PAID: "PAID";
10779
+ CANCELED: "CANCELED";
10780
+ PAYMENT_WAITING: "PAYMENT_WAITING";
10781
+ CONFIRMED: "CONFIRMED";
10782
+ DISPATCHED: "DISPATCHED";
10783
+ DELIVERING: "DELIVERING";
10784
+ DELIVERED: "DELIVERED";
10785
+ PURCHASE_DECIDED: "PURCHASE_DECIDED";
10786
+ }>;
10787
+ reason: z.ZodString;
10788
+ quantity: z.ZodNumber;
10789
+ canceledQuantity: z.ZodNumber;
10790
+ refundAmount: z.ZodNumber;
10791
+ deliveryFeeRefundAmount: z.ZodNumber;
10792
+ deliveryFeeChargeAmount: z.ZodNumber;
10793
+ couponChargeAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
10794
+ couponChargeRefundAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
10795
+ testPayment: z.ZodBoolean;
8673
10796
  }, z.core.$strip>;
8674
10797
  id: z.ZodString;
8675
10798
  createdAt: z.ZodString;
8676
10799
  storeId: z.ZodString;
10800
+ sequence: z.ZodOptional<z.ZodNumber>;
8677
10801
  }, z.core.$strip>, z.ZodObject<{
8678
10802
  type: z.ZodEnum<{
8679
10803
  "CLAIM.CANCEL_REQUESTED": "CLAIM.CANCEL_REQUESTED";
@@ -8706,11 +10830,14 @@ export declare const webhookEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
8706
10830
  deliveryFeeRefundAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
8707
10831
  deliveryFeeChargeAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
8708
10832
  deductAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
10833
+ couponChargeAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
10834
+ couponChargeRefundAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
8709
10835
  testPayment: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
8710
10836
  }, z.core.$strip>;
8711
10837
  id: z.ZodString;
8712
10838
  createdAt: z.ZodString;
8713
10839
  storeId: z.ZodString;
10840
+ sequence: z.ZodOptional<z.ZodNumber>;
8714
10841
  }, z.core.$strip>, z.ZodObject<{
8715
10842
  type: z.ZodLiteral<"INQUIRY.CREATED">;
8716
10843
  data: z.ZodObject<{
@@ -8720,6 +10847,7 @@ export declare const webhookEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
8720
10847
  id: z.ZodString;
8721
10848
  createdAt: z.ZodString;
8722
10849
  storeId: z.ZodString;
10850
+ sequence: z.ZodOptional<z.ZodNumber>;
8723
10851
  }, z.core.$strip>, z.ZodObject<{
8724
10852
  type: z.ZodLiteral<"REVIEW.CREATED">;
8725
10853
  data: z.ZodObject<{
@@ -8730,6 +10858,7 @@ export declare const webhookEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
8730
10858
  id: z.ZodString;
8731
10859
  createdAt: z.ZodString;
8732
10860
  storeId: z.ZodString;
10861
+ sequence: z.ZodOptional<z.ZodNumber>;
8733
10862
  }, z.core.$strip>, z.ZodObject<{
8734
10863
  type: z.ZodLiteral<"PRODUCT.OUT_OF_STOCK">;
8735
10864
  data: z.ZodObject<{
@@ -8739,6 +10868,7 @@ export declare const webhookEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
8739
10868
  id: z.ZodString;
8740
10869
  createdAt: z.ZodString;
8741
10870
  storeId: z.ZodString;
10871
+ sequence: z.ZodOptional<z.ZodNumber>;
8742
10872
  }, z.core.$strip>], "type">;
8743
10873
  export type WebhookEvent = z.infer<typeof webhookEventSchema>;
8744
10874
  export type WebhookEventType = WebhookEvent["type"];