@sayren/store-sdk 0.30.13 → 0.30.15

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
@@ -332,6 +332,335 @@ function createHttp(options) {
332
332
  };
333
333
  }
334
334
  //#endregion
335
+ //#region src/schemas/ai.ts
336
+ /**
337
+ * 상점 플랫폼 AI 채팅(이슈 #124) — 대화·메시지·실행과 실행 이벤트 스트림의 계약.
338
+ *
339
+ * 상점 플랫폼 전용이다(`@ConsoleOnly`, 공개 OpenAPI 문서 제외). 메시지를 보내면 api가 실행(run)을 만들어 202로 `streamId`를 돌려주고,
340
+ * 응답은 별도 중계(`streamUrl`, SSE)로 받는다. 실행은 브라우저와 무관하게 서버에서 끝까지 돈다 — 다시 열면 진행 중 실행의 스트림에
341
+ * 처음부터 다시 붙거나(보관 1시간) 확정된 메시지를 읽는다.
342
+ */
343
+ /** 첨부 하나 — 업로드(`POST /v1/uploads`, 목적 `ai-attachment`)가 돌려준 공개 주소 */
344
+ const aiAttachmentSchema = z.object({
345
+ url: z.string().url().max(2048),
346
+ name: z.string().trim().min(1).max(200),
347
+ mediaType: z.string().trim().min(1).max(100).describe("image/* 또는 application/pdf")
348
+ });
349
+ const AI_MESSAGE_MAX_CHARS = 8e3;
350
+ const AI_MESSAGE_MAX_ATTACHMENTS = 5;
351
+ /**
352
+ * 편집 미리보기에서 고른 요소(#65) — 미리보기 안 선택 스크립트가 만든 값이라 사이트 코드가 꾸밀 수 있다. api는 모델에 넘길 때 데이터로
353
+ * 감싼다. `source`는 그 컴포넌트를 **사용한** 위치다(작업 트리 상대 경로). React 개발 정보가 없으면 null이다
354
+ */
355
+ const aiPreviewSelectionSchema = z.object({
356
+ component: z.string().max(120).nullable(),
357
+ source: z.object({
358
+ path: z.string().max(300),
359
+ line: z.number().int().positive().max(1e6),
360
+ column: z.number().int().positive().max(1e5).optional()
361
+ }).nullable(),
362
+ tag: z.string().max(40),
363
+ text: z.string().max(200),
364
+ pagePath: z.string().max(500)
365
+ });
366
+ /** 실행 상태 — 끝난 상태는 `DONE`·`FAILED`·`CANCELLED`다 */
367
+ const aiRunStatusSchema = z.enum([
368
+ "QUEUED",
369
+ "RUNNING",
370
+ "CANCEL_REQUESTED",
371
+ "DONE",
372
+ "FAILED",
373
+ "CANCELLED"
374
+ ]);
375
+ const AI_RUN_ACTIVE_STATUSES = [
376
+ "QUEUED",
377
+ "RUNNING",
378
+ "CANCEL_REQUESTED"
379
+ ];
380
+ /** 진행 중 실행의 스트림 접속 정보. `streamToken`은 이 스트림 하나만 읽는 단기 자격(Bearer)이다 */
381
+ const aiStreamAccessSchema = z.object({
382
+ streamId: z.string(),
383
+ streamUrl: z.string().url(),
384
+ streamToken: z.string()
385
+ });
386
+ const aiRunSchema = z.object({
387
+ id: z.string().describe("실행 id = streamId"),
388
+ status: aiRunStatusSchema,
389
+ errorCode: z.string().nullable(),
390
+ createdAt: z.string(),
391
+ finishedAt: z.string().nullable()
392
+ });
393
+ /**
394
+ * 화면에 그리는 메시지 조각. 모델 원문(tool_use 블록 등)은 api가 보관하고 화면에는 이 형태만 준다.
395
+ * - `text`: 글
396
+ * - `tool`: 도구 호출 한 번(이름은 사람이 읽는 라벨, 결과 요약·링크)
397
+ * - `choices`: 선택지 버튼(가장 최근 것만 누를 수 있다)
398
+ * - `attachment`: 사용자가 올린 첨부
399
+ * - `approval`: 승인 대기로 남은 쓰기
400
+ */
401
+ const aiMessagePartSchema = z.discriminatedUnion("type", [
402
+ z.object({
403
+ type: z.literal("text"),
404
+ text: z.string()
405
+ }),
406
+ z.object({
407
+ type: z.literal("tool"),
408
+ toolCallId: z.string(),
409
+ name: z.string(),
410
+ label: z.string(),
411
+ status: z.enum([
412
+ "ok",
413
+ "error",
414
+ "unknown"
415
+ ]),
416
+ summary: z.string().nullable()
417
+ }),
418
+ z.object({
419
+ type: z.literal("choices"),
420
+ question: z.string(),
421
+ options: z.array(z.object({
422
+ label: z.string(),
423
+ value: z.string()
424
+ })).min(1).max(6)
425
+ }),
426
+ z.object({
427
+ type: z.literal("attachment"),
428
+ attachment: aiAttachmentSchema
429
+ }),
430
+ z.object({
431
+ type: z.literal("approval"),
432
+ approvalId: z.string(),
433
+ title: z.string()
434
+ }),
435
+ z.object({
436
+ type: z.literal("selection"),
437
+ selection: aiPreviewSelectionSchema
438
+ })
439
+ ]);
440
+ const aiMessageSchema = z.object({
441
+ id: z.string(),
442
+ role: z.enum(["user", "assistant"]),
443
+ parts: z.array(aiMessagePartSchema),
444
+ runId: z.string().nullable(),
445
+ createdAt: z.string()
446
+ });
447
+ const aiConversationSummarySchema = z.object({
448
+ id: z.string(),
449
+ title: z.string().nullable(),
450
+ createdAt: z.string(),
451
+ updatedAt: z.string()
452
+ });
453
+ const aiConversationSchema = aiConversationSummarySchema.extend({
454
+ messages: z.array(aiMessageSchema),
455
+ /** 진행 중 실행(없으면 null) — 스트림에 다시 붙을 때 쓴다 */
456
+ activeRun: aiRunSchema.extend({ stream: aiStreamAccessSchema }).nullable(),
457
+ /** 마지막 실행(진행 중이 아니면 결과 표시용) */
458
+ lastRun: aiRunSchema.nullable()
459
+ });
460
+ const createAiConversationRequestSchema = z.object({
461
+ /** 웹사이트에서 남긴 초안(#124 M2) — 연결한 사용자만 쓴다. 주면 첫 메시지로 실행을 시작한다 */
462
+ draftId: z.string().max(64).optional() });
463
+ const createAiConversationResponseSchema = z.object({
464
+ conversation: aiConversationSummarySchema,
465
+ /** `draftId`로 시작했으면 첫 실행 */
466
+ run: aiStreamAccessSchema.nullable()
467
+ });
468
+ const sendAiMessageRequestSchema = z.object({
469
+ text: z.string().trim().max(AI_MESSAGE_MAX_CHARS),
470
+ attachments: z.array(aiAttachmentSchema).max(5).default([]),
471
+ /** 선택지 버튼으로 보낸 답이면 그 값(화면 표시는 `text`) */
472
+ choice: z.string().max(200).optional(),
473
+ /** 편집 미리보기에서 고른 요소(#65) — 모델은 이 요소를 기준으로 고친다 */
474
+ selection: aiPreviewSelectionSchema.optional()
475
+ }).refine((body) => body.text.length > 0 || body.attachments.length > 0, { message: "내용이나 첨부가 있어야 합니다" });
476
+ const sendAiMessageResponseSchema = aiStreamAccessSchema.extend({ messageId: z.string() });
477
+ /**
478
+ * AI가 바꾸는 화면 영역 — 쓰기 도구가 시작되면 이벤트에 싣고, 패널이 그 화면으로 옮겨 반영된 데이터를 다시 읽는다(셀러가 AI가 하는 일을 같이 본다).
479
+ * 경로는 상점 플랫폼이 정한다(영역 → 라우트). `id`가 있으면 상세 화면이다
480
+ */
481
+ const aiFocusAreaSchema = z.enum([
482
+ "products",
483
+ "categories",
484
+ "collections",
485
+ "option_sets",
486
+ "coupons",
487
+ "points",
488
+ "orders",
489
+ "claims",
490
+ "customers",
491
+ "inquiries",
492
+ "customer_inquiries",
493
+ "store_settings",
494
+ "shipping",
495
+ "addresses",
496
+ "payments",
497
+ "login",
498
+ "members",
499
+ "order_flows",
500
+ "webhooks",
501
+ "storefront"
502
+ ]);
503
+ const aiFocusSchema = z.object({
504
+ area: aiFocusAreaSchema,
505
+ id: z.string().optional()
506
+ });
507
+ /** 변경 기록 보관 기간 — 지나면 내용을 비우고 되돌릴 수 없다(410 `AI_RUN_CHANGES_EXPIRED`) */
508
+ const AI_RUN_FILE_CHANGES_RETENTION_DAYS = 7;
509
+ /**
510
+ * 실행 하나의 변경 상태
511
+ * - `APPLIED`: 되돌릴 수 있다(진행 중 실행이 없을 때)
512
+ * - `INCOMPLETE`: 결과를 모르는 쓰기·이전 내용이 너무 큰 경로가 있다(되돌릴 수 없다)
513
+ * - `REVERTING`·`REVERTED`·`REVERT_UNKNOWN`(되돌리기 결과를 모름 — 다시 하지 않는다)·`EXPIRED`
514
+ */
515
+ const aiRunChangesStatusSchema = z.enum([
516
+ "APPLIED",
517
+ "INCOMPLETE",
518
+ "REVERTING",
519
+ "REVERTED",
520
+ "REVERT_UNKNOWN",
521
+ "EXPIRED"
522
+ ]);
523
+ const aiFileChangeKindSchema = z.enum([
524
+ "created",
525
+ "modified",
526
+ "deleted"
527
+ ]);
528
+ const aiRunChangesSchema = z.object({
529
+ runId: z.string(),
530
+ status: aiRunChangesStatusSchema,
531
+ files: z.array(z.object({
532
+ path: z.string(),
533
+ change: aiFileChangeKindSchema.describe("결과를 모르는 경로는 `modified`로 보인다")
534
+ }))
535
+ });
536
+ /** `GET /v1/ai/conversations/{id}/file-changes` — 대화의 실행별 변경(실행 만든 순) */
537
+ const aiConversationFileChangesSchema = z.object({ runs: z.array(aiRunChangesSchema) });
538
+ /** `GET /v1/ai/runs/{runId}/file-changes` — 변경 보기. 텍스트가 아닌 파일·보관이 끝난 내용은 null이다(diff는 화면이 계산한다) */
539
+ const aiRunFileDiffSchema = aiRunChangesSchema.extend({ files: z.array(z.object({
540
+ path: z.string(),
541
+ change: aiFileChangeKindSchema,
542
+ before: z.string().nullable(),
543
+ after: z.string().nullable(),
544
+ binary: z.boolean()
545
+ })) });
546
+ /**
547
+ * `POST /v1/ai/runs/{runId}/revert` — 실행이 바꾼 경로를 그 전 내용으로 한 번에 돌린다. 오류: 409 `AI_RUN_IN_PROGRESS`(대화에 진행 중 실행),
548
+ * 409 `AI_RUN_REVERT_CONFLICT`(`details.conflicts` — 그 뒤 바뀐 경로·결과를 모르는 쓰기), 409 `AI_RUN_ALREADY_REVERTED`,
549
+ * 410 `AI_RUN_CHANGES_EXPIRED`, 404 `AI_RUN_CHANGES_NOT_FOUND`, 502 `AI_RUN_REVERT_UNKNOWN`(결과를 모름 — 다시 하지 않는다)
550
+ */
551
+ const aiRunRevertResultSchema = z.object({
552
+ runId: z.string(),
553
+ status: z.literal("REVERTED"),
554
+ paths: z.array(z.string())
555
+ });
556
+ /** 409 `AI_RUN_REVERT_CONFLICT`의 `error.details` */
557
+ const aiRunRevertConflictDetailsSchema = z.object({ conflicts: z.array(z.object({
558
+ path: z.string(),
559
+ reason: z.enum(["CHANGED", "UNKNOWN"])
560
+ })) });
561
+ const aiStreamEventSchema = z.discriminatedUnion("type", [
562
+ z.object({
563
+ type: z.literal("delta"),
564
+ messageId: z.string(),
565
+ text: z.string()
566
+ }),
567
+ z.object({
568
+ type: z.literal("tool_start"),
569
+ messageId: z.string(),
570
+ toolCallId: z.string(),
571
+ name: z.string(),
572
+ label: z.string(),
573
+ /** 쓰기 도구가 바꾸는 화면(읽기 도구는 없다) */
574
+ focus: aiFocusSchema.optional()
575
+ }),
576
+ z.object({
577
+ type: z.literal("tool_result"),
578
+ messageId: z.string(),
579
+ toolCallId: z.string(),
580
+ status: z.enum([
581
+ "ok",
582
+ "error",
583
+ "unknown"
584
+ ]),
585
+ summary: z.string().nullable()
586
+ }),
587
+ z.object({
588
+ type: z.literal("choices"),
589
+ messageId: z.string(),
590
+ question: z.string(),
591
+ options: z.array(z.object({
592
+ label: z.string(),
593
+ value: z.string()
594
+ }))
595
+ }),
596
+ z.object({
597
+ type: z.literal("approval"),
598
+ messageId: z.string(),
599
+ approvalId: z.string(),
600
+ title: z.string()
601
+ }),
602
+ z.object({
603
+ type: z.literal("message"),
604
+ message: aiMessageSchema
605
+ }),
606
+ z.object({
607
+ type: z.literal("error"),
608
+ code: z.string(),
609
+ message: z.string()
610
+ }),
611
+ z.object({
612
+ type: z.literal("done"),
613
+ status: aiRunStatusSchema
614
+ })
615
+ ]);
616
+ /** 중계에 쌓이는 이벤트 한 건 — 실행기 → 중계 `POST /internal/streams/{id}/events` */
617
+ const aiStreamRecordSchema = z.object({
618
+ seq: z.number().int().positive(),
619
+ event: aiStreamEventSchema
620
+ });
621
+ const STORE_DRAFT_MAX_ATTACHMENTS = 5;
622
+ /** 초안 첨부 하나의 최대 크기(바이트) */
623
+ const STORE_DRAFT_ATTACHMENT_MAX_BYTES = 10485760;
624
+ /** 연결하지 않은 초안을 지우기까지 */
625
+ const STORE_DRAFT_RETENTION_DAYS = 7;
626
+ const createStoreDraftRequestSchema = z.object({
627
+ text: z.string().trim().min(1).max(AI_MESSAGE_MAX_CHARS),
628
+ attachments: z.array(z.object({
629
+ filename: z.string().trim().min(1).max(200),
630
+ size: z.number().int().positive().max(STORE_DRAFT_ATTACHMENT_MAX_BYTES)
631
+ })).max(5).default([])
632
+ });
633
+ const createStoreDraftResponseSchema = z.object({
634
+ draftId: z.string(),
635
+ /** 첨부마다 브라우저가 파일을 그대로 PUT할 자리(요청 순서와 같다) */
636
+ uploads: z.array(z.object({
637
+ uploadUrl: z.string().url(),
638
+ url: z.string().url()
639
+ })),
640
+ /** 다음 화면 — 상점 플랫폼 `/start?draft=…` */
641
+ continueUrl: z.string().url()
642
+ });
643
+ const storeDraftSchema = z.object({
644
+ id: z.string(),
645
+ text: z.string(),
646
+ attachments: z.array(aiAttachmentSchema),
647
+ createdAt: z.string(),
648
+ /** 이 초안으로 시작한 상점(없으면 null) */
649
+ storeId: z.string().nullable()
650
+ });
651
+ /** 로그인 전 초안 미리보기(`GET /v1/public/store-drafts/{id}`) — 로그인 화면이 「저장한 설명」을 보인다. 첨부는 이름만 */
652
+ const storeDraftPreviewSchema = z.object({
653
+ id: z.string(),
654
+ text: z.string(),
655
+ attachments: z.array(z.object({
656
+ name: z.string(),
657
+ mediaType: z.string()
658
+ })),
659
+ expiresAt: z.string(),
660
+ /** 이미 상점에서 쓴 초안이면 true(다시 시작할 수 없다) */
661
+ used: z.boolean()
662
+ });
663
+ //#endregion
335
664
  //#region src/schemas/analytics.ts
336
665
  /**
337
666
  * 방문 분석 조회 (관리 API `/v1/analytics/*`, 스코프 `analytics:r`).
@@ -1721,11 +2050,13 @@ const setCalendarRequestSchema = z.object({
1721
2050
  * - `product-image`: 상품 목록·상세의 상품 이미지. 목록 썸네일로 쓰이므로 정지 이미지만 받는다.
1722
2051
  * - `description`: 상세설명 본문에 삽입하는 미디어. 동영상과 svg도 받는다.
1723
2052
  * - `flow-attachment`: 주문 흐름 행동의 첨부(시안 등, 이슈 #115). 구매자에게 보이므로 정지 이미지와 PDF만 받는다.
2053
+ * - `ai-attachment`: 상점 플랫폼 AI 채팅에 붙이는 자료(이슈 #124). 모델이 읽는 정지 이미지와 PDF만 받는다.
1724
2054
  */
1725
2055
  const uploadPurposeSchema = z.enum([
1726
2056
  "product-image",
1727
2057
  "description",
1728
- "flow-attachment"
2058
+ "flow-attachment",
2059
+ "ai-attachment"
1729
2060
  ]);
1730
2061
  const MB = 1048576;
1731
2062
  /**
@@ -1772,6 +2103,17 @@ const UPLOAD_PURPOSE_LIMITS = {
1772
2103
  "pdf"
1773
2104
  ],
1774
2105
  maxBytes: 20 * MB
2106
+ },
2107
+ "ai-attachment": {
2108
+ extensions: [
2109
+ "jpg",
2110
+ "jpeg",
2111
+ "png",
2112
+ "webp",
2113
+ "gif",
2114
+ "pdf"
2115
+ ],
2116
+ maxBytes: 10 * MB
1775
2117
  }
1776
2118
  };
1777
2119
  /** 파일명의 소문자 확장자. 확장자가 없으면 `""` */
@@ -2479,7 +2821,7 @@ function parseWebhookEvent(body) {
2479
2821
  //#endregion
2480
2822
  //#region src/schemas/app-manifest.ts
2481
2823
  /**
2482
- * 서드파티 앱 매니페스트 `sayren.app.json` (이슈 #22) — CLI(`sayren app`)·api(빌드 `VERIFY`·버전 판정·동의 화면 자료)·런타임이
2824
+ * 서드파티 앱 매니페스트 `manifest.json` (이슈 #22) — CLI(`sayren app`)·api(빌드 `VERIFY`·버전 판정·동의 화면 자료)·런타임이
2483
2825
  * 같은 원천을 쓴다. 매니페스트는 정적 JSON이고 빌드 없이 읽는다.
2484
2826
  *
2485
2827
  * 기능 하나는 **capability** 하나다(`APP_CAPABILITIES`). capability는 매니페스트 조각·동의 문단·넓어짐 판정(재동의 조건)을 한 곳에 둔다.
@@ -3635,7 +3977,7 @@ const developerAppCreateSchema = z.object({
3635
3977
  });
3636
3978
  /** `PUT /platform/v1/developer/apps/{appId}/versions` — CLI `app deploy`가 올리는 번들 */
3637
3979
  const appArtifactUploadSchema = z.object({
3638
- manifest: z.unknown().describe("sayren.app.json 원문(JSON)"),
3980
+ manifest: z.unknown().describe("manifest.json 원문(JSON)"),
3639
3981
  packageJson: z.string().max(262144),
3640
3982
  lockfile: z.string().max(4194304).nullable(),
3641
3983
  /** 서버 번들(ESM 한 파일) base64. gzip 3MB까지 */
@@ -7247,6 +7589,13 @@ function isReservedStorefrontSlug(slug) {
7247
7589
  function storefrontEditPreviewLabelOf(siteId) {
7248
7590
  return `${siteId.replaceAll("_", "-")}${STOREFRONT_EDIT_PREVIEW_SUFFIX}`;
7249
7591
  }
7592
+ /**
7593
+ * 버전 미리보기 호스트 이름의 라벨 — 올라간 버전 하나를 보는 고유 주소(`sfs_ab12cd34`, 3 → `sfs-ab12cd34-v3-preview`). 편집 미리보기와 같은
7594
+ * `-preview` 공간이라 슬러그가 될 수 없다. 복제본·대조는 `storefrontEditPreviewLabelOf`와 같다.
7595
+ */
7596
+ function storefrontVersionPreviewLabelOf(siteId, versionNumber) {
7597
+ return `${siteId.replaceAll("_", "-")}-v${versionNumber}${STOREFRONT_EDIT_PREVIEW_SUFFIX}`;
7598
+ }
7250
7599
  const storefrontSlugSchema = z.string().regex(STOREFRONT_SLUG_PATTERN, "소문자·숫자·하이픈 3~30자여야 하고 하이픈으로 시작하거나 끝날 수 없습니다").refine((slug) => !slug.includes("--"), "하이픈을 연달아 쓸 수 없습니다").refine((slug) => !isReservedStorefrontSlug(slug), "플랫폼이 쓰는 이름이라 쓸 수 없습니다").describe("주소 슬러그. `{slug}.{호스팅 도메인}`이 사이트 주소가 된다");
7251
7600
  /** 바꾼 슬러그를 다른 사이트가 가져가지 못하게 막는 기간(일). 보류 동안 옛 주소는 새 주소로 301한다 */
7252
7601
  const STOREFRONT_SLUG_HOLD_DAYS = 90;
@@ -7327,7 +7676,8 @@ const storefrontVersionSchema = z.object({
7327
7676
  buildId: z.string().nullable().describe("편집 버전의 빌드 (`GET /v1/storefront/site/builds/{buildId}`). 템플릿 버전은 null"),
7328
7677
  createdByType: z.string().describe("만든 행위자 유형 (`USER`·`AGENT`·`APP`·`TOKEN`·`SYSTEM`). 늘어날 수 있다"),
7329
7678
  createdVia: z.string().nullable().optional().describe("만든 경로 (`CONSOLE` 상점 플랫폼 · `AI` AI 에이전트(MCP) · `CLI` `sayren` CLI · `API` 관리 API · `SYSTEM` 자동). 늘어날 수 있다"),
7330
- createdAt: z.string().describe("만든 시각 (ISO 8601)")
7679
+ createdAt: z.string().describe("만든 시각 (ISO 8601)"),
7680
+ previewable: z.boolean().optional().describe("미리보기 주소로 열 수 있는가 (`POST /v1/storefront/site/preview-link`의 `versionId`). 보관 기간이 지난 버전은 false")
7331
7681
  });
7332
7682
  const storefrontSiteStatusSchema = z.enum([
7333
7683
  "ACTIVE",
@@ -7486,11 +7836,14 @@ const setStorefrontVisibilityRequestSchema = z.object({
7486
7836
  const disableStorefrontHostingRequestSchema = z.object({ confirmSlug: z.string().min(1).describe("확인 입력 — 현재 슬러그") });
7487
7837
  const storefrontSlugAvailabilityQuerySchema = z.object({ slug: z.string().describe("확인할 슬러그") });
7488
7838
  /**
7489
- * 오픈 준비 중 미리보기 링크 — 상점 플랫폼에서 로그인한 OWNER·ADMIN만 받는다(PAT·에이전트 불가). 링크는 5분 안에 한 번 열면
7490
- * 그 브라우저에 12시간짜리 미리보기 쿠키가 생기고 오픈 준비 중인 사이트의 실제 화면을 본다. 링크를 남에게 넘기면 그 사람도
7491
- * 볼 수 있으므로 공유하지 않는다.
7839
+ * 버전 미리보기 링크 — 상점 플랫폼에서 로그인한 OWNER·ADMIN만 받는다(PAT·에이전트 불가). 버전마다 미리보기 전용 주소가 있고
7840
+ * (오픈 준비 중이어도 실제 화면), 링크를 5분 안에 열면 그 브라우저에 그 주소 전용 12시간 쿠키가 생긴다. 사이트 주소는 오픈 전이면
7841
+ * 누구에게나 「오픈 준비 중」이다. 미리보기 주소에 쿠키 없이 들어오면 상점 플랫폼 로그인과 OWNER·ADMIN 확인을 거친다.
7492
7842
  */
7493
- const createStorefrontPreviewLinkRequestSchema = z.object({ path: z.string().max(512).optional().describe("열 경로 (`/`로 시작). 생략하면 `/`") });
7843
+ const createStorefrontPreviewLinkRequestSchema = z.object({
7844
+ path: z.string().max(512).optional().describe("열 경로 (`/`로 시작). 생략하면 `/`"),
7845
+ versionId: z.string().max(64).optional().describe("볼 버전. 생략하면 발행 버전이다. 보관 기간이 지난 버전(`previewable: false`)은 409 `STOREFRONT_VERSION_NOT_PREVIEWABLE`")
7846
+ });
7494
7847
  const storefrontPreviewLinkSchema = z.object({
7495
7848
  url: z.string().describe("미리보기 링크 — 5분 안에 연다"),
7496
7849
  expiresAt: z.string().describe("링크 만료 시각 (ISO 8601)")
@@ -8028,7 +8381,7 @@ const storefrontVersionCreatedSchema = z.object({
8028
8381
  * 받는다(PAT·에이전트 불가). 5분 안에 열면 그 브라우저에 미리보기 호스트 전용 쿠키(12시간)가 생긴다. 편집 환경이
8029
8382
  * 없으면 409 `EDIT_SESSION_REQUIRED`다(편집 환경이 `STARTING`이면 링크는 주고, 미리보기 화면이 기동 대기를 보여 준다).
8030
8383
  */
8031
- const createStorefrontEditPreviewLinkRequestSchema = createStorefrontPreviewLinkRequestSchema;
8384
+ const createStorefrontEditPreviewLinkRequestSchema = z.object({ path: z.string().max(512).optional().describe("열 경로 (`/`로 시작). 생략하면 `/`") });
8032
8385
  /** 압축 파일 조각 하나의 최대 크기(바이트) */
8033
8386
  const STOREFRONT_SOURCE_PART_BYTES = 4194304;
8034
8387
  /** 내용 올리기 한 번의 최대 파일 수 */
@@ -8956,6 +9309,28 @@ list: (params) => storeHttp.request("GET", "/audit-logs", auditLogPageSchema, {
8956
9309
  remove: (locationId) => storeHttp.requestVoid("DELETE", path`/pickup-locations/${locationId}`)
8957
9310
  },
8958
9311
  /**
9312
+ * 상점 플랫폼 AI 채팅 (이슈 #124) — 상점 플랫폼 전용(공개 문서 제외). 메시지는 202로 `streamId`를 돌려주고
9313
+ * 응답은 `streamUrl`(SSE, Bearer `streamToken`)로 받는다. 실행은 브라우저와 무관하게 서버에서 끝까지 돈다.
9314
+ */
9315
+ ai: {
9316
+ /** `GET /v1/ai/conversations` — 내 대화 목록(최근 순) */
9317
+ listConversations: () => storeHttp.request("GET", "/ai/conversations", z.array(aiConversationSummarySchema)),
9318
+ /** `POST /v1/ai/conversations` — 새 대화. `draftId`를 주면 그 초안을 첫 메시지로 실행을 시작한다 */
9319
+ createConversation: (body = {}) => storeHttp.request("POST", "/ai/conversations", createAiConversationResponseSchema, { body: createAiConversationRequestSchema.parse(body) }),
9320
+ /** `GET /v1/ai/conversations/{id}` — 메시지와 진행 중 실행 */
9321
+ getConversation: (conversationId) => storeHttp.request("GET", path`/ai/conversations/${conversationId}`, aiConversationSchema),
9322
+ /** `POST /v1/ai/conversations/{id}/messages` (202) — 진행 중 실행이 있으면 409 `AI_RUN_IN_PROGRESS` */
9323
+ sendMessage: (conversationId, body) => storeHttp.request("POST", path`/ai/conversations/${conversationId}/messages`, sendAiMessageResponseSchema, { body: sendAiMessageRequestSchema.parse(body) }),
9324
+ /** `POST /v1/ai/runs/{id}/cancel` (202) — 실행기가 다음 단계 전에 멈춘다 */
9325
+ cancelRun: (runId) => storeHttp.request("POST", path`/ai/runs/${runId}/cancel`, aiRunSchema, { body: {} }),
9326
+ /** `GET /v1/ai/conversations/{id}/file-changes` — 실행별 스토어프론트 작업 트리 변경(#65) */
9327
+ listFileChanges: (conversationId) => storeHttp.request("GET", path`/ai/conversations/${conversationId}/file-changes`, aiConversationFileChangesSchema),
9328
+ /** `GET /v1/ai/runs/{id}/file-changes` — 실행 하나의 변경 내용(이전·이후) */
9329
+ getRunFileDiff: (runId) => storeHttp.request("GET", path`/ai/runs/${runId}/file-changes`, aiRunFileDiffSchema),
9330
+ /** `POST /v1/ai/runs/{id}/revert` — 실행이 바꾼 파일을 한 번에 되돌린다(전부 아니면 전무) */
9331
+ revertRun: (runId) => storeHttp.request("POST", path`/ai/runs/${runId}/revert`, aiRunRevertResultSchema, { body: {} })
9332
+ },
9333
+ /**
8959
9334
  * 스토어프론트 호스팅 (이슈 #53) — 조회 `storefront:r`, 쓰기 `storefront:rw`(OWNER·ADMIN).
8960
9335
  * 쓰기 응답은 바뀐 사이트다. Cloudflare 반영은 커밋 뒤라 `provisioning.status`가 잠시 `PENDING`일 수 있다.
8961
9336
  * 에이전트 토큰의 발행·되돌리기·템플릿 변경·공개 전환·슬러그 변경·끄기는 승인 대기(`ApprovalPendingError`)다.
@@ -8997,7 +9372,7 @@ list: (params) => storeHttp.request("GET", "/audit-logs", auditLogPageSchema, {
8997
9372
  /** `PUT /v1/storefront/site/visibility` — 오픈 준비 중 ↔ 공개 */
8998
9373
  setVisibility: (body) => storeHttp.request("PUT", "/storefront/site/visibility", storefrontSiteSchema, { body: setStorefrontVisibilityRequestSchema.parse(body) }),
8999
9374
  /**
9000
- * `POST /v1/storefront/site/preview-link` — 오픈 준비 중인 사이트를 구성원이 볼 수 있는 5분짜리 링크.
9375
+ * `POST /v1/storefront/site/preview-link` — 버전 미리보기 주소로 여는 5분짜리 링크(기본은 발행 버전, `versionId`로 다른 버전).
9001
9376
  * 상점 플랫폼에서 로그인한 OWNER·ADMIN만 받는다
9002
9377
  */
9003
9378
  createPreviewLink: (body = {}) => storeHttp.request("POST", "/storefront/site/preview-link", storefrontPreviewLinkSchema, { body: createStorefrontPreviewLinkRequestSchema.parse(body) }),
@@ -9568,4 +9943,4 @@ function createStoreSession(options) {
9568
9943
  };
9569
9944
  }
9570
9945
  //#endregion
9571
- export { APPROVAL_ALREADY_DECIDED_CODE, APPROVAL_REQUIRED_CODE, APP_CAPABILITIES, APP_DEPLOY_KEY_PATTERN, APP_DEPLOY_KEY_PREFIX, APP_EVENTS_MAX, APP_EVENT_SCOPES, APP_EVENT_TYPES, APP_FLOW_EVENT_PATTERN, APP_FLOW_ITEMS_MAX, APP_FLOW_NOTIFICATION_PATTERN, APP_HANDLE_PATTERN, APP_HTTP_KEY_PATTERN, APP_ICON_CONTENT_TYPES, APP_ICON_MAX_BYTES, APP_ICON_MIN_PX, APP_LIFECYCLE_EVENT_TYPES, APP_NETWORK_DENIED_SUFFIXES, APP_NETWORK_HOSTS_MAX, APP_PUBLIC_HTTP_MAX, APP_README_MAX_BYTES, APP_RESERVED_HANDLES, APP_SCHEDULES_MAX, APP_SCHEDULE_INTERVALS, APP_SCHEDULE_NAME_PATTERN, APP_SECRETS_MAX, APP_SECRET_NAME_PATTERN, APP_SECRET_PATTERNS, APP_SERVER_BUNDLE_MAX_GZIP_BYTES, APP_SETTINGS_MAX_FIELDS, APP_SETTING_FIELD_TYPES, APP_SETTING_KEY_PATTERN, APP_STORAGE_KEY_PATTERN, APP_STORAGE_MAX_BYTES, APP_STORAGE_MAX_KEYS, APP_TOOL_NAME_PATTERN, APP_UI_MAX_BYTES, APP_UI_MAX_FILES, ApiError, ApprovalPendingError, BRAND_BRIEF_MAX_REFERENCES, BUSINESS_INFO_MAX_LENGTH, BUSINESS_NUMBER_PATTERN, CASH_RECEIPT_STATUS_VALUES, COLLECTION_BEST_SELLING_DAYS, COLLECTION_PREVIEW_SIZE, COLLECTION_PRODUCT_SORTS, COLLECTION_SALES_SORT_DEFAULT_DAYS, COLLECTION_SLUG_PATTERN, COLLECTION_TYPES, COUPON_CODE_PATTERN, COUPON_CONDITIONS_DEFAULTS, COUPON_TARGET_ALL, COUPON_TARGET_LIST_MAX, CUSTOM_INPUT_FORBIDDEN_WORDS, CUSTOM_INPUT_TYPES, FULFILLMENT_METHODS, FULFILLMENT_METHODS_BY_TYPE, FULFILLMENT_METHOD_RULES, FULFILLMENT_RULES, INSTALLABLE_SCOPES, KNOWN_WEBHOOK_EVENT_TYPES, MAX_ADDON_GROUPS, MAX_ANALYTICS_ALLOWED_ORIGINS, MAX_AUTO_TRANSITION_DAYS, MAX_CALENDAR_DAYS, MAX_COLLECTIONS, MAX_COLLECTION_BEST_SELLING_TOP, MAX_COLLECTION_CREATED_WITHIN_DAYS, MAX_COLLECTION_DESCRIPTION, MAX_COLLECTION_PRODUCTS, MAX_COLLECTION_PRODUCTS_PER_ADD, MAX_COLLECTION_RULES, MAX_COLLECTION_RULE_CATEGORIES, MAX_COLLECTION_TITLE, MAX_CUSTOM_INPUTS, MAX_CUSTOM_INPUT_LENGTH, MAX_OPTION_GROUPS, MAX_PICKUP_LOCATIONS, MAX_PRODUCT_IMAGES, MAX_SAVED_OPTION_SETS, MAX_SAVED_OPTION_SET_NAME, MAX_STAY_NIGHTS, MAX_VALUES_PER_GROUP, MAX_VARIANTS, MCP_TELEMETRY_MAX_RESULTS, MIN_PAYMENT_AMOUNT, NON_INSTALLABLE_SCOPES, NO_COUPON_SETTLEMENT, NO_SHIPPING_BUNDLE_KEY, PAYMENT_ROUTING_EXCLUSION_CODES, POINT_ADJUSTMENT_MAX, POINT_EARN_RATE_BP_MAX, POINT_ENTRY_TYPES, POINT_EXPIRY_DAYS_MAX, POINT_EXPIRY_DAYS_MIN, POINT_LOT_SOURCES, POINT_POLICY_DEFAULTS, POINT_REVIEW_REWARD_MAX, POINT_USE_UNITS, PORTONE_CHANNEL_NAME_MAX_LENGTH, PORTONE_MAX_CHANNELS, PORTONE_MIN_CHANNELS, REFUND_POLICY_DEFAULTS, REFUND_POLICY_DELIVERY_FEE_KEYS, REMOTE_AREA_ZIP_RANGES, RESERVED_STOREFRONT_SLUGS, RESERVED_STORE_CODES, SCOPE_DESCRIPTIONS, SHIPPING_POLICY_DEFAULTS, STARTER_SELLER_TASKS, STARTER_STAGES, STOREFRONT_BLOCKED_PATH_SEGMENTS, STOREFRONT_BUILD_STAGES, STOREFRONT_BUILD_TERMINAL_STATUSES, STOREFRONT_CHECK_TERMINAL_STATUSES, STOREFRONT_CLOSED_SITE_HOLD_DAYS, STOREFRONT_CUSTOM_DOMAIN_LIMIT_DEFAULT, STOREFRONT_DOMAIN_DNS_GRACE_DAYS, STOREFRONT_DOMAIN_DNS_WAIT_DAYS, STOREFRONT_DOMAIN_TXT_LABEL, STOREFRONT_EDIT_ACTIVITY_TIMEOUT_MINUTES, STOREFRONT_EDIT_CAPACITY, STOREFRONT_EDIT_IDLE_MINUTES, STOREFRONT_EDIT_PREVIEW_SUFFIX, STOREFRONT_EDIT_START_STAGES, STOREFRONT_FILE_BATCH_MAX, STOREFRONT_FILE_MAX_BYTES, STOREFRONT_PATH_SEGMENT_PATTERN, STOREFRONT_PLATFORM_DOMAINS, STOREFRONT_PUBLIC_SUFFIXES, STOREFRONT_SEARCH_REGEX_MAX_LENGTH, STOREFRONT_SHOWCASE_SLUG_PREFIX, STOREFRONT_SITE_CREATE_LIMIT, STOREFRONT_SLUG_CHANGE_LIMIT, STOREFRONT_SLUG_CHANGE_WINDOW_DAYS, STOREFRONT_SLUG_HOLD_DAYS, STOREFRONT_SLUG_PATTERN, STOREFRONT_SOURCE_BLOB_BATCH_MAX, STOREFRONT_SOURCE_PART_BYTES, STOREFRONT_WORKSPACE_MAX_BYTES, STOREFRONT_WORKSPACE_MAX_FILES, STORE_CODE_PATTERN, STORE_ROLE_SCOPES, STORE_SCOPE_RESOURCES, STORE_SESSION_KEYS, TEMPLATE_STORE_LOCKED_BUSINESS_FIELDS, TOSS_WIDGET_CLIENT_KEY_PATTERN, TOSS_WIDGET_KEY_MESSAGE, TOSS_WIDGET_SECRET_KEY_PATTERN, UPLOAD_PURPOSE_LIMITS, VARIANT_COUNT_WARNING, VARIANT_STOCK_EXCLUSIVE_MESSAGE, WEBHOOK_DEFAULT_TOLERANCE_SEC, WEBHOOK_DELIVERY_ID_HEADER, WEBHOOK_EVENT_ID_HEADER, WEBHOOK_EVENT_TYPE_HEADER, WEBHOOK_FAILURE_REASONS, WEBHOOK_HEADERS, WEBHOOK_PAYLOAD_EXCERPT_MAX_BYTES, WEBHOOK_RESOURCE_TYPES, WEBHOOK_SIGNATURE_HEADER, WEBHOOK_USER_AGENT, addStorefrontDomainRequestSchema, addonGroupRequestSchema, addonGroupSchema, addonValueRequestSchema, addonValueSchema, addressChangeRequestListSchema, addressTypeSchema, agentPolicyDecisionSchema, allocateByWeight, analyticsChannelSchema, analyticsCheckoutOutcomeSchema, analyticsCheckoutSchema, analyticsDeviceRowSchema, analyticsDevicesSchema, analyticsFunnelStepSchema, analyticsOriginSchema, analyticsOverviewSchema, analyticsPagesQuerySchema, analyticsPagesSchema, analyticsProductRowSchema, analyticsProductSortSchema, analyticsProductsQuerySchema, analyticsProductsSchema, analyticsRangeQuerySchema, analyticsRealtimeSchema, analyticsSearchQuerySchema, analyticsSearchSchema, analyticsSourceGroupBySchema, analyticsSourceRowSchema, analyticsSourcesQuerySchema, analyticsSourcesSchema, analyticsTotalsSchema, apiLogErrorSchema, apiLogListQuerySchema, apiLogPageSchema, apiLogPrincipalSchema, apiLogPrincipalTypeSchema, apiLogSchema, apiLogStatusFilterSchema, apiLogSummarySchema, appArtifactUploadSchema, appBuildSchema, appBuildStageSchema, appCapabilitiesOf, appDeployKeyCreateSchema, appDeployKeyCreatedSchema, appDeployKeySchema, appDevTokenSchema, appDistributionSchema, appEventTypeSchema, appFlowEventSchema, appFlowEventSummarySchema, appFlowNotificationSchema, appFlowNotificationSummarySchema, appFlowParamSchema, appFlowSummaryOf, appHandleSchema, appHttpKeyMatches, appIconProblem, appInstallRequestSchema, appInstallationActivitySchema, appInstallationAppSchema, appInstallationRunSchema, appInstallationSchema, appInstallationSelfSchema, appInstallationSettingsSchema, appInstallationSettingsUpdateSchema, appInstallationStatusSchema, appInvocationSchema, appListingReviewSchema, appListingReviewStatusSchema, appListingSchema, appManifestProblems, appManifestSchema, appManifestWidens, appNetworkHostProblem, appNetworkHostSchema, appReleaseResultSchema, appRuntimeSchema, appScheduleIntervalLabel, appScheduleListOf, appScheduleSummarySchema, appScopeSchema, appSecretSummarySchema, appSessionSchema, appSettingFieldSchema, appStatusSchema, appStorageEntrySchema, appStorageKeysSchema, appStorageListQuerySchema, appStoragePutSchema, appToolCallSchema, appToolInputSchema, appToolListOf, appToolResultSchema, appToolSchema, appToolSummarySchema, appVersionSchema, appVersionStatusSchema, appVisibilitySchema, approvalDecisionRequestSchema, approvalListQuerySchema, approvalPageSchema, approvalRequestSchema, approvalStatusSchema, approveClaimResultSchema, auditActorSchema, auditActorTypeSchema, auditLogListQuerySchema, auditLogOutcomeSchema, auditLogPageSchema, auditLogSchema, auditLogSourceSchema, bestSellingRuleOf, brandBriefProductSourceSchema, brandBriefReferenceSchema, brandBriefSchema, brandBriefViewSchema, buildAuthorizeUrl, buildQuery, bulkResultSchema, businessInfoPatchShape, businessInfoResponseShape, businessNumberSchema, calendarDateSchema, calendarDaySchema, calendarQuerySchema, cancelBySellerRequestSchema, cancelBySellerResultSchema, carrierSchema, cashReceiptSchema, categoryAttributeSchema, categoryCreateRequestSchema, categoryDeleteQuerySchema, categoryDeleteStrategySchema, categoryListQuerySchema, categoryPatchRequestSchema, categoryProductSortSchema, categorySchema, categorySearchResultSchema, categoryTreeNodeSchema, categoryWithPathSchema, changeStorefrontSlugRequestSchema, changeStorefrontTemplateRequestSchema, changeTypeSchema, claimDetailSchema, claimHoldResultSchema, claimListQuerySchema, claimReasonSchema, claimReturnAddressSchema, claimSchema, claimStatusSchema, claimTypeSchema, claimWebhookEventDataSchema, claimWebhookEventSchema, collectionCreateRequestSchema, collectionListQuerySchema, collectionPageSchema, collectionPatchRequestSchema, collectionPreviewRequestSchema, collectionPreviewSchema, collectionProductListQuerySchema, collectionProductSchema, collectionProductSortRequestSchema, collectionProductsAddRequestSchema, collectionProductsReplaceRequestSchema, collectionRuleCategoryIds, collectionRuleSchema, collectionRuleViewSchema, collectionRulesPredicate, collectionRulesSchema, collectionSchema, collectionStateCountsSchema, collectionStateOf, collectionStateSchema, commerceFlowCheckSchema, commerceFlowSchema, commerceFlowSummarySchema, commerceFlowVersionViewSchema, commerceNumberField, compareBySales, consentActionSchema, consentKindSchema, consentSourceSchema, couponBenefitSchema, couponConditionsInputSchema, couponConditionsSchema, couponDiscountOf, couponIssueListQuerySchema, couponIssueMethodSchema, couponIssueSchema, couponIssueStatusSchema, couponKindSchema, couponListQuerySchema, couponRedemptionListQuerySchema, couponRedemptionSchema, couponRejectReasonSchema, couponRuleSchema, couponSchema, couponStatsSchema, couponStatusSchema, couponTargetInputSchema, couponTargetSchema, createCommerceFlowRequestSchema, createCouponRequestSchema, createPkcePair, createStoreClient, createStoreSession, createStorefrontEditPreviewLinkRequestSchema, createStorefrontPreviewLinkRequestSchema, createStorefrontSiteRequestSchema, createStorefrontVersionRequestSchema, customInputLabelForbiddenWord, customInputRequestSchema, customInputSchema, customInputValueSchema, customerAddressSchema, customerConsentListQuerySchema, customerConsentSchema, customerConsentStateSchema, customerConsentsSchema, customerCouponSchema, customerDelegationRequestSchema, customerDelegationSchema, customerDetailSchema, customerInquiryCategorySchema, customerInquiryListQuerySchema, customerListQuerySchema, customerOrderSchema, customerPointsSchema, customerSortSchema, customerStatsSchema, customerSummarySchema, customerWithdrawalBlockedDetailsSchema, defaultFulfillmentMethodOf, deleteStorefrontFileRequestSchema, deliveryBundleKeyOf, deliveryFeeWaiverSchema, deliveryInfoSchema, deliveryMethodSchema, deliveryStatusSchema, deliveryTypeSchema, descendantCategoryIdsOf, describeScope, devStoreSchema, developerAppCreateSchema, developerAppSchema, developerInstallationSchema, developerOrgSchema, developerStoreSchema, disableStorefrontHostingRequestSchema, discountRequestSchema, discountSchema, dispatchRequestSchema, easyPayProviderResponseSchema, easyPayProviderSchema, eventTypeSchema, exchangeAuthorizationCode, flowActionRequestSchema, flowActionResultSchema, flowActionSchema, flowFieldValueSchema, flowInputFieldSchema, flowNodeTypesSchema, flowNotificationWebhookEventDataSchema, flowNotificationWebhookEventSchema, flowPresetDetailSchema, flowPresetSummarySchema, flowRunSchema, flowRunStepSchema, flowSecretNameSchema, flowSecretSchema, flowStateChangedWebhookEventDataSchema, flowStateChangedWebhookEventSchema, flowStateSchema, formatOrderNo, fulfillBulkRequestSchema, fulfillRequestSchema, fulfillmentMethodOf, fulfillmentMethodSchema, fulfillmentMethodsOf, fulfillmentRuleOf, fulfillmentTypeOf, fulfillmentTypeResponseSchema, fulfillmentTypeSchema, holdOrderItemRequestSchema, inquiryListQuerySchema, inquirySchema, inquiryWebhookEventDataSchema, inquiryWebhookEventSchema, inventoryModeSchema, invitationDeliveryStatusSchema, invitationListQuerySchema, invitationSchema, inviteMemberRequestSchema, isCouponTargetLine, isEditableStorefrontPath, isInstallableScope, isReservedStoreCode, isReservedStorefrontSlug, isShowcaseStorefrontSlug, isStoreScope, isWebOrigin, issueCouponRequestSchema, issueCouponResultSchema, liveGateConditionCodeSchema, liveGateConditionSchema, liveGateErrorDetailsSchema, liveGateSchema, loginProviderSchema, loginProviderStatusSchema, loginProviderTestSchema, loginSettingsSchema, maskedSecretSchema, matchesCollectionRules, mcpRuleResultSchema, mcpToolEventSchema, migrateFlowVersionRequestSchema, migrateFlowVersionResultSchema, moveFlowStateRequestSchema, moveStorefrontFileRequestSchema, myAccountSchema, myStoreSchema, nightsOf, normalizeBusinessNumber, normalizeCouponCode, normalizeStorefrontHostname, normalizeStorefrontPath, oauthTokenResponseSchema, openFulfillmentUnion, optionGroupKindSchema, optionGroupRequestSchema, optionGroupSchema, optionModelRequestSchema, optionModelSchema, optionSelectionSchema, optionSortSchema, optionValueRequestSchema, optionValueSchema, orderCanceledWebhookEventDataSchema, orderCanceledWebhookEventSchema, orderDiscountSchema, orderFlowActionResultSchema, orderFulfilledWebhookEventDataSchema, orderFulfilledWebhookEventSchema, orderItemFlowSchema, orderItemFulfillmentSchema, orderItemFulfillmentSnapshotResponseSchema, orderItemFulfillmentSnapshotSchema, orderItemListQuerySchema, orderItemMemoResultSchema, orderItemPageSchema, orderItemSchema, orderItemStatusSchema, orderListQuerySchema, orderSchema, orderSummaryPageSchema, orderSummarySchema, orderWebhookEventDataSchema, orderWebhookEventSchema, pageInfoSchema, pageQueryShape, pageSchema, parseOrderNo, parseWebhookEvent, paymentAttemptRecordSchema, paymentAttemptStatusSchema, paymentCredentialSetSchema, paymentFailureWarningSchema, paymentListQuerySchema, paymentProviderSchema, paymentProviderVerificationSchema, paymentRecordDetailSchema, paymentRecordPageSchema, paymentRecordSchema, paymentRecordStatusSchema, paymentRefundRecordSchema, paymentSettingsSchema, pgEnvironmentSchema, pgPaymentMethodSchema, pgProviderSchema, pgVerificationResultSchema, pickupLocationRequestSchema, pickupLocationSchema, pickupLocationSnapshotSchema, planCodeSchema, planEntitlementsSchema, planErrorDetailsSchema, pointAdjustmentRequestSchema, pointAdjustmentResultSchema, pointEarnOf, pointEarnRateBpSchema, pointEarningEnabled, pointEntrySchema, pointExpiresAtOf, pointHistoryQuerySchema, pointLotSchema, pointPolicyNoticeSchema, pointPolicySchema, pointRestoreExpiresAtOf, pointUseOf, pointUsePolicySchema, policyDocumentUrlSchema, policyVersionSchema, portOneChannelSchema, portOneCredentialsInputSchema, productCreateRequestSchema, productFulfillmentCreateSchema, productFulfillmentResponseSchema, productFulfillmentSchema, productFulfillmentUpdateSchema, productImageRejection, productImageUrlSchema, productListQuerySchema, productOutOfStockWebhookEventDataSchema, productOutOfStockWebhookEventSchema, productPatchRequestSchema, productRefundPolicyOverride, productRefundPolicyPatchSchema, productReplaceRequestSchema, productSchema, productSortSchema, productStatusSchema, productSummarySchema, productVariantRequestSchema, productVariantSchema, proratedPaidRefundBase, proratedPointRefund, proratedRefundBase, publicPlanSchema, publicPlansSchema, publishStorefrontVersionRequestSchema, purchaseDecisionExtendResultSchema, purchaseDecisionRequestResultSchema, purchaseEarnPolicySchema, purchaseEarnRateOf, putBrandBriefRequestSchema, quoteDelivery, quotePricing, rankBestSelling, refreshUserToken, refundPolicyPatchSchema, refundPolicySchema, rejectClaimRequestSchema, remoteAreaLabelOf, remoteAreaOf, remoteAreaSchema, remoteSurchargeOf, replaceStorefrontSourceRequestSchema, replayFlowRequestSchema, replayFlowResultSchema, requiresCollection, requiresShipping, resolvePointPolicy, resolveRefundPolicy, resolveShippingPolicy, resolvedFlowSchema, responsePlanCodeSchema, responsePointEntryTypeSchema, reviewListQuerySchema, reviewReportResultSchema, reviewRewardPointOf, reviewRewardPolicySchema, reviewSchema, reviewSortSchema, reviewWebhookEventDataSchema, reviewWebhookEventSchema, rollbackStorefrontRequestSchema, runStorefrontCheckRequestSchema, salesReportGroupBySchema, salesReportQuerySchema, salesReportRowSchema, salesReportSchema, salesTotalsSchema, saveFlowDraftRequestSchema, saveFlowSecretRequestSchema, saveLoginProviderRequestSchema, savedCustomInputRequestSchema, savedCustomInputSchema, savedOptionGroupRequestSchema, savedOptionGroupSchema, savedOptionSetCompositionSchema, savedOptionSetFromProductRequestSchema, savedOptionSetFromProductResultSchema, savedOptionSetListQuerySchema, savedOptionSetRequestSchema, savedOptionSetSchema, savedOptionSetSortSchema, savedOptionValueRequestSchema, savedOptionValueSchema, scopeAccessSchema, scopesCoverEvent, searchStorefrontFilesRequestSchema, sellerAddressListQuerySchema, sellerAddressRequestSchema, sellerAddressSchema, sellerCancelPreviewSchema, sellerCustomerInquirySchema, setCalendarRequestSchema, setStorefrontVisibilityRequestSchema, settleCouponShortfall, settlementDetailQuerySchema, settlementDetailSchema, settlementListQuerySchema, settlementStatusSchema, settlementSummarySchema, settlementWithDetailsSchema, shippingAddressSchema, shippingPolicyPatchSchema, shippingPolicySchema, simulateFlowRequestSchema, simulateFlowResultSchema, simulationStepSchema, splitRefund, starterSellerTaskSchema, starterStageSchema, starterStatusSchema, starterStoreInfoFieldSchema, stayRangeSchema, staySnapshotSchema, storeAppDetailSchema, storeAppSchema, storeCodeSchema, storeIndustrySchema, storeMemberRoleUpdatedSchema, storeMemberSchema, storePointPolicySchema, storeRoleSchema, storeSchema, storeScopeResourceSchema, storeSubscriptionSchema, storeTemplateSchema, storefrontBuildDependenciesSchema, storefrontBuildListQuerySchema, storefrontBuildSchema, storefrontBuildStatusSchema, storefrontCheckSchema, storefrontCheckStatusSchema, storefrontCustomDomainStatusSchema, storefrontCustomHostnameProblem, storefrontDependencyFindingSchema, storefrontDeploymentLogSchema, storefrontDeploymentSchema, storefrontDeploymentStepSchema, storefrontDnsRecordSchema, storefrontDomainSchema, storefrontDomainTxtNameOf, storefrontEditPreviewLabelOf, storefrontEditPreviewSchema, storefrontEditSessionSchema, storefrontEditSessionStatusSchema, storefrontEditingSchema, storefrontFileConflictDetailsSchema, storefrontFileContentQuerySchema, storefrontFileContentSchema, storefrontFileDeleteResultSchema, storefrontFileEncodingSchema, storefrontFileEntrySchema, storefrontFileHashSchema, storefrontFileListQuerySchema, storefrontFileListSchema, storefrontFileMoveResultSchema, storefrontFilePathSchema, storefrontFileSearchResultSchema, storefrontFileWriteResultSchema, storefrontHostingSchema, storefrontPreviewLinkSchema, storefrontProvisioningSchema, storefrontRuleResultSchema, storefrontRuleSeveritySchema, storefrontSiteDomainSchema, storefrontSiteDomainsSchema, storefrontSiteSchema, storefrontSiteSnapshotSchema, storefrontSiteStatusSchema, storefrontSlugAvailabilityQuerySchema, storefrontSlugAvailabilitySchema, storefrontSlugSchema, storefrontSourceArchivePartSchema, storefrontSourceArchiveQuerySchema, storefrontSourceBlobsResultSchema, storefrontSourceModeSchema, storefrontSourceRefSchema, storefrontSourceReplacedSchema, storefrontSourceSchema, storefrontSuspensionSchema, storefrontTemplateSchema, storefrontVerifyReportSchema, storefrontVersionCreatedSchema, storefrontVersionSchema, storefrontVersionStatusSchema, storefrontVisibilitySchema, subscriptionLimitsSchema, subscriptionStatusSchema, subscriptionUsageSchema, tossPaymentsCredentialsInputSchema, trackingStageResponseSchema, trackingUpdateResultSchema, unknownWebhookEventSchema, updateCouponRequestSchema, updateLoginProviderRequestSchema, updateLoginSettingsRequestSchema, updateMemberRoleRequestSchema, updatePaymentProviderRequestSchema, updatePaymentSettingsRequestSchema, updatePointPolicyRequestSchema, updateStoreRequestSchema, updateStoreTemplateRequestSchema, uploadExtensionOf, uploadPurposeSchema, uploadRejection, uploadRequestSchema, uploadStorefrontSourceBlobsRequestSchema, uploadTicketSchema, upsertPortOneProviderRequestSchema, upsertTossPaymentsProviderRequestSchema, variantStockRequestSchema, variantStockSchema, verifyPaymentProviderRequestSchema, webhookCreatedSchema, webhookDeliveryDetailSchema, webhookDeliveryErrorCodeSchema, webhookDeliveryListQuerySchema, webhookDeliveryResourceSchema, webhookDeliverySchema, webhookDeliveryStatusSchema, webhookEventSchema, webhookFailureReasonSchema, webhookRedeliverFailedResultSchema, webhookRequestHeaderSchema, webhookRequestSchema, webhookResourceTypeSchema, webhookSchema, webhookSecretRotatedSchema, webhookStatusSchema, webhookTestRequestSchema, webhookTestResultSchema, withdrawCustomerRequestSchema, writeDryRunResultSchema, writePreviewSchema, writeStorefrontFilesRequestSchema };
9946
+ export { AI_MESSAGE_MAX_ATTACHMENTS, AI_MESSAGE_MAX_CHARS, AI_RUN_ACTIVE_STATUSES, AI_RUN_FILE_CHANGES_RETENTION_DAYS, APPROVAL_ALREADY_DECIDED_CODE, APPROVAL_REQUIRED_CODE, APP_CAPABILITIES, APP_DEPLOY_KEY_PATTERN, APP_DEPLOY_KEY_PREFIX, APP_EVENTS_MAX, APP_EVENT_SCOPES, APP_EVENT_TYPES, APP_FLOW_EVENT_PATTERN, APP_FLOW_ITEMS_MAX, APP_FLOW_NOTIFICATION_PATTERN, APP_HANDLE_PATTERN, APP_HTTP_KEY_PATTERN, APP_ICON_CONTENT_TYPES, APP_ICON_MAX_BYTES, APP_ICON_MIN_PX, APP_LIFECYCLE_EVENT_TYPES, APP_NETWORK_DENIED_SUFFIXES, APP_NETWORK_HOSTS_MAX, APP_PUBLIC_HTTP_MAX, APP_README_MAX_BYTES, APP_RESERVED_HANDLES, APP_SCHEDULES_MAX, APP_SCHEDULE_INTERVALS, APP_SCHEDULE_NAME_PATTERN, APP_SECRETS_MAX, APP_SECRET_NAME_PATTERN, APP_SECRET_PATTERNS, APP_SERVER_BUNDLE_MAX_GZIP_BYTES, APP_SETTINGS_MAX_FIELDS, APP_SETTING_FIELD_TYPES, APP_SETTING_KEY_PATTERN, APP_STORAGE_KEY_PATTERN, APP_STORAGE_MAX_BYTES, APP_STORAGE_MAX_KEYS, APP_TOOL_NAME_PATTERN, APP_UI_MAX_BYTES, APP_UI_MAX_FILES, ApiError, ApprovalPendingError, BRAND_BRIEF_MAX_REFERENCES, BUSINESS_INFO_MAX_LENGTH, BUSINESS_NUMBER_PATTERN, CASH_RECEIPT_STATUS_VALUES, COLLECTION_BEST_SELLING_DAYS, COLLECTION_PREVIEW_SIZE, COLLECTION_PRODUCT_SORTS, COLLECTION_SALES_SORT_DEFAULT_DAYS, COLLECTION_SLUG_PATTERN, COLLECTION_TYPES, COUPON_CODE_PATTERN, COUPON_CONDITIONS_DEFAULTS, COUPON_TARGET_ALL, COUPON_TARGET_LIST_MAX, CUSTOM_INPUT_FORBIDDEN_WORDS, CUSTOM_INPUT_TYPES, FULFILLMENT_METHODS, FULFILLMENT_METHODS_BY_TYPE, FULFILLMENT_METHOD_RULES, FULFILLMENT_RULES, INSTALLABLE_SCOPES, KNOWN_WEBHOOK_EVENT_TYPES, MAX_ADDON_GROUPS, MAX_ANALYTICS_ALLOWED_ORIGINS, MAX_AUTO_TRANSITION_DAYS, MAX_CALENDAR_DAYS, MAX_COLLECTIONS, MAX_COLLECTION_BEST_SELLING_TOP, MAX_COLLECTION_CREATED_WITHIN_DAYS, MAX_COLLECTION_DESCRIPTION, MAX_COLLECTION_PRODUCTS, MAX_COLLECTION_PRODUCTS_PER_ADD, MAX_COLLECTION_RULES, MAX_COLLECTION_RULE_CATEGORIES, MAX_COLLECTION_TITLE, MAX_CUSTOM_INPUTS, MAX_CUSTOM_INPUT_LENGTH, MAX_OPTION_GROUPS, MAX_PICKUP_LOCATIONS, MAX_PRODUCT_IMAGES, MAX_SAVED_OPTION_SETS, MAX_SAVED_OPTION_SET_NAME, MAX_STAY_NIGHTS, MAX_VALUES_PER_GROUP, MAX_VARIANTS, MCP_TELEMETRY_MAX_RESULTS, MIN_PAYMENT_AMOUNT, NON_INSTALLABLE_SCOPES, NO_COUPON_SETTLEMENT, NO_SHIPPING_BUNDLE_KEY, PAYMENT_ROUTING_EXCLUSION_CODES, POINT_ADJUSTMENT_MAX, POINT_EARN_RATE_BP_MAX, POINT_ENTRY_TYPES, POINT_EXPIRY_DAYS_MAX, POINT_EXPIRY_DAYS_MIN, POINT_LOT_SOURCES, POINT_POLICY_DEFAULTS, POINT_REVIEW_REWARD_MAX, POINT_USE_UNITS, PORTONE_CHANNEL_NAME_MAX_LENGTH, PORTONE_MAX_CHANNELS, PORTONE_MIN_CHANNELS, REFUND_POLICY_DEFAULTS, REFUND_POLICY_DELIVERY_FEE_KEYS, REMOTE_AREA_ZIP_RANGES, RESERVED_STOREFRONT_SLUGS, RESERVED_STORE_CODES, SCOPE_DESCRIPTIONS, SHIPPING_POLICY_DEFAULTS, STARTER_SELLER_TASKS, STARTER_STAGES, STOREFRONT_BLOCKED_PATH_SEGMENTS, STOREFRONT_BUILD_STAGES, STOREFRONT_BUILD_TERMINAL_STATUSES, STOREFRONT_CHECK_TERMINAL_STATUSES, STOREFRONT_CLOSED_SITE_HOLD_DAYS, STOREFRONT_CUSTOM_DOMAIN_LIMIT_DEFAULT, STOREFRONT_DOMAIN_DNS_GRACE_DAYS, STOREFRONT_DOMAIN_DNS_WAIT_DAYS, STOREFRONT_DOMAIN_TXT_LABEL, STOREFRONT_EDIT_ACTIVITY_TIMEOUT_MINUTES, STOREFRONT_EDIT_CAPACITY, STOREFRONT_EDIT_IDLE_MINUTES, STOREFRONT_EDIT_PREVIEW_SUFFIX, STOREFRONT_EDIT_START_STAGES, STOREFRONT_FILE_BATCH_MAX, STOREFRONT_FILE_MAX_BYTES, STOREFRONT_PATH_SEGMENT_PATTERN, STOREFRONT_PLATFORM_DOMAINS, STOREFRONT_PUBLIC_SUFFIXES, STOREFRONT_SEARCH_REGEX_MAX_LENGTH, STOREFRONT_SHOWCASE_SLUG_PREFIX, STOREFRONT_SITE_CREATE_LIMIT, STOREFRONT_SLUG_CHANGE_LIMIT, STOREFRONT_SLUG_CHANGE_WINDOW_DAYS, STOREFRONT_SLUG_HOLD_DAYS, STOREFRONT_SLUG_PATTERN, STOREFRONT_SOURCE_BLOB_BATCH_MAX, STOREFRONT_SOURCE_PART_BYTES, STOREFRONT_WORKSPACE_MAX_BYTES, STOREFRONT_WORKSPACE_MAX_FILES, STORE_CODE_PATTERN, STORE_DRAFT_ATTACHMENT_MAX_BYTES, STORE_DRAFT_MAX_ATTACHMENTS, STORE_DRAFT_RETENTION_DAYS, STORE_ROLE_SCOPES, STORE_SCOPE_RESOURCES, STORE_SESSION_KEYS, TEMPLATE_STORE_LOCKED_BUSINESS_FIELDS, TOSS_WIDGET_CLIENT_KEY_PATTERN, TOSS_WIDGET_KEY_MESSAGE, TOSS_WIDGET_SECRET_KEY_PATTERN, UPLOAD_PURPOSE_LIMITS, VARIANT_COUNT_WARNING, VARIANT_STOCK_EXCLUSIVE_MESSAGE, WEBHOOK_DEFAULT_TOLERANCE_SEC, WEBHOOK_DELIVERY_ID_HEADER, WEBHOOK_EVENT_ID_HEADER, WEBHOOK_EVENT_TYPE_HEADER, WEBHOOK_FAILURE_REASONS, WEBHOOK_HEADERS, WEBHOOK_PAYLOAD_EXCERPT_MAX_BYTES, WEBHOOK_RESOURCE_TYPES, WEBHOOK_SIGNATURE_HEADER, WEBHOOK_USER_AGENT, addStorefrontDomainRequestSchema, addonGroupRequestSchema, addonGroupSchema, addonValueRequestSchema, addonValueSchema, addressChangeRequestListSchema, addressTypeSchema, agentPolicyDecisionSchema, aiAttachmentSchema, aiConversationFileChangesSchema, aiConversationSchema, aiConversationSummarySchema, aiFileChangeKindSchema, aiFocusAreaSchema, aiFocusSchema, aiMessagePartSchema, aiMessageSchema, aiPreviewSelectionSchema, aiRunChangesSchema, aiRunChangesStatusSchema, aiRunFileDiffSchema, aiRunRevertConflictDetailsSchema, aiRunRevertResultSchema, aiRunSchema, aiRunStatusSchema, aiStreamAccessSchema, aiStreamEventSchema, aiStreamRecordSchema, allocateByWeight, analyticsChannelSchema, analyticsCheckoutOutcomeSchema, analyticsCheckoutSchema, analyticsDeviceRowSchema, analyticsDevicesSchema, analyticsFunnelStepSchema, analyticsOriginSchema, analyticsOverviewSchema, analyticsPagesQuerySchema, analyticsPagesSchema, analyticsProductRowSchema, analyticsProductSortSchema, analyticsProductsQuerySchema, analyticsProductsSchema, analyticsRangeQuerySchema, analyticsRealtimeSchema, analyticsSearchQuerySchema, analyticsSearchSchema, analyticsSourceGroupBySchema, analyticsSourceRowSchema, analyticsSourcesQuerySchema, analyticsSourcesSchema, analyticsTotalsSchema, apiLogErrorSchema, apiLogListQuerySchema, apiLogPageSchema, apiLogPrincipalSchema, apiLogPrincipalTypeSchema, apiLogSchema, apiLogStatusFilterSchema, apiLogSummarySchema, appArtifactUploadSchema, appBuildSchema, appBuildStageSchema, appCapabilitiesOf, appDeployKeyCreateSchema, appDeployKeyCreatedSchema, appDeployKeySchema, appDevTokenSchema, appDistributionSchema, appEventTypeSchema, appFlowEventSchema, appFlowEventSummarySchema, appFlowNotificationSchema, appFlowNotificationSummarySchema, appFlowParamSchema, appFlowSummaryOf, appHandleSchema, appHttpKeyMatches, appIconProblem, appInstallRequestSchema, appInstallationActivitySchema, appInstallationAppSchema, appInstallationRunSchema, appInstallationSchema, appInstallationSelfSchema, appInstallationSettingsSchema, appInstallationSettingsUpdateSchema, appInstallationStatusSchema, appInvocationSchema, appListingReviewSchema, appListingReviewStatusSchema, appListingSchema, appManifestProblems, appManifestSchema, appManifestWidens, appNetworkHostProblem, appNetworkHostSchema, appReleaseResultSchema, appRuntimeSchema, appScheduleIntervalLabel, appScheduleListOf, appScheduleSummarySchema, appScopeSchema, appSecretSummarySchema, appSessionSchema, appSettingFieldSchema, appStatusSchema, appStorageEntrySchema, appStorageKeysSchema, appStorageListQuerySchema, appStoragePutSchema, appToolCallSchema, appToolInputSchema, appToolListOf, appToolResultSchema, appToolSchema, appToolSummarySchema, appVersionSchema, appVersionStatusSchema, appVisibilitySchema, approvalDecisionRequestSchema, approvalListQuerySchema, approvalPageSchema, approvalRequestSchema, approvalStatusSchema, approveClaimResultSchema, auditActorSchema, auditActorTypeSchema, auditLogListQuerySchema, auditLogOutcomeSchema, auditLogPageSchema, auditLogSchema, auditLogSourceSchema, bestSellingRuleOf, brandBriefProductSourceSchema, brandBriefReferenceSchema, brandBriefSchema, brandBriefViewSchema, buildAuthorizeUrl, buildQuery, bulkResultSchema, businessInfoPatchShape, businessInfoResponseShape, businessNumberSchema, calendarDateSchema, calendarDaySchema, calendarQuerySchema, cancelBySellerRequestSchema, cancelBySellerResultSchema, carrierSchema, cashReceiptSchema, categoryAttributeSchema, categoryCreateRequestSchema, categoryDeleteQuerySchema, categoryDeleteStrategySchema, categoryListQuerySchema, categoryPatchRequestSchema, categoryProductSortSchema, categorySchema, categorySearchResultSchema, categoryTreeNodeSchema, categoryWithPathSchema, changeStorefrontSlugRequestSchema, changeStorefrontTemplateRequestSchema, changeTypeSchema, claimDetailSchema, claimHoldResultSchema, claimListQuerySchema, claimReasonSchema, claimReturnAddressSchema, claimSchema, claimStatusSchema, claimTypeSchema, claimWebhookEventDataSchema, claimWebhookEventSchema, collectionCreateRequestSchema, collectionListQuerySchema, collectionPageSchema, collectionPatchRequestSchema, collectionPreviewRequestSchema, collectionPreviewSchema, collectionProductListQuerySchema, collectionProductSchema, collectionProductSortRequestSchema, collectionProductsAddRequestSchema, collectionProductsReplaceRequestSchema, collectionRuleCategoryIds, collectionRuleSchema, collectionRuleViewSchema, collectionRulesPredicate, collectionRulesSchema, collectionSchema, collectionStateCountsSchema, collectionStateOf, collectionStateSchema, commerceFlowCheckSchema, commerceFlowSchema, commerceFlowSummarySchema, commerceFlowVersionViewSchema, commerceNumberField, compareBySales, consentActionSchema, consentKindSchema, consentSourceSchema, couponBenefitSchema, couponConditionsInputSchema, couponConditionsSchema, couponDiscountOf, couponIssueListQuerySchema, couponIssueMethodSchema, couponIssueSchema, couponIssueStatusSchema, couponKindSchema, couponListQuerySchema, couponRedemptionListQuerySchema, couponRedemptionSchema, couponRejectReasonSchema, couponRuleSchema, couponSchema, couponStatsSchema, couponStatusSchema, couponTargetInputSchema, couponTargetSchema, createAiConversationRequestSchema, createAiConversationResponseSchema, createCommerceFlowRequestSchema, createCouponRequestSchema, createPkcePair, createStoreClient, createStoreDraftRequestSchema, createStoreDraftResponseSchema, createStoreSession, createStorefrontEditPreviewLinkRequestSchema, createStorefrontPreviewLinkRequestSchema, createStorefrontSiteRequestSchema, createStorefrontVersionRequestSchema, customInputLabelForbiddenWord, customInputRequestSchema, customInputSchema, customInputValueSchema, customerAddressSchema, customerConsentListQuerySchema, customerConsentSchema, customerConsentStateSchema, customerConsentsSchema, customerCouponSchema, customerDelegationRequestSchema, customerDelegationSchema, customerDetailSchema, customerInquiryCategorySchema, customerInquiryListQuerySchema, customerListQuerySchema, customerOrderSchema, customerPointsSchema, customerSortSchema, customerStatsSchema, customerSummarySchema, customerWithdrawalBlockedDetailsSchema, defaultFulfillmentMethodOf, deleteStorefrontFileRequestSchema, deliveryBundleKeyOf, deliveryFeeWaiverSchema, deliveryInfoSchema, deliveryMethodSchema, deliveryStatusSchema, deliveryTypeSchema, descendantCategoryIdsOf, describeScope, devStoreSchema, developerAppCreateSchema, developerAppSchema, developerInstallationSchema, developerOrgSchema, developerStoreSchema, disableStorefrontHostingRequestSchema, discountRequestSchema, discountSchema, dispatchRequestSchema, easyPayProviderResponseSchema, easyPayProviderSchema, eventTypeSchema, exchangeAuthorizationCode, flowActionRequestSchema, flowActionResultSchema, flowActionSchema, flowFieldValueSchema, flowInputFieldSchema, flowNodeTypesSchema, flowNotificationWebhookEventDataSchema, flowNotificationWebhookEventSchema, flowPresetDetailSchema, flowPresetSummarySchema, flowRunSchema, flowRunStepSchema, flowSecretNameSchema, flowSecretSchema, flowStateChangedWebhookEventDataSchema, flowStateChangedWebhookEventSchema, flowStateSchema, formatOrderNo, fulfillBulkRequestSchema, fulfillRequestSchema, fulfillmentMethodOf, fulfillmentMethodSchema, fulfillmentMethodsOf, fulfillmentRuleOf, fulfillmentTypeOf, fulfillmentTypeResponseSchema, fulfillmentTypeSchema, holdOrderItemRequestSchema, inquiryListQuerySchema, inquirySchema, inquiryWebhookEventDataSchema, inquiryWebhookEventSchema, inventoryModeSchema, invitationDeliveryStatusSchema, invitationListQuerySchema, invitationSchema, inviteMemberRequestSchema, isCouponTargetLine, isEditableStorefrontPath, isInstallableScope, isReservedStoreCode, isReservedStorefrontSlug, isShowcaseStorefrontSlug, isStoreScope, isWebOrigin, issueCouponRequestSchema, issueCouponResultSchema, liveGateConditionCodeSchema, liveGateConditionSchema, liveGateErrorDetailsSchema, liveGateSchema, loginProviderSchema, loginProviderStatusSchema, loginProviderTestSchema, loginSettingsSchema, maskedSecretSchema, matchesCollectionRules, mcpRuleResultSchema, mcpToolEventSchema, migrateFlowVersionRequestSchema, migrateFlowVersionResultSchema, moveFlowStateRequestSchema, moveStorefrontFileRequestSchema, myAccountSchema, myStoreSchema, nightsOf, normalizeBusinessNumber, normalizeCouponCode, normalizeStorefrontHostname, normalizeStorefrontPath, oauthTokenResponseSchema, openFulfillmentUnion, optionGroupKindSchema, optionGroupRequestSchema, optionGroupSchema, optionModelRequestSchema, optionModelSchema, optionSelectionSchema, optionSortSchema, optionValueRequestSchema, optionValueSchema, orderCanceledWebhookEventDataSchema, orderCanceledWebhookEventSchema, orderDiscountSchema, orderFlowActionResultSchema, orderFulfilledWebhookEventDataSchema, orderFulfilledWebhookEventSchema, orderItemFlowSchema, orderItemFulfillmentSchema, orderItemFulfillmentSnapshotResponseSchema, orderItemFulfillmentSnapshotSchema, orderItemListQuerySchema, orderItemMemoResultSchema, orderItemPageSchema, orderItemSchema, orderItemStatusSchema, orderListQuerySchema, orderSchema, orderSummaryPageSchema, orderSummarySchema, orderWebhookEventDataSchema, orderWebhookEventSchema, pageInfoSchema, pageQueryShape, pageSchema, parseOrderNo, parseWebhookEvent, paymentAttemptRecordSchema, paymentAttemptStatusSchema, paymentCredentialSetSchema, paymentFailureWarningSchema, paymentListQuerySchema, paymentProviderSchema, paymentProviderVerificationSchema, paymentRecordDetailSchema, paymentRecordPageSchema, paymentRecordSchema, paymentRecordStatusSchema, paymentRefundRecordSchema, paymentSettingsSchema, pgEnvironmentSchema, pgPaymentMethodSchema, pgProviderSchema, pgVerificationResultSchema, pickupLocationRequestSchema, pickupLocationSchema, pickupLocationSnapshotSchema, planCodeSchema, planEntitlementsSchema, planErrorDetailsSchema, pointAdjustmentRequestSchema, pointAdjustmentResultSchema, pointEarnOf, pointEarnRateBpSchema, pointEarningEnabled, pointEntrySchema, pointExpiresAtOf, pointHistoryQuerySchema, pointLotSchema, pointPolicyNoticeSchema, pointPolicySchema, pointRestoreExpiresAtOf, pointUseOf, pointUsePolicySchema, policyDocumentUrlSchema, policyVersionSchema, portOneChannelSchema, portOneCredentialsInputSchema, productCreateRequestSchema, productFulfillmentCreateSchema, productFulfillmentResponseSchema, productFulfillmentSchema, productFulfillmentUpdateSchema, productImageRejection, productImageUrlSchema, productListQuerySchema, productOutOfStockWebhookEventDataSchema, productOutOfStockWebhookEventSchema, productPatchRequestSchema, productRefundPolicyOverride, productRefundPolicyPatchSchema, productReplaceRequestSchema, productSchema, productSortSchema, productStatusSchema, productSummarySchema, productVariantRequestSchema, productVariantSchema, proratedPaidRefundBase, proratedPointRefund, proratedRefundBase, publicPlanSchema, publicPlansSchema, publishStorefrontVersionRequestSchema, purchaseDecisionExtendResultSchema, purchaseDecisionRequestResultSchema, purchaseEarnPolicySchema, purchaseEarnRateOf, putBrandBriefRequestSchema, quoteDelivery, quotePricing, rankBestSelling, refreshUserToken, refundPolicyPatchSchema, refundPolicySchema, rejectClaimRequestSchema, remoteAreaLabelOf, remoteAreaOf, remoteAreaSchema, remoteSurchargeOf, replaceStorefrontSourceRequestSchema, replayFlowRequestSchema, replayFlowResultSchema, requiresCollection, requiresShipping, resolvePointPolicy, resolveRefundPolicy, resolveShippingPolicy, resolvedFlowSchema, responsePlanCodeSchema, responsePointEntryTypeSchema, reviewListQuerySchema, reviewReportResultSchema, reviewRewardPointOf, reviewRewardPolicySchema, reviewSchema, reviewSortSchema, reviewWebhookEventDataSchema, reviewWebhookEventSchema, rollbackStorefrontRequestSchema, runStorefrontCheckRequestSchema, salesReportGroupBySchema, salesReportQuerySchema, salesReportRowSchema, salesReportSchema, salesTotalsSchema, saveFlowDraftRequestSchema, saveFlowSecretRequestSchema, saveLoginProviderRequestSchema, savedCustomInputRequestSchema, savedCustomInputSchema, savedOptionGroupRequestSchema, savedOptionGroupSchema, savedOptionSetCompositionSchema, savedOptionSetFromProductRequestSchema, savedOptionSetFromProductResultSchema, savedOptionSetListQuerySchema, savedOptionSetRequestSchema, savedOptionSetSchema, savedOptionSetSortSchema, savedOptionValueRequestSchema, savedOptionValueSchema, scopeAccessSchema, scopesCoverEvent, searchStorefrontFilesRequestSchema, sellerAddressListQuerySchema, sellerAddressRequestSchema, sellerAddressSchema, sellerCancelPreviewSchema, sellerCustomerInquirySchema, sendAiMessageRequestSchema, sendAiMessageResponseSchema, setCalendarRequestSchema, setStorefrontVisibilityRequestSchema, settleCouponShortfall, settlementDetailQuerySchema, settlementDetailSchema, settlementListQuerySchema, settlementStatusSchema, settlementSummarySchema, settlementWithDetailsSchema, shippingAddressSchema, shippingPolicyPatchSchema, shippingPolicySchema, simulateFlowRequestSchema, simulateFlowResultSchema, simulationStepSchema, splitRefund, starterSellerTaskSchema, starterStageSchema, starterStatusSchema, starterStoreInfoFieldSchema, stayRangeSchema, staySnapshotSchema, storeAppDetailSchema, storeAppSchema, storeCodeSchema, storeDraftPreviewSchema, storeDraftSchema, storeIndustrySchema, storeMemberRoleUpdatedSchema, storeMemberSchema, storePointPolicySchema, storeRoleSchema, storeSchema, storeScopeResourceSchema, storeSubscriptionSchema, storeTemplateSchema, storefrontBuildDependenciesSchema, storefrontBuildListQuerySchema, storefrontBuildSchema, storefrontBuildStatusSchema, storefrontCheckSchema, storefrontCheckStatusSchema, storefrontCustomDomainStatusSchema, storefrontCustomHostnameProblem, storefrontDependencyFindingSchema, storefrontDeploymentLogSchema, storefrontDeploymentSchema, storefrontDeploymentStepSchema, storefrontDnsRecordSchema, storefrontDomainSchema, storefrontDomainTxtNameOf, storefrontEditPreviewLabelOf, storefrontEditPreviewSchema, storefrontEditSessionSchema, storefrontEditSessionStatusSchema, storefrontEditingSchema, storefrontFileConflictDetailsSchema, storefrontFileContentQuerySchema, storefrontFileContentSchema, storefrontFileDeleteResultSchema, storefrontFileEncodingSchema, storefrontFileEntrySchema, storefrontFileHashSchema, storefrontFileListQuerySchema, storefrontFileListSchema, storefrontFileMoveResultSchema, storefrontFilePathSchema, storefrontFileSearchResultSchema, storefrontFileWriteResultSchema, storefrontHostingSchema, storefrontPreviewLinkSchema, storefrontProvisioningSchema, storefrontRuleResultSchema, storefrontRuleSeveritySchema, storefrontSiteDomainSchema, storefrontSiteDomainsSchema, storefrontSiteSchema, storefrontSiteSnapshotSchema, storefrontSiteStatusSchema, storefrontSlugAvailabilityQuerySchema, storefrontSlugAvailabilitySchema, storefrontSlugSchema, storefrontSourceArchivePartSchema, storefrontSourceArchiveQuerySchema, storefrontSourceBlobsResultSchema, storefrontSourceModeSchema, storefrontSourceRefSchema, storefrontSourceReplacedSchema, storefrontSourceSchema, storefrontSuspensionSchema, storefrontTemplateSchema, storefrontVerifyReportSchema, storefrontVersionCreatedSchema, storefrontVersionPreviewLabelOf, storefrontVersionSchema, storefrontVersionStatusSchema, storefrontVisibilitySchema, subscriptionLimitsSchema, subscriptionStatusSchema, subscriptionUsageSchema, tossPaymentsCredentialsInputSchema, trackingStageResponseSchema, trackingUpdateResultSchema, unknownWebhookEventSchema, updateCouponRequestSchema, updateLoginProviderRequestSchema, updateLoginSettingsRequestSchema, updateMemberRoleRequestSchema, updatePaymentProviderRequestSchema, updatePaymentSettingsRequestSchema, updatePointPolicyRequestSchema, updateStoreRequestSchema, updateStoreTemplateRequestSchema, uploadExtensionOf, uploadPurposeSchema, uploadRejection, uploadRequestSchema, uploadStorefrontSourceBlobsRequestSchema, uploadTicketSchema, upsertPortOneProviderRequestSchema, upsertTossPaymentsProviderRequestSchema, variantStockRequestSchema, variantStockSchema, verifyPaymentProviderRequestSchema, webhookCreatedSchema, webhookDeliveryDetailSchema, webhookDeliveryErrorCodeSchema, webhookDeliveryListQuerySchema, webhookDeliveryResourceSchema, webhookDeliverySchema, webhookDeliveryStatusSchema, webhookEventSchema, webhookFailureReasonSchema, webhookRedeliverFailedResultSchema, webhookRequestHeaderSchema, webhookRequestSchema, webhookResourceTypeSchema, webhookSchema, webhookSecretRotatedSchema, webhookStatusSchema, webhookTestRequestSchema, webhookTestResultSchema, withdrawCustomerRequestSchema, writeDryRunResultSchema, writePreviewSchema, writeStorefrontFilesRequestSchema };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sayren/store-sdk",
3
- "version": "0.30.13",
3
+ "version": "0.30.15",
4
4
  "main": "./dist/index.mjs",
5
5
  "types": "./dist/index.d.mts",
6
6
  "exports": {
package/src/client.ts CHANGED
@@ -1,5 +1,19 @@
1
1
  import { z } from "zod";
2
2
  import { ApiError, createHttp, path, type Query, resolveToken, type TokenSource } from "./http";
3
+ import {
4
+ aiConversationFileChangesSchema,
5
+ aiConversationSchema,
6
+ aiConversationSummarySchema,
7
+ aiRunFileDiffSchema,
8
+ aiRunRevertResultSchema,
9
+ aiRunSchema,
10
+ type CreateAiConversationRequest,
11
+ createAiConversationRequestSchema,
12
+ createAiConversationResponseSchema,
13
+ type SendAiMessageRequest,
14
+ sendAiMessageRequestSchema,
15
+ sendAiMessageResponseSchema,
16
+ } from "./schemas/ai";
3
17
  import {
4
18
  type AnalyticsPagesParams,
5
19
  type AnalyticsProductsParams,
@@ -1715,6 +1729,50 @@ export function createStoreClient(options: StoreClientOptions) {
1715
1729
  storeHttp.requestVoid("DELETE", path`/pickup-locations/${locationId}`),
1716
1730
  },
1717
1731
 
1732
+ /**
1733
+ * 상점 플랫폼 AI 채팅 (이슈 #124) — 상점 플랫폼 전용(공개 문서 제외). 메시지는 202로 `streamId`를 돌려주고
1734
+ * 응답은 `streamUrl`(SSE, Bearer `streamToken`)로 받는다. 실행은 브라우저와 무관하게 서버에서 끝까지 돈다.
1735
+ */
1736
+ ai: {
1737
+ /** `GET /v1/ai/conversations` — 내 대화 목록(최근 순) */
1738
+ listConversations: () =>
1739
+ storeHttp.request("GET", "/ai/conversations", z.array(aiConversationSummarySchema)),
1740
+ /** `POST /v1/ai/conversations` — 새 대화. `draftId`를 주면 그 초안을 첫 메시지로 실행을 시작한다 */
1741
+ createConversation: (body: CreateAiConversationRequest = {}) =>
1742
+ storeHttp.request("POST", "/ai/conversations", createAiConversationResponseSchema, {
1743
+ body: createAiConversationRequestSchema.parse(body),
1744
+ }),
1745
+ /** `GET /v1/ai/conversations/{id}` — 메시지와 진행 중 실행 */
1746
+ getConversation: (conversationId: string) =>
1747
+ storeHttp.request("GET", path`/ai/conversations/${conversationId}`, aiConversationSchema),
1748
+ /** `POST /v1/ai/conversations/{id}/messages` (202) — 진행 중 실행이 있으면 409 `AI_RUN_IN_PROGRESS` */
1749
+ sendMessage: (conversationId: string, body: SendAiMessageRequest) =>
1750
+ storeHttp.request(
1751
+ "POST",
1752
+ path`/ai/conversations/${conversationId}/messages`,
1753
+ sendAiMessageResponseSchema,
1754
+ { body: sendAiMessageRequestSchema.parse(body) },
1755
+ ),
1756
+ /** `POST /v1/ai/runs/{id}/cancel` (202) — 실행기가 다음 단계 전에 멈춘다 */
1757
+ cancelRun: (runId: string) =>
1758
+ storeHttp.request("POST", path`/ai/runs/${runId}/cancel`, aiRunSchema, { body: {} }),
1759
+ /** `GET /v1/ai/conversations/{id}/file-changes` — 실행별 스토어프론트 작업 트리 변경(#65) */
1760
+ listFileChanges: (conversationId: string) =>
1761
+ storeHttp.request(
1762
+ "GET",
1763
+ path`/ai/conversations/${conversationId}/file-changes`,
1764
+ aiConversationFileChangesSchema,
1765
+ ),
1766
+ /** `GET /v1/ai/runs/{id}/file-changes` — 실행 하나의 변경 내용(이전·이후) */
1767
+ getRunFileDiff: (runId: string) =>
1768
+ storeHttp.request("GET", path`/ai/runs/${runId}/file-changes`, aiRunFileDiffSchema),
1769
+ /** `POST /v1/ai/runs/{id}/revert` — 실행이 바꾼 파일을 한 번에 되돌린다(전부 아니면 전무) */
1770
+ revertRun: (runId: string) =>
1771
+ storeHttp.request("POST", path`/ai/runs/${runId}/revert`, aiRunRevertResultSchema, {
1772
+ body: {},
1773
+ }),
1774
+ },
1775
+
1718
1776
  /**
1719
1777
  * 스토어프론트 호스팅 (이슈 #53) — 조회 `storefront:r`, 쓰기 `storefront:rw`(OWNER·ADMIN).
1720
1778
  * 쓰기 응답은 바뀐 사이트다. Cloudflare 반영은 커밋 뒤라 `provisioning.status`가 잠시 `PENDING`일 수 있다.
@@ -1795,7 +1853,7 @@ export function createStoreClient(options: StoreClientOptions) {
1795
1853
  body: setStorefrontVisibilityRequestSchema.parse(body),
1796
1854
  }),
1797
1855
  /**
1798
- * `POST /v1/storefront/site/preview-link` — 오픈 준비 중인 사이트를 구성원이 볼 수 있는 5분짜리 링크.
1856
+ * `POST /v1/storefront/site/preview-link` — 버전 미리보기 주소로 여는 5분짜리 링크(기본은 발행 버전, `versionId`로 다른 버전).
1799
1857
  * 상점 플랫폼에서 로그인한 OWNER·ADMIN만 받는다
1800
1858
  */
1801
1859
  createPreviewLink: (body: CreateStorefrontPreviewLinkRequest = {}) =>