@sayren/store-sdk 0.29.0 → 0.29.2

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
- SUCCEEDED: "SUCCEEDED";
37
36
  FAILED: "FAILED";
37
+ SUCCEEDED: "SUCCEEDED";
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
- SUCCEEDED: "SUCCEEDED";
73
72
  FAILED: "FAILED";
73
+ SUCCEEDED: "SUCCEEDED";
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
- SUCCEEDED: "SUCCEEDED";
106
105
  FAILED: "FAILED";
106
+ SUCCEEDED: "SUCCEEDED";
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
- SUCCEEDED: "SUCCEEDED";
153
152
  FAILED: "FAILED";
153
+ SUCCEEDED: "SUCCEEDED";
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
- ALLOW: "ALLOW";
170
169
  APPROVAL_REQUIRED: "APPROVAL_REQUIRED";
170
+ ALLOW: "ALLOW";
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
- ALLOW: "ALLOW";
195
194
  APPROVAL_REQUIRED: "APPROVAL_REQUIRED";
195
+ ALLOW: "ALLOW";
196
196
  }>;
197
197
  reason: z.ZodNullable<z.ZodString>;
198
198
  preview: z.ZodObject<{
@@ -213,11 +213,11 @@ 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
- SUCCEEDED: "SUCCEEDED";
217
- FAILED: "FAILED";
216
+ UNKNOWN: "UNKNOWN";
218
217
  PENDING: "PENDING";
218
+ FAILED: "FAILED";
219
+ SUCCEEDED: "SUCCEEDED";
219
220
  EXECUTING: "EXECUTING";
220
- UNKNOWN: "UNKNOWN";
221
221
  REJECTED: "REJECTED";
222
222
  EXPIRED: "EXPIRED";
223
223
  }>;
@@ -225,11 +225,11 @@ 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
- SUCCEEDED: "SUCCEEDED";
229
- FAILED: "FAILED";
228
+ UNKNOWN: "UNKNOWN";
230
229
  PENDING: "PENDING";
230
+ FAILED: "FAILED";
231
+ SUCCEEDED: "SUCCEEDED";
231
232
  EXECUTING: "EXECUTING";
232
- UNKNOWN: "UNKNOWN";
233
233
  REJECTED: "REJECTED";
234
234
  EXPIRED: "EXPIRED";
235
235
  }>;
@@ -287,11 +287,11 @@ 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
- SUCCEEDED: "SUCCEEDED";
291
- FAILED: "FAILED";
290
+ UNKNOWN: "UNKNOWN";
292
291
  PENDING: "PENDING";
292
+ FAILED: "FAILED";
293
+ SUCCEEDED: "SUCCEEDED";
293
294
  EXECUTING: "EXECUTING";
294
- UNKNOWN: "UNKNOWN";
295
295
  REJECTED: "REJECTED";
296
296
  EXPIRED: "EXPIRED";
297
297
  }>>>>;
@@ -306,11 +306,11 @@ export declare const approvalPageSchema: z.ZodObject<{
306
306
  items: z.ZodArray<z.ZodObject<{
307
307
  approvalId: z.ZodString;
308
308
  status: z.ZodEnum<{
309
- SUCCEEDED: "SUCCEEDED";
310
- FAILED: "FAILED";
309
+ UNKNOWN: "UNKNOWN";
311
310
  PENDING: "PENDING";
311
+ FAILED: "FAILED";
312
+ SUCCEEDED: "SUCCEEDED";
312
313
  EXECUTING: "EXECUTING";
313
- UNKNOWN: "UNKNOWN";
314
314
  REJECTED: "REJECTED";
315
315
  EXPIRED: "EXPIRED";
316
316
  }>;
@@ -581,7 +581,6 @@ 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";
585
584
  DIRECT: "DIRECT";
586
585
  ORGANIC_SEARCH: "ORGANIC_SEARCH";
587
586
  SOCIAL: "SOCIAL";
@@ -589,6 +588,7 @@ export declare const analyticsChannelSchema: z.ZodEnum<{
589
588
  EMAIL: "EMAIL";
590
589
  CAMPAIGN: "CAMPAIGN";
591
590
  REFERRAL: "REFERRAL";
591
+ UNKNOWN: "UNKNOWN";
592
592
  }>;
593
593
  export type AnalyticsChannel = z.infer<typeof analyticsChannelSchema>;
594
594
  export declare const analyticsSourceGroupBySchema: z.ZodEnum<{
@@ -615,7 +615,6 @@ 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";
619
618
  DIRECT: "DIRECT";
620
619
  ORGANIC_SEARCH: "ORGANIC_SEARCH";
621
620
  SOCIAL: "SOCIAL";
@@ -623,6 +622,7 @@ export declare const analyticsSourceRowSchema: z.ZodObject<{
623
622
  EMAIL: "EMAIL";
624
623
  CAMPAIGN: "CAMPAIGN";
625
624
  REFERRAL: "REFERRAL";
625
+ UNKNOWN: "UNKNOWN";
626
626
  }>>;
627
627
  source: z.ZodNullable<z.ZodString>;
628
628
  medium: z.ZodNullable<z.ZodString>;
@@ -651,7 +651,6 @@ 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";
655
654
  DIRECT: "DIRECT";
656
655
  ORGANIC_SEARCH: "ORGANIC_SEARCH";
657
656
  SOCIAL: "SOCIAL";
@@ -659,6 +658,7 @@ export declare const analyticsSourcesSchema: z.ZodObject<{
659
658
  EMAIL: "EMAIL";
660
659
  CAMPAIGN: "CAMPAIGN";
661
660
  REFERRAL: "REFERRAL";
661
+ UNKNOWN: "UNKNOWN";
662
662
  }>>;
663
663
  source: z.ZodNullable<z.ZodString>;
664
664
  medium: z.ZodNullable<z.ZodString>;
@@ -1264,8 +1264,8 @@ export declare const claimTypeSchema: z.ZodEnum<{
1264
1264
  }>;
1265
1265
  export type ClaimType = z.infer<typeof claimTypeSchema>;
1266
1266
  export declare const claimStatusSchema: z.ZodEnum<{
1267
- REJECTED: "REJECTED";
1268
1267
  COMPLETED: "COMPLETED";
1268
+ REJECTED: "REJECTED";
1269
1269
  REQUESTED: "REQUESTED";
1270
1270
  HELD: "HELD";
1271
1271
  COLLECTING: "COLLECTING";
@@ -1308,8 +1308,8 @@ export declare const claimSchema: z.ZodObject<{
1308
1308
  CANCEL: "CANCEL";
1309
1309
  }>;
1310
1310
  status: z.ZodEnum<{
1311
- REJECTED: "REJECTED";
1312
1311
  COMPLETED: "COMPLETED";
1312
+ REJECTED: "REJECTED";
1313
1313
  REQUESTED: "REQUESTED";
1314
1314
  HELD: "HELD";
1315
1315
  COLLECTING: "COLLECTING";
@@ -1396,8 +1396,8 @@ export declare const claimDetailSchema: z.ZodObject<{
1396
1396
  CANCEL: "CANCEL";
1397
1397
  }>;
1398
1398
  status: z.ZodEnum<{
1399
- REJECTED: "REJECTED";
1400
1399
  COMPLETED: "COMPLETED";
1400
+ REJECTED: "REJECTED";
1401
1401
  REQUESTED: "REQUESTED";
1402
1402
  HELD: "HELD";
1403
1403
  COLLECTING: "COLLECTING";
@@ -1453,8 +1453,8 @@ export declare const claimDetailSchema: z.ZodObject<{
1453
1453
  }, z.core.$strip>>;
1454
1454
  histories: z.ZodOptional<z.ZodArray<z.ZodObject<{
1455
1455
  status: z.ZodEnum<{
1456
- REJECTED: "REJECTED";
1457
1456
  COMPLETED: "COMPLETED";
1457
+ REJECTED: "REJECTED";
1458
1458
  REQUESTED: "REQUESTED";
1459
1459
  HELD: "HELD";
1460
1460
  COLLECTING: "COLLECTING";
@@ -1508,8 +1508,8 @@ export type ApproveClaimResult = z.infer<typeof approveClaimResultSchema>;
1508
1508
  * 컬렉션 (이슈 #83) — 상품을 어디에 보여 줄지 정하는 묶음이다. 카테고리는 상품이 무엇인지를 정하고 상품당 하나지만, 컬렉션은
1509
1509
  * 다대다다. 이벤트·기획전은 기간이 있는 직접 선택 컬렉션이다. 권한은 카테고리와 같다(`category:r`·`category:rw`).
1510
1510
  *
1511
- * 유형은 만들 때 정하고 바꿀 수 없다. 지금은 직접 선택(`MANUAL`)만 만들 수 있다. 조건 자동(`AUTOMATIC`)은 다음 단계에서 열리고,
1512
- * 응답의 `type`은 값이 늘 수 있어 문자열이다.
1511
+ * 유형은 만들 때 정하고 바꿀 수 없다. 직접 선택(`MANUAL`)은 셀러가 상품을 담고 순서를 정하고, 조건 자동(`AUTOMATIC`)은 조건(`rules`)을
1512
+ * 모두 만족하는 판매 중 상품을 조회할 때마다 계산한다(결과를 저장하지 않는다). 응답의 `type`은 값이 늘 수 있어 문자열이다.
1513
1513
  */
1514
1514
  /** 상점당 컬렉션 최대 개수 — 넘으면 409 `COLLECTION_LIMIT_EXCEEDED` */
1515
1515
  export declare const MAX_COLLECTIONS = 200;
@@ -1523,7 +1523,7 @@ export declare const MAX_COLLECTION_TITLE = 60;
1523
1523
  export declare const MAX_COLLECTION_DESCRIPTION = 500;
1524
1524
  /** 주소(slug) 형식 — 영문 소문자·숫자·하이픈, 첫 글자는 영문 소문자나 숫자, 64자까지 */
1525
1525
  export declare const COLLECTION_SLUG_PATTERN: RegExp;
1526
- /** 유형 — `MANUAL`(직접 선택)·`AUTOMATIC`(조건 자동, 아직 만들 수 없다) */
1526
+ /** 유형 — `MANUAL`(직접 선택)·`AUTOMATIC`(조건 자동) */
1527
1527
  export declare const COLLECTION_TYPES: readonly ["MANUAL", "AUTOMATIC"];
1528
1528
  export type CollectionType = (typeof COLLECTION_TYPES)[number];
1529
1529
  /**
@@ -1555,6 +1555,98 @@ export declare function collectionStateOf(collection: {
1555
1555
  startsAt: string | null;
1556
1556
  endsAt: string | null;
1557
1557
  }, now: Date): CollectionState;
1558
+ /** 조건 자동 컬렉션의 조건 최대 개수 */
1559
+ export declare const MAX_COLLECTION_RULES = 10;
1560
+ /** 카테고리 조건 하나에 넣는 카테고리 최대 개수 */
1561
+ export declare const MAX_COLLECTION_RULE_CATEGORIES = 20;
1562
+ /** 등록일 조건의 최대 일수 */
1563
+ export declare const MAX_COLLECTION_CREATED_WITHIN_DAYS = 365;
1564
+ /** 미리보기(`POST /v1/collections/preview`)가 싣는 상품 최대 개수 */
1565
+ export declare const COLLECTION_PREVIEW_SIZE = 20;
1566
+ /**
1567
+ * 조건 하나 — `field`로 가른다. 가격은 즉시할인을 반영한 판매가(`discountedPrice ?? salePrice`)다.
1568
+ * 판매량 상위(`bestSelling`)는 판매량 집계가 열릴 때 더한다.
1569
+ */
1570
+ export declare const collectionRuleSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1571
+ field: z.ZodLiteral<"createdWithinDays">;
1572
+ value: z.ZodNumber;
1573
+ }, z.core.$strip>, z.ZodObject<{
1574
+ field: z.ZodLiteral<"category">;
1575
+ categoryIds: z.ZodArray<z.ZodString>;
1576
+ }, z.core.$strip>, z.ZodObject<{
1577
+ field: z.ZodLiteral<"price">;
1578
+ min: z.ZodOptional<z.ZodNumber>;
1579
+ max: z.ZodOptional<z.ZodNumber>;
1580
+ }, z.core.$strip>, z.ZodObject<{
1581
+ field: z.ZodLiteral<"discounted">;
1582
+ value: z.ZodLiteral<true>;
1583
+ }, z.core.$strip>], "field">;
1584
+ export type CollectionRule = z.infer<typeof collectionRuleSchema>;
1585
+ export type CollectionRuleField = CollectionRule["field"];
1586
+ /** 조건 목록 — 모두 만족해야 한다(AND). 같은 `field`는 한 번만 쓴다 */
1587
+ export declare const collectionRulesSchema: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
1588
+ field: z.ZodLiteral<"createdWithinDays">;
1589
+ value: z.ZodNumber;
1590
+ }, z.core.$strip>, z.ZodObject<{
1591
+ field: z.ZodLiteral<"category">;
1592
+ categoryIds: z.ZodArray<z.ZodString>;
1593
+ }, z.core.$strip>, z.ZodObject<{
1594
+ field: z.ZodLiteral<"price">;
1595
+ min: z.ZodOptional<z.ZodNumber>;
1596
+ max: z.ZodOptional<z.ZodNumber>;
1597
+ }, z.core.$strip>, z.ZodObject<{
1598
+ field: z.ZodLiteral<"discounted">;
1599
+ value: z.ZodLiteral<true>;
1600
+ }, z.core.$strip>], "field">>;
1601
+ /**
1602
+ * 응답의 조건 — 이 SDK가 아는 조건이거나 뒤에 더해질 조건(`field`만 확인한다)이다. 새 조건이 생겨도 옛 SDK의 응답 검증이 깨지지 않는다.
1603
+ */
1604
+ export declare const collectionRuleViewSchema: z.ZodUnion<readonly [z.ZodObject<{
1605
+ field: z.ZodLiteral<"createdWithinDays">;
1606
+ value: z.ZodNumber;
1607
+ }, z.core.$strip>, z.ZodObject<{
1608
+ field: z.ZodLiteral<"category">;
1609
+ categoryIds: z.ZodArray<z.ZodString>;
1610
+ }, z.core.$strip>, z.ZodObject<{
1611
+ field: z.ZodLiteral<"price">;
1612
+ min: z.ZodOptional<z.ZodNumber>;
1613
+ max: z.ZodOptional<z.ZodNumber>;
1614
+ }, z.core.$strip>, z.ZodObject<{
1615
+ field: z.ZodLiteral<"discounted">;
1616
+ value: z.ZodLiteral<true>;
1617
+ }, z.core.$strip>, z.ZodObject<{
1618
+ field: z.ZodString;
1619
+ }, z.core.$loose>]>;
1620
+ export type CollectionRuleView = z.infer<typeof collectionRuleViewSchema>;
1621
+ /** 조건 판정에 쓰는 상품 값 — 즉시할인가는 호출부가 계산해 넘긴다 */
1622
+ export interface CollectionRuleProduct {
1623
+ createdAt: string;
1624
+ categoryId: string | null;
1625
+ salePrice: number;
1626
+ /** 지금 적용되는 즉시할인가. 할인이 없으면 null */
1627
+ discountedPrice: number | null;
1628
+ }
1629
+ export interface CollectionRuleContext {
1630
+ /** 판정 시각 — 등록일 조건의 기준이다 */
1631
+ now: Date;
1632
+ /** 상점 카테고리(부모 관계) — 카테고리 조건의 하위 포함 판정에 쓴다 */
1633
+ categories: ReadonlyArray<{
1634
+ categoryId: string;
1635
+ parentId: string | null;
1636
+ }>;
1637
+ }
1638
+ /** 카테고리 자신 + 모든 하위 카테고리 id */
1639
+ export declare function descendantCategoryIdsOf(roots: readonly string[], categories: CollectionRuleContext["categories"]): Set<string>;
1640
+ /**
1641
+ * 조건 판정 함수를 만든다 — 모든 조건을 만족해야 true다(AND). 카테고리 트리는 여기서 한 번만 푼다.
1642
+ * 알 수 없는 조건(`field`)은 만족하지 않는 것으로 본다. 모르는 조건을 건너뛰면 상품이 예고 없이 늘어난다.
1643
+ * 판매 상태는 보지 않는다. 판매 중만 거르는 것은 호출부다.
1644
+ */
1645
+ export declare function collectionRulesPredicate(rules: readonly CollectionRuleView[], context: CollectionRuleContext): (product: CollectionRuleProduct) => boolean;
1646
+ /** 상품 하나가 조건을 모두 만족하는가 — 여러 상품을 판정할 때는 `collectionRulesPredicate`를 한 번 만들어 쓴다 */
1647
+ export declare function matchesCollectionRules(product: CollectionRuleProduct, rules: readonly CollectionRuleView[], context: CollectionRuleContext): boolean;
1648
+ /** 조건이 참조하는 카테고리 id — 카테고리 삭제의 참조 검사에 쓴다 */
1649
+ export declare function collectionRuleCategoryIds(rules: readonly CollectionRuleView[]): string[];
1558
1650
  export declare const collectionSchema: z.ZodObject<{
1559
1651
  collectionId: z.ZodString;
1560
1652
  type: z.ZodString;
@@ -1563,6 +1655,22 @@ export declare const collectionSchema: z.ZodObject<{
1563
1655
  description: z.ZodString;
1564
1656
  imageUrl: z.ZodNullable<z.ZodString>;
1565
1657
  productSort: z.ZodString;
1658
+ rules: z.ZodNullable<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
1659
+ field: z.ZodLiteral<"createdWithinDays">;
1660
+ value: z.ZodNumber;
1661
+ }, z.core.$strip>, z.ZodObject<{
1662
+ field: z.ZodLiteral<"category">;
1663
+ categoryIds: z.ZodArray<z.ZodString>;
1664
+ }, z.core.$strip>, z.ZodObject<{
1665
+ field: z.ZodLiteral<"price">;
1666
+ min: z.ZodOptional<z.ZodNumber>;
1667
+ max: z.ZodOptional<z.ZodNumber>;
1668
+ }, z.core.$strip>, z.ZodObject<{
1669
+ field: z.ZodLiteral<"discounted">;
1670
+ value: z.ZodLiteral<true>;
1671
+ }, z.core.$strip>, z.ZodObject<{
1672
+ field: z.ZodString;
1673
+ }, z.core.$loose>]>>>;
1566
1674
  visible: z.ZodBoolean;
1567
1675
  startsAt: z.ZodNullable<z.ZodString>;
1568
1676
  endsAt: z.ZodNullable<z.ZodString>;
@@ -1582,18 +1690,34 @@ export declare const collectionSchema: z.ZodObject<{
1582
1690
  }, z.core.$strip>;
1583
1691
  export type Collection = z.infer<typeof collectionSchema>;
1584
1692
  /**
1585
- * `POST /v1/collections` — 직접 선택 컬렉션을 만든다. `slug`를 생략하면 `c-{id 뒤 8자}`로 만든다.
1586
- * `productIds`는 처음 담을 상품과 순서다.
1693
+ * `POST /v1/collections` — 컬렉션을 만든다. `slug`를 생략하면 `c-{id 뒤 8자}`로 만든다.
1694
+ * 직접 선택(`MANUAL`)은 `productIds`가 처음 담을 상품과 순서다. 조건 자동(`AUTOMATIC`)은 `rules`가 있어야 하고 `productIds`를 받지 않는다.
1695
+ * `productSort`를 생략하면 직접 선택은 `MANUAL`, 조건 자동은 `LATEST`다. 조건 자동은 `MANUAL`을 쓸 수 없다.
1587
1696
  */
1588
1697
  export declare const collectionCreateRequestSchema: z.ZodObject<{
1589
1698
  title: z.ZodString;
1590
1699
  slug: z.ZodOptional<z.ZodString>;
1591
1700
  type: z.ZodDefault<z.ZodEnum<{
1592
1701
  MANUAL: "MANUAL";
1702
+ AUTOMATIC: "AUTOMATIC";
1593
1703
  }>>;
1704
+ rules: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
1705
+ field: z.ZodLiteral<"createdWithinDays">;
1706
+ value: z.ZodNumber;
1707
+ }, z.core.$strip>, z.ZodObject<{
1708
+ field: z.ZodLiteral<"category">;
1709
+ categoryIds: z.ZodArray<z.ZodString>;
1710
+ }, z.core.$strip>, z.ZodObject<{
1711
+ field: z.ZodLiteral<"price">;
1712
+ min: z.ZodOptional<z.ZodNumber>;
1713
+ max: z.ZodOptional<z.ZodNumber>;
1714
+ }, z.core.$strip>, z.ZodObject<{
1715
+ field: z.ZodLiteral<"discounted">;
1716
+ value: z.ZodLiteral<true>;
1717
+ }, z.core.$strip>], "field">>>;
1594
1718
  description: z.ZodDefault<z.ZodString>;
1595
1719
  imageUrl: z.ZodOptional<z.ZodNullable<z.ZodURL>>;
1596
- productSort: z.ZodDefault<z.ZodEnum<{
1720
+ productSort: z.ZodOptional<z.ZodEnum<{
1597
1721
  PRICE_ASC: "PRICE_ASC";
1598
1722
  PRICE_DESC: "PRICE_DESC";
1599
1723
  MANUAL: "MANUAL";
@@ -1620,6 +1744,20 @@ export declare const collectionPatchRequestSchema: z.ZodObject<{
1620
1744
  title: z.ZodOptional<z.ZodString>;
1621
1745
  slug: z.ZodOptional<z.ZodString>;
1622
1746
  type: z.ZodOptional<z.ZodString>;
1747
+ rules: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
1748
+ field: z.ZodLiteral<"createdWithinDays">;
1749
+ value: z.ZodNumber;
1750
+ }, z.core.$strip>, z.ZodObject<{
1751
+ field: z.ZodLiteral<"category">;
1752
+ categoryIds: z.ZodArray<z.ZodString>;
1753
+ }, z.core.$strip>, z.ZodObject<{
1754
+ field: z.ZodLiteral<"price">;
1755
+ min: z.ZodOptional<z.ZodNumber>;
1756
+ max: z.ZodOptional<z.ZodNumber>;
1757
+ }, z.core.$strip>, z.ZodObject<{
1758
+ field: z.ZodLiteral<"discounted">;
1759
+ value: z.ZodLiteral<true>;
1760
+ }, z.core.$strip>], "field">>>;
1623
1761
  description: z.ZodOptional<z.ZodString>;
1624
1762
  imageUrl: z.ZodOptional<z.ZodNullable<z.ZodURL>>;
1625
1763
  productSort: z.ZodOptional<z.ZodEnum<{
@@ -1683,6 +1821,22 @@ export declare const collectionPageSchema: z.ZodObject<{
1683
1821
  description: z.ZodString;
1684
1822
  imageUrl: z.ZodNullable<z.ZodString>;
1685
1823
  productSort: z.ZodString;
1824
+ rules: z.ZodNullable<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
1825
+ field: z.ZodLiteral<"createdWithinDays">;
1826
+ value: z.ZodNumber;
1827
+ }, z.core.$strip>, z.ZodObject<{
1828
+ field: z.ZodLiteral<"category">;
1829
+ categoryIds: z.ZodArray<z.ZodString>;
1830
+ }, z.core.$strip>, z.ZodObject<{
1831
+ field: z.ZodLiteral<"price">;
1832
+ min: z.ZodOptional<z.ZodNumber>;
1833
+ max: z.ZodOptional<z.ZodNumber>;
1834
+ }, z.core.$strip>, z.ZodObject<{
1835
+ field: z.ZodLiteral<"discounted">;
1836
+ value: z.ZodLiteral<true>;
1837
+ }, z.core.$strip>, z.ZodObject<{
1838
+ field: z.ZodString;
1839
+ }, z.core.$loose>]>>>;
1686
1840
  visible: z.ZodBoolean;
1687
1841
  startsAt: z.ZodNullable<z.ZodString>;
1688
1842
  endsAt: z.ZodNullable<z.ZodString>;
@@ -1737,6 +1891,47 @@ export declare const collectionProductListQuerySchema: z.ZodObject<{
1737
1891
  page: z.ZodOptional<z.ZodString>;
1738
1892
  size: z.ZodOptional<z.ZodString>;
1739
1893
  }, z.core.$strip>;
1894
+ /** `POST /v1/collections/preview` — 저장하지 않고 조건으로 나오는 상품을 본다 */
1895
+ export declare const collectionPreviewRequestSchema: z.ZodObject<{
1896
+ rules: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
1897
+ field: z.ZodLiteral<"createdWithinDays">;
1898
+ value: z.ZodNumber;
1899
+ }, z.core.$strip>, z.ZodObject<{
1900
+ field: z.ZodLiteral<"category">;
1901
+ categoryIds: z.ZodArray<z.ZodString>;
1902
+ }, z.core.$strip>, z.ZodObject<{
1903
+ field: z.ZodLiteral<"price">;
1904
+ min: z.ZodOptional<z.ZodNumber>;
1905
+ max: z.ZodOptional<z.ZodNumber>;
1906
+ }, z.core.$strip>, z.ZodObject<{
1907
+ field: z.ZodLiteral<"discounted">;
1908
+ value: z.ZodLiteral<true>;
1909
+ }, z.core.$strip>], "field">>;
1910
+ productSort: z.ZodOptional<z.ZodEnum<{
1911
+ PRICE_ASC: "PRICE_ASC";
1912
+ PRICE_DESC: "PRICE_DESC";
1913
+ MANUAL: "MANUAL";
1914
+ LATEST: "LATEST";
1915
+ REVIEW_COUNT: "REVIEW_COUNT";
1916
+ RATING_DESC: "RATING_DESC";
1917
+ RECOMMEND: "RECOMMEND";
1918
+ }>>;
1919
+ }, z.core.$strip>;
1920
+ export type CollectionPreviewRequest = z.infer<typeof collectionPreviewRequestSchema>;
1921
+ /** 미리보기 응답 — 조건을 만족하는 판매 중 상품 수와 앞 20개 */
1922
+ export declare const collectionPreviewSchema: z.ZodObject<{
1923
+ count: z.ZodNumber;
1924
+ products: z.ZodArray<z.ZodObject<{
1925
+ productId: z.ZodString;
1926
+ name: z.ZodString;
1927
+ thumbnailUrl: z.ZodNullable<z.ZodString>;
1928
+ status: z.ZodString;
1929
+ salePrice: z.ZodNumber;
1930
+ position: z.ZodNumber;
1931
+ addedAt: z.ZodString;
1932
+ }, z.core.$strip>>;
1933
+ }, z.core.$strip>;
1934
+ export type CollectionPreview = z.infer<typeof collectionPreviewSchema>;
1740
1935
  //#endregion
1741
1936
  //#region src/schemas/coupon.d.ts
1742
1937
  /**
@@ -2689,10 +2884,10 @@ export declare const webhookSecretRotatedSchema: z.ZodObject<{
2689
2884
  }, z.core.$strip>;
2690
2885
  export type WebhookSecretRotated = z.infer<typeof webhookSecretRotatedSchema>;
2691
2886
  export declare const webhookDeliveryStatusSchema: z.ZodEnum<{
2692
- FAILED: "FAILED";
2693
2887
  PENDING: "PENDING";
2694
2888
  PENDING_RETRY: "PENDING_RETRY";
2695
2889
  SUCCESS: "SUCCESS";
2890
+ FAILED: "FAILED";
2696
2891
  }>;
2697
2892
  export type WebhookDeliveryStatus = z.infer<typeof webhookDeliveryStatusSchema>;
2698
2893
  export declare const webhookDeliveryErrorCodeSchema: z.ZodEnum<{
@@ -2754,10 +2949,10 @@ export declare const webhookDeliverySchema: z.ZodObject<{
2754
2949
  }>;
2755
2950
  url: z.ZodString;
2756
2951
  status: z.ZodEnum<{
2757
- FAILED: "FAILED";
2758
2952
  PENDING: "PENDING";
2759
2953
  PENDING_RETRY: "PENDING_RETRY";
2760
2954
  SUCCESS: "SUCCESS";
2955
+ FAILED: "FAILED";
2761
2956
  }>;
2762
2957
  responseStatusCode: z.ZodNullable<z.ZodNumber>;
2763
2958
  responseTimeMs: z.ZodNullable<z.ZodNumber>;
@@ -2807,10 +3002,10 @@ export declare const webhookDeliveryDetailSchema: z.ZodObject<{
2807
3002
  }>;
2808
3003
  url: z.ZodString;
2809
3004
  status: z.ZodEnum<{
2810
- FAILED: "FAILED";
2811
3005
  PENDING: "PENDING";
2812
3006
  PENDING_RETRY: "PENDING_RETRY";
2813
3007
  SUCCESS: "SUCCESS";
3008
+ FAILED: "FAILED";
2814
3009
  }>;
2815
3010
  responseStatusCode: z.ZodNullable<z.ZodNumber>;
2816
3011
  responseTimeMs: z.ZodNullable<z.ZodNumber>;
@@ -2845,10 +3040,10 @@ export type WebhookDeliveryDetail = z.infer<typeof webhookDeliveryDetailSchema>;
2845
3040
  /** 전송 기록 조회 쿼리 — `GET /webhooks/{id}/deliveries` */
2846
3041
  export declare const webhookDeliveryListQuerySchema: z.ZodObject<{
2847
3042
  status: z.ZodOptional<z.ZodEnum<{
2848
- FAILED: "FAILED";
2849
3043
  PENDING: "PENDING";
2850
3044
  PENDING_RETRY: "PENDING_RETRY";
2851
3045
  SUCCESS: "SUCCESS";
3046
+ FAILED: "FAILED";
2852
3047
  }>>;
2853
3048
  eventType: z.ZodOptional<z.ZodEnum<{
2854
3049
  "ORDER.PAID": "ORDER.PAID";
@@ -3885,8 +4080,8 @@ export declare const pgEnvironmentSchema: z.ZodEnum<{
3885
4080
  }>;
3886
4081
  export type PgEnvironment = z.infer<typeof pgEnvironmentSchema>;
3887
4082
  export declare const pgVerificationResultSchema: z.ZodEnum<{
3888
- FAILED: "FAILED";
3889
4083
  SUCCESS: "SUCCESS";
4084
+ FAILED: "FAILED";
3890
4085
  }>;
3891
4086
  export type PgVerificationResult = z.infer<typeof pgVerificationResultSchema>;
3892
4087
  /**
@@ -4035,8 +4230,8 @@ export declare const paymentCredentialSetSchema: z.ZodObject<{
4035
4230
  }, z.core.$strip>>;
4036
4231
  lastVerification: z.ZodNullable<z.ZodObject<{
4037
4232
  result: z.ZodEnum<{
4038
- FAILED: "FAILED";
4039
4233
  SUCCESS: "SUCCESS";
4234
+ FAILED: "FAILED";
4040
4235
  }>;
4041
4236
  message: z.ZodNullable<z.ZodString>;
4042
4237
  checkedAt: z.ZodString;
@@ -4137,8 +4332,8 @@ export declare const paymentProviderSchema: z.ZodObject<{
4137
4332
  }, z.core.$strip>>;
4138
4333
  lastVerification: z.ZodNullable<z.ZodObject<{
4139
4334
  result: z.ZodEnum<{
4140
- FAILED: "FAILED";
4141
4335
  SUCCESS: "SUCCESS";
4336
+ FAILED: "FAILED";
4142
4337
  }>;
4143
4338
  message: z.ZodNullable<z.ZodString>;
4144
4339
  checkedAt: z.ZodString;
@@ -4174,8 +4369,8 @@ export declare const paymentProviderSchema: z.ZodObject<{
4174
4369
  }, z.core.$strip>>;
4175
4370
  lastVerification: z.ZodNullable<z.ZodObject<{
4176
4371
  result: z.ZodEnum<{
4177
- FAILED: "FAILED";
4178
4372
  SUCCESS: "SUCCESS";
4373
+ FAILED: "FAILED";
4179
4374
  }>;
4180
4375
  message: z.ZodNullable<z.ZodString>;
4181
4376
  checkedAt: z.ZodString;
@@ -4210,8 +4405,8 @@ export declare const paymentProviderSchema: z.ZodObject<{
4210
4405
  }, z.core.$strip>>;
4211
4406
  lastVerification: z.ZodNullable<z.ZodObject<{
4212
4407
  result: z.ZodEnum<{
4213
- FAILED: "FAILED";
4214
4408
  SUCCESS: "SUCCESS";
4409
+ FAILED: "FAILED";
4215
4410
  }>;
4216
4411
  message: z.ZodNullable<z.ZodString>;
4217
4412
  checkedAt: z.ZodString;
@@ -4301,8 +4496,8 @@ export declare const paymentSettingsSchema: z.ZodObject<{
4301
4496
  }, z.core.$strip>>;
4302
4497
  lastVerification: z.ZodNullable<z.ZodObject<{
4303
4498
  result: z.ZodEnum<{
4304
- FAILED: "FAILED";
4305
4499
  SUCCESS: "SUCCESS";
4500
+ FAILED: "FAILED";
4306
4501
  }>;
4307
4502
  message: z.ZodNullable<z.ZodString>;
4308
4503
  checkedAt: z.ZodString;
@@ -4338,8 +4533,8 @@ export declare const paymentSettingsSchema: z.ZodObject<{
4338
4533
  }, z.core.$strip>>;
4339
4534
  lastVerification: z.ZodNullable<z.ZodObject<{
4340
4535
  result: z.ZodEnum<{
4341
- FAILED: "FAILED";
4342
4536
  SUCCESS: "SUCCESS";
4537
+ FAILED: "FAILED";
4343
4538
  }>;
4344
4539
  message: z.ZodNullable<z.ZodString>;
4345
4540
  checkedAt: z.ZodString;
@@ -4374,8 +4569,8 @@ export declare const paymentSettingsSchema: z.ZodObject<{
4374
4569
  }, z.core.$strip>>;
4375
4570
  lastVerification: z.ZodNullable<z.ZodObject<{
4376
4571
  result: z.ZodEnum<{
4377
- FAILED: "FAILED";
4378
4572
  SUCCESS: "SUCCESS";
4573
+ FAILED: "FAILED";
4379
4574
  }>;
4380
4575
  message: z.ZodNullable<z.ZodString>;
4381
4576
  checkedAt: z.ZodString;
@@ -4431,8 +4626,8 @@ export declare const paymentProviderVerificationSchema: z.ZodObject<{
4431
4626
  LIVE: "LIVE";
4432
4627
  }>;
4433
4628
  result: z.ZodEnum<{
4434
- FAILED: "FAILED";
4435
4629
  SUCCESS: "SUCCESS";
4630
+ FAILED: "FAILED";
4436
4631
  }>;
4437
4632
  message: z.ZodNullable<z.ZodString>;
4438
4633
  checkedAt: z.ZodString;
@@ -4562,8 +4757,8 @@ export type SalesReport = z.infer<typeof salesReportSchema>;
4562
4757
  * - `FAILED`: 승인되지 않고 끝났다(거절·준비 장애·구매자 취소·만료)
4563
4758
  */
4564
4759
  export declare const paymentRecordStatusSchema: z.ZodEnum<{
4565
- FAILED: "FAILED";
4566
4760
  PENDING: "PENDING";
4761
+ FAILED: "FAILED";
4567
4762
  APPROVED: "APPROVED";
4568
4763
  PARTIALLY_REFUNDED: "PARTIALLY_REFUNDED";
4569
4764
  REFUNDED: "REFUNDED";
@@ -4610,8 +4805,8 @@ export declare const paymentRecordSchema: z.ZodObject<{
4610
4805
  orderName: z.ZodString;
4611
4806
  customerName: z.ZodString;
4612
4807
  status: z.ZodEnum<{
4613
- FAILED: "FAILED";
4614
4808
  PENDING: "PENDING";
4809
+ FAILED: "FAILED";
4615
4810
  APPROVED: "APPROVED";
4616
4811
  PARTIALLY_REFUNDED: "PARTIALLY_REFUNDED";
4617
4812
  REFUNDED: "REFUNDED";
@@ -4656,8 +4851,8 @@ export declare const paymentRecordPageSchema: z.ZodObject<{
4656
4851
  orderName: z.ZodString;
4657
4852
  customerName: z.ZodString;
4658
4853
  status: z.ZodEnum<{
4659
- FAILED: "FAILED";
4660
4854
  PENDING: "PENDING";
4855
+ FAILED: "FAILED";
4661
4856
  APPROVED: "APPROVED";
4662
4857
  PARTIALLY_REFUNDED: "PARTIALLY_REFUNDED";
4663
4858
  REFUNDED: "REFUNDED";
@@ -4745,8 +4940,8 @@ export declare const paymentRecordDetailSchema: z.ZodObject<{
4745
4940
  orderName: z.ZodString;
4746
4941
  customerName: z.ZodString;
4747
4942
  status: z.ZodEnum<{
4748
- FAILED: "FAILED";
4749
4943
  PENDING: "PENDING";
4944
+ FAILED: "FAILED";
4750
4945
  APPROVED: "APPROVED";
4751
4946
  PARTIALLY_REFUNDED: "PARTIALLY_REFUNDED";
4752
4947
  REFUNDED: "REFUNDED";
@@ -4871,6 +5066,245 @@ export interface PaymentListParams extends PageParams {
4871
5066
  includeTest?: boolean;
4872
5067
  }
4873
5068
  //#endregion
5069
+ //#region src/schemas/points.d.ts
5070
+ /**
5071
+ * 적립금 (이슈 #93) — 상점 정책·원장 유형·순수 계산. 정책 해석은 `resolvePointPolicy`, 리뷰 적립 금액은
5072
+ * `reviewRewardPointOf`, 적립 묶음(lot) 만료 시각은 `pointExpiresAtOf` 한 곳이다. 서버·상점 플랫폼이 같은 함수를 쓴다.
5073
+ *
5074
+ * 정책이 없으면(null) 모든 적립이 꺼져 있다(사용자 결정 2026-10-02). 셀러가 켜야 적립이 시작된다.
5075
+ * 구매 적립 금액은 `pointEarnOf`, 적용 적립률은 `purchaseEarnRateOf`(상품 덮어쓰기 우선)다. 사용 규칙은 다음 단계(P3)에서 가산한다.
5076
+ */
5077
+ /** 리뷰 적립·회수 금액 상한 — 한 리뷰에 주는 금액 */
5078
+ export declare const POINT_REVIEW_REWARD_MAX = 100000;
5079
+ /** 유효 기간 범위(일) — 「소멸 없음」 선택지는 두지 않는다(사용자 결정 2026-10-02) */
5080
+ export declare const POINT_EXPIRY_DAYS_MIN = 30;
5081
+ export declare const POINT_EXPIRY_DAYS_MAX = 1825;
5082
+ /** 구매 적립률 상한(만분율) — 3000 = 30% */
5083
+ export declare const POINT_EARN_RATE_BP_MAX = 3000;
5084
+ /** 구매 적립률(만분율, 100 = 1%). 상품별 덮어쓰기도 같은 범위다 */
5085
+ export declare const pointEarnRateBpSchema: z.ZodNumber;
5086
+ export declare const reviewRewardPolicySchema: z.ZodObject<{
5087
+ enabled: z.ZodBoolean;
5088
+ textPoint: z.ZodNumber;
5089
+ photoPoint: z.ZodNumber;
5090
+ }, z.core.$strip>;
5091
+ export type ReviewRewardPolicy = z.infer<typeof reviewRewardPolicySchema>;
5092
+ export declare const purchaseEarnPolicySchema: z.ZodObject<{
5093
+ enabled: z.ZodBoolean;
5094
+ rateBp: z.ZodNumber;
5095
+ }, z.core.$strip>;
5096
+ export type PurchaseEarnPolicy = z.infer<typeof purchaseEarnPolicySchema>;
5097
+ /** 저장된 상점 정책(`stores.point_policy`) — 해석은 `resolvePointPolicy` */
5098
+ export declare const pointPolicySchema: z.ZodObject<{
5099
+ reviewReward: z.ZodObject<{
5100
+ enabled: z.ZodBoolean;
5101
+ textPoint: z.ZodNumber;
5102
+ photoPoint: z.ZodNumber;
5103
+ }, z.core.$strip>;
5104
+ purchaseEarn: z.ZodObject<{
5105
+ enabled: z.ZodBoolean;
5106
+ rateBp: z.ZodNumber;
5107
+ }, z.core.$strip>;
5108
+ expiryDays: z.ZodNullable<z.ZodNumber>;
5109
+ }, z.core.$strip>;
5110
+ export type PointPolicy = z.infer<typeof pointPolicySchema>;
5111
+ /** 정책이 없을 때 — 모두 끔 */
5112
+ export declare const POINT_POLICY_DEFAULTS: PointPolicy;
5113
+ /**
5114
+ * 저장된 정책 → 유효 정책. null·형식이 틀린 값은 기본(모두 끔)이다. 키 하나가 틀려도 그 묶음만 기본으로 읽는다
5115
+ * (정책 형식이 바뀌어 옛 행이 남아 있을 때 적립을 잘못 켜지 않게 한다).
5116
+ */
5117
+ export declare function resolvePointPolicy(stored: unknown): PointPolicy;
5118
+ /** 적립을 하나라도 켰는가 — 켜면 유효 기간이 필수다 */
5119
+ export declare function pointEarningEnabled(policy: PointPolicy): boolean;
5120
+ /**
5121
+ * 주문상품에 적용할 구매 적립률 — 구매 적립이 꺼져 있으면 0, 상품 덮어쓰기(`products.point_earn_rate_bp`)가 있으면 그 값
5122
+ * (0 = 적립 안 함), 없으면 상점 기본이다. 결제 확정 때 주문상품에 스냅샷한다.
5123
+ */
5124
+ export declare function purchaseEarnRateOf(policy: PointPolicy, productRateBp: number | null): number;
5125
+ /** 구매 적립 금액 — 적립 기준 금액 × 적립률, 1원 미만은 내린다 */
5126
+ export declare function pointEarnOf(input: {
5127
+ paidBase: number;
5128
+ rateBp: number;
5129
+ }): number;
5130
+ /** 리뷰 하나의 적립 금액 — 정책이 꺼져 있으면 0이다. 사진은 추가분이다 */
5131
+ export declare function reviewRewardPointOf(policy: PointPolicy, hasPhoto: boolean): number;
5132
+ /**
5133
+ * 적립 묶음의 만료 시각 — 적립 시각 + `days`일이 속한 한국 시간 날짜의 끝(23:59:59.999 KST). 구매자 안내가 날짜 단위라
5134
+ * 시각을 날짜 끝에 맞춘다. `days`가 null이면 만료 없음(null)이다.
5135
+ */
5136
+ export declare function pointExpiresAtOf(earnedAt: Date, days: number | null): Date | null;
5137
+ /** 적립 묶음 출처 — 같은 출처 id에는 묶음이 하나뿐이다(DB 부분 유니크) */
5138
+ export declare const POINT_LOT_SOURCES: readonly ["REVIEW", "PURCHASE", "ADJUST", "REFUND_RESTORE", "OPENING"];
5139
+ export type PointLotSource = (typeof POINT_LOT_SOURCES)[number];
5140
+ /** 원장 항목 유형. 지금 쓰는 것은 리뷰 적립·회수이고 나머지는 다음 단계 자리다 */
5141
+ export declare const POINT_ENTRY_TYPES: readonly ["EARN_REVIEW", "REVOKE_REVIEW", "EARN_PURCHASE", "USE_RESERVE", "USE_RELEASE", "REFUND_RESTORE", "EXPIRE", "ADJUST", "OPENING"];
5142
+ export type PointEntryType = (typeof POINT_ENTRY_TYPES)[number];
5143
+ /** 상점 플랫폼 알림 — `REVIEW_REWARD_PAUSED` 리뷰 자동 적립이 멈춤 · `POINTS_AVAILABLE` 적립금 설정을 쓸 수 있음 */
5144
+ export declare const pointPolicyNoticeSchema: z.ZodNullable<z.ZodEnum<{
5145
+ REVIEW_REWARD_PAUSED: "REVIEW_REWARD_PAUSED";
5146
+ POINTS_AVAILABLE: "POINTS_AVAILABLE";
5147
+ }>>;
5148
+ export type PointPolicyNotice = z.infer<typeof pointPolicyNoticeSchema>;
5149
+ /** `GET /v1/store/point-policy` 응답 */
5150
+ export declare const storePointPolicySchema: z.ZodObject<{
5151
+ available: z.ZodBoolean;
5152
+ configured: z.ZodBoolean;
5153
+ reviewReward: z.ZodObject<{
5154
+ enabled: z.ZodBoolean;
5155
+ textPoint: z.ZodNumber;
5156
+ photoPoint: z.ZodNumber;
5157
+ }, z.core.$strip>;
5158
+ purchaseEarn: z.ZodObject<{
5159
+ enabled: z.ZodBoolean;
5160
+ rateBp: z.ZodNumber;
5161
+ }, z.core.$strip>;
5162
+ expiryDays: z.ZodNullable<z.ZodNumber>;
5163
+ notice: z.ZodNullable<z.ZodEnum<{
5164
+ REVIEW_REWARD_PAUSED: "REVIEW_REWARD_PAUSED";
5165
+ POINTS_AVAILABLE: "POINTS_AVAILABLE";
5166
+ }>>;
5167
+ }, z.core.$strip>;
5168
+ export type StorePointPolicy = z.infer<typeof storePointPolicySchema>;
5169
+ /**
5170
+ * `PUT /v1/store/point-policy` 본문 — 준 항목만 바꾼다(생략 = 저장된 값 유지). 리뷰 적립·구매 적립 중 하나라도 켜면 유효 기간이 있어야 한다
5171
+ * (본문이나 저장된 값, 없으면 400 `POINT_EXPIRY_REQUIRED`).
5172
+ */
5173
+ export declare const updatePointPolicyRequestSchema: z.ZodObject<{
5174
+ reviewReward: z.ZodOptional<z.ZodObject<{
5175
+ enabled: z.ZodBoolean;
5176
+ textPoint: z.ZodNumber;
5177
+ photoPoint: z.ZodNumber;
5178
+ }, z.core.$strip>>;
5179
+ purchaseEarn: z.ZodOptional<z.ZodObject<{
5180
+ enabled: z.ZodBoolean;
5181
+ rateBp: z.ZodNumber;
5182
+ }, z.core.$strip>>;
5183
+ expiryDays: z.ZodOptional<z.ZodNumber>;
5184
+ }, z.core.$strip>;
5185
+ export type UpdatePointPolicyRequest = z.infer<typeof updatePointPolicyRequestSchema>;
5186
+ /** 응답의 원장 유형 — 값이 추가될 수 있어 문자열로 받는다 */
5187
+ export declare const responsePointEntryTypeSchema: z.ZodUnion<readonly [z.ZodEnum<{
5188
+ EARN_REVIEW: "EARN_REVIEW";
5189
+ REVOKE_REVIEW: "REVOKE_REVIEW";
5190
+ EARN_PURCHASE: "EARN_PURCHASE";
5191
+ USE_RESERVE: "USE_RESERVE";
5192
+ USE_RELEASE: "USE_RELEASE";
5193
+ REFUND_RESTORE: "REFUND_RESTORE";
5194
+ EXPIRE: "EXPIRE";
5195
+ ADJUST: "ADJUST";
5196
+ OPENING: "OPENING";
5197
+ }>, z.ZodString]>;
5198
+ /** 원장 항목 — 셀러 조회용(사유·행위자 포함) */
5199
+ export declare const pointEntrySchema: z.ZodObject<{
5200
+ entryId: z.ZodString;
5201
+ memberId: z.ZodString;
5202
+ type: z.ZodUnion<readonly [z.ZodEnum<{
5203
+ EARN_REVIEW: "EARN_REVIEW";
5204
+ REVOKE_REVIEW: "REVOKE_REVIEW";
5205
+ EARN_PURCHASE: "EARN_PURCHASE";
5206
+ USE_RESERVE: "USE_RESERVE";
5207
+ USE_RELEASE: "USE_RELEASE";
5208
+ REFUND_RESTORE: "REFUND_RESTORE";
5209
+ EXPIRE: "EXPIRE";
5210
+ ADJUST: "ADJUST";
5211
+ OPENING: "OPENING";
5212
+ }>, z.ZodString]>;
5213
+ amount: z.ZodNumber;
5214
+ balanceAfter: z.ZodNumber;
5215
+ refType: z.ZodNullable<z.ZodString>;
5216
+ refId: z.ZodNullable<z.ZodString>;
5217
+ memo: z.ZodNullable<z.ZodString>;
5218
+ actor: z.ZodNullable<z.ZodString>;
5219
+ createdAt: z.ZodString;
5220
+ }, z.core.$strip>;
5221
+ export type PointEntry = z.infer<typeof pointEntrySchema>;
5222
+ /** 적립 묶음 요약 — 남은 금액이 있는 묶음 */
5223
+ export declare const pointLotSchema: z.ZodObject<{
5224
+ lotId: z.ZodString;
5225
+ source: z.ZodUnion<readonly [z.ZodEnum<{
5226
+ PURCHASE: "PURCHASE";
5227
+ REFUND_RESTORE: "REFUND_RESTORE";
5228
+ ADJUST: "ADJUST";
5229
+ OPENING: "OPENING";
5230
+ REVIEW: "REVIEW";
5231
+ }>, z.ZodString]>;
5232
+ amount: z.ZodNumber;
5233
+ remaining: z.ZodNumber;
5234
+ expiresAt: z.ZodNullable<z.ZodString>;
5235
+ createdAt: z.ZodString;
5236
+ }, z.core.$strip>;
5237
+ export type PointLot = z.infer<typeof pointLotSchema>;
5238
+ /** `GET /v1/customers/{customerId}/points` */
5239
+ export declare const customerPointsSchema: z.ZodObject<{
5240
+ balance: z.ZodNumber;
5241
+ expiringSoon: z.ZodNumber;
5242
+ lots: z.ZodArray<z.ZodObject<{
5243
+ lotId: z.ZodString;
5244
+ source: z.ZodUnion<readonly [z.ZodEnum<{
5245
+ PURCHASE: "PURCHASE";
5246
+ REFUND_RESTORE: "REFUND_RESTORE";
5247
+ ADJUST: "ADJUST";
5248
+ OPENING: "OPENING";
5249
+ REVIEW: "REVIEW";
5250
+ }>, z.ZodString]>;
5251
+ amount: z.ZodNumber;
5252
+ remaining: z.ZodNumber;
5253
+ expiresAt: z.ZodNullable<z.ZodString>;
5254
+ createdAt: z.ZodString;
5255
+ }, z.core.$strip>>;
5256
+ }, z.core.$strip>;
5257
+ export type CustomerPoints = z.infer<typeof customerPointsSchema>;
5258
+ /** 원장 조회 쿼리 — 상점 전체(`GET /v1/points/history`)는 회원·유형·기간으로 거른다 */
5259
+ export declare const pointHistoryQuerySchema: z.ZodObject<{
5260
+ page: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
5261
+ size: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
5262
+ type: z.ZodOptional<z.ZodString>;
5263
+ memberId: z.ZodOptional<z.ZodString>;
5264
+ from: z.ZodOptional<z.ZodISODateTime>;
5265
+ to: z.ZodOptional<z.ZodISODateTime>;
5266
+ }, z.core.$strip>;
5267
+ export type PointHistoryQuery = z.infer<typeof pointHistoryQuerySchema>;
5268
+ /** 셀러 조정 금액 한도 — 한 번에 천만 원 */
5269
+ export declare const POINT_ADJUSTMENT_MAX = 10000000;
5270
+ /**
5271
+ * `POST /v1/customers/{customerId}/points/adjustments` — 셀러 지급(+)·차감(−). 헤더 `Idempotency-Key`가 필수다.
5272
+ * 지급의 소멸 시각은 `expiresAt`(생략하면 정책 유효 기간, 정책이 없으면 400 `POINT_EXPIRY_REQUIRED`), 차감은 소멸이 이른 적립금부터 뺀다
5273
+ * (잔액보다 많으면 409 `POINT_BALANCE_INSUFFICIENT`).
5274
+ */
5275
+ export declare const pointAdjustmentRequestSchema: z.ZodObject<{
5276
+ amount: z.ZodNumber;
5277
+ reason: z.ZodString;
5278
+ expiresAt: z.ZodOptional<z.ZodISODateTime>;
5279
+ }, z.core.$strip>;
5280
+ export type PointAdjustmentRequest = z.infer<typeof pointAdjustmentRequestSchema>;
5281
+ export declare const pointAdjustmentResultSchema: z.ZodObject<{
5282
+ entry: z.ZodObject<{
5283
+ entryId: z.ZodString;
5284
+ memberId: z.ZodString;
5285
+ type: z.ZodUnion<readonly [z.ZodEnum<{
5286
+ EARN_REVIEW: "EARN_REVIEW";
5287
+ REVOKE_REVIEW: "REVOKE_REVIEW";
5288
+ EARN_PURCHASE: "EARN_PURCHASE";
5289
+ USE_RESERVE: "USE_RESERVE";
5290
+ USE_RELEASE: "USE_RELEASE";
5291
+ REFUND_RESTORE: "REFUND_RESTORE";
5292
+ EXPIRE: "EXPIRE";
5293
+ ADJUST: "ADJUST";
5294
+ OPENING: "OPENING";
5295
+ }>, z.ZodString]>;
5296
+ amount: z.ZodNumber;
5297
+ balanceAfter: z.ZodNumber;
5298
+ refType: z.ZodNullable<z.ZodString>;
5299
+ refId: z.ZodNullable<z.ZodString>;
5300
+ memo: z.ZodNullable<z.ZodString>;
5301
+ actor: z.ZodNullable<z.ZodString>;
5302
+ createdAt: z.ZodString;
5303
+ }, z.core.$strip>;
5304
+ balance: z.ZodNumber;
5305
+ }, z.core.$strip>;
5306
+ export type PointAdjustmentResult = z.infer<typeof pointAdjustmentResultSchema>;
5307
+ //#endregion
4874
5308
  //#region src/schemas/product.d.ts
4875
5309
  export declare const productStatusSchema: z.ZodEnum<{
4876
5310
  SALE: "SALE";
@@ -5086,6 +5520,7 @@ export declare const productSchema: z.ZodObject<{
5086
5520
  description: z.ZodOptional<z.ZodString>;
5087
5521
  descriptionJson: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5088
5522
  originalPrice: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
5523
+ pointEarnRateBp: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
5089
5524
  images: z.ZodOptional<z.ZodArray<z.ZodURL>>;
5090
5525
  attributes: z.ZodOptional<z.ZodArray<z.ZodObject<{
5091
5526
  attributeId: z.ZodString;
@@ -5432,6 +5867,7 @@ export declare const productCreateRequestSchema: z.ZodObject<{
5432
5867
  categoryId: z.ZodString;
5433
5868
  salePrice: z.ZodNumber;
5434
5869
  originalPrice: z.ZodOptional<z.ZodNumber>;
5870
+ pointEarnRateBp: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
5435
5871
  description: z.ZodOptional<z.ZodString>;
5436
5872
  descriptionJson: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5437
5873
  images: z.ZodOptional<z.ZodArray<z.ZodURL>>;
@@ -5517,6 +5953,7 @@ export declare const productReplaceRequestSchema: z.ZodObject<{
5517
5953
  categoryId: z.ZodString;
5518
5954
  salePrice: z.ZodNumber;
5519
5955
  originalPrice: z.ZodOptional<z.ZodNumber>;
5956
+ pointEarnRateBp: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
5520
5957
  description: z.ZodOptional<z.ZodString>;
5521
5958
  descriptionJson: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5522
5959
  images: z.ZodOptional<z.ZodArray<z.ZodURL>>;
@@ -5567,6 +6004,7 @@ export declare const productPatchRequestSchema: z.ZodObject<{
5567
6004
  sellerFaultFreeShipping: z.ZodOptional<z.ZodBoolean>;
5568
6005
  conditionalFreeShortfallCharge: z.ZodOptional<z.ZodBoolean>;
5569
6006
  }, z.core.$strict>>>;
6007
+ pointEarnRateBp: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
5570
6008
  }, z.core.$strict>;
5571
6009
  export type ProductPatchRequest = z.infer<typeof productPatchRequestSchema>;
5572
6010
  export declare const productSortSchema: z.ZodEnum<{
@@ -6283,8 +6721,8 @@ export type StorefrontDomain = z.infer<typeof storefrontDomainSchema>;
6283
6721
  */
6284
6722
  export declare const storefrontProvisioningSchema: z.ZodObject<{
6285
6723
  status: z.ZodEnum<{
6286
- FAILED: "FAILED";
6287
6724
  PENDING: "PENDING";
6725
+ FAILED: "FAILED";
6288
6726
  SYNCED: "SYNCED";
6289
6727
  }>;
6290
6728
  lastErrorCode: z.ZodNullable<z.ZodString>;
@@ -6364,8 +6802,8 @@ export declare const storefrontSiteSchema: z.ZodObject<{
6364
6802
  }, z.core.$strip>>;
6365
6803
  provisioning: z.ZodObject<{
6366
6804
  status: z.ZodEnum<{
6367
- FAILED: "FAILED";
6368
6805
  PENDING: "PENDING";
6806
+ FAILED: "FAILED";
6369
6807
  SYNCED: "SYNCED";
6370
6808
  }>;
6371
6809
  lastErrorCode: z.ZodNullable<z.ZodString>;
@@ -6444,8 +6882,8 @@ export declare const storefrontHostingSchema: z.ZodObject<{
6444
6882
  }, z.core.$strip>>;
6445
6883
  provisioning: z.ZodObject<{
6446
6884
  status: z.ZodEnum<{
6447
- FAILED: "FAILED";
6448
6885
  PENDING: "PENDING";
6886
+ FAILED: "FAILED";
6449
6887
  SYNCED: "SYNCED";
6450
6888
  }>;
6451
6889
  lastErrorCode: z.ZodNullable<z.ZodString>;
@@ -6487,8 +6925,8 @@ export declare const storefrontDeploymentStepSchema: z.ZodObject<{
6487
6925
  PUBLISH: "PUBLISH";
6488
6926
  }>;
6489
6927
  status: z.ZodEnum<{
6490
- FAILED: "FAILED";
6491
6928
  PENDING: "PENDING";
6929
+ FAILED: "FAILED";
6492
6930
  RUNNING: "RUNNING";
6493
6931
  DONE: "DONE";
6494
6932
  }>;
@@ -6509,9 +6947,9 @@ export type StorefrontDeploymentLog = z.infer<typeof storefrontDeploymentLogSche
6509
6947
  export declare const storefrontDeploymentSchema: z.ZodObject<{
6510
6948
  siteId: z.ZodString;
6511
6949
  status: z.ZodEnum<{
6512
- SUCCEEDED: "SUCCEEDED";
6513
- FAILED: "FAILED";
6514
6950
  IN_PROGRESS: "IN_PROGRESS";
6951
+ FAILED: "FAILED";
6952
+ SUCCEEDED: "SUCCEEDED";
6515
6953
  }>;
6516
6954
  url: z.ZodString;
6517
6955
  startedAt: z.ZodString;
@@ -6523,8 +6961,8 @@ export declare const storefrontDeploymentSchema: z.ZodObject<{
6523
6961
  PUBLISH: "PUBLISH";
6524
6962
  }>;
6525
6963
  status: z.ZodEnum<{
6526
- FAILED: "FAILED";
6527
6964
  PENDING: "PENDING";
6965
+ FAILED: "FAILED";
6528
6966
  RUNNING: "RUNNING";
6529
6967
  DONE: "DONE";
6530
6968
  }>;
@@ -6644,8 +7082,8 @@ export declare function storefrontCustomHostnameProblem(hostname: string, hostin
6644
7082
  /** 소유 확인 TXT 레코드의 전체 이름 */
6645
7083
  export declare function storefrontDomainTxtNameOf(hostname: string): string;
6646
7084
  export declare const storefrontCustomDomainStatusSchema: z.ZodEnum<{
6647
- FAILED: "FAILED";
6648
7085
  ACTIVE: "ACTIVE";
7086
+ FAILED: "FAILED";
6649
7087
  PENDING_DNS: "PENDING_DNS";
6650
7088
  PENDING_VALIDATION: "PENDING_VALIDATION";
6651
7089
  }>;
@@ -6671,8 +7109,8 @@ export declare const storefrontSiteDomainSchema: z.ZodObject<{
6671
7109
  CUSTOM: "CUSTOM";
6672
7110
  }>;
6673
7111
  status: z.ZodEnum<{
6674
- FAILED: "FAILED";
6675
7112
  ACTIVE: "ACTIVE";
7113
+ FAILED: "FAILED";
6676
7114
  PENDING_DNS: "PENDING_DNS";
6677
7115
  PENDING_VALIDATION: "PENDING_VALIDATION";
6678
7116
  }>;
@@ -6690,9 +7128,9 @@ export declare const storefrontSiteDomainSchema: z.ZodObject<{
6690
7128
  }>;
6691
7129
  }, z.core.$strip>>;
6692
7130
  certificateStatus: z.ZodNullable<z.ZodEnum<{
6693
- FAILED: "FAILED";
6694
- PENDING: "PENDING";
6695
7131
  ACTIVE: "ACTIVE";
7132
+ PENDING: "PENDING";
7133
+ FAILED: "FAILED";
6696
7134
  }>>;
6697
7135
  failureCode: z.ZodNullable<z.ZodString>;
6698
7136
  verifiedAt: z.ZodNullable<z.ZodString>;
@@ -6714,8 +7152,8 @@ export declare const storefrontSiteDomainsSchema: z.ZodObject<{
6714
7152
  CUSTOM: "CUSTOM";
6715
7153
  }>;
6716
7154
  status: z.ZodEnum<{
6717
- FAILED: "FAILED";
6718
7155
  ACTIVE: "ACTIVE";
7156
+ FAILED: "FAILED";
6719
7157
  PENDING_DNS: "PENDING_DNS";
6720
7158
  PENDING_VALIDATION: "PENDING_VALIDATION";
6721
7159
  }>;
@@ -6733,9 +7171,9 @@ export declare const storefrontSiteDomainsSchema: z.ZodObject<{
6733
7171
  }>;
6734
7172
  }, z.core.$strip>>;
6735
7173
  certificateStatus: z.ZodNullable<z.ZodEnum<{
6736
- FAILED: "FAILED";
6737
- PENDING: "PENDING";
6738
7174
  ACTIVE: "ACTIVE";
7175
+ PENDING: "PENDING";
7176
+ FAILED: "FAILED";
6739
7177
  }>>;
6740
7178
  failureCode: z.ZodNullable<z.ZodString>;
6741
7179
  verifiedAt: z.ZodNullable<z.ZodString>;
@@ -6969,8 +7407,8 @@ export declare const runStorefrontCheckRequestSchema: z.ZodObject<{
6969
7407
  }, z.core.$strip>;
6970
7408
  export type RunStorefrontCheckRequest = z.infer<typeof runStorefrontCheckRequestSchema>;
6971
7409
  export declare const storefrontCheckStatusSchema: z.ZodEnum<{
6972
- FAILED: "FAILED";
6973
7410
  UNKNOWN: "UNKNOWN";
7411
+ FAILED: "FAILED";
6974
7412
  RUNNING: "RUNNING";
6975
7413
  QUEUED: "QUEUED";
6976
7414
  PASSED: "PASSED";
@@ -6983,8 +7421,8 @@ export declare const storefrontCheckSchema: z.ZodObject<{
6983
7421
  checkId: z.ZodString;
6984
7422
  check: z.ZodString;
6985
7423
  status: z.ZodEnum<{
6986
- FAILED: "FAILED";
6987
7424
  UNKNOWN: "UNKNOWN";
7425
+ FAILED: "FAILED";
6988
7426
  RUNNING: "RUNNING";
6989
7427
  QUEUED: "QUEUED";
6990
7428
  PASSED: "PASSED";
@@ -7068,8 +7506,8 @@ export declare const storefrontVerifyReportSchema: z.ZodObject<{
7068
7506
  }, z.core.$strip>;
7069
7507
  export type StorefrontVerifyReport = z.infer<typeof storefrontVerifyReportSchema>;
7070
7508
  export declare const storefrontBuildStatusSchema: z.ZodEnum<{
7071
- SUCCEEDED: "SUCCEEDED";
7072
7509
  FAILED: "FAILED";
7510
+ SUCCEEDED: "SUCCEEDED";
7073
7511
  RUNNING: "RUNNING";
7074
7512
  QUEUED: "QUEUED";
7075
7513
  TIMED_OUT: "TIMED_OUT";
@@ -7136,8 +7574,8 @@ export declare const storefrontBuildSchema: z.ZodObject<{
7136
7574
  versionId: z.ZodString;
7137
7575
  versionNumber: z.ZodNumber;
7138
7576
  status: z.ZodEnum<{
7139
- SUCCEEDED: "SUCCEEDED";
7140
7577
  FAILED: "FAILED";
7578
+ SUCCEEDED: "SUCCEEDED";
7141
7579
  RUNNING: "RUNNING";
7142
7580
  QUEUED: "QUEUED";
7143
7581
  TIMED_OUT: "TIMED_OUT";
@@ -7265,8 +7703,8 @@ export declare const storefrontVersionCreatedSchema: z.ZodObject<{
7265
7703
  versionId: z.ZodString;
7266
7704
  versionNumber: z.ZodNumber;
7267
7705
  status: z.ZodEnum<{
7268
- SUCCEEDED: "SUCCEEDED";
7269
7706
  FAILED: "FAILED";
7707
+ SUCCEEDED: "SUCCEEDED";
7270
7708
  RUNNING: "RUNNING";
7271
7709
  QUEUED: "QUEUED";
7272
7710
  TIMED_OUT: "TIMED_OUT";
@@ -7826,6 +8264,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
7826
8264
  description?: string | undefined;
7827
8265
  descriptionJson?: string | null | undefined;
7828
8266
  originalPrice?: number | null | undefined;
8267
+ pointEarnRateBp?: number | null | undefined;
7829
8268
  images?: string[] | undefined;
7830
8269
  attributes?: {
7831
8270
  attributeId: string;
@@ -7923,6 +8362,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
7923
8362
  description?: string | undefined;
7924
8363
  descriptionJson?: string | null | undefined;
7925
8364
  originalPrice?: number | null | undefined;
8365
+ pointEarnRateBp?: number | null | undefined;
7926
8366
  images?: string[] | undefined;
7927
8367
  attributes?: {
7928
8368
  attributeId: string;
@@ -8020,6 +8460,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
8020
8460
  description?: string | undefined;
8021
8461
  descriptionJson?: string | null | undefined;
8022
8462
  originalPrice?: number | null | undefined;
8463
+ pointEarnRateBp?: number | null | undefined;
8023
8464
  images?: string[] | undefined;
8024
8465
  attributes?: {
8025
8466
  attributeId: string;
@@ -8325,6 +8766,23 @@ export declare function createStoreClient(options: StoreClientOptions): {
8325
8766
  description: string;
8326
8767
  imageUrl: string | null;
8327
8768
  productSort: string;
8769
+ rules: ({
8770
+ field: "createdWithinDays";
8771
+ value: number;
8772
+ } | {
8773
+ field: "category";
8774
+ categoryIds: string[];
8775
+ } | {
8776
+ field: "price";
8777
+ min?: number | undefined;
8778
+ max?: number | undefined;
8779
+ } | {
8780
+ field: "discounted";
8781
+ value: true;
8782
+ } | {
8783
+ [x: string]: unknown;
8784
+ field: string;
8785
+ })[] | null;
8328
8786
  visible: boolean;
8329
8787
  startsAt: string | null;
8330
8788
  endsAt: string | null;
@@ -8353,6 +8811,23 @@ export declare function createStoreClient(options: StoreClientOptions): {
8353
8811
  description: string;
8354
8812
  imageUrl: string | null;
8355
8813
  productSort: string;
8814
+ rules: ({
8815
+ field: "createdWithinDays";
8816
+ value: number;
8817
+ } | {
8818
+ field: "category";
8819
+ categoryIds: string[];
8820
+ } | {
8821
+ field: "price";
8822
+ min?: number | undefined;
8823
+ max?: number | undefined;
8824
+ } | {
8825
+ field: "discounted";
8826
+ value: true;
8827
+ } | {
8828
+ [x: string]: unknown;
8829
+ field: string;
8830
+ })[] | null;
8356
8831
  visible: boolean;
8357
8832
  startsAt: string | null;
8358
8833
  endsAt: string | null;
@@ -8374,6 +8849,23 @@ export declare function createStoreClient(options: StoreClientOptions): {
8374
8849
  description: string;
8375
8850
  imageUrl: string | null;
8376
8851
  productSort: string;
8852
+ rules: ({
8853
+ field: "createdWithinDays";
8854
+ value: number;
8855
+ } | {
8856
+ field: "category";
8857
+ categoryIds: string[];
8858
+ } | {
8859
+ field: "price";
8860
+ min?: number | undefined;
8861
+ max?: number | undefined;
8862
+ } | {
8863
+ field: "discounted";
8864
+ value: true;
8865
+ } | {
8866
+ [x: string]: unknown;
8867
+ field: string;
8868
+ })[] | null;
8377
8869
  visible: boolean;
8378
8870
  startsAt: string | null;
8379
8871
  endsAt: string | null;
@@ -8394,6 +8886,23 @@ export declare function createStoreClient(options: StoreClientOptions): {
8394
8886
  description: string;
8395
8887
  imageUrl: string | null;
8396
8888
  productSort: string;
8889
+ rules: ({
8890
+ field: "createdWithinDays";
8891
+ value: number;
8892
+ } | {
8893
+ field: "category";
8894
+ categoryIds: string[];
8895
+ } | {
8896
+ field: "price";
8897
+ min?: number | undefined;
8898
+ max?: number | undefined;
8899
+ } | {
8900
+ field: "discounted";
8901
+ value: true;
8902
+ } | {
8903
+ [x: string]: unknown;
8904
+ field: string;
8905
+ })[] | null;
8397
8906
  visible: boolean;
8398
8907
  startsAt: string | null;
8399
8908
  endsAt: string | null;
@@ -8407,7 +8916,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
8407
8916
  updatedAt: string;
8408
8917
  }>;
8409
8918
  remove: (collectionId: string) => Promise<void>;
8410
- /** 담긴 상품 — 직접 정한 순서 */
8919
+ /** 담긴 상품 — 직접 선택은 정한 순서, 조건 자동은 지금 조건을 만족하는 판매 중 상품(기본 정렬 순) */
8411
8920
  listProducts: (collectionId: string, params?: {
8412
8921
  page?: number;
8413
8922
  size?: number;
@@ -8435,6 +8944,23 @@ export declare function createStoreClient(options: StoreClientOptions): {
8435
8944
  description: string;
8436
8945
  imageUrl: string | null;
8437
8946
  productSort: string;
8947
+ rules: ({
8948
+ field: "createdWithinDays";
8949
+ value: number;
8950
+ } | {
8951
+ field: "category";
8952
+ categoryIds: string[];
8953
+ } | {
8954
+ field: "price";
8955
+ min?: number | undefined;
8956
+ max?: number | undefined;
8957
+ } | {
8958
+ field: "discounted";
8959
+ value: true;
8960
+ } | {
8961
+ [x: string]: unknown;
8962
+ field: string;
8963
+ })[] | null;
8438
8964
  visible: boolean;
8439
8965
  startsAt: string | null;
8440
8966
  endsAt: string | null;
@@ -8456,6 +8982,23 @@ export declare function createStoreClient(options: StoreClientOptions): {
8456
8982
  description: string;
8457
8983
  imageUrl: string | null;
8458
8984
  productSort: string;
8985
+ rules: ({
8986
+ field: "createdWithinDays";
8987
+ value: number;
8988
+ } | {
8989
+ field: "category";
8990
+ categoryIds: string[];
8991
+ } | {
8992
+ field: "price";
8993
+ min?: number | undefined;
8994
+ max?: number | undefined;
8995
+ } | {
8996
+ field: "discounted";
8997
+ value: true;
8998
+ } | {
8999
+ [x: string]: unknown;
9000
+ field: string;
9001
+ })[] | null;
8459
9002
  visible: boolean;
8460
9003
  startsAt: string | null;
8461
9004
  endsAt: string | null;
@@ -8469,6 +9012,19 @@ export declare function createStoreClient(options: StoreClientOptions): {
8469
9012
  updatedAt: string;
8470
9013
  }>;
8471
9014
  removeProduct: (collectionId: string, productId: string) => Promise<void>;
9015
+ /** 조건 자동 미리보기 — 저장하지 않고 조건을 만족하는 판매 중 상품 수와 앞 20개를 본다 */
9016
+ preview: (body: CollectionPreviewRequest) => Promise<{
9017
+ count: number;
9018
+ products: {
9019
+ productId: string;
9020
+ name: string;
9021
+ thumbnailUrl: string | null;
9022
+ status: string;
9023
+ salePrice: number;
9024
+ position: number;
9025
+ addedAt: string;
9026
+ }[];
9027
+ }>;
8472
9028
  };
8473
9029
  categories: {
8474
9030
  list: (params?: {
@@ -9070,7 +9626,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
9070
9626
  contents: {
9071
9627
  claimId: string;
9072
9628
  type: "RETURN" | "EXCHANGE" | "CANCEL";
9073
- status: "REJECTED" | "COMPLETED" | "REQUESTED" | "HELD" | "COLLECTING" | "COLLECTED" | "REDELIVERING" | "APPROVED" | "WITHDRAWN";
9629
+ status: "COMPLETED" | "REJECTED" | "REQUESTED" | "HELD" | "COLLECTING" | "COLLECTED" | "REDELIVERING" | "APPROVED" | "WITHDRAWN";
9074
9630
  orderId: string;
9075
9631
  orderItemId: string;
9076
9632
  productName: string;
@@ -9108,7 +9664,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
9108
9664
  get: (claimId: string) => Promise<{
9109
9665
  claimId: string;
9110
9666
  type: "RETURN" | "EXCHANGE" | "CANCEL";
9111
- status: "REJECTED" | "COMPLETED" | "REQUESTED" | "HELD" | "COLLECTING" | "COLLECTED" | "REDELIVERING" | "APPROVED" | "WITHDRAWN";
9667
+ status: "COMPLETED" | "REJECTED" | "REQUESTED" | "HELD" | "COLLECTING" | "COLLECTED" | "REDELIVERING" | "APPROVED" | "WITHDRAWN";
9112
9668
  orderId: string;
9113
9669
  orderItemId: string;
9114
9670
  productName: string;
@@ -9142,7 +9698,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
9142
9698
  address2: string | null;
9143
9699
  } | null;
9144
9700
  histories?: {
9145
- status: "REJECTED" | "COMPLETED" | "REQUESTED" | "HELD" | "COLLECTING" | "COLLECTED" | "REDELIVERING" | "APPROVED" | "WITHDRAWN";
9701
+ status: "COMPLETED" | "REJECTED" | "REQUESTED" | "HELD" | "COLLECTING" | "COLLECTED" | "REDELIVERING" | "APPROVED" | "WITHDRAWN";
9146
9702
  actor: "SYSTEM" | "BUYER" | "SELLER";
9147
9703
  occurredAt: string;
9148
9704
  }[] | undefined;
@@ -9174,7 +9730,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
9174
9730
  completeExchange: (claimId: string) => Promise<{
9175
9731
  claimId: string;
9176
9732
  type: "RETURN" | "EXCHANGE" | "CANCEL";
9177
- status: "REJECTED" | "COMPLETED" | "REQUESTED" | "HELD" | "COLLECTING" | "COLLECTED" | "REDELIVERING" | "APPROVED" | "WITHDRAWN";
9733
+ status: "COMPLETED" | "REJECTED" | "REQUESTED" | "HELD" | "COLLECTING" | "COLLECTED" | "REDELIVERING" | "APPROVED" | "WITHDRAWN";
9178
9734
  orderId: string;
9179
9735
  orderItemId: string;
9180
9736
  productName: string;
@@ -9355,7 +9911,80 @@ export declare function createStoreClient(options: StoreClientOptions): {
9355
9911
  }>;
9356
9912
  };
9357
9913
  /** 구매자 관리 — 조회 `customer:r`, 탈퇴 처리 `customer:rw`(상점 플랫폼 OWNER·ADMIN) */
9914
+ /** 적립금 — 상점 전체 원장(#93). 스코프 `promotion:r` */
9915
+ points: {
9916
+ /** `GET /v1/points/history` — 회원(`memberId`)·유형(`type`)·기간(`from`·`to`)으로 거른다 */
9917
+ listHistory: (params?: PointHistoryQuery) => Promise<{
9918
+ page: number;
9919
+ size: number;
9920
+ totalElements: number;
9921
+ totalPages: number;
9922
+ contents: {
9923
+ entryId: string;
9924
+ memberId: string;
9925
+ type: string;
9926
+ amount: number;
9927
+ balanceAfter: number;
9928
+ refType: string | null;
9929
+ refId: string | null;
9930
+ memo: string | null;
9931
+ actor: string | null;
9932
+ createdAt: string;
9933
+ }[];
9934
+ }>;
9935
+ };
9358
9936
  customers: {
9937
+ /** `GET /v1/customers/{customerId}/points` — 잔액·30일 안 소멸 예정·남은 적립 묶음(#93) */
9938
+ getPoints: (customerId: string) => Promise<{
9939
+ balance: number;
9940
+ expiringSoon: number;
9941
+ lots: {
9942
+ lotId: string;
9943
+ source: string;
9944
+ amount: number;
9945
+ remaining: number;
9946
+ expiresAt: string | null;
9947
+ createdAt: string;
9948
+ }[];
9949
+ }>;
9950
+ /** `GET /v1/customers/{customerId}/points/history` — 적립금 내역(최신순, 셀러 사유 포함) */
9951
+ listPointHistory: (customerId: string, params?: Omit<PointHistoryQuery, "memberId">) => Promise<{
9952
+ page: number;
9953
+ size: number;
9954
+ totalElements: number;
9955
+ totalPages: number;
9956
+ contents: {
9957
+ entryId: string;
9958
+ memberId: string;
9959
+ type: string;
9960
+ amount: number;
9961
+ balanceAfter: number;
9962
+ refType: string | null;
9963
+ refId: string | null;
9964
+ memo: string | null;
9965
+ actor: string | null;
9966
+ createdAt: string;
9967
+ }[];
9968
+ }>;
9969
+ /**
9970
+ * `POST /v1/customers/{customerId}/points/adjustments` (201) — 스코프 `promotion:rw`. 양수 지급, 음수 차감. `idempotencyKey`가 필수다.
9971
+ * 에러: 409 `POINT_BALANCE_INSUFFICIENT`·`POINTS_UNAVAILABLE`, 400 `POINT_EXPIRY_REQUIRED`. 에이전트 요청은 승인 대상이다
9972
+ */
9973
+ adjustPoints: (customerId: string, body: PointAdjustmentRequest, idempotencyKey: string) => Promise<{
9974
+ entry: {
9975
+ entryId: string;
9976
+ memberId: string;
9977
+ type: string;
9978
+ amount: number;
9979
+ balanceAfter: number;
9980
+ refType: string | null;
9981
+ refId: string | null;
9982
+ memo: string | null;
9983
+ actor: string | null;
9984
+ createdAt: string;
9985
+ };
9986
+ balance: number;
9987
+ }>;
9359
9988
  list: (params?: PageParams & Omit<z.input<typeof customerListQuerySchema>, "page" | "size">) => Promise<{
9360
9989
  page: number;
9361
9990
  size: number;
@@ -10077,7 +10706,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
10077
10706
  sources: (params: AnalyticsSourcesParams) => Promise<{
10078
10707
  groupBy: "CAMPAIGN" | "CHANNEL" | "SOURCE" | "DEVICE";
10079
10708
  rows: {
10080
- channel: "UNKNOWN" | "DIRECT" | "ORGANIC_SEARCH" | "SOCIAL" | "PAID" | "EMAIL" | "CAMPAIGN" | "REFERRAL" | null;
10709
+ channel: "DIRECT" | "ORGANIC_SEARCH" | "SOCIAL" | "PAID" | "EMAIL" | "CAMPAIGN" | "REFERRAL" | "UNKNOWN" | null;
10081
10710
  source: string | null;
10082
10711
  medium: string | null;
10083
10712
  campaign: string | null;
@@ -10212,7 +10841,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
10212
10841
  orderId: string | null;
10213
10842
  orderName: string;
10214
10843
  customerName: string;
10215
- status: "FAILED" | "PENDING" | "APPROVED" | "PARTIALLY_REFUNDED" | "REFUNDED";
10844
+ status: "PENDING" | "FAILED" | "APPROVED" | "PARTIALLY_REFUNDED" | "REFUNDED";
10216
10845
  amount: number;
10217
10846
  refundedAmount: number;
10218
10847
  provider: "tosspayments" | "portone" | null;
@@ -10236,7 +10865,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
10236
10865
  orderId: string | null;
10237
10866
  orderName: string;
10238
10867
  customerName: string;
10239
- status: "FAILED" | "PENDING" | "APPROVED" | "PARTIALLY_REFUNDED" | "REFUNDED";
10868
+ status: "PENDING" | "FAILED" | "APPROVED" | "PARTIALLY_REFUNDED" | "REFUNDED";
10240
10869
  amount: number;
10241
10870
  refundedAmount: number;
10242
10871
  provider: "tosspayments" | "portone" | null;
@@ -10335,7 +10964,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
10335
10964
  masked: string | null;
10336
10965
  }[];
10337
10966
  lastVerification: {
10338
- result: "FAILED" | "SUCCESS";
10967
+ result: "SUCCESS" | "FAILED";
10339
10968
  message: string | null;
10340
10969
  checkedAt: string;
10341
10970
  } | null;
@@ -10360,7 +10989,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
10360
10989
  masked: string | null;
10361
10990
  }[];
10362
10991
  lastVerification: {
10363
- result: "FAILED" | "SUCCESS";
10992
+ result: "SUCCESS" | "FAILED";
10364
10993
  message: string | null;
10365
10994
  checkedAt: string;
10366
10995
  } | null;
@@ -10384,7 +11013,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
10384
11013
  masked: string | null;
10385
11014
  }[];
10386
11015
  lastVerification: {
10387
- result: "FAILED" | "SUCCESS";
11016
+ result: "SUCCESS" | "FAILED";
10388
11017
  message: string | null;
10389
11018
  checkedAt: string;
10390
11019
  } | null;
@@ -10445,7 +11074,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
10445
11074
  masked: string | null;
10446
11075
  }[];
10447
11076
  lastVerification: {
10448
- result: "FAILED" | "SUCCESS";
11077
+ result: "SUCCESS" | "FAILED";
10449
11078
  message: string | null;
10450
11079
  checkedAt: string;
10451
11080
  } | null;
@@ -10470,7 +11099,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
10470
11099
  masked: string | null;
10471
11100
  }[];
10472
11101
  lastVerification: {
10473
- result: "FAILED" | "SUCCESS";
11102
+ result: "SUCCESS" | "FAILED";
10474
11103
  message: string | null;
10475
11104
  checkedAt: string;
10476
11105
  } | null;
@@ -10494,7 +11123,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
10494
11123
  masked: string | null;
10495
11124
  }[];
10496
11125
  lastVerification: {
10497
- result: "FAILED" | "SUCCESS";
11126
+ result: "SUCCESS" | "FAILED";
10498
11127
  message: string | null;
10499
11128
  checkedAt: string;
10500
11129
  } | null;
@@ -10560,7 +11189,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
10560
11189
  masked: string | null;
10561
11190
  }[];
10562
11191
  lastVerification: {
10563
- result: "FAILED" | "SUCCESS";
11192
+ result: "SUCCESS" | "FAILED";
10564
11193
  message: string | null;
10565
11194
  checkedAt: string;
10566
11195
  } | null;
@@ -10585,7 +11214,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
10585
11214
  masked: string | null;
10586
11215
  }[];
10587
11216
  lastVerification: {
10588
- result: "FAILED" | "SUCCESS";
11217
+ result: "SUCCESS" | "FAILED";
10589
11218
  message: string | null;
10590
11219
  checkedAt: string;
10591
11220
  } | null;
@@ -10609,7 +11238,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
10609
11238
  masked: string | null;
10610
11239
  }[];
10611
11240
  lastVerification: {
10612
- result: "FAILED" | "SUCCESS";
11241
+ result: "SUCCESS" | "FAILED";
10613
11242
  message: string | null;
10614
11243
  checkedAt: string;
10615
11244
  } | null;
@@ -10656,7 +11285,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
10656
11285
  masked: string | null;
10657
11286
  }[];
10658
11287
  lastVerification: {
10659
- result: "FAILED" | "SUCCESS";
11288
+ result: "SUCCESS" | "FAILED";
10660
11289
  message: string | null;
10661
11290
  checkedAt: string;
10662
11291
  } | null;
@@ -10681,7 +11310,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
10681
11310
  masked: string | null;
10682
11311
  }[];
10683
11312
  lastVerification: {
10684
- result: "FAILED" | "SUCCESS";
11313
+ result: "SUCCESS" | "FAILED";
10685
11314
  message: string | null;
10686
11315
  checkedAt: string;
10687
11316
  } | null;
@@ -10705,7 +11334,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
10705
11334
  masked: string | null;
10706
11335
  }[];
10707
11336
  lastVerification: {
10708
- result: "FAILED" | "SUCCESS";
11337
+ result: "SUCCESS" | "FAILED";
10709
11338
  message: string | null;
10710
11339
  checkedAt: string;
10711
11340
  } | null;
@@ -10762,7 +11391,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
10762
11391
  masked: string | null;
10763
11392
  }[];
10764
11393
  lastVerification: {
10765
- result: "FAILED" | "SUCCESS";
11394
+ result: "SUCCESS" | "FAILED";
10766
11395
  message: string | null;
10767
11396
  checkedAt: string;
10768
11397
  } | null;
@@ -10787,7 +11416,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
10787
11416
  masked: string | null;
10788
11417
  }[];
10789
11418
  lastVerification: {
10790
- result: "FAILED" | "SUCCESS";
11419
+ result: "SUCCESS" | "FAILED";
10791
11420
  message: string | null;
10792
11421
  checkedAt: string;
10793
11422
  } | null;
@@ -10811,7 +11440,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
10811
11440
  masked: string | null;
10812
11441
  }[];
10813
11442
  lastVerification: {
10814
- result: "FAILED" | "SUCCESS";
11443
+ result: "SUCCESS" | "FAILED";
10815
11444
  message: string | null;
10816
11445
  checkedAt: string;
10817
11446
  } | null;
@@ -10858,7 +11487,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
10858
11487
  masked: string | null;
10859
11488
  }[];
10860
11489
  lastVerification: {
10861
- result: "FAILED" | "SUCCESS";
11490
+ result: "SUCCESS" | "FAILED";
10862
11491
  message: string | null;
10863
11492
  checkedAt: string;
10864
11493
  } | null;
@@ -10883,7 +11512,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
10883
11512
  masked: string | null;
10884
11513
  }[];
10885
11514
  lastVerification: {
10886
- result: "FAILED" | "SUCCESS";
11515
+ result: "SUCCESS" | "FAILED";
10887
11516
  message: string | null;
10888
11517
  checkedAt: string;
10889
11518
  } | null;
@@ -10907,7 +11536,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
10907
11536
  masked: string | null;
10908
11537
  }[];
10909
11538
  lastVerification: {
10910
- result: "FAILED" | "SUCCESS";
11539
+ result: "SUCCESS" | "FAILED";
10911
11540
  message: string | null;
10912
11541
  checkedAt: string;
10913
11542
  } | null;
@@ -10963,7 +11592,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
10963
11592
  masked: string | null;
10964
11593
  }[];
10965
11594
  lastVerification: {
10966
- result: "FAILED" | "SUCCESS";
11595
+ result: "SUCCESS" | "FAILED";
10967
11596
  message: string | null;
10968
11597
  checkedAt: string;
10969
11598
  } | null;
@@ -10988,7 +11617,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
10988
11617
  masked: string | null;
10989
11618
  }[];
10990
11619
  lastVerification: {
10991
- result: "FAILED" | "SUCCESS";
11620
+ result: "SUCCESS" | "FAILED";
10992
11621
  message: string | null;
10993
11622
  checkedAt: string;
10994
11623
  } | null;
@@ -11012,7 +11641,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
11012
11641
  masked: string | null;
11013
11642
  }[];
11014
11643
  lastVerification: {
11015
- result: "FAILED" | "SUCCESS";
11644
+ result: "SUCCESS" | "FAILED";
11016
11645
  message: string | null;
11017
11646
  checkedAt: string;
11018
11647
  } | null;
@@ -11040,7 +11669,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
11040
11669
  verify: (provider: PgProvider, body?: VerifyPaymentProviderRequest) => Promise<{
11041
11670
  provider: "tosspayments" | "portone";
11042
11671
  environment: "TEST" | "LIVE";
11043
- result: "FAILED" | "SUCCESS";
11672
+ result: "SUCCESS" | "FAILED";
11044
11673
  message: string | null;
11045
11674
  checkedAt: string;
11046
11675
  }>;
@@ -11106,7 +11735,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
11106
11735
  eventId: string;
11107
11736
  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";
11108
11737
  url: string;
11109
- status: "FAILED" | "PENDING" | "PENDING_RETRY" | "SUCCESS";
11738
+ status: "PENDING" | "PENDING_RETRY" | "SUCCESS" | "FAILED";
11110
11739
  responseStatusCode: number | null;
11111
11740
  responseTimeMs: number | null;
11112
11741
  responseBodyExcerpt: string | null;
@@ -11133,7 +11762,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
11133
11762
  eventId: string;
11134
11763
  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";
11135
11764
  url: string;
11136
- status: "FAILED" | "PENDING" | "PENDING_RETRY" | "SUCCESS";
11765
+ status: "PENDING" | "PENDING_RETRY" | "SUCCESS" | "FAILED";
11137
11766
  responseStatusCode: number | null;
11138
11767
  responseTimeMs: number | null;
11139
11768
  responseBodyExcerpt: string | null;
@@ -11168,7 +11797,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
11168
11797
  eventId: string;
11169
11798
  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";
11170
11799
  url: string;
11171
- status: "FAILED" | "PENDING" | "PENDING_RETRY" | "SUCCESS";
11800
+ status: "PENDING" | "PENDING_RETRY" | "SUCCESS" | "FAILED";
11172
11801
  responseStatusCode: number | null;
11173
11802
  responseTimeMs: number | null;
11174
11803
  responseBodyExcerpt: string | null;
@@ -11264,7 +11893,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
11264
11893
  method: string | null;
11265
11894
  path: string | null;
11266
11895
  statusCode: number | null;
11267
- outcome: "SUCCEEDED" | "FAILED" | "PENDING_APPROVAL" | "DENIED" | "DRY_RUN" | null;
11896
+ outcome: "FAILED" | "SUCCEEDED" | "PENDING_APPROVAL" | "DENIED" | "DRY_RUN" | null;
11268
11897
  errorCode: string | null;
11269
11898
  traceId: string | null;
11270
11899
  idempotencyKey: string | null;
@@ -11282,7 +11911,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
11282
11911
  list: (params?: ApprovalListOptions) => Promise<{
11283
11912
  items: {
11284
11913
  approvalId: string;
11285
- status: "SUCCEEDED" | "FAILED" | "PENDING" | "EXECUTING" | "UNKNOWN" | "REJECTED" | "EXPIRED";
11914
+ status: "UNKNOWN" | "PENDING" | "FAILED" | "SUCCEEDED" | "EXECUTING" | "REJECTED" | "EXPIRED";
11286
11915
  operationId: string;
11287
11916
  method: string;
11288
11917
  path: string;
@@ -11332,7 +11961,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
11332
11961
  }>;
11333
11962
  get: (approvalId: string) => Promise<{
11334
11963
  approvalId: string;
11335
- status: "SUCCEEDED" | "FAILED" | "PENDING" | "EXECUTING" | "UNKNOWN" | "REJECTED" | "EXPIRED";
11964
+ status: "UNKNOWN" | "PENDING" | "FAILED" | "SUCCEEDED" | "EXECUTING" | "REJECTED" | "EXPIRED";
11336
11965
  operationId: string;
11337
11966
  method: string;
11338
11967
  path: string;
@@ -11384,7 +12013,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
11384
12013
  */
11385
12014
  approve: (approvalId: string, body?: ApprovalDecisionRequest) => Promise<{
11386
12015
  approvalId: string;
11387
- status: "SUCCEEDED" | "FAILED" | "PENDING" | "EXECUTING" | "UNKNOWN" | "REJECTED" | "EXPIRED";
12016
+ status: "UNKNOWN" | "PENDING" | "FAILED" | "SUCCEEDED" | "EXECUTING" | "REJECTED" | "EXPIRED";
11388
12017
  operationId: string;
11389
12018
  method: string;
11390
12019
  path: string;
@@ -11432,7 +12061,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
11432
12061
  }>;
11433
12062
  reject: (approvalId: string, body?: ApprovalDecisionRequest) => Promise<{
11434
12063
  approvalId: string;
11435
- status: "SUCCEEDED" | "FAILED" | "PENDING" | "EXECUTING" | "UNKNOWN" | "REJECTED" | "EXPIRED";
12064
+ status: "UNKNOWN" | "PENDING" | "FAILED" | "SUCCEEDED" | "EXECUTING" | "REJECTED" | "EXPIRED";
11436
12065
  operationId: string;
11437
12066
  method: string;
11438
12067
  path: string;
@@ -11600,7 +12229,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
11600
12229
  createdVia?: string | null | undefined;
11601
12230
  } | null;
11602
12231
  provisioning: {
11603
- status: "FAILED" | "PENDING" | "SYNCED";
12232
+ status: "PENDING" | "FAILED" | "SYNCED";
11604
12233
  lastErrorCode: string | null;
11605
12234
  syncedAt: string | null;
11606
12235
  };
@@ -11658,7 +12287,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
11658
12287
  createdVia?: string | null | undefined;
11659
12288
  } | null;
11660
12289
  provisioning: {
11661
- status: "FAILED" | "PENDING" | "SYNCED";
12290
+ status: "PENDING" | "FAILED" | "SYNCED";
11662
12291
  lastErrorCode: string | null;
11663
12292
  syncedAt: string | null;
11664
12293
  };
@@ -11676,13 +12305,13 @@ export declare function createStoreClient(options: StoreClientOptions): {
11676
12305
  /** `GET /v1/storefront/site/deployment` — 배포 진행(단계·기록). 만든 뒤 반영이 끝날 때까지 폴링한다 */
11677
12306
  getDeployment: () => Promise<{
11678
12307
  siteId: string;
11679
- status: "SUCCEEDED" | "FAILED" | "IN_PROGRESS";
12308
+ status: "IN_PROGRESS" | "FAILED" | "SUCCEEDED";
11680
12309
  url: string;
11681
12310
  startedAt: string;
11682
12311
  finishedAt: string | null;
11683
12312
  steps: {
11684
12313
  key: "SITE" | "UPLOAD" | "PUBLISH";
11685
- status: "FAILED" | "PENDING" | "RUNNING" | "DONE";
12314
+ status: "PENDING" | "FAILED" | "RUNNING" | "DONE";
11686
12315
  finishedAt: string | null;
11687
12316
  }[];
11688
12317
  log: {
@@ -11698,13 +12327,13 @@ export declare function createStoreClient(options: StoreClientOptions): {
11698
12327
  /** `POST /v1/storefront/site/deployment/retry` (202) — 밀린 반영을 곧바로 다시 시도한다. 이미 반영됐으면 그대로다 */
11699
12328
  retryDeployment: () => Promise<{
11700
12329
  siteId: string;
11701
- status: "SUCCEEDED" | "FAILED" | "IN_PROGRESS";
12330
+ status: "IN_PROGRESS" | "FAILED" | "SUCCEEDED";
11702
12331
  url: string;
11703
12332
  startedAt: string;
11704
12333
  finishedAt: string | null;
11705
12334
  steps: {
11706
12335
  key: "SITE" | "UPLOAD" | "PUBLISH";
11707
- status: "FAILED" | "PENDING" | "RUNNING" | "DONE";
12336
+ status: "PENDING" | "FAILED" | "RUNNING" | "DONE";
11708
12337
  finishedAt: string | null;
11709
12338
  }[];
11710
12339
  log: {
@@ -11754,7 +12383,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
11754
12383
  createdVia?: string | null | undefined;
11755
12384
  } | null;
11756
12385
  provisioning: {
11757
- status: "FAILED" | "PENDING" | "SYNCED";
12386
+ status: "PENDING" | "FAILED" | "SYNCED";
11758
12387
  lastErrorCode: string | null;
11759
12388
  syncedAt: string | null;
11760
12389
  };
@@ -11818,7 +12447,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
11818
12447
  createdVia?: string | null | undefined;
11819
12448
  } | null;
11820
12449
  provisioning: {
11821
- status: "FAILED" | "PENDING" | "SYNCED";
12450
+ status: "PENDING" | "FAILED" | "SYNCED";
11822
12451
  lastErrorCode: string | null;
11823
12452
  syncedAt: string | null;
11824
12453
  };
@@ -11866,7 +12495,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
11866
12495
  createdVia?: string | null | undefined;
11867
12496
  } | null;
11868
12497
  provisioning: {
11869
- status: "FAILED" | "PENDING" | "SYNCED";
12498
+ status: "PENDING" | "FAILED" | "SYNCED";
11870
12499
  lastErrorCode: string | null;
11871
12500
  syncedAt: string | null;
11872
12501
  };
@@ -11914,7 +12543,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
11914
12543
  createdVia?: string | null | undefined;
11915
12544
  } | null;
11916
12545
  provisioning: {
11917
- status: "FAILED" | "PENDING" | "SYNCED";
12546
+ status: "PENDING" | "FAILED" | "SYNCED";
11918
12547
  lastErrorCode: string | null;
11919
12548
  syncedAt: string | null;
11920
12549
  };
@@ -11962,7 +12591,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
11962
12591
  createdVia?: string | null | undefined;
11963
12592
  } | null;
11964
12593
  provisioning: {
11965
- status: "FAILED" | "PENDING" | "SYNCED";
12594
+ status: "PENDING" | "FAILED" | "SYNCED";
11966
12595
  lastErrorCode: string | null;
11967
12596
  syncedAt: string | null;
11968
12597
  };
@@ -11994,7 +12623,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
11994
12623
  domainId: string;
11995
12624
  hostname: string;
11996
12625
  kind: "PLATFORM" | "CUSTOM";
11997
- status: "FAILED" | "ACTIVE" | "PENDING_DNS" | "PENDING_VALIDATION";
12626
+ status: "ACTIVE" | "FAILED" | "PENDING_DNS" | "PENDING_VALIDATION";
11998
12627
  isPrimary: boolean;
11999
12628
  dnsRecords: {
12000
12629
  type: "CNAME" | "TXT";
@@ -12002,7 +12631,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
12002
12631
  value: string;
12003
12632
  purpose: "ROUTING" | "OWNERSHIP";
12004
12633
  }[];
12005
- certificateStatus: "FAILED" | "PENDING" | "ACTIVE" | null;
12634
+ certificateStatus: "ACTIVE" | "PENDING" | "FAILED" | null;
12006
12635
  failureCode: string | null;
12007
12636
  verifiedAt: string | null;
12008
12637
  activatedAt: string | null;
@@ -12018,7 +12647,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
12018
12647
  domainId: string;
12019
12648
  hostname: string;
12020
12649
  kind: "PLATFORM" | "CUSTOM";
12021
- status: "FAILED" | "ACTIVE" | "PENDING_DNS" | "PENDING_VALIDATION";
12650
+ status: "ACTIVE" | "FAILED" | "PENDING_DNS" | "PENDING_VALIDATION";
12022
12651
  isPrimary: boolean;
12023
12652
  dnsRecords: {
12024
12653
  type: "CNAME" | "TXT";
@@ -12026,7 +12655,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
12026
12655
  value: string;
12027
12656
  purpose: "ROUTING" | "OWNERSHIP";
12028
12657
  }[];
12029
- certificateStatus: "FAILED" | "PENDING" | "ACTIVE" | null;
12658
+ certificateStatus: "ACTIVE" | "PENDING" | "FAILED" | null;
12030
12659
  failureCode: string | null;
12031
12660
  verifiedAt: string | null;
12032
12661
  activatedAt: string | null;
@@ -12038,7 +12667,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
12038
12667
  domainId: string;
12039
12668
  hostname: string;
12040
12669
  kind: "PLATFORM" | "CUSTOM";
12041
- status: "FAILED" | "ACTIVE" | "PENDING_DNS" | "PENDING_VALIDATION";
12670
+ status: "ACTIVE" | "FAILED" | "PENDING_DNS" | "PENDING_VALIDATION";
12042
12671
  isPrimary: boolean;
12043
12672
  dnsRecords: {
12044
12673
  type: "CNAME" | "TXT";
@@ -12046,7 +12675,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
12046
12675
  value: string;
12047
12676
  purpose: "ROUTING" | "OWNERSHIP";
12048
12677
  }[];
12049
- certificateStatus: "FAILED" | "PENDING" | "ACTIVE" | null;
12678
+ certificateStatus: "ACTIVE" | "PENDING" | "FAILED" | null;
12050
12679
  failureCode: string | null;
12051
12680
  verifiedAt: string | null;
12052
12681
  activatedAt: string | null;
@@ -12062,7 +12691,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
12062
12691
  domainId: string;
12063
12692
  hostname: string;
12064
12693
  kind: "PLATFORM" | "CUSTOM";
12065
- status: "FAILED" | "ACTIVE" | "PENDING_DNS" | "PENDING_VALIDATION";
12694
+ status: "ACTIVE" | "FAILED" | "PENDING_DNS" | "PENDING_VALIDATION";
12066
12695
  isPrimary: boolean;
12067
12696
  dnsRecords: {
12068
12697
  type: "CNAME" | "TXT";
@@ -12070,7 +12699,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
12070
12699
  value: string;
12071
12700
  purpose: "ROUTING" | "OWNERSHIP";
12072
12701
  }[];
12073
- certificateStatus: "FAILED" | "PENDING" | "ACTIVE" | null;
12702
+ certificateStatus: "ACTIVE" | "PENDING" | "FAILED" | null;
12074
12703
  failureCode: string | null;
12075
12704
  verifiedAt: string | null;
12076
12705
  activatedAt: string | null;
@@ -12113,7 +12742,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
12113
12742
  createdVia?: string | null | undefined;
12114
12743
  } | null;
12115
12744
  provisioning: {
12116
- status: "FAILED" | "PENDING" | "SYNCED";
12745
+ status: "PENDING" | "FAILED" | "SYNCED";
12117
12746
  lastErrorCode: string | null;
12118
12747
  syncedAt: string | null;
12119
12748
  };
@@ -12273,7 +12902,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
12273
12902
  runCheck: (body: RunStorefrontCheckRequest) => Promise<{
12274
12903
  checkId: string;
12275
12904
  check: string;
12276
- status: "FAILED" | "UNKNOWN" | "RUNNING" | "QUEUED" | "PASSED" | "TIMED_OUT";
12905
+ status: "UNKNOWN" | "FAILED" | "RUNNING" | "QUEUED" | "PASSED" | "TIMED_OUT";
12277
12906
  exitCode: number | null;
12278
12907
  durationMs: number | null;
12279
12908
  outputTail: string | null;
@@ -12287,7 +12916,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
12287
12916
  getCheck: (checkId: string) => Promise<{
12288
12917
  checkId: string;
12289
12918
  check: string;
12290
- status: "FAILED" | "UNKNOWN" | "RUNNING" | "QUEUED" | "PASSED" | "TIMED_OUT";
12919
+ status: "UNKNOWN" | "FAILED" | "RUNNING" | "QUEUED" | "PASSED" | "TIMED_OUT";
12291
12920
  exitCode: number | null;
12292
12921
  durationMs: number | null;
12293
12922
  outputTail: string | null;
@@ -12354,7 +12983,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
12354
12983
  buildId: string;
12355
12984
  versionId: string;
12356
12985
  versionNumber: number;
12357
- status: "SUCCEEDED" | "FAILED" | "RUNNING" | "QUEUED" | "TIMED_OUT";
12986
+ status: "FAILED" | "SUCCEEDED" | "RUNNING" | "QUEUED" | "TIMED_OUT";
12358
12987
  failureStage: string | null;
12359
12988
  errorCode: string | null;
12360
12989
  logTail: string | null;
@@ -12435,7 +13064,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
12435
13064
  buildId: string;
12436
13065
  versionId: string;
12437
13066
  versionNumber: number;
12438
- status: "SUCCEEDED" | "FAILED" | "RUNNING" | "QUEUED" | "TIMED_OUT";
13067
+ status: "FAILED" | "SUCCEEDED" | "RUNNING" | "QUEUED" | "TIMED_OUT";
12439
13068
  failureStage: string | null;
12440
13069
  errorCode: string | null;
12441
13070
  logTail: string | null;
@@ -12513,7 +13142,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
12513
13142
  buildId: string;
12514
13143
  versionId: string;
12515
13144
  versionNumber: number;
12516
- status: "SUCCEEDED" | "FAILED" | "RUNNING" | "QUEUED" | "TIMED_OUT";
13145
+ status: "FAILED" | "SUCCEEDED" | "RUNNING" | "QUEUED" | "TIMED_OUT";
12517
13146
  failureStage: string | null;
12518
13147
  errorCode: string | null;
12519
13148
  logTail: string | null;
@@ -12851,6 +13480,44 @@ export declare function createStoreClient(options: StoreClientOptions): {
12851
13480
  businessNumber: string | null;
12852
13481
  customerCenterPhone: string | null;
12853
13482
  }>;
13483
+ /**
13484
+ * `GET /v1/store/point-policy` — 스코프 `promotion:r`. 적립금 정책(리뷰 적립·유효 기간)과 준비 여부(`available`), 상점에 보일 안내(`notice`).
13485
+ * 정책을 정하지 않았으면 모두 끔이다(#93)
13486
+ */
13487
+ getPointPolicy: () => Promise<{
13488
+ available: boolean;
13489
+ configured: boolean;
13490
+ reviewReward: {
13491
+ enabled: boolean;
13492
+ textPoint: number;
13493
+ photoPoint: number;
13494
+ };
13495
+ purchaseEarn: {
13496
+ enabled: boolean;
13497
+ rateBp: number;
13498
+ };
13499
+ expiryDays: number | null;
13500
+ notice: "REVIEW_REWARD_PAUSED" | "POINTS_AVAILABLE" | null;
13501
+ }>;
13502
+ /**
13503
+ * `PUT /v1/store/point-policy` — 스코프 `promotion:rw`. 준 항목만 바꾼다. 에이전트 요청은 승인 대상이다.
13504
+ * 에러: 409 `POINTS_UNAVAILABLE`(준비 중) · 400 `POINT_EXPIRY_REQUIRED`(리뷰 적립을 켜는데 유효 기간이 없음)
13505
+ */
13506
+ updatePointPolicy: (body: UpdatePointPolicyRequest) => Promise<{
13507
+ available: boolean;
13508
+ configured: boolean;
13509
+ reviewReward: {
13510
+ enabled: boolean;
13511
+ textPoint: number;
13512
+ photoPoint: number;
13513
+ };
13514
+ purchaseEarn: {
13515
+ enabled: boolean;
13516
+ rateBp: number;
13517
+ };
13518
+ expiryDays: number | null;
13519
+ notice: "REVIEW_REWARD_PAUSED" | "POINTS_AVAILABLE" | null;
13520
+ }>;
12854
13521
  listMembers: () => Promise<{
12855
13522
  userId: string;
12856
13523
  name: string;
@@ -14159,8 +14826,8 @@ export declare const claimWebhookEventDataSchema: z.ZodObject<{
14159
14826
  CANCEL: "CANCEL";
14160
14827
  }>;
14161
14828
  status: z.ZodEnum<{
14162
- REJECTED: "REJECTED";
14163
14829
  COMPLETED: "COMPLETED";
14830
+ REJECTED: "REJECTED";
14164
14831
  REQUESTED: "REQUESTED";
14165
14832
  HELD: "HELD";
14166
14833
  COLLECTING: "COLLECTING";
@@ -14349,8 +15016,8 @@ export declare const claimWebhookEventSchema: z.ZodObject<{
14349
15016
  CANCEL: "CANCEL";
14350
15017
  }>;
14351
15018
  status: z.ZodEnum<{
14352
- REJECTED: "REJECTED";
14353
15019
  COMPLETED: "COMPLETED";
15020
+ REJECTED: "REJECTED";
14354
15021
  REQUESTED: "REQUESTED";
14355
15022
  HELD: "HELD";
14356
15023
  COLLECTING: "COLLECTING";
@@ -14559,8 +15226,8 @@ export declare const webhookEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
14559
15226
  CANCEL: "CANCEL";
14560
15227
  }>;
14561
15228
  status: z.ZodEnum<{
14562
- REJECTED: "REJECTED";
14563
15229
  COMPLETED: "COMPLETED";
15230
+ REJECTED: "REJECTED";
14564
15231
  REQUESTED: "REQUESTED";
14565
15232
  HELD: "HELD";
14566
15233
  COLLECTING: "COLLECTING";