@sayren/store-sdk 0.65.0 → 0.67.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.mjs CHANGED
@@ -3849,6 +3849,10 @@ const claimSchema = z$1.object({
3849
3849
  holdExpiresAt: z$1.string().nullable(),
3850
3850
  /** 보류를 이미 썼는지 — 보류는 클레임당 1회라 해제·만료 뒤에도 true */
3851
3851
  holdUsed: z$1.boolean(),
3852
+ rejection: z$1.object({
3853
+ reason: z$1.string().describe("거절 사유 코드 — `USED_PRODUCT`·`MISSING_COMPONENT`·`PERIOD_EXPIRED`·`BUYER_FAULT_DAMAGE`·`ETC`. 값이 추가될 수 있어 문자열로 받는다"),
3854
+ detail: z$1.string().describe("거절 상세 사유. 구매자에게 그대로 보인다")
3855
+ }).nullable().optional().default(null).describe("판매자가 거절한 사유. 거절(`REJECTED`) 클레임만 값이 있고 그 밖에는 null이다. 서버는 항상 싣는다"),
3852
3856
  returnAddress: claimReturnAddressSchema.nullable().describe("수거 안내에 쓸 반품지(이슈 #30). 상품이 지정한 반품지, 없으면 상점 기본 반품지다. 취소 클레임과 반품지를 등록하지 않은 상점은 null")
3853
3857
  });
3854
3858
  /** `GET /v1/claims` 쿼리 — OpenAPI 문서용 형태(값은 쿼리 문자열) */
@@ -10323,6 +10327,7 @@ const customerDetailSchema = z$1.object({
10323
10327
  joinedAt: z$1.string(),
10324
10328
  point: z$1.number().int(),
10325
10329
  marketingAgreed: z$1.boolean(),
10330
+ lockedUntil: z$1.string().nullable().optional().default(null).describe("로그인 잠금이 풀리는 시각(ISO 8601). 비밀번호를 5회 연속 틀리면 10분 잠긴다. 잠겨 있지 않으면 null. `POST /v1/customers/{customerId}/unlock`으로 바로 풀 수 있다. 서버는 항상 싣는다"),
10326
10331
  loginMethods: z$1.array(z$1.object({
10327
10332
  method: z$1.enum([
10328
10333
  "password",
@@ -11065,7 +11070,7 @@ const paymentRecordSchema = z$1.object({
11065
11070
  status: paymentRecordStatusSchema,
11066
11071
  amount: z$1.number().int().describe("결제 금액"),
11067
11072
  refundedAmount: z$1.number().int().describe("환불 완료 금액 합계. 실패한 환불은 빼고 센다"),
11068
- heldRefundAmount: z$1.number().int().optional().default(0).describe("환불 대기 금액 합계(#115) — 주문만 취소하고 아직 환불하지 않은 몫. 결제 상세에서 환불 처리한다"),
11073
+ heldRefundAmount: z$1.number().int().optional().default(0).describe("환불 대기 금액 합계(#115) — 주문만 취소하고 아직 환불하지 않은 몫(`HELD`)과 다시 요청할 수 있는 실패 환불(`FAILED`, 결제 잔액 안의 것). 결제 상세에서 환불 처리한다"),
11069
11074
  provider: pgProviderResponseSchema.nullable().describe("승인한 PG. 승인 전에 끝났으면 마지막 시도의 PG"),
11070
11075
  method: pgPaymentMethodSchema.nullable().describe("실제 결제수단. 모르면 요청 수단"),
11071
11076
  easyPayProvider: easyPayProviderResponseSchema.nullable().optional().default(null).describe("간편결제사. `method`가 `EASY_PAY`일 때만 값이 있고, PG가 알려 주지 않았으면 요청한 간편결제사다. 그 밖의 결제수단과 간편결제 이전 결제는 null. 서버는 항상 싣는다. 현재 값은 `NAVERPAY`·`KAKAOPAY`·`TOSSPAY`·`PAYCO`이고 값이 추가될 수 있어 문자열로 받는다"),
@@ -11129,7 +11134,7 @@ const paymentListQuerySchema = z$1.object({
11129
11134
  method: z$1.string().optional().describe("실제 결제수단 필터"),
11130
11135
  keyword: z$1.string().optional().describe("결제 id·주문 id·PG 거래 id·시도 id·PG 주문번호(일치), 구매자명(포함)"),
11131
11136
  includeTest: z$1.string().optional().describe("테스트 결제 포함 여부 (`true`·`false`. 기본 false — 실결제만)"),
11132
- refundHeld: z$1.string().optional().describe("`true`면 환불 대기가 있는 결제만(#115)"),
11137
+ refundHeld: z$1.string().optional().describe("`true`면 환불 대기(`heldRefundAmount` > 0)가 있는 결제만(#115). 다시 요청할 수 있는 실패 환불도 포함한다"),
11133
11138
  page: z$1.string().optional().describe("페이지 번호 (1부터)"),
11134
11139
  size: z$1.string().optional().describe("페이지 크기 (기본 20, 최대 100)")
11135
11140
  });
@@ -12647,6 +12652,8 @@ listHistory: (params) => storeHttp.request("GET", "/points/history", pageSchema(
12647
12652
  consents: (customerId, params) => storeHttp.request("GET", path`/customers/${customerId}/consents`, pageSchema(customerConsentSchema), { query: params }),
12648
12653
  /** 보유 쿠폰 (이슈 #47) — 최근 지급 순, 최대 500장 */
12649
12654
  coupons: (customerId) => storeHttp.request("GET", path`/customers/${customerId}/coupons`, z$1.array(customerCouponSchema)),
12655
+ /** 로그인 잠금 해제 — 비밀번호 연속 실패 잠금과 실패 횟수를 지운다(멱등). 상점 플랫폼 OWNER·ADMIN */
12656
+ unlock: (customerId) => storeHttp.request("POST", path`/customers/${customerId}/unlock`, customerDetailSchema),
12650
12657
  withdraw: (customerId, body) => storeHttp.requestVoid("POST", path`/customers/${customerId}/withdraw`, { body: withdrawCustomerRequestSchema.parse(body) })
12651
12658
  },
12652
12659
  /** 쿠폰 (이슈 #47) — 조회 `promotion:r`, 쓰기 `promotion:rw` */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sayren/store-sdk",
3
- "version": "0.65.0",
3
+ "version": "0.67.0",
4
4
  "main": "./dist/index.mjs",
5
5
  "types": "./dist/index.d.mts",
6
6
  "exports": {
package/src/client.ts CHANGED
@@ -1603,6 +1603,9 @@ export function createStoreClient(options: StoreClientOptions) {
1603
1603
  path`/customers/${customerId}/coupons`,
1604
1604
  z.array(customerCouponSchema),
1605
1605
  ),
1606
+ /** 로그인 잠금 해제 — 비밀번호 연속 실패 잠금과 실패 횟수를 지운다(멱등). 상점 플랫폼 OWNER·ADMIN */
1607
+ unlock: (customerId: string) =>
1608
+ storeHttp.request("POST", path`/customers/${customerId}/unlock`, customerDetailSchema),
1606
1609
  withdraw: (customerId: string, body: WithdrawCustomerRequest) =>
1607
1610
  storeHttp.requestVoid("POST", path`/customers/${customerId}/withdraw`, {
1608
1611
  body: withdrawCustomerRequestSchema.parse(body),
@@ -113,6 +113,21 @@ export const claimSchema = z.object({
113
113
  holdExpiresAt: z.string().nullable(),
114
114
  /** 보류를 이미 썼는지 — 보류는 클레임당 1회라 해제·만료 뒤에도 true */
115
115
  holdUsed: z.boolean(),
116
+ rejection: z
117
+ .object({
118
+ reason: z
119
+ .string()
120
+ .describe(
121
+ "거절 사유 코드 — `USED_PRODUCT`·`MISSING_COMPONENT`·`PERIOD_EXPIRED`·`BUYER_FAULT_DAMAGE`·`ETC`. 값이 추가될 수 있어 문자열로 받는다",
122
+ ),
123
+ detail: z.string().describe("거절 상세 사유. 구매자에게 그대로 보인다"),
124
+ })
125
+ .nullable()
126
+ .optional()
127
+ .default(null)
128
+ .describe(
129
+ "판매자가 거절한 사유. 거절(`REJECTED`) 클레임만 값이 있고 그 밖에는 null이다. 서버는 항상 싣는다",
130
+ ),
116
131
  returnAddress: claimReturnAddressSchema
117
132
  .nullable()
118
133
  .describe(
@@ -236,6 +236,15 @@ export const customerDetailSchema = z.object({
236
236
  joinedAt: z.string(),
237
237
  point: z.number().int(),
238
238
  marketingAgreed: z.boolean(),
239
+ lockedUntil: z
240
+ .string()
241
+ .nullable()
242
+ .optional()
243
+ .default(null)
244
+ .describe(
245
+ "로그인 잠금이 풀리는 시각(ISO 8601). 비밀번호를 5회 연속 틀리면 10분 잠긴다. 잠겨 있지 않으면 null. " +
246
+ "`POST /v1/customers/{customerId}/unlock`으로 바로 풀 수 있다. 서버는 항상 싣는다",
247
+ ),
239
248
  loginMethods: z
240
249
  .array(
241
250
  z.object({
@@ -813,7 +813,7 @@ export const paymentRecordSchema = z.object({
813
813
  .optional()
814
814
  .default(0)
815
815
  .describe(
816
- "환불 대기 금액 합계(#115) — 주문만 취소하고 아직 환불하지 않은 몫. 결제 상세에서 환불 처리한다",
816
+ "환불 대기 금액 합계(#115) — 주문만 취소하고 아직 환불하지 않은 몫(`HELD`)과 다시 요청할 수 있는 실패 환불(`FAILED`, 결제 잔액 안의 것). 결제 상세에서 환불 처리한다",
817
817
  ),
818
818
  provider: pgProviderResponseSchema
819
819
  .nullable()
@@ -974,7 +974,12 @@ export const paymentListQuerySchema = z.object({
974
974
  .string()
975
975
  .optional()
976
976
  .describe("테스트 결제 포함 여부 (`true`·`false`. 기본 false — 실결제만)"),
977
- refundHeld: z.string().optional().describe("`true`면 환불 대기가 있는 결제만(#115)"),
977
+ refundHeld: z
978
+ .string()
979
+ .optional()
980
+ .describe(
981
+ "`true`면 환불 대기(`heldRefundAmount` > 0)가 있는 결제만(#115). 다시 요청할 수 있는 실패 환불도 포함한다",
982
+ ),
978
983
  page: z.string().optional().describe("페이지 번호 (1부터)"),
979
984
  size: z.string().optional().describe("페이지 크기 (기본 20, 최대 100)"),
980
985
  });