@sayren/store-sdk 0.30.2 → 0.30.3
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 +465 -400
- package/dist/index.mjs +13 -1
- package/package.json +1 -1
- package/src/schemas/commerce-flow.ts +20 -1
package/dist/index.mjs
CHANGED
|
@@ -2598,7 +2598,18 @@ const flowInputFieldSchema = z.object({
|
|
|
2598
2598
|
placeholder: z.string().optional().describe("입력 안내"),
|
|
2599
2599
|
maxLength: z.number().int().optional(),
|
|
2600
2600
|
maxFiles: z.number().int().optional(),
|
|
2601
|
-
options: z.array(z.union([
|
|
2601
|
+
options: z.array(z.union([
|
|
2602
|
+
z.string(),
|
|
2603
|
+
z.number(),
|
|
2604
|
+
z.object({
|
|
2605
|
+
value: z.string(),
|
|
2606
|
+
label: z.string()
|
|
2607
|
+
}).describe("값과 보여 줄 이름")
|
|
2608
|
+
])).optional().describe("고르는 형식의 선택지. 값만 있거나 값·이름 쌍이다(보낼 때는 값)"),
|
|
2609
|
+
when: z.object({
|
|
2610
|
+
key: z.string(),
|
|
2611
|
+
in: z.array(z.string())
|
|
2612
|
+
}).optional().describe("다른 칸(`key`)의 값이 `in` 중 하나일 때만 보이고 받는 칸. 없으면 늘 받는다")
|
|
2602
2613
|
});
|
|
2603
2614
|
const flowActionSchema = z.object({
|
|
2604
2615
|
key: z.string().describe("행동 키. 플랫폼 키(예: CONFIRM_ORDER)와 상점·앱이 정한 키가 섞인다"),
|
|
@@ -2635,6 +2646,7 @@ const flowStateSchema = z.object({
|
|
|
2635
2646
|
enteredAt: z.string().describe("이 상태에 들어온 시각(ISO 8601)"),
|
|
2636
2647
|
deadlineAt: z.string().optional().describe("가장 가까운 기한(ISO 8601)"),
|
|
2637
2648
|
attachments: z.array(z.string()).optional().describe("가장 최근 행동이 붙인 첨부 주소(시안 등, #115). 없으면 생략"),
|
|
2649
|
+
earlierAttachments: z.array(z.string()).optional().describe("앞 상태에서 붙인 첨부(수정 요청 뒤의 이전 시안 등). 다음 첨부가 오면 바뀐다. 없으면 생략"),
|
|
2638
2650
|
inputs: z.object({
|
|
2639
2651
|
by: z.string().describe("적은 사람 — seller · buyer"),
|
|
2640
2652
|
values: z.array(z.object({
|
package/package.json
CHANGED
|
@@ -20,7 +20,20 @@ export const flowInputFieldSchema = z.object({
|
|
|
20
20
|
placeholder: z.string().optional().describe("입력 안내"),
|
|
21
21
|
maxLength: z.number().int().optional(),
|
|
22
22
|
maxFiles: z.number().int().optional(),
|
|
23
|
-
options: z
|
|
23
|
+
options: z
|
|
24
|
+
.array(
|
|
25
|
+
z.union([
|
|
26
|
+
z.string(),
|
|
27
|
+
z.number(),
|
|
28
|
+
z.object({ value: z.string(), label: z.string() }).describe("값과 보여 줄 이름"),
|
|
29
|
+
]),
|
|
30
|
+
)
|
|
31
|
+
.optional()
|
|
32
|
+
.describe("고르는 형식의 선택지. 값만 있거나 값·이름 쌍이다(보낼 때는 값)"),
|
|
33
|
+
when: z
|
|
34
|
+
.object({ key: z.string(), in: z.array(z.string()) })
|
|
35
|
+
.optional()
|
|
36
|
+
.describe("다른 칸(`key`)의 값이 `in` 중 하나일 때만 보이고 받는 칸. 없으면 늘 받는다"),
|
|
24
37
|
});
|
|
25
38
|
export type FlowInputField = z.infer<typeof flowInputFieldSchema>;
|
|
26
39
|
|
|
@@ -67,6 +80,12 @@ export const flowStateSchema = z.object({
|
|
|
67
80
|
.array(z.string())
|
|
68
81
|
.optional()
|
|
69
82
|
.describe("가장 최근 행동이 붙인 첨부 주소(시안 등, #115). 없으면 생략"),
|
|
83
|
+
earlierAttachments: z
|
|
84
|
+
.array(z.string())
|
|
85
|
+
.optional()
|
|
86
|
+
.describe(
|
|
87
|
+
"앞 상태에서 붙인 첨부(수정 요청 뒤의 이전 시안 등). 다음 첨부가 오면 바뀐다. 없으면 생략",
|
|
88
|
+
),
|
|
70
89
|
inputs: z
|
|
71
90
|
.object({
|
|
72
91
|
by: z.string().describe("적은 사람 — seller · buyer"),
|