@sayren/store-sdk 0.16.0 → 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";
@@ -166,8 +166,8 @@ export declare const auditLogPageSchema: z.ZodObject<{
166
166
  export type AuditLogPage = z.infer<typeof auditLogPageSchema>;
167
167
  export declare const agentPolicyDecisionSchema: z.ZodEnum<{
168
168
  DENIED: "DENIED";
169
- APPROVAL_REQUIRED: "APPROVAL_REQUIRED";
170
169
  ALLOW: "ALLOW";
170
+ APPROVAL_REQUIRED: "APPROVAL_REQUIRED";
171
171
  }>;
172
172
  export type AgentPolicyDecision = z.infer<typeof agentPolicyDecisionSchema>;
173
173
  export declare const writePreviewSchema: z.ZodObject<{
@@ -191,8 +191,8 @@ export declare const writeDryRunResultSchema: z.ZodObject<{
191
191
  dryRun: z.ZodLiteral<true>;
192
192
  decision: z.ZodEnum<{
193
193
  DENIED: "DENIED";
194
- APPROVAL_REQUIRED: "APPROVAL_REQUIRED";
195
194
  ALLOW: "ALLOW";
195
+ APPROVAL_REQUIRED: "APPROVAL_REQUIRED";
196
196
  }>;
197
197
  reason: z.ZodNullable<z.ZodString>;
198
198
  preview: z.ZodObject<{
@@ -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;
@@ -2273,6 +2751,7 @@ export declare const eventTypeSchema: z.ZodEnum<{
2273
2751
  "ORDER.PURCHASE_DECIDED": "ORDER.PURCHASE_DECIDED";
2274
2752
  "ORDER.ADDRESS_CHANGE_REQUESTED": "ORDER.ADDRESS_CHANGE_REQUESTED";
2275
2753
  "ORDER.CANCELED": "ORDER.CANCELED";
2754
+ "ORDER.FULFILLED": "ORDER.FULFILLED";
2276
2755
  "CLAIM.CANCEL_REQUESTED": "CLAIM.CANCEL_REQUESTED";
2277
2756
  "CLAIM.RETURN_REQUESTED": "CLAIM.RETURN_REQUESTED";
2278
2757
  "CLAIM.EXCHANGE_REQUESTED": "CLAIM.EXCHANGE_REQUESTED";
@@ -2298,6 +2777,7 @@ export declare const webhookSchema: z.ZodObject<{
2298
2777
  "ORDER.PURCHASE_DECIDED": "ORDER.PURCHASE_DECIDED";
2299
2778
  "ORDER.ADDRESS_CHANGE_REQUESTED": "ORDER.ADDRESS_CHANGE_REQUESTED";
2300
2779
  "ORDER.CANCELED": "ORDER.CANCELED";
2780
+ "ORDER.FULFILLED": "ORDER.FULFILLED";
2301
2781
  "CLAIM.CANCEL_REQUESTED": "CLAIM.CANCEL_REQUESTED";
2302
2782
  "CLAIM.RETURN_REQUESTED": "CLAIM.RETURN_REQUESTED";
2303
2783
  "CLAIM.EXCHANGE_REQUESTED": "CLAIM.EXCHANGE_REQUESTED";
@@ -2327,6 +2807,7 @@ export declare const webhookCreatedSchema: z.ZodObject<{
2327
2807
  "ORDER.PURCHASE_DECIDED": "ORDER.PURCHASE_DECIDED";
2328
2808
  "ORDER.ADDRESS_CHANGE_REQUESTED": "ORDER.ADDRESS_CHANGE_REQUESTED";
2329
2809
  "ORDER.CANCELED": "ORDER.CANCELED";
2810
+ "ORDER.FULFILLED": "ORDER.FULFILLED";
2330
2811
  "CLAIM.CANCEL_REQUESTED": "CLAIM.CANCEL_REQUESTED";
2331
2812
  "CLAIM.RETURN_REQUESTED": "CLAIM.RETURN_REQUESTED";
2332
2813
  "CLAIM.EXCHANGE_REQUESTED": "CLAIM.EXCHANGE_REQUESTED";
@@ -2352,10 +2833,10 @@ export declare const webhookSecretRotatedSchema: z.ZodObject<{
2352
2833
  }, z.core.$strip>;
2353
2834
  export type WebhookSecretRotated = z.infer<typeof webhookSecretRotatedSchema>;
2354
2835
  export declare const webhookDeliveryStatusSchema: z.ZodEnum<{
2836
+ FAILED: "FAILED";
2355
2837
  PENDING: "PENDING";
2356
2838
  PENDING_RETRY: "PENDING_RETRY";
2357
2839
  SUCCESS: "SUCCESS";
2358
- FAILED: "FAILED";
2359
2840
  }>;
2360
2841
  export type WebhookDeliveryStatus = z.infer<typeof webhookDeliveryStatusSchema>;
2361
2842
  export declare const webhookDeliveryErrorCodeSchema: z.ZodEnum<{
@@ -2406,6 +2887,7 @@ export declare const webhookDeliverySchema: z.ZodObject<{
2406
2887
  "ORDER.PURCHASE_DECIDED": "ORDER.PURCHASE_DECIDED";
2407
2888
  "ORDER.ADDRESS_CHANGE_REQUESTED": "ORDER.ADDRESS_CHANGE_REQUESTED";
2408
2889
  "ORDER.CANCELED": "ORDER.CANCELED";
2890
+ "ORDER.FULFILLED": "ORDER.FULFILLED";
2409
2891
  "CLAIM.CANCEL_REQUESTED": "CLAIM.CANCEL_REQUESTED";
2410
2892
  "CLAIM.RETURN_REQUESTED": "CLAIM.RETURN_REQUESTED";
2411
2893
  "CLAIM.EXCHANGE_REQUESTED": "CLAIM.EXCHANGE_REQUESTED";
@@ -2416,10 +2898,10 @@ export declare const webhookDeliverySchema: z.ZodObject<{
2416
2898
  }>;
2417
2899
  url: z.ZodString;
2418
2900
  status: z.ZodEnum<{
2901
+ FAILED: "FAILED";
2419
2902
  PENDING: "PENDING";
2420
2903
  PENDING_RETRY: "PENDING_RETRY";
2421
2904
  SUCCESS: "SUCCESS";
2422
- FAILED: "FAILED";
2423
2905
  }>;
2424
2906
  responseStatusCode: z.ZodNullable<z.ZodNumber>;
2425
2907
  responseTimeMs: z.ZodNullable<z.ZodNumber>;
@@ -2458,6 +2940,7 @@ export declare const webhookDeliveryDetailSchema: z.ZodObject<{
2458
2940
  "ORDER.PURCHASE_DECIDED": "ORDER.PURCHASE_DECIDED";
2459
2941
  "ORDER.ADDRESS_CHANGE_REQUESTED": "ORDER.ADDRESS_CHANGE_REQUESTED";
2460
2942
  "ORDER.CANCELED": "ORDER.CANCELED";
2943
+ "ORDER.FULFILLED": "ORDER.FULFILLED";
2461
2944
  "CLAIM.CANCEL_REQUESTED": "CLAIM.CANCEL_REQUESTED";
2462
2945
  "CLAIM.RETURN_REQUESTED": "CLAIM.RETURN_REQUESTED";
2463
2946
  "CLAIM.EXCHANGE_REQUESTED": "CLAIM.EXCHANGE_REQUESTED";
@@ -2468,10 +2951,10 @@ export declare const webhookDeliveryDetailSchema: z.ZodObject<{
2468
2951
  }>;
2469
2952
  url: z.ZodString;
2470
2953
  status: z.ZodEnum<{
2954
+ FAILED: "FAILED";
2471
2955
  PENDING: "PENDING";
2472
2956
  PENDING_RETRY: "PENDING_RETRY";
2473
2957
  SUCCESS: "SUCCESS";
2474
- FAILED: "FAILED";
2475
2958
  }>;
2476
2959
  responseStatusCode: z.ZodNullable<z.ZodNumber>;
2477
2960
  responseTimeMs: z.ZodNullable<z.ZodNumber>;
@@ -2506,10 +2989,10 @@ export type WebhookDeliveryDetail = z.infer<typeof webhookDeliveryDetailSchema>;
2506
2989
  /** 전송 기록 조회 쿼리 — `GET /webhooks/{id}/deliveries` */
2507
2990
  export declare const webhookDeliveryListQuerySchema: z.ZodObject<{
2508
2991
  status: z.ZodOptional<z.ZodEnum<{
2992
+ FAILED: "FAILED";
2509
2993
  PENDING: "PENDING";
2510
2994
  PENDING_RETRY: "PENDING_RETRY";
2511
2995
  SUCCESS: "SUCCESS";
2512
- FAILED: "FAILED";
2513
2996
  }>>;
2514
2997
  eventType: z.ZodOptional<z.ZodEnum<{
2515
2998
  "ORDER.PAID": "ORDER.PAID";
@@ -2519,6 +3002,7 @@ export declare const webhookDeliveryListQuerySchema: z.ZodObject<{
2519
3002
  "ORDER.PURCHASE_DECIDED": "ORDER.PURCHASE_DECIDED";
2520
3003
  "ORDER.ADDRESS_CHANGE_REQUESTED": "ORDER.ADDRESS_CHANGE_REQUESTED";
2521
3004
  "ORDER.CANCELED": "ORDER.CANCELED";
3005
+ "ORDER.FULFILLED": "ORDER.FULFILLED";
2522
3006
  "CLAIM.CANCEL_REQUESTED": "CLAIM.CANCEL_REQUESTED";
2523
3007
  "CLAIM.RETURN_REQUESTED": "CLAIM.RETURN_REQUESTED";
2524
3008
  "CLAIM.EXCHANGE_REQUESTED": "CLAIM.EXCHANGE_REQUESTED";
@@ -2545,6 +3029,7 @@ export declare const webhookTestRequestSchema: z.ZodObject<{
2545
3029
  "ORDER.PURCHASE_DECIDED": "ORDER.PURCHASE_DECIDED";
2546
3030
  "ORDER.ADDRESS_CHANGE_REQUESTED": "ORDER.ADDRESS_CHANGE_REQUESTED";
2547
3031
  "ORDER.CANCELED": "ORDER.CANCELED";
3032
+ "ORDER.FULFILLED": "ORDER.FULFILLED";
2548
3033
  "CLAIM.CANCEL_REQUESTED": "CLAIM.CANCEL_REQUESTED";
2549
3034
  "CLAIM.RETURN_REQUESTED": "CLAIM.RETURN_REQUESTED";
2550
3035
  "CLAIM.EXCHANGE_REQUESTED": "CLAIM.EXCHANGE_REQUESTED";
@@ -2585,6 +3070,7 @@ export declare const webhookRequestSchema: z.ZodObject<{
2585
3070
  "ORDER.PURCHASE_DECIDED": "ORDER.PURCHASE_DECIDED";
2586
3071
  "ORDER.ADDRESS_CHANGE_REQUESTED": "ORDER.ADDRESS_CHANGE_REQUESTED";
2587
3072
  "ORDER.CANCELED": "ORDER.CANCELED";
3073
+ "ORDER.FULFILLED": "ORDER.FULFILLED";
2588
3074
  "CLAIM.CANCEL_REQUESTED": "CLAIM.CANCEL_REQUESTED";
2589
3075
  "CLAIM.RETURN_REQUESTED": "CLAIM.RETURN_REQUESTED";
2590
3076
  "CLAIM.EXCHANGE_REQUESTED": "CLAIM.EXCHANGE_REQUESTED";
@@ -2664,6 +3150,89 @@ export declare const reviewReportResultSchema: z.ZodObject<{
2664
3150
  }, z.core.$strip>;
2665
3151
  export type ReviewReportResult = z.infer<typeof reviewReportResultSchema>;
2666
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
2667
3236
  //#region src/schemas/order.d.ts
2668
3237
  export declare const orderSummarySchema: z.ZodObject<{
2669
3238
  orderId: z.ZodString;
@@ -2694,6 +3263,41 @@ export declare const shippingAddressSchema: z.ZodObject<{
2694
3263
  entranceCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2695
3264
  }, z.core.$strip>;
2696
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>;
2697
3301
  export declare const orderItemSchema: z.ZodObject<{
2698
3302
  orderItemId: z.ZodString;
2699
3303
  orderId: z.ZodString;
@@ -2717,16 +3321,46 @@ export declare const orderItemSchema: z.ZodObject<{
2717
3321
  optionId: z.ZodNullable<z.ZodString>;
2718
3322
  optionName: z.ZodNullable<z.ZodString>;
2719
3323
  sellerCode: z.ZodNullable<z.ZodString>;
3324
+ fulfillmentType: z.ZodDefault<z.ZodOptional<z.ZodString>>;
2720
3325
  quantity: z.ZodNumber;
2721
3326
  canceledQuantity: z.ZodNumber;
2722
3327
  activeQuantity: z.ZodNumber;
2723
3328
  unitPrice: z.ZodNumber;
2724
3329
  discountAmount: z.ZodNumber;
2725
3330
  totalPrice: z.ZodNumber;
3331
+ couponDiscountAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
2726
3332
  hold: z.ZodNullable<z.ZodObject<{
2727
3333
  reason: z.ZodString;
2728
3334
  expectedDispatchDate: z.ZodString;
2729
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>>>>;
2730
3364
  autoDecisionDate: z.ZodNullable<z.ZodString>;
2731
3365
  sellerMemo: z.ZodNullable<z.ZodString>;
2732
3366
  orderedAt: z.ZodString;
@@ -2743,9 +3377,19 @@ export declare const orderItemSchema: z.ZodObject<{
2743
3377
  "CLAIM.EXCHANGE_REQUESTED": "CLAIM.EXCHANGE_REQUESTED";
2744
3378
  "CLAIM.COMPLETED": "CLAIM.COMPLETED";
2745
3379
  }>;
3380
+ withdrawalRestricted: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
2746
3381
  testPayment: z.ZodBoolean;
2747
3382
  }, z.core.$strip>;
2748
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>;
2749
3393
  export declare const orderSchema: z.ZodObject<{
2750
3394
  orderId: z.ZodString;
2751
3395
  orderedAt: z.ZodString;
@@ -2754,6 +3398,7 @@ export declare const orderSchema: z.ZodObject<{
2754
3398
  phone: z.ZodString;
2755
3399
  email: z.ZodOptional<z.ZodEmail>;
2756
3400
  }, z.core.$strip>;
3401
+ requiresShipping: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
2757
3402
  shippingAddress: z.ZodObject<{
2758
3403
  receiverName: z.ZodString;
2759
3404
  phone: z.ZodString;
@@ -2777,6 +3422,15 @@ export declare const orderSchema: z.ZodObject<{
2777
3422
  productAmount: z.ZodNumber;
2778
3423
  deliveryFee: z.ZodNumber;
2779
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>>>>;
2780
3434
  totalAmount: z.ZodNumber;
2781
3435
  paidAt: z.ZodNullable<z.ZodString>;
2782
3436
  cashReceipt: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodObject<{
@@ -2802,6 +3456,7 @@ export declare const orderSchema: z.ZodObject<{
2802
3456
  updatedAt: z.ZodString;
2803
3457
  }, z.core.$strip>>>>;
2804
3458
  }, z.core.$strip>;
3459
+ withdrawalAgreedAt: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
2805
3460
  testPayment: z.ZodBoolean;
2806
3461
  items: z.ZodArray<z.ZodObject<{
2807
3462
  orderItemId: z.ZodString;
@@ -2826,16 +3481,46 @@ export declare const orderSchema: z.ZodObject<{
2826
3481
  optionId: z.ZodNullable<z.ZodString>;
2827
3482
  optionName: z.ZodNullable<z.ZodString>;
2828
3483
  sellerCode: z.ZodNullable<z.ZodString>;
3484
+ fulfillmentType: z.ZodDefault<z.ZodOptional<z.ZodString>>;
2829
3485
  quantity: z.ZodNumber;
2830
3486
  canceledQuantity: z.ZodNumber;
2831
3487
  activeQuantity: z.ZodNumber;
2832
3488
  unitPrice: z.ZodNumber;
2833
3489
  discountAmount: z.ZodNumber;
2834
3490
  totalPrice: z.ZodNumber;
3491
+ couponDiscountAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
2835
3492
  hold: z.ZodNullable<z.ZodObject<{
2836
3493
  reason: z.ZodString;
2837
3494
  expectedDispatchDate: z.ZodString;
2838
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>>>>;
2839
3524
  autoDecisionDate: z.ZodNullable<z.ZodString>;
2840
3525
  sellerMemo: z.ZodNullable<z.ZodString>;
2841
3526
  orderedAt: z.ZodString;
@@ -2852,6 +3537,7 @@ export declare const orderSchema: z.ZodObject<{
2852
3537
  "CLAIM.EXCHANGE_REQUESTED": "CLAIM.EXCHANGE_REQUESTED";
2853
3538
  "CLAIM.COMPLETED": "CLAIM.COMPLETED";
2854
3539
  }>;
3540
+ withdrawalRestricted: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
2855
3541
  testPayment: z.ZodBoolean;
2856
3542
  }, z.core.$strip>>;
2857
3543
  }, z.core.$strip>;
@@ -2911,16 +3597,46 @@ export declare const orderItemPageSchema: z.ZodObject<{
2911
3597
  optionId: z.ZodNullable<z.ZodString>;
2912
3598
  optionName: z.ZodNullable<z.ZodString>;
2913
3599
  sellerCode: z.ZodNullable<z.ZodString>;
3600
+ fulfillmentType: z.ZodDefault<z.ZodOptional<z.ZodString>>;
2914
3601
  quantity: z.ZodNumber;
2915
3602
  canceledQuantity: z.ZodNumber;
2916
3603
  activeQuantity: z.ZodNumber;
2917
3604
  unitPrice: z.ZodNumber;
2918
3605
  discountAmount: z.ZodNumber;
2919
3606
  totalPrice: z.ZodNumber;
3607
+ couponDiscountAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
2920
3608
  hold: z.ZodNullable<z.ZodObject<{
2921
3609
  reason: z.ZodString;
2922
3610
  expectedDispatchDate: z.ZodString;
2923
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>>>>;
2924
3640
  autoDecisionDate: z.ZodNullable<z.ZodString>;
2925
3641
  sellerMemo: z.ZodNullable<z.ZodString>;
2926
3642
  orderedAt: z.ZodString;
@@ -2937,6 +3653,7 @@ export declare const orderItemPageSchema: z.ZodObject<{
2937
3653
  "CLAIM.EXCHANGE_REQUESTED": "CLAIM.EXCHANGE_REQUESTED";
2938
3654
  "CLAIM.COMPLETED": "CLAIM.COMPLETED";
2939
3655
  }>;
3656
+ withdrawalRestricted: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
2940
3657
  testPayment: z.ZodBoolean;
2941
3658
  }, z.core.$strip>>;
2942
3659
  }, z.core.$strip>;
@@ -2962,6 +3679,7 @@ export declare const orderListQuerySchema: z.ZodObject<{
2962
3679
  PURCHASE_DECIDED: "PURCHASE_DECIDED";
2963
3680
  }>>;
2964
3681
  keyword: z.ZodOptional<z.ZodString>;
3682
+ fulfillmentType: z.ZodOptional<z.ZodString>;
2965
3683
  testPayment: z.ZodOptional<z.ZodEnum<{
2966
3684
  true: "true";
2967
3685
  false: "false";
@@ -2998,6 +3716,8 @@ export interface OrderListParams extends PageParams {
2998
3716
  orderedTo?: string;
2999
3717
  status?: z.infer<typeof orderItemStatusSchema>;
3000
3718
  keyword?: string;
3719
+ /** 상품 유형 필터 — 이 유형의 주문상품이 하나라도 있는 주문(이슈 #48) */
3720
+ fulfillmentType?: z.infer<typeof fulfillmentTypeResponseSchema>;
3001
3721
  /** 테스트 결제 필터 — `"true"` 테스트 결제만, `"false"` 실결제만, 생략하면 전부 */
3002
3722
  testPayment?: "true" | "false";
3003
3723
  }
@@ -3122,6 +3842,21 @@ export declare const cancelBySellerRequestSchema: z.ZodObject<{
3122
3842
  quantity: z.ZodOptional<z.ZodNumber>;
3123
3843
  }, z.core.$strip>;
3124
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>;
3125
3860
  /** `POST /v1/order-items/{orderItemId}/cancel` 응답 — 셀러 직권취소 환불 결과 */
3126
3861
  export declare const cancelBySellerResultSchema: z.ZodObject<{
3127
3862
  orderItemId: z.ZodString;
@@ -3130,6 +3865,8 @@ export declare const cancelBySellerResultSchema: z.ZodObject<{
3130
3865
  canceledQuantity: z.ZodNumber;
3131
3866
  deliveryFeeRefundAmount: z.ZodNumber;
3132
3867
  deliveryFeeChargeAmount: z.ZodNumber;
3868
+ couponChargeAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3869
+ couponChargeRefundAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3133
3870
  refundedAt: z.ZodString;
3134
3871
  }, z.core.$strip>;
3135
3872
  export type CancelBySellerResult = z.infer<typeof cancelBySellerResultSchema>;
@@ -3202,8 +3939,8 @@ export declare const pgEnvironmentSchema: z.ZodEnum<{
3202
3939
  }>;
3203
3940
  export type PgEnvironment = z.infer<typeof pgEnvironmentSchema>;
3204
3941
  export declare const pgVerificationResultSchema: z.ZodEnum<{
3205
- SUCCESS: "SUCCESS";
3206
3942
  FAILED: "FAILED";
3943
+ SUCCESS: "SUCCESS";
3207
3944
  }>;
3208
3945
  export type PgVerificationResult = z.infer<typeof pgVerificationResultSchema>;
3209
3946
  /**
@@ -3352,8 +4089,8 @@ export declare const paymentCredentialSetSchema: z.ZodObject<{
3352
4089
  }, z.core.$strip>>;
3353
4090
  lastVerification: z.ZodNullable<z.ZodObject<{
3354
4091
  result: z.ZodEnum<{
3355
- SUCCESS: "SUCCESS";
3356
4092
  FAILED: "FAILED";
4093
+ SUCCESS: "SUCCESS";
3357
4094
  }>;
3358
4095
  message: z.ZodNullable<z.ZodString>;
3359
4096
  checkedAt: z.ZodString;
@@ -3454,8 +4191,8 @@ export declare const paymentProviderSchema: z.ZodObject<{
3454
4191
  }, z.core.$strip>>;
3455
4192
  lastVerification: z.ZodNullable<z.ZodObject<{
3456
4193
  result: z.ZodEnum<{
3457
- SUCCESS: "SUCCESS";
3458
4194
  FAILED: "FAILED";
4195
+ SUCCESS: "SUCCESS";
3459
4196
  }>;
3460
4197
  message: z.ZodNullable<z.ZodString>;
3461
4198
  checkedAt: z.ZodString;
@@ -3491,8 +4228,8 @@ export declare const paymentProviderSchema: z.ZodObject<{
3491
4228
  }, z.core.$strip>>;
3492
4229
  lastVerification: z.ZodNullable<z.ZodObject<{
3493
4230
  result: z.ZodEnum<{
3494
- SUCCESS: "SUCCESS";
3495
4231
  FAILED: "FAILED";
4232
+ SUCCESS: "SUCCESS";
3496
4233
  }>;
3497
4234
  message: z.ZodNullable<z.ZodString>;
3498
4235
  checkedAt: z.ZodString;
@@ -3527,8 +4264,8 @@ export declare const paymentProviderSchema: z.ZodObject<{
3527
4264
  }, z.core.$strip>>;
3528
4265
  lastVerification: z.ZodNullable<z.ZodObject<{
3529
4266
  result: z.ZodEnum<{
3530
- SUCCESS: "SUCCESS";
3531
4267
  FAILED: "FAILED";
4268
+ SUCCESS: "SUCCESS";
3532
4269
  }>;
3533
4270
  message: z.ZodNullable<z.ZodString>;
3534
4271
  checkedAt: z.ZodString;
@@ -3603,8 +4340,8 @@ export declare const paymentSettingsSchema: z.ZodObject<{
3603
4340
  }, z.core.$strip>>;
3604
4341
  lastVerification: z.ZodNullable<z.ZodObject<{
3605
4342
  result: z.ZodEnum<{
3606
- SUCCESS: "SUCCESS";
3607
4343
  FAILED: "FAILED";
4344
+ SUCCESS: "SUCCESS";
3608
4345
  }>;
3609
4346
  message: z.ZodNullable<z.ZodString>;
3610
4347
  checkedAt: z.ZodString;
@@ -3640,8 +4377,8 @@ export declare const paymentSettingsSchema: z.ZodObject<{
3640
4377
  }, z.core.$strip>>;
3641
4378
  lastVerification: z.ZodNullable<z.ZodObject<{
3642
4379
  result: z.ZodEnum<{
3643
- SUCCESS: "SUCCESS";
3644
4380
  FAILED: "FAILED";
4381
+ SUCCESS: "SUCCESS";
3645
4382
  }>;
3646
4383
  message: z.ZodNullable<z.ZodString>;
3647
4384
  checkedAt: z.ZodString;
@@ -3676,8 +4413,8 @@ export declare const paymentSettingsSchema: z.ZodObject<{
3676
4413
  }, z.core.$strip>>;
3677
4414
  lastVerification: z.ZodNullable<z.ZodObject<{
3678
4415
  result: z.ZodEnum<{
3679
- SUCCESS: "SUCCESS";
3680
4416
  FAILED: "FAILED";
4417
+ SUCCESS: "SUCCESS";
3681
4418
  }>;
3682
4419
  message: z.ZodNullable<z.ZodString>;
3683
4420
  checkedAt: z.ZodString;
@@ -3724,8 +4461,8 @@ export declare const paymentProviderVerificationSchema: z.ZodObject<{
3724
4461
  LIVE: "LIVE";
3725
4462
  }>;
3726
4463
  result: z.ZodEnum<{
3727
- SUCCESS: "SUCCESS";
3728
4464
  FAILED: "FAILED";
4465
+ SUCCESS: "SUCCESS";
3729
4466
  }>;
3730
4467
  message: z.ZodNullable<z.ZodString>;
3731
4468
  checkedAt: z.ZodString;
@@ -3855,8 +4592,8 @@ export type SalesReport = z.infer<typeof salesReportSchema>;
3855
4592
  * - `FAILED`: 승인되지 않고 끝났다(거절·준비 장애·구매자 취소·만료)
3856
4593
  */
3857
4594
  export declare const paymentRecordStatusSchema: z.ZodEnum<{
3858
- PENDING: "PENDING";
3859
4595
  FAILED: "FAILED";
4596
+ PENDING: "PENDING";
3860
4597
  APPROVED: "APPROVED";
3861
4598
  PARTIALLY_REFUNDED: "PARTIALLY_REFUNDED";
3862
4599
  REFUNDED: "REFUNDED";
@@ -3903,8 +4640,8 @@ export declare const paymentRecordSchema: z.ZodObject<{
3903
4640
  orderName: z.ZodString;
3904
4641
  customerName: z.ZodString;
3905
4642
  status: z.ZodEnum<{
3906
- PENDING: "PENDING";
3907
4643
  FAILED: "FAILED";
4644
+ PENDING: "PENDING";
3908
4645
  APPROVED: "APPROVED";
3909
4646
  PARTIALLY_REFUNDED: "PARTIALLY_REFUNDED";
3910
4647
  REFUNDED: "REFUNDED";
@@ -3949,8 +4686,8 @@ export declare const paymentRecordPageSchema: z.ZodObject<{
3949
4686
  orderName: z.ZodString;
3950
4687
  customerName: z.ZodString;
3951
4688
  status: z.ZodEnum<{
3952
- PENDING: "PENDING";
3953
4689
  FAILED: "FAILED";
4690
+ PENDING: "PENDING";
3954
4691
  APPROVED: "APPROVED";
3955
4692
  PARTIALLY_REFUNDED: "PARTIALLY_REFUNDED";
3956
4693
  REFUNDED: "REFUNDED";
@@ -4038,8 +4775,8 @@ export declare const paymentRecordDetailSchema: z.ZodObject<{
4038
4775
  orderName: z.ZodString;
4039
4776
  customerName: z.ZodString;
4040
4777
  status: z.ZodEnum<{
4041
- PENDING: "PENDING";
4042
4778
  FAILED: "FAILED";
4779
+ PENDING: "PENDING";
4043
4780
  APPROVED: "APPROVED";
4044
4781
  PARTIALLY_REFUNDED: "PARTIALLY_REFUNDED";
4045
4782
  REFUNDED: "REFUNDED";
@@ -4193,6 +4930,7 @@ export declare const productSummarySchema: z.ZodObject<{
4193
4930
  categoryId: z.ZodNullable<z.ZodString>;
4194
4931
  thumbnailUrl: z.ZodOptional<z.ZodURL>;
4195
4932
  hasOptions: z.ZodBoolean;
4933
+ fulfillmentType: z.ZodDefault<z.ZodOptional<z.ZodString>>;
4196
4934
  updatedAt: z.ZodString;
4197
4935
  }, z.core.$strip>;
4198
4936
  export type ProductSummary = z.infer<typeof productSummarySchema>;
@@ -4233,6 +4971,18 @@ export declare const productVariantSchema: z.ZodObject<{
4233
4971
  usable: z.ZodBoolean;
4234
4972
  }, z.core.$strip>;
4235
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>;
4236
4986
  export declare const productSchema: z.ZodObject<{
4237
4987
  productId: z.ZodString;
4238
4988
  name: z.ZodString;
@@ -4249,6 +4999,25 @@ export declare const productSchema: z.ZodObject<{
4249
4999
  thumbnailUrl: z.ZodOptional<z.ZodURL>;
4250
5000
  hasOptions: z.ZodBoolean;
4251
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>>>;
4252
5021
  description: z.ZodOptional<z.ZodString>;
4253
5022
  descriptionJson: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4254
5023
  originalPrice: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
@@ -4298,7 +5067,6 @@ export declare const productSchema: z.ZodObject<{
4298
5067
  }, z.core.$strict>>>;
4299
5068
  shippingAddressId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4300
5069
  returnAddressId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4301
- createdAt: z.ZodOptional<z.ZodString>;
4302
5070
  }, z.core.$strip>;
4303
5071
  export type Product = z.infer<typeof productSchema>;
4304
5072
  /** 상품 하나에 등록할 수 있는 이미지 최대 장수 — 첫 장이 대표(썸네일)다 */
@@ -4433,6 +5201,22 @@ export declare const variantStockSchema: z.ZodObject<{
4433
5201
  }, z.core.$strip>;
4434
5202
  export type VariantStock = z.infer<typeof variantStockSchema>;
4435
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>>;
4436
5220
  name: z.ZodString;
4437
5221
  categoryId: z.ZodString;
4438
5222
  salePrice: z.ZodNumber;
@@ -4485,6 +5269,22 @@ export declare const productCreateRequestSchema: z.ZodObject<{
4485
5269
  }, z.core.$strip>;
4486
5270
  export type ProductCreateRequest = z.infer<typeof productCreateRequestSchema>;
4487
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>>;
4488
5288
  name: z.ZodOptional<z.ZodString>;
4489
5289
  salePrice: z.ZodOptional<z.ZodNumber>;
4490
5290
  status: z.ZodOptional<z.ZodEnum<{
@@ -4534,18 +5334,6 @@ export declare const productListQuerySchema: z.ZodObject<{
4534
5334
  "updatedAt.desc": "updatedAt.desc";
4535
5335
  }>>;
4536
5336
  }, z.core.$strip>;
4537
- export declare const discountSchema: z.ZodObject<{
4538
- productId: z.ZodString;
4539
- discountType: z.ZodEnum<{
4540
- RATE: "RATE";
4541
- AMOUNT: "AMOUNT";
4542
- }>;
4543
- discountValue: z.ZodNumber;
4544
- discountedPrice: z.ZodNumber;
4545
- startAt: z.ZodNullable<z.ZodString>;
4546
- endAt: z.ZodNullable<z.ZodString>;
4547
- }, z.core.$strip>;
4548
- export type Discount = z.infer<typeof discountSchema>;
4549
5337
  export declare const discountRequestSchema: z.ZodObject<{
4550
5338
  discountType: z.ZodEnum<{
4551
5339
  RATE: "RATE";
@@ -4597,6 +5385,8 @@ export declare const updateStoreRequestSchema: z.ZodObject<{
4597
5385
  analyticsAllowedOrigins: z.ZodOptional<z.ZodArray<z.ZodString>>;
4598
5386
  storefrontOrigins: z.ZodOptional<z.ZodArray<z.ZodString>>;
4599
5387
  guestCheckoutEnabled: z.ZodOptional<z.ZodBoolean>;
5388
+ fulfillmentMailEnabled: z.ZodOptional<z.ZodBoolean>;
5389
+ withdrawalNotice: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4600
5390
  autoDeliverDays: z.ZodOptional<z.ZodNumber>;
4601
5391
  autoConfirmDays: z.ZodOptional<z.ZodNumber>;
4602
5392
  refundPolicy: z.ZodOptional<z.ZodObject<{
@@ -4605,6 +5395,7 @@ export declare const updateStoreRequestSchema: z.ZodObject<{
4605
5395
  exchangeDeliveryFee: z.ZodOptional<z.ZodNumber>;
4606
5396
  sellerFaultFreeShipping: z.ZodOptional<z.ZodBoolean>;
4607
5397
  conditionalFreeShortfallCharge: z.ZodOptional<z.ZodBoolean>;
5398
+ couponShortfallCharge: z.ZodOptional<z.ZodBoolean>;
4608
5399
  }, z.core.$strict>>;
4609
5400
  shippingPolicy: z.ZodOptional<z.ZodObject<{
4610
5401
  baseDeliveryFee: z.ZodOptional<z.ZodNumber>;
@@ -4634,6 +5425,8 @@ export declare const storeSchema: z.ZodObject<{
4634
5425
  analyticsAllowedOrigins: z.ZodArray<z.ZodString>;
4635
5426
  storefrontOrigins: z.ZodArray<z.ZodString>;
4636
5427
  guestCheckoutEnabled: z.ZodBoolean;
5428
+ fulfillmentMailEnabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
5429
+ withdrawalNotice: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
4637
5430
  autoDeliverDays: z.ZodNumber;
4638
5431
  autoConfirmDays: z.ZodNumber;
4639
5432
  refundPolicy: z.ZodObject<{
@@ -4642,6 +5435,7 @@ export declare const storeSchema: z.ZodObject<{
4642
5435
  exchangeDeliveryFee: z.ZodNumber;
4643
5436
  sellerFaultFreeShipping: z.ZodBoolean;
4644
5437
  conditionalFreeShortfallCharge: z.ZodBoolean;
5438
+ couponShortfallCharge: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
4645
5439
  }, z.core.$strip>;
4646
5440
  shippingPolicy: z.ZodObject<{
4647
5441
  baseDeliveryFee: z.ZodNumber;
@@ -4746,23 +5540,30 @@ export declare const storeMemberRoleUpdatedSchema: z.ZodObject<{
4746
5540
  }>;
4747
5541
  }, z.core.$strip>;
4748
5542
  export type StoreMemberRoleUpdated = z.infer<typeof storeMemberRoleUpdatedSchema>;
5543
+ /**
5544
+ * 주소 유형 — 출고지·반품지·방문 수령지(이슈 #48). 방문 수령지(`PICKUP`)는 목록에서 `type=PICKUP`으로 조회할 때만 나온다
5545
+ * (이 값을 모르는 옛 SDK의 목록 파싱이 깨지지 않게).
5546
+ */
4749
5547
  export declare const addressTypeSchema: z.ZodEnum<{
4750
- RETURN: "RETURN";
4751
5548
  SHIPPING: "SHIPPING";
5549
+ PICKUP: "PICKUP";
5550
+ RETURN: "RETURN";
4752
5551
  }>;
4753
5552
  export type AddressType = z.infer<typeof addressTypeSchema>;
4754
5553
  /** `GET /v1/seller-addresses` 쿼리 — OpenAPI 문서용 형태. 기본 주소 우선, 그다음 등록순이다 */
4755
5554
  export declare const sellerAddressListQuerySchema: z.ZodObject<{
4756
5555
  type: z.ZodOptional<z.ZodEnum<{
4757
- RETURN: "RETURN";
4758
5556
  SHIPPING: "SHIPPING";
5557
+ PICKUP: "PICKUP";
5558
+ RETURN: "RETURN";
4759
5559
  }>>;
4760
5560
  }, z.core.$strip>;
4761
5561
  export declare const sellerAddressSchema: z.ZodObject<{
4762
5562
  addressId: z.ZodString;
4763
5563
  type: z.ZodEnum<{
4764
- RETURN: "RETURN";
4765
5564
  SHIPPING: "SHIPPING";
5565
+ PICKUP: "PICKUP";
5566
+ RETURN: "RETURN";
4766
5567
  }>;
4767
5568
  name: z.ZodString;
4768
5569
  isDefault: z.ZodBoolean;
@@ -4776,8 +5577,9 @@ export declare const sellerAddressSchema: z.ZodObject<{
4776
5577
  export type SellerAddress = z.infer<typeof sellerAddressSchema>;
4777
5578
  export declare const sellerAddressRequestSchema: z.ZodObject<{
4778
5579
  type: z.ZodEnum<{
4779
- RETURN: "RETURN";
4780
5580
  SHIPPING: "SHIPPING";
5581
+ PICKUP: "PICKUP";
5582
+ RETURN: "RETURN";
4781
5583
  }>;
4782
5584
  name: z.ZodString;
4783
5585
  contactName: z.ZodString;
@@ -4794,10 +5596,13 @@ export type SellerAddressRequest = z.infer<typeof sellerAddressRequestSchema>;
4794
5596
  *
4795
5597
  * - `product-image`: 상품 목록·상세의 상품 이미지. 목록 썸네일로 쓰이므로 정지 이미지만 받는다.
4796
5598
  * - `description`: 상세설명 본문에 삽입하는 미디어. 동영상과 svg도 받는다.
5599
+ * - `digital-asset`: 파일 다운로드 상품의 판매 파일(이슈 #48). **비공개 객체**로 올라가고 공개 주소가 없다 — 구매자는 제공된
5600
+ * 주문상품에서 수명 300초의 서명 주소로만 받는다.
4797
5601
  */
4798
5602
  export declare const uploadPurposeSchema: z.ZodEnum<{
4799
5603
  "product-image": "product-image";
4800
5604
  description: "description";
5605
+ "digital-asset": "digital-asset";
4801
5606
  }>;
4802
5607
  export type UploadPurpose = z.infer<typeof uploadPurposeSchema>;
4803
5608
  export interface UploadPurposeLimit {
@@ -4812,6 +5617,8 @@ export interface UploadPurposeLimit {
4812
5617
  * 직접 PUT되므로 이 검사는 셀러가 올리기 전에 알게 하는 장치이고, 실제 상한은 CDN이 강제한다.
4813
5618
  */
4814
5619
  export declare const UPLOAD_PURPOSE_LIMITS: Record<UploadPurpose, UploadPurposeLimit>;
5620
+ /** 비공개 업로드(판매 파일)의 PUT 필수 헤더 — CDN이 이 값으로 공개 조회를 막는다 */
5621
+ export declare const PRIVATE_UPLOAD_HEADERS: Readonly<Record<string, string>>;
4815
5622
  /** 파일명의 소문자 확장자. 확장자가 없으면 `""` */
4816
5623
  export declare function uploadExtensionOf(filename: string): string;
4817
5624
  export interface UploadRejection {
@@ -4837,6 +5644,7 @@ export declare const uploadRequestSchema: z.ZodObject<{
4837
5644
  purpose: z.ZodDefault<z.ZodEnum<{
4838
5645
  "product-image": "product-image";
4839
5646
  description: "description";
5647
+ "digital-asset": "digital-asset";
4840
5648
  }>>;
4841
5649
  size: z.ZodOptional<z.ZodNumber>;
4842
5650
  }, z.core.$strip>;
@@ -4844,6 +5652,8 @@ export type UploadRequest = z.infer<typeof uploadRequestSchema>;
4844
5652
  export declare const uploadTicketSchema: z.ZodObject<{
4845
5653
  url: z.ZodURL;
4846
5654
  uploadUrl: z.ZodURL;
5655
+ key: z.ZodOptional<z.ZodString>;
5656
+ headers: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>>;
4847
5657
  }, z.core.$strip>;
4848
5658
  export type UploadTicket = z.infer<typeof uploadTicketSchema>;
4849
5659
  //#endregion
@@ -5125,6 +5935,8 @@ export declare function createStoreClient(options: StoreClientOptions): {
5125
5935
  create: (body: UploadRequest) => Promise<{
5126
5936
  url: string;
5127
5937
  uploadUrl: string;
5938
+ headers: Record<string, string>;
5939
+ key?: string | undefined;
5128
5940
  }>;
5129
5941
  /**
5130
5942
  * 자리 발급 + 바이트 PUT을 한 번에 — 끝나면 `url`이 공개 주소다.
@@ -5152,6 +5964,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
5152
5964
  stockQuantity: number;
5153
5965
  categoryId: string | null;
5154
5966
  hasOptions: boolean;
5967
+ fulfillmentType: string;
5155
5968
  updatedAt: string;
5156
5969
  thumbnailUrl?: string | undefined;
5157
5970
  }[];
@@ -5166,6 +5979,13 @@ export declare function createStoreClient(options: StoreClientOptions): {
5166
5979
  categoryId: string | null;
5167
5980
  hasOptions: boolean;
5168
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;
5169
5989
  optionGroups: {
5170
5990
  groupId: string;
5171
5991
  name: string;
@@ -5190,6 +6010,15 @@ export declare function createStoreClient(options: StoreClientOptions): {
5190
6010
  usable: boolean;
5191
6011
  }[];
5192
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;
5193
6022
  description?: string | undefined;
5194
6023
  descriptionJson?: string | null | undefined;
5195
6024
  originalPrice?: number | null | undefined;
@@ -5212,7 +6041,6 @@ export declare function createStoreClient(options: StoreClientOptions): {
5212
6041
  } | null | undefined;
5213
6042
  shippingAddressId?: string | null | undefined;
5214
6043
  returnAddressId?: string | null | undefined;
5215
- createdAt?: string | undefined;
5216
6044
  }>;
5217
6045
  create: (body: ProductCreateRequest, idempotencyKey?: string) => Promise<{
5218
6046
  productId: string;
@@ -5224,6 +6052,13 @@ export declare function createStoreClient(options: StoreClientOptions): {
5224
6052
  categoryId: string | null;
5225
6053
  hasOptions: boolean;
5226
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;
5227
6062
  optionGroups: {
5228
6063
  groupId: string;
5229
6064
  name: string;
@@ -5248,6 +6083,15 @@ export declare function createStoreClient(options: StoreClientOptions): {
5248
6083
  usable: boolean;
5249
6084
  }[];
5250
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;
5251
6095
  description?: string | undefined;
5252
6096
  descriptionJson?: string | null | undefined;
5253
6097
  originalPrice?: number | null | undefined;
@@ -5270,7 +6114,6 @@ export declare function createStoreClient(options: StoreClientOptions): {
5270
6114
  } | null | undefined;
5271
6115
  shippingAddressId?: string | null | undefined;
5272
6116
  returnAddressId?: string | null | undefined;
5273
- createdAt?: string | undefined;
5274
6117
  }>;
5275
6118
  update: (productId: string, body: ProductCreateRequest) => Promise<{
5276
6119
  productId: string;
@@ -5282,6 +6125,13 @@ export declare function createStoreClient(options: StoreClientOptions): {
5282
6125
  categoryId: string | null;
5283
6126
  hasOptions: boolean;
5284
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;
5285
6135
  optionGroups: {
5286
6136
  groupId: string;
5287
6137
  name: string;
@@ -5306,6 +6156,15 @@ export declare function createStoreClient(options: StoreClientOptions): {
5306
6156
  usable: boolean;
5307
6157
  }[];
5308
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;
5309
6168
  description?: string | undefined;
5310
6169
  descriptionJson?: string | null | undefined;
5311
6170
  originalPrice?: number | null | undefined;
@@ -5328,7 +6187,6 @@ export declare function createStoreClient(options: StoreClientOptions): {
5328
6187
  } | null | undefined;
5329
6188
  shippingAddressId?: string | null | undefined;
5330
6189
  returnAddressId?: string | null | undefined;
5331
- createdAt?: string | undefined;
5332
6190
  }>;
5333
6191
  patch: (productId: string, body: ProductPatchRequest) => Promise<void>;
5334
6192
  remove: (productId: string) => Promise<void>;
@@ -5419,6 +6277,110 @@ export declare function createStoreClient(options: StoreClientOptions): {
5419
6277
  endAt: string | null;
5420
6278
  }>;
5421
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
+ }>;
5422
6384
  };
5423
6385
  categories: {
5424
6386
  list: (params?: {
@@ -5601,6 +6563,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
5601
6563
  phone: string;
5602
6564
  email?: string | undefined;
5603
6565
  };
6566
+ requiresShipping: boolean;
5604
6567
  shippingAddress: {
5605
6568
  receiverName: string;
5606
6569
  phone: string;
@@ -5617,6 +6580,15 @@ export declare function createStoreClient(options: StoreClientOptions): {
5617
6580
  productAmount: number;
5618
6581
  deliveryFee: number;
5619
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
+ }[];
5620
6592
  totalAmount: number;
5621
6593
  paidAt: string | null;
5622
6594
  cashReceipt: {
@@ -5639,6 +6611,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
5639
6611
  updatedAt: string;
5640
6612
  } | null;
5641
6613
  };
6614
+ withdrawalAgreedAt: string | null;
5642
6615
  testPayment: boolean;
5643
6616
  items: {
5644
6617
  orderItemId: string;
@@ -5650,21 +6623,52 @@ export declare function createStoreClient(options: StoreClientOptions): {
5650
6623
  optionId: string | null;
5651
6624
  optionName: string | null;
5652
6625
  sellerCode: string | null;
6626
+ fulfillmentType: string;
5653
6627
  quantity: number;
5654
6628
  canceledQuantity: number;
5655
6629
  activeQuantity: number;
5656
6630
  unitPrice: number;
5657
6631
  discountAmount: number;
5658
6632
  totalPrice: number;
6633
+ couponDiscountAmount: number;
5659
6634
  hold: {
5660
6635
  reason: string;
5661
6636
  expectedDispatchDate: string;
5662
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;
5663
6666
  autoDecisionDate: string | null;
5664
6667
  sellerMemo: string | null;
5665
6668
  orderedAt: string;
5666
6669
  lastChangedAt: string;
5667
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;
5668
6672
  testPayment: boolean;
5669
6673
  }[];
5670
6674
  }>;
@@ -5709,21 +6713,52 @@ export declare function createStoreClient(options: StoreClientOptions): {
5709
6713
  optionId: string | null;
5710
6714
  optionName: string | null;
5711
6715
  sellerCode: string | null;
6716
+ fulfillmentType: string;
5712
6717
  quantity: number;
5713
6718
  canceledQuantity: number;
5714
6719
  activeQuantity: number;
5715
6720
  unitPrice: number;
5716
6721
  discountAmount: number;
5717
6722
  totalPrice: number;
6723
+ couponDiscountAmount: number;
5718
6724
  hold: {
5719
6725
  reason: string;
5720
6726
  expectedDispatchDate: string;
5721
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;
5722
6756
  autoDecisionDate: string | null;
5723
6757
  sellerMemo: string | null;
5724
6758
  orderedAt: string;
5725
6759
  lastChangedAt: string;
5726
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;
5727
6762
  testPayment: boolean;
5728
6763
  }[];
5729
6764
  }>;
@@ -5747,6 +6782,8 @@ export declare function createStoreClient(options: StoreClientOptions): {
5747
6782
  canceledQuantity: number;
5748
6783
  deliveryFeeRefundAmount: number;
5749
6784
  deliveryFeeChargeAmount: number;
6785
+ couponChargeAmount: number;
6786
+ couponChargeRefundAmount: number;
5750
6787
  refundedAt: string;
5751
6788
  }>;
5752
6789
  updateMemo: (orderItemId: string, memo: string) => Promise<void>;
@@ -5779,12 +6816,92 @@ export declare function createStoreClient(options: StoreClientOptions): {
5779
6816
  orderItemId?: string | undefined;
5780
6817
  }[];
5781
6818
  }>;
5782
- updateTracking: (orderItemId: string, carrierCode: string, trackingNumber: string) => Promise<void>;
6819
+ updateTracking: (orderItemId: string, carrierCode: string, trackingNumber: string) => Promise<void>;
6820
+ /**
6821
+ * 배송완료 처리 — `DISPATCHED`·`DELIVERING`만 넘어간다. 응답의 `autoDecisionDate`가 자동 구매확정 예정일이다
6822
+ * (스토어 설정 `autoConfirmDays`가 0이면 null).
6823
+ */
6824
+ markDelivered: (orderItemId: string, idempotencyKey?: string) => Promise<{
6825
+ orderItemId: string;
6826
+ orderId: string;
6827
+ status: "PAID" | "CANCELED" | "PAYMENT_WAITING" | "CONFIRMED" | "DISPATCHED" | "DELIVERING" | "DELIVERED" | "PURCHASE_DECIDED";
6828
+ claimStatus: "CANCEL_REQUESTED" | "RETURN_REQUESTED" | "EXCHANGE_REQUESTED" | null;
6829
+ productId: string;
6830
+ productName: string;
6831
+ optionId: string | null;
6832
+ optionName: string | null;
6833
+ sellerCode: string | null;
6834
+ fulfillmentType: string;
6835
+ quantity: number;
6836
+ canceledQuantity: number;
6837
+ activeQuantity: number;
6838
+ unitPrice: number;
6839
+ discountAmount: number;
6840
+ totalPrice: number;
6841
+ couponDiscountAmount: number;
6842
+ hold: {
6843
+ reason: string;
6844
+ expectedDispatchDate: string;
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;
6874
+ autoDecisionDate: string | null;
6875
+ sellerMemo: string | null;
6876
+ orderedAt: string;
6877
+ lastChangedAt: string;
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;
6880
+ testPayment: boolean;
6881
+ }>;
6882
+ /** 배송완료 일괄 처리 — 항목별 부분 성공이다 */
6883
+ markDeliveredBulk: (orderItemIds: string[], idempotencyKey?: string) => Promise<{
6884
+ succeeded: string[];
6885
+ failed: {
6886
+ code: string;
6887
+ message: string;
6888
+ id?: string | undefined;
6889
+ productId?: string | undefined;
6890
+ orderItemId?: string | undefined;
6891
+ }[];
6892
+ }>;
6893
+ /**
6894
+ * 제공 안내 메일 재발송 (이슈 #48) — 제공된 주문상품의 안내 메일을 다시 보낸다. 주문상품당 하루 3회(429).
6895
+ * 코드·파일 주소는 메일에 없다
6896
+ */
6897
+ resendFulfillmentMail: (orderItemId: string) => Promise<{
6898
+ mailStatus: string;
6899
+ }>;
5783
6900
  /**
5784
- * 배송완료 처리 — `DISPATCHED`·`DELIVERING`만 넘어간다. 응답의 `autoDecisionDate`가 자동 구매확정 예정일이다
5785
- * (스토어 설정 `autoConfirmDays`가 0이면 null).
6901
+ * 제공 처리 (이슈 #48) — 수동 제공 비실물 주문상품(이용권·방문 수령)을 `PAID`·`CONFIRMED`에서 제공 완료(`DELIVERED`)로
6902
+ * 바꾼다. `note`는 구매자 주문 상세에 이용 안내로 실린다. 배송 상품은 409 `SHIPPING_REQUIRED`
5786
6903
  */
5787
- markDelivered: (orderItemId: string, idempotencyKey?: string) => Promise<{
6904
+ fulfill: (orderItemId: string, body?: FulfillRequest, idempotencyKey?: string) => Promise<{
5788
6905
  orderItemId: string;
5789
6906
  orderId: string;
5790
6907
  status: "PAID" | "CANCELED" | "PAYMENT_WAITING" | "CONFIRMED" | "DISPATCHED" | "DELIVERING" | "DELIVERED" | "PURCHASE_DECIDED";
@@ -5794,25 +6911,56 @@ export declare function createStoreClient(options: StoreClientOptions): {
5794
6911
  optionId: string | null;
5795
6912
  optionName: string | null;
5796
6913
  sellerCode: string | null;
6914
+ fulfillmentType: string;
5797
6915
  quantity: number;
5798
6916
  canceledQuantity: number;
5799
6917
  activeQuantity: number;
5800
6918
  unitPrice: number;
5801
6919
  discountAmount: number;
5802
6920
  totalPrice: number;
6921
+ couponDiscountAmount: number;
5803
6922
  hold: {
5804
6923
  reason: string;
5805
6924
  expectedDispatchDate: string;
5806
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;
5807
6954
  autoDecisionDate: string | null;
5808
6955
  sellerMemo: string | null;
5809
6956
  orderedAt: string;
5810
6957
  lastChangedAt: string;
5811
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;
5812
6960
  testPayment: boolean;
5813
6961
  }>;
5814
- /** 배송완료 일괄 처리 — 항목별 부분 성공이다 */
5815
- markDeliveredBulk: (orderItemIds: string[], idempotencyKey?: string) => Promise<{
6962
+ /** 제공 처리 일괄 — 항목별 부분 성공이다 */
6963
+ fulfillBulk: (orderItemIds: string[], body?: FulfillRequest, idempotencyKey?: string) => Promise<{
5816
6964
  succeeded: string[];
5817
6965
  failed: {
5818
6966
  code: string;
@@ -5882,6 +7030,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
5882
7030
  carrierCode: string | null;
5883
7031
  trackingNumber: string | null;
5884
7032
  } | null;
7033
+ fulfillmentType: string;
5885
7034
  requestedAt: string;
5886
7035
  completedAt: string | null;
5887
7036
  holdExpiresAt: string | null;
@@ -5919,6 +7068,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
5919
7068
  carrierCode: string | null;
5920
7069
  trackingNumber: string | null;
5921
7070
  } | null;
7071
+ fulfillmentType: string;
5922
7072
  requestedAt: string;
5923
7073
  completedAt: string | null;
5924
7074
  holdExpiresAt: string | null;
@@ -5944,6 +7094,8 @@ export declare function createStoreClient(options: StoreClientOptions): {
5944
7094
  quantity: number;
5945
7095
  deliveryFeeRefundAmount: number;
5946
7096
  deliveryFeeChargeAmount: number;
7097
+ couponChargeAmount: number;
7098
+ couponChargeRefundAmount: number;
5947
7099
  refundedAt: string;
5948
7100
  }>;
5949
7101
  reject: (claimId: string, body: RejectClaimRequest) => Promise<void>;
@@ -5982,6 +7134,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
5982
7134
  carrierCode: string | null;
5983
7135
  trackingNumber: string | null;
5984
7136
  } | null;
7137
+ fulfillmentType: string;
5985
7138
  requestedAt: string;
5986
7139
  completedAt: string | null;
5987
7140
  holdExpiresAt: string | null;
@@ -6011,7 +7164,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
6011
7164
  productId: string;
6012
7165
  productName: string;
6013
7166
  orderItemId: string | null;
6014
- category: "ETC" | "DELIVERY" | "RETURN" | "EXCHANGE" | "PRODUCT";
7167
+ category: "ETC" | "PRODUCT" | "DELIVERY" | "RETURN" | "EXCHANGE";
6015
7168
  content: string;
6016
7169
  secret: boolean;
6017
7170
  writerMaskedName: string;
@@ -6029,7 +7182,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
6029
7182
  productId: string;
6030
7183
  productName: string;
6031
7184
  orderItemId: string | null;
6032
- category: "ETC" | "DELIVERY" | "RETURN" | "EXCHANGE" | "PRODUCT";
7185
+ category: "ETC" | "PRODUCT" | "DELIVERY" | "RETURN" | "EXCHANGE";
6033
7186
  content: string;
6034
7187
  secret: boolean;
6035
7188
  writerMaskedName: string;
@@ -6260,8 +7413,395 @@ export declare function createStoreClient(options: StoreClientOptions): {
6260
7413
  occurredAt: string;
6261
7414
  }[];
6262
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
+ }[]>;
6263
7436
  withdraw: (customerId: string, body: WithdrawCustomerRequest) => Promise<void>;
6264
7437
  };
7438
+ /** 쿠폰 (이슈 #47) — 조회 `promotion:r`, 쓰기 `promotion:rw` */
7439
+ coupons: {
7440
+ list: (params?: PageParams & Omit<z.input<typeof couponListQuerySchema>, "page" | "size">) => Promise<{
7441
+ page: number;
7442
+ size: number;
7443
+ totalElements: number;
7444
+ totalPages: number;
7445
+ contents: {
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;
7482
+ createdAt: string;
7483
+ updatedAt: string;
7484
+ }[];
7485
+ }>;
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
+ };
6265
7805
  customerInquiries: {
6266
7806
  list: (params?: PageParams & {
6267
7807
  answered?: boolean;
@@ -6477,7 +8017,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
6477
8017
  sources: (params: AnalyticsSourcesParams) => Promise<{
6478
8018
  groupBy: "CHANNEL" | "SOURCE" | "CAMPAIGN" | "DEVICE";
6479
8019
  rows: {
6480
- channel: "PAID" | "DIRECT" | "CAMPAIGN" | "UNKNOWN" | "ORGANIC_SEARCH" | "SOCIAL" | "EMAIL" | "REFERRAL" | null;
8020
+ channel: "UNKNOWN" | "PAID" | "DIRECT" | "CAMPAIGN" | "ORGANIC_SEARCH" | "SOCIAL" | "EMAIL" | "REFERRAL" | null;
6481
8021
  source: string | null;
6482
8022
  medium: string | null;
6483
8023
  campaign: string | null;
@@ -6612,7 +8152,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
6612
8152
  orderId: string | null;
6613
8153
  orderName: string;
6614
8154
  customerName: string;
6615
- status: "PENDING" | "FAILED" | "APPROVED" | "PARTIALLY_REFUNDED" | "REFUNDED";
8155
+ status: "FAILED" | "PENDING" | "APPROVED" | "PARTIALLY_REFUNDED" | "REFUNDED";
6616
8156
  amount: number;
6617
8157
  refundedAmount: number;
6618
8158
  provider: "tosspayments" | "portone" | null;
@@ -6636,7 +8176,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
6636
8176
  orderId: string | null;
6637
8177
  orderName: string;
6638
8178
  customerName: string;
6639
- status: "PENDING" | "FAILED" | "APPROVED" | "PARTIALLY_REFUNDED" | "REFUNDED";
8179
+ status: "FAILED" | "PENDING" | "APPROVED" | "PARTIALLY_REFUNDED" | "REFUNDED";
6640
8180
  amount: number;
6641
8181
  refundedAmount: number;
6642
8182
  provider: "tosspayments" | "portone" | null;
@@ -6735,7 +8275,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
6735
8275
  masked: string | null;
6736
8276
  }[];
6737
8277
  lastVerification: {
6738
- result: "SUCCESS" | "FAILED";
8278
+ result: "FAILED" | "SUCCESS";
6739
8279
  message: string | null;
6740
8280
  checkedAt: string;
6741
8281
  } | null;
@@ -6760,7 +8300,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
6760
8300
  masked: string | null;
6761
8301
  }[];
6762
8302
  lastVerification: {
6763
- result: "SUCCESS" | "FAILED";
8303
+ result: "FAILED" | "SUCCESS";
6764
8304
  message: string | null;
6765
8305
  checkedAt: string;
6766
8306
  } | null;
@@ -6784,7 +8324,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
6784
8324
  masked: string | null;
6785
8325
  }[];
6786
8326
  lastVerification: {
6787
- result: "SUCCESS" | "FAILED";
8327
+ result: "FAILED" | "SUCCESS";
6788
8328
  message: string | null;
6789
8329
  checkedAt: string;
6790
8330
  } | null;
@@ -6836,7 +8376,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
6836
8376
  masked: string | null;
6837
8377
  }[];
6838
8378
  lastVerification: {
6839
- result: "SUCCESS" | "FAILED";
8379
+ result: "FAILED" | "SUCCESS";
6840
8380
  message: string | null;
6841
8381
  checkedAt: string;
6842
8382
  } | null;
@@ -6861,7 +8401,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
6861
8401
  masked: string | null;
6862
8402
  }[];
6863
8403
  lastVerification: {
6864
- result: "SUCCESS" | "FAILED";
8404
+ result: "FAILED" | "SUCCESS";
6865
8405
  message: string | null;
6866
8406
  checkedAt: string;
6867
8407
  } | null;
@@ -6885,7 +8425,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
6885
8425
  masked: string | null;
6886
8426
  }[];
6887
8427
  lastVerification: {
6888
- result: "SUCCESS" | "FAILED";
8428
+ result: "FAILED" | "SUCCESS";
6889
8429
  message: string | null;
6890
8430
  checkedAt: string;
6891
8431
  } | null;
@@ -6942,7 +8482,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
6942
8482
  masked: string | null;
6943
8483
  }[];
6944
8484
  lastVerification: {
6945
- result: "SUCCESS" | "FAILED";
8485
+ result: "FAILED" | "SUCCESS";
6946
8486
  message: string | null;
6947
8487
  checkedAt: string;
6948
8488
  } | null;
@@ -6967,7 +8507,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
6967
8507
  masked: string | null;
6968
8508
  }[];
6969
8509
  lastVerification: {
6970
- result: "SUCCESS" | "FAILED";
8510
+ result: "FAILED" | "SUCCESS";
6971
8511
  message: string | null;
6972
8512
  checkedAt: string;
6973
8513
  } | null;
@@ -6991,7 +8531,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
6991
8531
  masked: string | null;
6992
8532
  }[];
6993
8533
  lastVerification: {
6994
- result: "SUCCESS" | "FAILED";
8534
+ result: "FAILED" | "SUCCESS";
6995
8535
  message: string | null;
6996
8536
  checkedAt: string;
6997
8537
  } | null;
@@ -7038,7 +8578,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
7038
8578
  masked: string | null;
7039
8579
  }[];
7040
8580
  lastVerification: {
7041
- result: "SUCCESS" | "FAILED";
8581
+ result: "FAILED" | "SUCCESS";
7042
8582
  message: string | null;
7043
8583
  checkedAt: string;
7044
8584
  } | null;
@@ -7063,7 +8603,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
7063
8603
  masked: string | null;
7064
8604
  }[];
7065
8605
  lastVerification: {
7066
- result: "SUCCESS" | "FAILED";
8606
+ result: "FAILED" | "SUCCESS";
7067
8607
  message: string | null;
7068
8608
  checkedAt: string;
7069
8609
  } | null;
@@ -7087,7 +8627,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
7087
8627
  masked: string | null;
7088
8628
  }[];
7089
8629
  lastVerification: {
7090
- result: "SUCCESS" | "FAILED";
8630
+ result: "FAILED" | "SUCCESS";
7091
8631
  message: string | null;
7092
8632
  checkedAt: string;
7093
8633
  } | null;
@@ -7144,7 +8684,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
7144
8684
  masked: string | null;
7145
8685
  }[];
7146
8686
  lastVerification: {
7147
- result: "SUCCESS" | "FAILED";
8687
+ result: "FAILED" | "SUCCESS";
7148
8688
  message: string | null;
7149
8689
  checkedAt: string;
7150
8690
  } | null;
@@ -7169,7 +8709,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
7169
8709
  masked: string | null;
7170
8710
  }[];
7171
8711
  lastVerification: {
7172
- result: "SUCCESS" | "FAILED";
8712
+ result: "FAILED" | "SUCCESS";
7173
8713
  message: string | null;
7174
8714
  checkedAt: string;
7175
8715
  } | null;
@@ -7193,7 +8733,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
7193
8733
  masked: string | null;
7194
8734
  }[];
7195
8735
  lastVerification: {
7196
- result: "SUCCESS" | "FAILED";
8736
+ result: "FAILED" | "SUCCESS";
7197
8737
  message: string | null;
7198
8738
  checkedAt: string;
7199
8739
  } | null;
@@ -7240,7 +8780,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
7240
8780
  masked: string | null;
7241
8781
  }[];
7242
8782
  lastVerification: {
7243
- result: "SUCCESS" | "FAILED";
8783
+ result: "FAILED" | "SUCCESS";
7244
8784
  message: string | null;
7245
8785
  checkedAt: string;
7246
8786
  } | null;
@@ -7265,7 +8805,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
7265
8805
  masked: string | null;
7266
8806
  }[];
7267
8807
  lastVerification: {
7268
- result: "SUCCESS" | "FAILED";
8808
+ result: "FAILED" | "SUCCESS";
7269
8809
  message: string | null;
7270
8810
  checkedAt: string;
7271
8811
  } | null;
@@ -7289,7 +8829,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
7289
8829
  masked: string | null;
7290
8830
  }[];
7291
8831
  lastVerification: {
7292
- result: "SUCCESS" | "FAILED";
8832
+ result: "FAILED" | "SUCCESS";
7293
8833
  message: string | null;
7294
8834
  checkedAt: string;
7295
8835
  } | null;
@@ -7345,7 +8885,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
7345
8885
  masked: string | null;
7346
8886
  }[];
7347
8887
  lastVerification: {
7348
- result: "SUCCESS" | "FAILED";
8888
+ result: "FAILED" | "SUCCESS";
7349
8889
  message: string | null;
7350
8890
  checkedAt: string;
7351
8891
  } | null;
@@ -7370,7 +8910,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
7370
8910
  masked: string | null;
7371
8911
  }[];
7372
8912
  lastVerification: {
7373
- result: "SUCCESS" | "FAILED";
8913
+ result: "FAILED" | "SUCCESS";
7374
8914
  message: string | null;
7375
8915
  checkedAt: string;
7376
8916
  } | null;
@@ -7394,7 +8934,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
7394
8934
  masked: string | null;
7395
8935
  }[];
7396
8936
  lastVerification: {
7397
- result: "SUCCESS" | "FAILED";
8937
+ result: "FAILED" | "SUCCESS";
7398
8938
  message: string | null;
7399
8939
  checkedAt: string;
7400
8940
  } | null;
@@ -7422,7 +8962,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
7422
8962
  verify: (provider: PgProvider, body?: VerifyPaymentProviderRequest) => Promise<{
7423
8963
  provider: "tosspayments" | "portone";
7424
8964
  environment: "TEST" | "LIVE";
7425
- result: "SUCCESS" | "FAILED";
8965
+ result: "FAILED" | "SUCCESS";
7426
8966
  message: string | null;
7427
8967
  checkedAt: string;
7428
8968
  }>;
@@ -7431,7 +8971,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
7431
8971
  list: () => Promise<{
7432
8972
  webhookId: string;
7433
8973
  url: string;
7434
- eventTypes: ("ORDER.PAID" | "ORDER.CONFIRMED" | "ORDER.DISPATCHED" | "ORDER.DELIVERED" | "ORDER.PURCHASE_DECIDED" | "ORDER.ADDRESS_CHANGE_REQUESTED" | "ORDER.CANCELED" | "CLAIM.CANCEL_REQUESTED" | "CLAIM.RETURN_REQUESTED" | "CLAIM.EXCHANGE_REQUESTED" | "CLAIM.COMPLETED" | "INQUIRY.CREATED" | "REVIEW.CREATED" | "PRODUCT.OUT_OF_STOCK")[];
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")[];
7435
8975
  status: "ACTIVE" | "SUSPENDED";
7436
8976
  secretPrefix: string;
7437
8977
  suspendedAt: string | null;
@@ -7441,7 +8981,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
7441
8981
  create: (body: WebhookRequest) => Promise<{
7442
8982
  webhookId: string;
7443
8983
  url: string;
7444
- eventTypes: ("ORDER.PAID" | "ORDER.CONFIRMED" | "ORDER.DISPATCHED" | "ORDER.DELIVERED" | "ORDER.PURCHASE_DECIDED" | "ORDER.ADDRESS_CHANGE_REQUESTED" | "ORDER.CANCELED" | "CLAIM.CANCEL_REQUESTED" | "CLAIM.RETURN_REQUESTED" | "CLAIM.EXCHANGE_REQUESTED" | "CLAIM.COMPLETED" | "INQUIRY.CREATED" | "REVIEW.CREATED" | "PRODUCT.OUT_OF_STOCK")[];
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")[];
7445
8985
  status: "ACTIVE" | "SUSPENDED";
7446
8986
  secretPrefix: string;
7447
8987
  suspendedAt: string | null;
@@ -7451,7 +8991,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
7451
8991
  get: (webhookId: string) => Promise<{
7452
8992
  webhookId: string;
7453
8993
  url: string;
7454
- eventTypes: ("ORDER.PAID" | "ORDER.CONFIRMED" | "ORDER.DISPATCHED" | "ORDER.DELIVERED" | "ORDER.PURCHASE_DECIDED" | "ORDER.ADDRESS_CHANGE_REQUESTED" | "ORDER.CANCELED" | "CLAIM.CANCEL_REQUESTED" | "CLAIM.RETURN_REQUESTED" | "CLAIM.EXCHANGE_REQUESTED" | "CLAIM.COMPLETED" | "INQUIRY.CREATED" | "REVIEW.CREATED" | "PRODUCT.OUT_OF_STOCK")[];
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")[];
7455
8995
  status: "ACTIVE" | "SUSPENDED";
7456
8996
  secretPrefix: string;
7457
8997
  suspendedAt: string | null;
@@ -7461,7 +9001,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
7461
9001
  update: (webhookId: string, body: WebhookRequest) => Promise<{
7462
9002
  webhookId: string;
7463
9003
  url: string;
7464
- eventTypes: ("ORDER.PAID" | "ORDER.CONFIRMED" | "ORDER.DISPATCHED" | "ORDER.DELIVERED" | "ORDER.PURCHASE_DECIDED" | "ORDER.ADDRESS_CHANGE_REQUESTED" | "ORDER.CANCELED" | "CLAIM.CANCEL_REQUESTED" | "CLAIM.RETURN_REQUESTED" | "CLAIM.EXCHANGE_REQUESTED" | "CLAIM.COMPLETED" | "INQUIRY.CREATED" | "REVIEW.CREATED" | "PRODUCT.OUT_OF_STOCK")[];
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")[];
7465
9005
  status: "ACTIVE" | "SUSPENDED";
7466
9006
  secretPrefix: string;
7467
9007
  suspendedAt: string | null;
@@ -7476,7 +9016,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
7476
9016
  resume: (webhookId: string) => Promise<{
7477
9017
  webhookId: string;
7478
9018
  url: string;
7479
- eventTypes: ("ORDER.PAID" | "ORDER.CONFIRMED" | "ORDER.DISPATCHED" | "ORDER.DELIVERED" | "ORDER.PURCHASE_DECIDED" | "ORDER.ADDRESS_CHANGE_REQUESTED" | "ORDER.CANCELED" | "CLAIM.CANCEL_REQUESTED" | "CLAIM.RETURN_REQUESTED" | "CLAIM.EXCHANGE_REQUESTED" | "CLAIM.COMPLETED" | "INQUIRY.CREATED" | "REVIEW.CREATED" | "PRODUCT.OUT_OF_STOCK")[];
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")[];
7480
9020
  status: "ACTIVE" | "SUSPENDED";
7481
9021
  secretPrefix: string;
7482
9022
  suspendedAt: string | null;
@@ -7486,9 +9026,9 @@ export declare function createStoreClient(options: StoreClientOptions): {
7486
9026
  listDeliveries: (webhookId: string, params?: WebhookDeliveryListParams) => Promise<{
7487
9027
  deliveryId: string;
7488
9028
  eventId: string;
7489
- eventType: "ORDER.PAID" | "ORDER.CONFIRMED" | "ORDER.DISPATCHED" | "ORDER.DELIVERED" | "ORDER.PURCHASE_DECIDED" | "ORDER.ADDRESS_CHANGE_REQUESTED" | "ORDER.CANCELED" | "CLAIM.CANCEL_REQUESTED" | "CLAIM.RETURN_REQUESTED" | "CLAIM.EXCHANGE_REQUESTED" | "CLAIM.COMPLETED" | "INQUIRY.CREATED" | "REVIEW.CREATED" | "PRODUCT.OUT_OF_STOCK";
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";
7490
9030
  url: string;
7491
- status: "PENDING" | "PENDING_RETRY" | "SUCCESS" | "FAILED";
9031
+ status: "FAILED" | "PENDING" | "PENDING_RETRY" | "SUCCESS";
7492
9032
  responseStatusCode: number | null;
7493
9033
  responseTimeMs: number | null;
7494
9034
  responseBodyExcerpt: string | null;
@@ -7513,9 +9053,9 @@ export declare function createStoreClient(options: StoreClientOptions): {
7513
9053
  getDelivery: (webhookId: string, deliveryId: string) => Promise<{
7514
9054
  deliveryId: string;
7515
9055
  eventId: string;
7516
- eventType: "ORDER.PAID" | "ORDER.CONFIRMED" | "ORDER.DISPATCHED" | "ORDER.DELIVERED" | "ORDER.PURCHASE_DECIDED" | "ORDER.ADDRESS_CHANGE_REQUESTED" | "ORDER.CANCELED" | "CLAIM.CANCEL_REQUESTED" | "CLAIM.RETURN_REQUESTED" | "CLAIM.EXCHANGE_REQUESTED" | "CLAIM.COMPLETED" | "INQUIRY.CREATED" | "REVIEW.CREATED" | "PRODUCT.OUT_OF_STOCK";
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";
7517
9057
  url: string;
7518
- status: "PENDING" | "PENDING_RETRY" | "SUCCESS" | "FAILED";
9058
+ status: "FAILED" | "PENDING" | "PENDING_RETRY" | "SUCCESS";
7519
9059
  responseStatusCode: number | null;
7520
9060
  responseTimeMs: number | null;
7521
9061
  responseBodyExcerpt: string | null;
@@ -7548,9 +9088,9 @@ export declare function createStoreClient(options: StoreClientOptions): {
7548
9088
  redeliver: (webhookId: string, deliveryId: string) => Promise<{
7549
9089
  deliveryId: string;
7550
9090
  eventId: string;
7551
- eventType: "ORDER.PAID" | "ORDER.CONFIRMED" | "ORDER.DISPATCHED" | "ORDER.DELIVERED" | "ORDER.PURCHASE_DECIDED" | "ORDER.ADDRESS_CHANGE_REQUESTED" | "ORDER.CANCELED" | "CLAIM.CANCEL_REQUESTED" | "CLAIM.RETURN_REQUESTED" | "CLAIM.EXCHANGE_REQUESTED" | "CLAIM.COMPLETED" | "INQUIRY.CREATED" | "REVIEW.CREATED" | "PRODUCT.OUT_OF_STOCK";
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";
7552
9092
  url: string;
7553
- status: "PENDING" | "PENDING_RETRY" | "SUCCESS" | "FAILED";
9093
+ status: "FAILED" | "PENDING" | "PENDING_RETRY" | "SUCCESS";
7554
9094
  responseStatusCode: number | null;
7555
9095
  responseTimeMs: number | null;
7556
9096
  responseBodyExcerpt: string | null;
@@ -7646,7 +9186,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
7646
9186
  method: string | null;
7647
9187
  path: string | null;
7648
9188
  statusCode: number | null;
7649
- outcome: "FAILED" | "SUCCEEDED" | "PENDING_APPROVAL" | "DENIED" | "DRY_RUN" | null;
9189
+ outcome: "SUCCEEDED" | "FAILED" | "PENDING_APPROVAL" | "DENIED" | "DRY_RUN" | null;
7650
9190
  errorCode: string | null;
7651
9191
  traceId: string | null;
7652
9192
  idempotencyKey: string | null;
@@ -7664,7 +9204,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
7664
9204
  list: (params?: ApprovalListOptions) => Promise<{
7665
9205
  items: {
7666
9206
  approvalId: string;
7667
- status: "PENDING" | "FAILED" | "SUCCEEDED" | "EXECUTING" | "UNKNOWN" | "REJECTED" | "EXPIRED";
9207
+ status: "SUCCEEDED" | "FAILED" | "PENDING" | "EXECUTING" | "UNKNOWN" | "REJECTED" | "EXPIRED";
7668
9208
  operationId: string;
7669
9209
  method: string;
7670
9210
  path: string;
@@ -7714,7 +9254,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
7714
9254
  }>;
7715
9255
  get: (approvalId: string) => Promise<{
7716
9256
  approvalId: string;
7717
- status: "PENDING" | "FAILED" | "SUCCEEDED" | "EXECUTING" | "UNKNOWN" | "REJECTED" | "EXPIRED";
9257
+ status: "SUCCEEDED" | "FAILED" | "PENDING" | "EXECUTING" | "UNKNOWN" | "REJECTED" | "EXPIRED";
7718
9258
  operationId: string;
7719
9259
  method: string;
7720
9260
  path: string;
@@ -7766,7 +9306,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
7766
9306
  */
7767
9307
  approve: (approvalId: string, body?: ApprovalDecisionRequest) => Promise<{
7768
9308
  approvalId: string;
7769
- status: "PENDING" | "FAILED" | "SUCCEEDED" | "EXECUTING" | "UNKNOWN" | "REJECTED" | "EXPIRED";
9309
+ status: "SUCCEEDED" | "FAILED" | "PENDING" | "EXECUTING" | "UNKNOWN" | "REJECTED" | "EXPIRED";
7770
9310
  operationId: string;
7771
9311
  method: string;
7772
9312
  path: string;
@@ -7814,7 +9354,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
7814
9354
  }>;
7815
9355
  reject: (approvalId: string, body?: ApprovalDecisionRequest) => Promise<{
7816
9356
  approvalId: string;
7817
- status: "PENDING" | "FAILED" | "SUCCEEDED" | "EXECUTING" | "UNKNOWN" | "REJECTED" | "EXPIRED";
9357
+ status: "SUCCEEDED" | "FAILED" | "PENDING" | "EXECUTING" | "UNKNOWN" | "REJECTED" | "EXPIRED";
7818
9358
  operationId: string;
7819
9359
  method: string;
7820
9360
  path: string;
@@ -7911,7 +9451,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
7911
9451
  sellerAddresses: {
7912
9452
  list: (type?: AddressType) => Promise<{
7913
9453
  addressId: string;
7914
- type: "RETURN" | "SHIPPING";
9454
+ type: "SHIPPING" | "PICKUP" | "RETURN";
7915
9455
  name: string;
7916
9456
  isDefault: boolean;
7917
9457
  contactName: string;
@@ -7939,6 +9479,8 @@ export declare function createStoreClient(options: StoreClientOptions): {
7939
9479
  analyticsAllowedOrigins: string[];
7940
9480
  storefrontOrigins: string[];
7941
9481
  guestCheckoutEnabled: boolean;
9482
+ fulfillmentMailEnabled: boolean;
9483
+ withdrawalNotice: string | null;
7942
9484
  autoDeliverDays: number;
7943
9485
  autoConfirmDays: number;
7944
9486
  refundPolicy: {
@@ -7947,6 +9489,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
7947
9489
  exchangeDeliveryFee: number;
7948
9490
  sellerFaultFreeShipping: boolean;
7949
9491
  conditionalFreeShortfallCharge: boolean;
9492
+ couponShortfallCharge: boolean;
7950
9493
  };
7951
9494
  shippingPolicy: {
7952
9495
  baseDeliveryFee: number;
@@ -7979,6 +9522,8 @@ export declare function createStoreClient(options: StoreClientOptions): {
7979
9522
  analyticsAllowedOrigins: string[];
7980
9523
  storefrontOrigins: string[];
7981
9524
  guestCheckoutEnabled: boolean;
9525
+ fulfillmentMailEnabled: boolean;
9526
+ withdrawalNotice: string | null;
7982
9527
  autoDeliverDays: number;
7983
9528
  autoConfirmDays: number;
7984
9529
  refundPolicy: {
@@ -7987,6 +9532,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
7987
9532
  exchangeDeliveryFee: number;
7988
9533
  sellerFaultFreeShipping: boolean;
7989
9534
  conditionalFreeShortfallCharge: boolean;
9535
+ couponShortfallCharge: boolean;
7990
9536
  };
7991
9537
  shippingPolicy: {
7992
9538
  baseDeliveryFee: number;
@@ -8132,6 +9678,333 @@ export declare function exchangeStoreTokenViaOAuth(options: {
8132
9678
  role?: string;
8133
9679
  }>;
8134
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
8135
10008
  //#region src/schemas/refund-policy.d.ts
8136
10009
  /** 유효 환불 정책 — 스토어 기본 + 상품별 덮어쓰기를 합친 결과 */
8137
10010
  export declare const refundPolicySchema: z.ZodObject<{
@@ -8140,6 +10013,7 @@ export declare const refundPolicySchema: z.ZodObject<{
8140
10013
  exchangeDeliveryFee: z.ZodNumber;
8141
10014
  sellerFaultFreeShipping: z.ZodBoolean;
8142
10015
  conditionalFreeShortfallCharge: z.ZodBoolean;
10016
+ couponShortfallCharge: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
8143
10017
  }, z.core.$strip>;
8144
10018
  export type RefundPolicy = z.infer<typeof refundPolicySchema>;
8145
10019
  /**
@@ -8161,8 +10035,20 @@ export declare const refundPolicyPatchSchema: z.ZodObject<{
8161
10035
  exchangeDeliveryFee: z.ZodOptional<z.ZodNumber>;
8162
10036
  sellerFaultFreeShipping: z.ZodOptional<z.ZodBoolean>;
8163
10037
  conditionalFreeShortfallCharge: z.ZodOptional<z.ZodBoolean>;
10038
+ couponShortfallCharge: z.ZodOptional<z.ZodBoolean>;
8164
10039
  }, z.core.$strict>;
8165
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>;
8166
10052
  /** 정책 해석에 쓰는 상품 값 — 상품별 덮어쓰기와 레거시 배송비 필드 */
8167
10053
  export interface RefundPolicyProductInput {
8168
10054
  /** 상품별 덮어쓰기. 없으면 스토어 기본을 그대로 쓴다 */
@@ -8194,7 +10080,8 @@ export declare function productRefundPolicyOverride(product?: RefundPolicyProduc
8194
10080
  *
8195
10081
  * 원 단위 반올림 규칙: `floor(주문상품 금액 × 누적 수량 ÷ 전체 수량)`을 두 번 구해 그 차를 쓴다.
8196
10082
  * 부분 취소를 몇 번 나눠도 합이 주문상품 금액과 정확히 같아서 1원이 남거나 넘치지 않는다.
8197
- * 할인은 이미 단가에 들어 있어(주문 단위 쿠폰이 없다) 별도 안분이 없다.
10083
+ * 즉시할인은 이미 단가에 들어 있다. 쿠폰 할인은 단가에 들어가지 않으므로 환불은 실결제 금액을 나누는
10084
+ * `proratedPaidRefundBase`(promotion.ts)를 쓴다(이슈 #47).
8198
10085
  *
8199
10086
  * @param totalPrice 주문상품 금액 (할인 반영 단가 × 전체 수량)
8200
10087
  * @param quantity 주문상품 전체 수량
@@ -8231,6 +10118,7 @@ export declare const STORE_SCOPE_RESOURCES: {
8231
10118
  readonly member: readonly ["r", "rw"];
8232
10119
  readonly customer: readonly ["r", "rw"];
8233
10120
  readonly audit: readonly ["r"];
10121
+ readonly promotion: readonly ["r", "rw"];
8234
10122
  };
8235
10123
  export type StoreScopeResource = keyof typeof STORE_SCOPE_RESOURCES;
8236
10124
  export declare const storeScopeResourceSchema: z.ZodEnum<{
@@ -8247,6 +10135,7 @@ export declare const storeScopeResourceSchema: z.ZodEnum<{
8247
10135
  member: "member";
8248
10136
  customer: "customer";
8249
10137
  audit: "audit";
10138
+ promotion: "promotion";
8250
10139
  }>;
8251
10140
  /** 카탈로그상 존재하는 스코프 문자열인가 (예: `settlement:rw`는 false) */
8252
10141
  export declare function isStoreScope(scope: string): boolean;
@@ -8256,9 +10145,9 @@ export declare function isStoreScope(scope: string): boolean;
8256
10145
  * 발급 시 지정한 스코프만 갖는다(발급자 보유 스코프 이내).
8257
10146
  */
8258
10147
  export declare const STORE_ROLE_SCOPES: {
8259
- readonly OWNER: readonly ["product:rw", "category:rw", "order:rw", "claim:rw", "inquiry:rw", "review:rw", "settlement:r", "analytics:r", "webhook:rw", "store:rw", "member:rw", "customer:rw", "audit:r"];
8260
- readonly ADMIN: readonly ["product:rw", "category:rw", "order:rw", "claim:rw", "inquiry:rw", "review:rw", "analytics:r", "webhook:rw", "store:rw", "member:rw", "customer:rw", "audit:r"];
8261
- readonly STAFF: readonly ["product:rw", "category:rw", "order:rw", "claim:rw", "inquiry:rw", "review:rw", "customer:r"];
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"];
8262
10151
  };
8263
10152
  //#endregion
8264
10153
  //#region src/schemas/shipping-policy.d.ts
@@ -8369,6 +10258,11 @@ export interface DeliveryBundleProduct {
8369
10258
  conditionalFreeAmount: number | null;
8370
10259
  /** 출고지 주소 id(`seller_addresses`). null이면 스토어 기본 출고지를 쓰는 상품끼리 한 묶음이다 */
8371
10260
  shippingAddressId?: string | null;
10261
+ /**
10262
+ * 상품 유형 (이슈 #48). 생략·null이면 배송 상품이다. 배송이 필요 없는 유형은 묶음을 만들지 않는다.
10263
+ * 줄(`DeliveryFeeLine.fulfillmentType`)에 값이 있으면 그 값이 이긴다.
10264
+ */
10265
+ fulfillmentType?: FulfillmentType | null;
8372
10266
  }
8373
10267
  /**
8374
10268
  * 배송 묶음 키 — **같은 출고지 + 같은 배송 정책이면 같은 키다.**
@@ -8386,6 +10280,11 @@ export interface DeliveryFeeLine {
8386
10280
  productId: string;
8387
10281
  /** 상품 금액 (할인 반영 단가 × 수량) */
8388
10282
  amount: number;
10283
+ /**
10284
+ * 이 줄의 상품 유형 — 주문서 스냅샷 값이다(이슈 #48). 주면 상품의 현재 유형보다 우선한다. 주문서를 만든 뒤 셀러가
10285
+ * 유형을 바꿔도 결제 시작의 견적과 주문상품 스냅샷이 같은 유형을 보게 한다. 생략하면 상품 값을 쓴다.
10286
+ */
10287
+ fulfillmentType?: FulfillmentType | null;
8389
10288
  }
8390
10289
  /**
8391
10290
  * 기본 배송비를 면제한 근거 — 면제하지 않았으면 null이다.
@@ -8430,6 +10329,13 @@ export interface DeliveryQuote {
8430
10329
  remoteArea: RemoteArea;
8431
10330
  /** 스토어 전체 무료 기준(`freeThreshold`) 충족으로 기본 배송비를 면제했는가 */
8432
10331
  freeByThreshold: boolean;
10332
+ /**
10333
+ * 배송이 필요한 줄의 상품 금액 합 — 스토어 전체 무료 기준의 판정 금액이다(이슈 #48). 비실물 줄은 빠진다.
10334
+ * 주문 상품 금액 합(`productAmount`)과 다를 수 있다.
10335
+ */
10336
+ shippableAmount: number;
10337
+ /** 배송이 필요한 줄이 하나라도 있는가 — 배송 묶음이 하나라도 있는가다. false면 배송지를 받지 않는다 */
10338
+ requiresShipping: boolean;
8433
10339
  }
8434
10340
  export interface DeliveryQuoteInput {
8435
10341
  lines: DeliveryFeeLine[];
@@ -8513,8 +10419,35 @@ export declare const orderWebhookEventDataSchema: z.ZodObject<{
8513
10419
  PURCHASE_DECIDED: "PURCHASE_DECIDED";
8514
10420
  }>;
8515
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>;
8516
10425
  }, z.core.$strip>;
8517
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>;
8518
10451
  /**
8519
10452
  * `ORDER.CANCELED` — 셀러 직권취소(`POST /v1/order-items/{orderItemId}/cancel`)로 주문상품이 취소됐다.
8520
10453
  * 수량 단위 부분 취소도 이 이벤트다(`quantity` < 주문 수량이면 주문상품 상태가 그대로다).
@@ -8549,6 +10482,8 @@ export declare const orderCanceledWebhookEventDataSchema: z.ZodObject<{
8549
10482
  refundAmount: z.ZodNumber;
8550
10483
  deliveryFeeRefundAmount: z.ZodNumber;
8551
10484
  deliveryFeeChargeAmount: z.ZodNumber;
10485
+ couponChargeAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
10486
+ couponChargeRefundAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
8552
10487
  testPayment: z.ZodBoolean;
8553
10488
  }, z.core.$strip>;
8554
10489
  export type OrderCanceledWebhookEventData = z.infer<typeof orderCanceledWebhookEventDataSchema>;
@@ -8577,6 +10512,8 @@ export declare const claimWebhookEventDataSchema: z.ZodObject<{
8577
10512
  deliveryFeeRefundAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
8578
10513
  deliveryFeeChargeAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
8579
10514
  deductAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
10515
+ couponChargeAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
10516
+ couponChargeRefundAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
8580
10517
  testPayment: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
8581
10518
  }, z.core.$strip>;
8582
10519
  export type ClaimWebhookEventData = z.infer<typeof claimWebhookEventDataSchema>;
@@ -8618,10 +10555,39 @@ export declare const orderWebhookEventSchema: z.ZodObject<{
8618
10555
  PURCHASE_DECIDED: "PURCHASE_DECIDED";
8619
10556
  }>;
8620
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;
8621
10586
  }, z.core.$strip>;
8622
10587
  id: z.ZodString;
8623
10588
  createdAt: z.ZodString;
8624
10589
  storeId: z.ZodString;
10590
+ sequence: z.ZodOptional<z.ZodNumber>;
8625
10591
  }, z.core.$strip>;
8626
10592
  export declare const orderCanceledWebhookEventSchema: z.ZodObject<{
8627
10593
  type: z.ZodLiteral<"ORDER.CANCELED">;
@@ -8654,11 +10620,14 @@ export declare const orderCanceledWebhookEventSchema: z.ZodObject<{
8654
10620
  refundAmount: z.ZodNumber;
8655
10621
  deliveryFeeRefundAmount: z.ZodNumber;
8656
10622
  deliveryFeeChargeAmount: z.ZodNumber;
10623
+ couponChargeAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
10624
+ couponChargeRefundAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
8657
10625
  testPayment: z.ZodBoolean;
8658
10626
  }, z.core.$strip>;
8659
10627
  id: z.ZodString;
8660
10628
  createdAt: z.ZodString;
8661
10629
  storeId: z.ZodString;
10630
+ sequence: z.ZodOptional<z.ZodNumber>;
8662
10631
  }, z.core.$strip>;
8663
10632
  export declare const claimWebhookEventSchema: z.ZodObject<{
8664
10633
  type: z.ZodEnum<{
@@ -8692,11 +10661,14 @@ export declare const claimWebhookEventSchema: z.ZodObject<{
8692
10661
  deliveryFeeRefundAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
8693
10662
  deliveryFeeChargeAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
8694
10663
  deductAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
10664
+ couponChargeAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
10665
+ couponChargeRefundAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
8695
10666
  testPayment: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
8696
10667
  }, z.core.$strip>;
8697
10668
  id: z.ZodString;
8698
10669
  createdAt: z.ZodString;
8699
10670
  storeId: z.ZodString;
10671
+ sequence: z.ZodOptional<z.ZodNumber>;
8700
10672
  }, z.core.$strip>;
8701
10673
  export declare const inquiryWebhookEventSchema: z.ZodObject<{
8702
10674
  type: z.ZodLiteral<"INQUIRY.CREATED">;
@@ -8707,6 +10679,7 @@ export declare const inquiryWebhookEventSchema: z.ZodObject<{
8707
10679
  id: z.ZodString;
8708
10680
  createdAt: z.ZodString;
8709
10681
  storeId: z.ZodString;
10682
+ sequence: z.ZodOptional<z.ZodNumber>;
8710
10683
  }, z.core.$strip>;
8711
10684
  export declare const reviewWebhookEventSchema: z.ZodObject<{
8712
10685
  type: z.ZodLiteral<"REVIEW.CREATED">;
@@ -8718,6 +10691,7 @@ export declare const reviewWebhookEventSchema: z.ZodObject<{
8718
10691
  id: z.ZodString;
8719
10692
  createdAt: z.ZodString;
8720
10693
  storeId: z.ZodString;
10694
+ sequence: z.ZodOptional<z.ZodNumber>;
8721
10695
  }, z.core.$strip>;
8722
10696
  export declare const productOutOfStockWebhookEventSchema: z.ZodObject<{
8723
10697
  type: z.ZodLiteral<"PRODUCT.OUT_OF_STOCK">;
@@ -8728,6 +10702,7 @@ export declare const productOutOfStockWebhookEventSchema: z.ZodObject<{
8728
10702
  id: z.ZodString;
8729
10703
  createdAt: z.ZodString;
8730
10704
  storeId: z.ZodString;
10705
+ sequence: z.ZodOptional<z.ZodNumber>;
8731
10706
  }, z.core.$strip>;
8732
10707
  /** 웹훅 요청 본문. `type`으로 판별하며 `data` 형태가 타입별로 다르다 */
8733
10708
  export declare const webhookEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -8752,10 +10727,38 @@ export declare const webhookEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
8752
10727
  PURCHASE_DECIDED: "PURCHASE_DECIDED";
8753
10728
  }>;
8754
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;
8755
10757
  }, z.core.$strip>;
8756
10758
  id: z.ZodString;
8757
10759
  createdAt: z.ZodString;
8758
10760
  storeId: z.ZodString;
10761
+ sequence: z.ZodOptional<z.ZodNumber>;
8759
10762
  }, z.core.$strip>, z.ZodObject<{
8760
10763
  type: z.ZodLiteral<"ORDER.CANCELED">;
8761
10764
  data: z.ZodObject<{
@@ -8787,11 +10790,14 @@ export declare const webhookEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
8787
10790
  refundAmount: z.ZodNumber;
8788
10791
  deliveryFeeRefundAmount: z.ZodNumber;
8789
10792
  deliveryFeeChargeAmount: z.ZodNumber;
10793
+ couponChargeAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
10794
+ couponChargeRefundAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
8790
10795
  testPayment: z.ZodBoolean;
8791
10796
  }, z.core.$strip>;
8792
10797
  id: z.ZodString;
8793
10798
  createdAt: z.ZodString;
8794
10799
  storeId: z.ZodString;
10800
+ sequence: z.ZodOptional<z.ZodNumber>;
8795
10801
  }, z.core.$strip>, z.ZodObject<{
8796
10802
  type: z.ZodEnum<{
8797
10803
  "CLAIM.CANCEL_REQUESTED": "CLAIM.CANCEL_REQUESTED";
@@ -8824,11 +10830,14 @@ export declare const webhookEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
8824
10830
  deliveryFeeRefundAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
8825
10831
  deliveryFeeChargeAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
8826
10832
  deductAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
10833
+ couponChargeAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
10834
+ couponChargeRefundAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
8827
10835
  testPayment: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
8828
10836
  }, z.core.$strip>;
8829
10837
  id: z.ZodString;
8830
10838
  createdAt: z.ZodString;
8831
10839
  storeId: z.ZodString;
10840
+ sequence: z.ZodOptional<z.ZodNumber>;
8832
10841
  }, z.core.$strip>, z.ZodObject<{
8833
10842
  type: z.ZodLiteral<"INQUIRY.CREATED">;
8834
10843
  data: z.ZodObject<{
@@ -8838,6 +10847,7 @@ export declare const webhookEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
8838
10847
  id: z.ZodString;
8839
10848
  createdAt: z.ZodString;
8840
10849
  storeId: z.ZodString;
10850
+ sequence: z.ZodOptional<z.ZodNumber>;
8841
10851
  }, z.core.$strip>, z.ZodObject<{
8842
10852
  type: z.ZodLiteral<"REVIEW.CREATED">;
8843
10853
  data: z.ZodObject<{
@@ -8848,6 +10858,7 @@ export declare const webhookEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
8848
10858
  id: z.ZodString;
8849
10859
  createdAt: z.ZodString;
8850
10860
  storeId: z.ZodString;
10861
+ sequence: z.ZodOptional<z.ZodNumber>;
8851
10862
  }, z.core.$strip>, z.ZodObject<{
8852
10863
  type: z.ZodLiteral<"PRODUCT.OUT_OF_STOCK">;
8853
10864
  data: z.ZodObject<{
@@ -8857,6 +10868,7 @@ export declare const webhookEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
8857
10868
  id: z.ZodString;
8858
10869
  createdAt: z.ZodString;
8859
10870
  storeId: z.ZodString;
10871
+ sequence: z.ZodOptional<z.ZodNumber>;
8860
10872
  }, z.core.$strip>], "type">;
8861
10873
  export type WebhookEvent = z.infer<typeof webhookEventSchema>;
8862
10874
  export type WebhookEventType = WebhookEvent["type"];