coupon-moa-mcp 0.4.0 → 0.4.2

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.
Files changed (2) hide show
  1. package/dist/index.js +27 -23
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -63,33 +63,37 @@ var AdminApiClient = class {
63
63
  import { z } from "zod";
64
64
  var pushStoresSchema = z.object({
65
65
  items: z.array(z.object({
66
- brandId: z.string().describe("\uBE0C\uB79C\uB4DC ID"),
67
- branchName: z.string().describe("\uD55C\uAD6D\uC5B4 \uC9C0\uC810\uBA85"),
68
- nameJa: z.string().describe("\uC77C\uBCF8\uC5B4 \uC9C0\uC810\uBA85 (Google Places \uAC80\uC0C9\uC6A9)"),
69
- cityId: z.string().describe("\uB3C4\uC2DC ID"),
70
- address: z.string().optional().default("").describe("\uC8FC\uC18C"),
71
- location: z.tuple([z.number(), z.number()]).optional().default([0, 0]).describe("[lng, lat]"),
72
- operatingHours: z.array(z.object({
73
- day: z.number(),
74
- open: z.string(),
75
- close: z.string(),
76
- isNextDay: z.boolean()
77
- })).optional().default([]).describe("\uC601\uC5C5\uC2DC\uAC04"),
78
- phone: z.string().optional().default("").describe("\uC804\uD654\uBC88\uD638"),
79
- note: z.string().optional().default("").describe("\uBA54\uBAA8"),
80
- warning: z.string().optional().default("").describe("\uC8FC\uC758\uC0AC\uD56D")
81
- })).describe("\uB4F1\uB85D\uD560 \uC9C0\uC810 \uBAA9\uB85D")
66
+ brandId: z.string(),
67
+ branchName: z.string(),
68
+ nameJa: z.string(),
69
+ cityId: z.string(),
70
+ address: z.string().optional(),
71
+ location: z.array(z.number()).optional(),
72
+ phone: z.string().optional(),
73
+ note: z.string().optional(),
74
+ warning: z.string().optional()
75
+ }))
82
76
  });
83
77
  async function pushStores(api2, params) {
84
78
  const batchId = `batch-${crypto.randomUUID().slice(0, 8)}`;
85
79
  const items = params.items.map((item) => {
86
- const operatingHours = item.operatingHours.length > 0 ? item.operatingHours : Array.from({ length: 7 }, (_, day) => ({
87
- day,
88
- open: "10:00",
89
- close: "22:00",
90
- isNextDay: false
91
- }));
92
- return { ...item, operatingHours };
80
+ return {
81
+ brandId: item.brandId,
82
+ branchName: item.branchName,
83
+ nameJa: item.nameJa,
84
+ cityId: item.cityId,
85
+ address: item.address ?? "",
86
+ location: item.location ?? [0, 0],
87
+ operatingHours: Array.from({ length: 7 }, (_, day) => ({
88
+ day,
89
+ open: "10:00",
90
+ close: "22:00",
91
+ isNextDay: false
92
+ })),
93
+ phone: item.phone ?? "",
94
+ note: item.note ?? "",
95
+ warning: item.warning ?? ""
96
+ };
93
97
  });
94
98
  const result = await api2.send("push-stores", { batchId, items });
95
99
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "coupon-moa-mcp",
3
- "version": "0.4.0",
3
+ "version": "0.4.2",
4
4
  "description": "MCP server for Coupon Moa admin — push store data, query brands/cities/stores via Claude",
5
5
  "private": false,
6
6
  "type": "module",