@sayren/store-sdk 0.67.0 → 0.68.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
@@ -1365,6 +1365,7 @@ const autoConfirmDaysDescription = "배송완료 후 자동 구매확정까지
1365
1365
  const updateStoreRequestSchema = strictRequest(z$1.object({
1366
1366
  name: z$1.string().min(2).max(50).optional(),
1367
1367
  logoUrl: z$1.url().optional(),
1368
+ iconUrl: z$1.url().nullable().optional().describe("상점 아이콘(정사각, https) — 구매자 비밀번호 재설정 메일·화면에 보인다. `null`을 주면 지운다(상점 이름 첫 글자로 보인다)"),
1368
1369
  customerCenterPhone: z$1.string().nullable().optional().describe("고객센터 전화번호. `null`을 주면 지운다"),
1369
1370
  businessHours: z$1.string().max(100).optional(),
1370
1371
  ...businessInfoPatchShape,
@@ -1393,6 +1394,7 @@ const storeSchema = z$1.object({
1393
1394
  "CLOSED"
1394
1395
  ]),
1395
1396
  logoUrl: z$1.url().nullable(),
1397
+ iconUrl: z$1.string().nullable().optional().default(null).describe("상점 아이콘(정사각). 없으면 null. 서버는 항상 싣는다"),
1396
1398
  businessNumber: z$1.string().nullable().describe("사업자등록번호(숫자 10자리). 없으면 null"),
1397
1399
  customerCenterPhone: z$1.string().nullable(),
1398
1400
  ...businessInfoResponseShape,
@@ -4407,12 +4409,14 @@ const setCalendarRequestSchema = strictRequest(z$1.object({
4407
4409
  * - `description`: 상세설명 본문에 삽입하는 미디어. 동영상과 svg도 받는다.
4408
4410
  * - `flow-attachment`: 주문 흐름 행동의 첨부(시안 등, 이슈 #115). 구매자에게 보이므로 정지 이미지와 PDF만 받는다.
4409
4411
  * - `ai-attachment`: 상점 플랫폼 AI 채팅에 붙이는 자료(이슈 #124). 모델이 읽는 정지 이미지와 PDF만 받는다.
4412
+ * - `store-icon`: 상점 아이콘(정사각, 이슈 #400). 메일에도 실리므로 메일 클라이언트가 그리는 PNG·JPG만 받는다.
4410
4413
  */
4411
4414
  const uploadPurposeSchema = z$1.enum([
4412
4415
  "product-image",
4413
4416
  "description",
4414
4417
  "flow-attachment",
4415
- "ai-attachment"
4418
+ "ai-attachment",
4419
+ "store-icon"
4416
4420
  ]);
4417
4421
  const MB = 1048576;
4418
4422
  /**
@@ -4470,6 +4474,14 @@ const UPLOAD_PURPOSE_LIMITS = {
4470
4474
  "pdf"
4471
4475
  ],
4472
4476
  maxBytes: 10 * MB
4477
+ },
4478
+ "store-icon": {
4479
+ extensions: [
4480
+ "jpg",
4481
+ "jpeg",
4482
+ "png"
4483
+ ],
4484
+ maxBytes: 5 * MB
4473
4485
  }
4474
4486
  };
4475
4487
  /** 파일명의 소문자 확장자. 확장자가 없으면 `""` */
@@ -12652,6 +12664,8 @@ listHistory: (params) => storeHttp.request("GET", "/points/history", pageSchema(
12652
12664
  consents: (customerId, params) => storeHttp.request("GET", path`/customers/${customerId}/consents`, pageSchema(customerConsentSchema), { query: params }),
12653
12665
  /** 보유 쿠폰 (이슈 #47) — 최근 지급 순, 최대 500장 */
12654
12666
  coupons: (customerId) => storeHttp.request("GET", path`/customers/${customerId}/coupons`, z$1.array(customerCouponSchema)),
12667
+ /** 비밀번호 재설정 메일 보내기(#400) — 구매자가 메일 링크에서 새 비밀번호를 정한다. 상점 플랫폼 OWNER·ADMIN */
12668
+ sendPasswordReset: (customerId) => storeHttp.requestVoid("POST", path`/customers/${customerId}/password-reset`),
12655
12669
  /** 로그인 잠금 해제 — 비밀번호 연속 실패 잠금과 실패 횟수를 지운다(멱등). 상점 플랫폼 OWNER·ADMIN */
12656
12670
  unlock: (customerId) => storeHttp.request("POST", path`/customers/${customerId}/unlock`, customerDetailSchema),
12657
12671
  withdraw: (customerId, body) => storeHttp.requestVoid("POST", path`/customers/${customerId}/withdraw`, { body: withdrawCustomerRequestSchema.parse(body) })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sayren/store-sdk",
3
- "version": "0.67.0",
3
+ "version": "0.68.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
+ /** 비밀번호 재설정 메일 보내기(#400) — 구매자가 메일 링크에서 새 비밀번호를 정한다. 상점 플랫폼 OWNER·ADMIN */
1607
+ sendPasswordReset: (customerId: string) =>
1608
+ storeHttp.requestVoid("POST", path`/customers/${customerId}/password-reset`),
1606
1609
  /** 로그인 잠금 해제 — 비밀번호 연속 실패 잠금과 실패 횟수를 지운다(멱등). 상점 플랫폼 OWNER·ADMIN */
1607
1610
  unlock: (customerId: string) =>
1608
1611
  storeHttp.request("POST", path`/customers/${customerId}/unlock`, customerDetailSchema),
@@ -233,6 +233,13 @@ export const updateStoreRequestSchema = strictRequest(
233
233
  .object({
234
234
  name: z.string().min(2).max(50).optional(),
235
235
  logoUrl: z.url().optional(),
236
+ iconUrl: z
237
+ .url()
238
+ .nullable()
239
+ .optional()
240
+ .describe(
241
+ "상점 아이콘(정사각, https) — 구매자 비밀번호 재설정 메일·화면에 보인다. `null`을 주면 지운다(상점 이름 첫 글자로 보인다)",
242
+ ),
236
243
  customerCenterPhone: z
237
244
  .string()
238
245
  .nullable()
@@ -332,6 +339,12 @@ export const storeSchema = z.object({
332
339
  .describe("스토어프론트 호스팅 사이트의 대표 주소. 사이트가 없으면 null"),
333
340
  status: z.enum(["ACTIVE", "SUSPENDED", "CLOSED"]),
334
341
  logoUrl: z.url().nullable(),
342
+ iconUrl: z
343
+ .string()
344
+ .nullable()
345
+ .optional()
346
+ .default(null)
347
+ .describe("상점 아이콘(정사각). 없으면 null. 서버는 항상 싣는다"),
335
348
  businessNumber: z.string().nullable().describe("사업자등록번호(숫자 10자리). 없으면 null"),
336
349
  customerCenterPhone: z.string().nullable(),
337
350
  ...businessInfoResponseShape,
@@ -8,12 +8,14 @@ import { strictRequest } from "./strict";
8
8
  * - `description`: 상세설명 본문에 삽입하는 미디어. 동영상과 svg도 받는다.
9
9
  * - `flow-attachment`: 주문 흐름 행동의 첨부(시안 등, 이슈 #115). 구매자에게 보이므로 정지 이미지와 PDF만 받는다.
10
10
  * - `ai-attachment`: 상점 플랫폼 AI 채팅에 붙이는 자료(이슈 #124). 모델이 읽는 정지 이미지와 PDF만 받는다.
11
+ * - `store-icon`: 상점 아이콘(정사각, 이슈 #400). 메일에도 실리므로 메일 클라이언트가 그리는 PNG·JPG만 받는다.
11
12
  */
12
13
  export const uploadPurposeSchema = z.enum([
13
14
  "product-image",
14
15
  "description",
15
16
  "flow-attachment",
16
17
  "ai-attachment",
18
+ "store-icon",
17
19
  ]);
18
20
 
19
21
  export type UploadPurpose = z.infer<typeof uploadPurposeSchema>;
@@ -51,6 +53,10 @@ export const UPLOAD_PURPOSE_LIMITS: Record<UploadPurpose, UploadPurposeLimit> =
51
53
  extensions: ["jpg", "jpeg", "png", "webp", "gif", "pdf"],
52
54
  maxBytes: 10 * MB,
53
55
  },
56
+ "store-icon": {
57
+ extensions: ["jpg", "jpeg", "png"],
58
+ maxBytes: 5 * MB,
59
+ },
54
60
  };
55
61
 
56
62
  /** 파일명의 소문자 확장자. 확장자가 없으면 `""` */