@sayren/store-sdk 0.66.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
@@ -10327,6 +10327,7 @@ const customerDetailSchema = z$1.object({
10327
10327
  joinedAt: z$1.string(),
10328
10328
  point: z$1.number().int(),
10329
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`으로 바로 풀 수 있다. 서버는 항상 싣는다"),
10330
10331
  loginMethods: z$1.array(z$1.object({
10331
10332
  method: z$1.enum([
10332
10333
  "password",
@@ -11069,7 +11070,7 @@ const paymentRecordSchema = z$1.object({
11069
11070
  status: paymentRecordStatusSchema,
11070
11071
  amount: z$1.number().int().describe("결제 금액"),
11071
11072
  refundedAmount: z$1.number().int().describe("환불 완료 금액 합계. 실패한 환불은 빼고 센다"),
11072
- heldRefundAmount: z$1.number().int().optional().default(0).describe("환불 대기 금액 합계(#115) — 주문만 취소하고 아직 환불하지 않은 몫. 결제 상세에서 환불 처리한다"),
11073
+ heldRefundAmount: z$1.number().int().optional().default(0).describe("환불 대기 금액 합계(#115) — 주문만 취소하고 아직 환불하지 않은 몫(`HELD`)과 다시 요청할 수 있는 실패 환불(`FAILED`, 결제 잔액 안의 것). 결제 상세에서 환불 처리한다"),
11073
11074
  provider: pgProviderResponseSchema.nullable().describe("승인한 PG. 승인 전에 끝났으면 마지막 시도의 PG"),
11074
11075
  method: pgPaymentMethodSchema.nullable().describe("실제 결제수단. 모르면 요청 수단"),
11075
11076
  easyPayProvider: easyPayProviderResponseSchema.nullable().optional().default(null).describe("간편결제사. `method`가 `EASY_PAY`일 때만 값이 있고, PG가 알려 주지 않았으면 요청한 간편결제사다. 그 밖의 결제수단과 간편결제 이전 결제는 null. 서버는 항상 싣는다. 현재 값은 `NAVERPAY`·`KAKAOPAY`·`TOSSPAY`·`PAYCO`이고 값이 추가될 수 있어 문자열로 받는다"),
@@ -11133,7 +11134,7 @@ const paymentListQuerySchema = z$1.object({
11133
11134
  method: z$1.string().optional().describe("실제 결제수단 필터"),
11134
11135
  keyword: z$1.string().optional().describe("결제 id·주문 id·PG 거래 id·시도 id·PG 주문번호(일치), 구매자명(포함)"),
11135
11136
  includeTest: z$1.string().optional().describe("테스트 결제 포함 여부 (`true`·`false`. 기본 false — 실결제만)"),
11136
- refundHeld: z$1.string().optional().describe("`true`면 환불 대기가 있는 결제만(#115)"),
11137
+ refundHeld: z$1.string().optional().describe("`true`면 환불 대기(`heldRefundAmount` > 0)가 있는 결제만(#115). 다시 요청할 수 있는 실패 환불도 포함한다"),
11137
11138
  page: z$1.string().optional().describe("페이지 번호 (1부터)"),
11138
11139
  size: z$1.string().optional().describe("페이지 크기 (기본 20, 최대 100)")
11139
11140
  });
@@ -12651,6 +12652,8 @@ listHistory: (params) => storeHttp.request("GET", "/points/history", pageSchema(
12651
12652
  consents: (customerId, params) => storeHttp.request("GET", path`/customers/${customerId}/consents`, pageSchema(customerConsentSchema), { query: params }),
12652
12653
  /** 보유 쿠폰 (이슈 #47) — 최근 지급 순, 최대 500장 */
12653
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),
12654
12657
  withdraw: (customerId, body) => storeHttp.requestVoid("POST", path`/customers/${customerId}/withdraw`, { body: withdrawCustomerRequestSchema.parse(body) })
12655
12658
  },
12656
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.66.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),
@@ -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
  });