daiso 1.0.3 โ 1.0.5
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/README.md +218 -537
- package/dist/api/actionsProxy.js +82 -0
- package/dist/api/cgvHandlers.js +103 -16
- package/dist/api/daisoHandlers.js +127 -0
- package/dist/api/emart24Handlers.js +176 -0
- package/dist/api/gs25Handlers.js +256 -0
- package/dist/api/handlers.js +184 -108
- package/dist/api/healthChecks.js +332 -0
- package/dist/api/lottecinemaHandlers.js +155 -0
- package/dist/api/lottemartHandlers.js +128 -0
- package/dist/api/megaboxHandlers.js +81 -50
- package/dist/api/routes/cuRoutes.js +17 -0
- package/dist/api/routes/daisoRoutes.js +6 -1
- package/dist/api/routes/emart24Routes.js +22 -0
- package/dist/api/routes/gs25Routes.js +22 -0
- package/dist/api/routes/healthRoutes.js +44 -0
- package/dist/api/routes/lottecinemaRoutes.js +22 -0
- package/dist/api/routes/lottemartRoutes.js +18 -0
- package/dist/api/routes/oliveyoungRoutes.js +6 -1
- package/dist/api/routes/sevenelevenRoutes.js +32 -0
- package/dist/api/sevenelevenHandlers.js +200 -0
- package/dist/cli/args.js +54 -0
- package/dist/cli/commands/convenience.js +241 -0
- package/dist/cli/commands/daiso.js +96 -0
- package/dist/cli/constants.js +5 -0
- package/dist/cli/deps.js +48 -0
- package/dist/cli/http.js +98 -0
- package/dist/cli/interactiveFetch.js +31 -0
- package/dist/cli/interactiveItemSearch.js +259 -0
- package/dist/cli/interactivePrompt.js +49 -0
- package/dist/cli/interactiveTypes.js +4 -0
- package/dist/cli/types.js +4 -0
- package/dist/cli.js +66 -181
- package/dist/cliHelp.js +216 -9
- package/dist/cliInteractive.js +174 -0
- package/dist/cliPicker.js +56 -0
- package/dist/cliRenderer.js +139 -0
- package/dist/index.js +147 -8
- package/dist/pages/openapi.js +2 -1
- package/dist/pages/openapiFullSpec.js +58 -0
- package/dist/pages/openapiResponse.js +28 -0
- package/dist/pages/openapiSpec.js +2 -41
- package/dist/pages/openapiSpecActions.js +109 -0
- package/dist/pages/openapiSpecComponents.js +30 -391
- package/dist/pages/openapiSpecComponentsCgv.js +24 -0
- package/dist/pages/openapiSpecComponentsCu.js +112 -0
- package/dist/pages/openapiSpecComponentsDaisoOliveyoung.js +342 -0
- package/dist/pages/openapiSpecComponentsEmart24.js +141 -0
- package/dist/pages/openapiSpecComponentsGs25.js +109 -0
- package/dist/pages/openapiSpecComponentsLotteMart.js +85 -0
- package/dist/pages/openapiSpecComponentsLottecinema.js +163 -0
- package/dist/pages/openapiSpecComponentsMegabox.js +144 -0
- package/dist/pages/openapiSpecComponentsSeveneleven.js +82 -0
- package/dist/pages/openapiSpecPathsCgv.js +66 -3
- package/dist/pages/openapiSpecPathsCu.js +138 -0
- package/dist/pages/openapiSpecPathsDaiso.js +302 -0
- package/dist/pages/openapiSpecPathsDaisoOliveyoung.js +4 -376
- package/dist/pages/openapiSpecPathsEmart24.js +223 -0
- package/dist/pages/openapiSpecPathsGs25.js +166 -0
- package/dist/pages/openapiSpecPathsLotteMart.js +135 -0
- package/dist/pages/openapiSpecPathsLottecinema.js +212 -0
- package/dist/pages/openapiSpecPathsMegabox.js +52 -3
- package/dist/pages/openapiSpecPathsOliveyoung.js +231 -0
- package/dist/pages/openapiSpecPathsSeveneleven.js +234 -0
- package/dist/pages/prompt.js +8 -402
- package/dist/pages/promptCoreText.js +278 -0
- package/dist/pages/promptReferenceText.js +131 -0
- package/dist/pages/promptRetailCinemaText.js +273 -0
- package/dist/services/cgv/client.js +6 -1
- package/dist/services/cgv/index.js +3 -3
- package/dist/services/cgv/location.js +235 -0
- package/dist/services/cgv/tools/findTheaters.js +30 -5
- package/dist/services/cgv/tools/getTimetable.js +42 -14
- package/dist/services/cgv/tools/searchMovies.js +40 -12
- package/dist/services/cgv/transport.js +0 -3
- package/dist/services/cu/api.js +11 -0
- package/dist/services/cu/client.js +297 -0
- package/dist/services/cu/index.js +21 -0
- package/dist/services/cu/tools/checkInventory.js +123 -0
- package/dist/services/cu/tools/findNearbyStores.js +49 -0
- package/dist/services/cu/types.js +4 -0
- package/dist/services/daiso/api.js +22 -2
- package/dist/services/daiso/client.js +59 -0
- package/dist/services/daiso/index.js +2 -0
- package/dist/services/daiso/product.js +17 -0
- package/dist/services/daiso/tools/checkInventory.js +76 -41
- package/dist/services/daiso/tools/findStores.js +17 -7
- package/dist/services/daiso/tools/getDisplayLocation.js +75 -0
- package/dist/services/emart24/api.js +11 -0
- package/dist/services/emart24/client.js +173 -0
- package/dist/services/emart24/index.js +22 -0
- package/dist/services/emart24/inventoryLookup.js +134 -0
- package/dist/services/emart24/tools/checkInventory.js +54 -0
- package/dist/services/emart24/tools/findNearbyStores.js +72 -0
- package/dist/services/emart24/tools/searchProducts.js +63 -0
- package/dist/services/emart24/types.js +4 -0
- package/dist/services/gs25/api.js +9 -0
- package/dist/services/gs25/client.js +198 -0
- package/dist/services/gs25/index.js +22 -0
- package/dist/services/gs25/storeUtils.js +168 -0
- package/dist/services/gs25/tools/checkInventory.js +163 -0
- package/dist/services/gs25/tools/findNearbyStores.js +103 -0
- package/dist/services/gs25/tools/searchProducts.js +50 -0
- package/dist/services/gs25/types.js +4 -0
- package/dist/services/lottecinema/api.js +12 -0
- package/dist/services/lottecinema/client.js +161 -0
- package/dist/services/lottecinema/index.js +30 -0
- package/dist/services/lottecinema/location.js +191 -0
- package/dist/services/lottecinema/tools/findNearbyTheaters.js +47 -0
- package/dist/services/lottecinema/tools/getRemainingSeats.js +85 -0
- package/dist/services/lottecinema/tools/listNowShowing.js +79 -0
- package/dist/services/lottecinema/types.js +4 -0
- package/dist/services/lottemart/api.js +31 -0
- package/dist/services/lottemart/client.js +245 -0
- package/dist/services/lottemart/clientTypes.js +4 -0
- package/dist/services/lottemart/config.js +4 -0
- package/dist/services/lottemart/debug.js +92 -0
- package/dist/services/lottemart/geocode.js +49 -0
- package/dist/services/lottemart/index.js +30 -0
- package/dist/services/lottemart/keyword.js +29 -0
- package/dist/services/lottemart/parser.js +185 -0
- package/dist/services/lottemart/session.js +331 -0
- package/dist/services/lottemart/storeSearch.js +52 -0
- package/dist/services/lottemart/tools/findNearbyStores.js +67 -0
- package/dist/services/lottemart/tools/searchProducts.js +62 -0
- package/dist/services/lottemart/types.js +4 -0
- package/dist/services/lottemart/zetta.js +105 -0
- package/dist/services/megabox/location.js +219 -0
- package/dist/services/megabox/tools/findNearbyTheaters.js +13 -44
- package/dist/services/megabox/tools/getRemainingSeats.js +31 -3
- package/dist/services/megabox/tools/listNowShowing.js +31 -3
- package/dist/services/oliveyoung/api.js +2 -0
- package/dist/services/oliveyoung/client.js +150 -9
- package/dist/services/oliveyoung/index.js +3 -1
- package/dist/services/oliveyoung/tools/checkInventory.js +15 -4
- package/dist/services/oliveyoung/tools/searchProducts.js +57 -0
- package/dist/services/seveneleven/api.js +15 -0
- package/dist/services/seveneleven/client.js +279 -0
- package/dist/services/seveneleven/index.js +30 -0
- package/dist/services/seveneleven/inventory.js +302 -0
- package/dist/services/seveneleven/productKeyword.js +141 -0
- package/dist/services/seveneleven/tools/checkInventory.js +82 -0
- package/dist/services/seveneleven/tools/getCatalogSnapshot.js +55 -0
- package/dist/services/seveneleven/tools/getSearchPopwords.js +41 -0
- package/dist/services/seveneleven/tools/searchProducts.js +56 -0
- package/dist/services/seveneleven/tools/searchStores.js +45 -0
- package/dist/services/seveneleven/types.js +4 -0
- package/dist/utils/cliInteractiveHelpers.js +63 -0
- package/dist/utils/daisoKeyword.js +30 -0
- package/dist/utils/http.js +16 -2
- package/openapi.json +1977 -734
- package/openapi.yaml +1430 -543
- package/package.json +28 -15
- package/dist/tools/checkInventory.js +0 -98
- package/dist/tools/findStores.js +0 -125
- package/dist/tools/getPriceInfo.js +0 -77
- package/dist/tools/searchProducts.js +0 -61
- package/dist/types/index.js +0 -4
package/dist/index.js
CHANGED
|
@@ -13,16 +13,33 @@ import { createDaisoService } from './services/daiso/index.js';
|
|
|
13
13
|
import { createOliveyoungService } from './services/oliveyoung/index.js';
|
|
14
14
|
import { createMegaboxService } from './services/megabox/index.js';
|
|
15
15
|
import { createCgvService } from './services/cgv/index.js';
|
|
16
|
+
import { createLotteCinemaService } from './services/lottecinema/index.js';
|
|
17
|
+
import { createLotteMartService } from './services/lottemart/index.js';
|
|
18
|
+
import { createCuService } from './services/cu/index.js';
|
|
19
|
+
import { createEmart24Service } from './services/emart24/index.js';
|
|
20
|
+
import { createGs25Service } from './services/gs25/index.js';
|
|
21
|
+
import { createSevenElevenService } from './services/seveneleven/index.js';
|
|
16
22
|
import { createPromptResponse } from './pages/prompt.js';
|
|
17
|
-
import { createOpenApiJsonResponse, createOpenApiYamlResponse } from './pages/openapi.js';
|
|
23
|
+
import { createFullOpenApiJsonResponse, createFullOpenApiYamlResponse, createOpenApiJsonResponse, createOpenApiYamlResponse, } from './pages/openapi.js';
|
|
18
24
|
import { createPrivacyResponse } from './pages/privacy.js';
|
|
25
|
+
import { buildActionQueryTargetUrl } from './api/actionsProxy.js';
|
|
19
26
|
import { registerDaisoRoutes } from './api/routes/daisoRoutes.js';
|
|
20
27
|
import { registerOliveyoungRoutes } from './api/routes/oliveyoungRoutes.js';
|
|
21
28
|
import { registerMegaboxRoutes } from './api/routes/megaboxRoutes.js';
|
|
22
29
|
import { registerCgvRoutes } from './api/routes/cgvRoutes.js';
|
|
30
|
+
import { registerLotteCinemaRoutes } from './api/routes/lottecinemaRoutes.js';
|
|
31
|
+
import { registerLotteMartRoutes } from './api/routes/lottemartRoutes.js';
|
|
32
|
+
import { registerCuRoutes } from './api/routes/cuRoutes.js';
|
|
33
|
+
import { registerEmart24Routes } from './api/routes/emart24Routes.js';
|
|
34
|
+
import { registerGs25Routes } from './api/routes/gs25Routes.js';
|
|
35
|
+
import { registerSevenElevenRoutes } from './api/routes/sevenelevenRoutes.js';
|
|
36
|
+
import { registerHealthRoutes } from './api/routes/healthRoutes.js';
|
|
23
37
|
// ์๋ฒ ๋ฉํ๋ฐ์ดํฐ
|
|
24
38
|
const SERVER_NAME = 'multi-service-mcp';
|
|
25
39
|
const SERVER_VERSION = '1.0.0';
|
|
40
|
+
const SESSION_HEADER = 'mcp-session-id';
|
|
41
|
+
// ์ธ์
๋ณ MCP ์ ์ก ๊ณ์ธต/์๋ฒ๋ฅผ ์ ์งํด GET/POST/DELETE๋ฅผ ์ผ๊ด ์ฒ๋ฆฌํฉ๋๋ค.
|
|
42
|
+
const mcpSessions = new Map();
|
|
26
43
|
/**
|
|
27
44
|
* ์์ฒญ ์ปจํ
์คํธ ๊ธฐ๋ฐ ์๋น์ค ๋ ์ง์คํธ๋ฆฌ ์์ฑ
|
|
28
45
|
*/
|
|
@@ -30,9 +47,21 @@ const createRegistry = (bindings) => {
|
|
|
30
47
|
const registry = new ServiceRegistry();
|
|
31
48
|
registry.registerAll([
|
|
32
49
|
createDaisoService,
|
|
50
|
+
createGs25Service,
|
|
51
|
+
createSevenElevenService,
|
|
52
|
+
createCuService,
|
|
53
|
+
createEmart24Service,
|
|
54
|
+
() => createLotteMartService({
|
|
55
|
+
googleMapsApiKey: bindings?.GOOGLE_MAPS_API_KEY,
|
|
56
|
+
zyteApiKey: bindings?.ZYTE_API_KEY,
|
|
57
|
+
}),
|
|
33
58
|
createMegaboxService,
|
|
59
|
+
() => createLotteCinemaService({
|
|
60
|
+
googleMapsApiKey: bindings?.GOOGLE_MAPS_API_KEY,
|
|
61
|
+
}),
|
|
34
62
|
() => createCgvService({
|
|
35
63
|
zyteApiKey: bindings?.ZYTE_API_KEY,
|
|
64
|
+
googleMapsApiKey: bindings?.GOOGLE_MAPS_API_KEY,
|
|
36
65
|
}),
|
|
37
66
|
() => createOliveyoungService({
|
|
38
67
|
zyteApiKey: bindings?.ZYTE_API_KEY,
|
|
@@ -52,13 +81,88 @@ const createMcpServer = (bindings) => {
|
|
|
52
81
|
registry.applyToServer(server);
|
|
53
82
|
return server;
|
|
54
83
|
};
|
|
84
|
+
/**
|
|
85
|
+
* initialize ์์ฒญ ์ฌ๋ถ๋ฅผ ํ์ธํฉ๋๋ค.
|
|
86
|
+
*/
|
|
87
|
+
const isInitializeRequest = (body) => {
|
|
88
|
+
if (Array.isArray(body)) {
|
|
89
|
+
return body.some((item) => typeof item === 'object' && item !== null && item.method === 'initialize');
|
|
90
|
+
}
|
|
91
|
+
return typeof body === 'object' && body !== null && body.method === 'initialize';
|
|
92
|
+
};
|
|
93
|
+
/**
|
|
94
|
+
* ์ ์ธ์
transport/server๋ฅผ ์์ฑํฉ๋๋ค.
|
|
95
|
+
*/
|
|
96
|
+
const createSessionTransport = (bindings) => {
|
|
97
|
+
const server = createMcpServer(bindings);
|
|
98
|
+
const transport = new WebStandardStreamableHTTPServerTransport({
|
|
99
|
+
sessionIdGenerator: () => crypto.randomUUID(),
|
|
100
|
+
onsessioninitialized: (sessionId) => {
|
|
101
|
+
mcpSessions.set(sessionId, { server, transport });
|
|
102
|
+
},
|
|
103
|
+
onsessionclosed: (sessionId) => {
|
|
104
|
+
mcpSessions.delete(sessionId);
|
|
105
|
+
},
|
|
106
|
+
});
|
|
107
|
+
return { server, transport };
|
|
108
|
+
};
|
|
109
|
+
/**
|
|
110
|
+
* /mcp ์์ฒญ์ ์ธ์
๊ธฐ๋ฐ์ผ๋ก ์ฒ๋ฆฌํฉ๋๋ค.
|
|
111
|
+
*/
|
|
112
|
+
const handleMcpRequest = async (c) => {
|
|
113
|
+
const sessionId = c.req.header(SESSION_HEADER);
|
|
114
|
+
if (sessionId) {
|
|
115
|
+
const existing = mcpSessions.get(sessionId);
|
|
116
|
+
if (!existing) {
|
|
117
|
+
if (c.req.method === 'POST') {
|
|
118
|
+
const transport = new WebStandardStreamableHTTPServerTransport();
|
|
119
|
+
const server = createMcpServer(c.env);
|
|
120
|
+
await server.connect(transport);
|
|
121
|
+
const response = await transport.handleRequest(c.req.raw);
|
|
122
|
+
response.headers.set('x-mcp-session-fallback', 'stateless');
|
|
123
|
+
return response;
|
|
124
|
+
}
|
|
125
|
+
return c.json({
|
|
126
|
+
error: 'Session not found',
|
|
127
|
+
message: '์ ํจํ์ง ์์ mcp-session-id ์
๋๋ค. initialize ์์ฒญ๋ถํฐ ๋ค์ ์์ํด์ฃผ์ธ์.',
|
|
128
|
+
}, 404);
|
|
129
|
+
}
|
|
130
|
+
return existing.transport.handleRequest(c.req.raw);
|
|
131
|
+
}
|
|
132
|
+
if (c.req.method === 'POST') {
|
|
133
|
+
const parsedBody = await c.req.raw
|
|
134
|
+
.clone()
|
|
135
|
+
.json()
|
|
136
|
+
.catch(() => undefined);
|
|
137
|
+
if (!isInitializeRequest(parsedBody)) {
|
|
138
|
+
return c.json({
|
|
139
|
+
error: 'Bad Request',
|
|
140
|
+
message: '์ธ์
์ด ์์ต๋๋ค. ๋จผ์ initialize ์์ฒญ์ผ๋ก ์ธ์
์ ์์ฑํด์ฃผ์ธ์.',
|
|
141
|
+
}, 400);
|
|
142
|
+
}
|
|
143
|
+
const { server, transport } = createSessionTransport(c.env);
|
|
144
|
+
await server.connect(transport);
|
|
145
|
+
return transport.handleRequest(c.req.raw, { parsedBody });
|
|
146
|
+
}
|
|
147
|
+
return c.json({
|
|
148
|
+
error: 'Bad Request',
|
|
149
|
+
message: `์ธ์
์ด ์์ต๋๋ค. ๋จผ์ POST /mcp initialize ์์ฒญ ํ ${SESSION_HEADER} ํค๋๋ฅผ ์ฌ์ฉํด์ฃผ์ธ์.`,
|
|
150
|
+
}, 400);
|
|
151
|
+
};
|
|
55
152
|
// Hono ์ฑ ์์ฑ
|
|
56
153
|
const app = new Hono();
|
|
57
154
|
// CORS ์ค์
|
|
58
155
|
app.use('*', cors({
|
|
59
156
|
origin: '*',
|
|
60
157
|
allowMethods: ['GET', 'POST', 'DELETE', 'OPTIONS'],
|
|
61
|
-
allowHeaders: [
|
|
158
|
+
allowHeaders: [
|
|
159
|
+
'Content-Type',
|
|
160
|
+
'Authorization',
|
|
161
|
+
'x-health-check-key',
|
|
162
|
+
'mcp-session-id',
|
|
163
|
+
'Last-Event-ID',
|
|
164
|
+
'mcp-protocol-version',
|
|
165
|
+
],
|
|
62
166
|
exposeHeaders: ['mcp-session-id', 'mcp-protocol-version'],
|
|
63
167
|
}));
|
|
64
168
|
// ๊ธฐ๋ณธ ์ ๋ณด ์๋ํฌ์ธํธ (GET ์์ฒญ๋ง)
|
|
@@ -73,6 +177,10 @@ app.get('/', (c) => {
|
|
|
73
177
|
endpoints: {
|
|
74
178
|
mcp: '/ ๋๋ /mcp (POST) - MCP ํ๋กํ ์ฝ ์๋ํฌ์ธํธ',
|
|
75
179
|
health: '/health (GET) - ํฌ์ค ์ฒดํฌ',
|
|
180
|
+
healthChecks: '/api/health/checks (GET) - ์๋น์ค๋ณ ์์ธ ํฌ์ค ์ฒดํฌ',
|
|
181
|
+
openapi: '/openapi.json (GET) - OpenAI Actions์ฉ ์ถ์ฝ OpenAPI',
|
|
182
|
+
openapiFull: '/openapi-full.json (GET) - ์ ์ฒด OpenAPI',
|
|
183
|
+
actionsQuery: '/api/actions/query (GET) - ๊ธฐ์กด GET API ํตํฉ facade',
|
|
76
184
|
},
|
|
77
185
|
services,
|
|
78
186
|
tools: allTools,
|
|
@@ -89,6 +197,7 @@ app.on(['POST', 'DELETE', 'OPTIONS'], '/', async (c) => {
|
|
|
89
197
|
});
|
|
90
198
|
// ํฌ์ค ์ฒดํฌ ์๋ํฌ์ธํธ
|
|
91
199
|
app.get('/health', (c) => c.json({ status: 'ok' }));
|
|
200
|
+
registerHealthRoutes(app);
|
|
92
201
|
// ํ๋กฌํํธ ํ์ด์ง (MCP ๋ฏธ์ง์ ์์ด์ ํธ์ฉ)
|
|
93
202
|
app.get('/prompt', (c) => {
|
|
94
203
|
const baseUrl = new URL(c.req.url).origin;
|
|
@@ -103,6 +212,14 @@ app.get('/openapi.yaml', (c) => {
|
|
|
103
212
|
const baseUrl = new URL(c.req.url).origin;
|
|
104
213
|
return createOpenApiYamlResponse(baseUrl);
|
|
105
214
|
});
|
|
215
|
+
app.get('/openapi-full.json', (c) => {
|
|
216
|
+
const baseUrl = new URL(c.req.url).origin;
|
|
217
|
+
return createFullOpenApiJsonResponse(baseUrl);
|
|
218
|
+
});
|
|
219
|
+
app.get('/openapi-full.yaml', (c) => {
|
|
220
|
+
const baseUrl = new URL(c.req.url).origin;
|
|
221
|
+
return createFullOpenApiYamlResponse(baseUrl);
|
|
222
|
+
});
|
|
106
223
|
// ๊ฐ์ธ์ ๋ณด ์ฒ๋ฆฌ๋ฐฉ์นจ ํ์ด์ง
|
|
107
224
|
app.get('/privacy', (c) => {
|
|
108
225
|
const baseUrl = new URL(c.req.url).origin;
|
|
@@ -110,14 +227,36 @@ app.get('/privacy', (c) => {
|
|
|
110
227
|
});
|
|
111
228
|
// GET API ์๋ํฌ์ธํธ (MCP ๋ฏธ์ง์ ์์ด์ ํธ์ฉ)
|
|
112
229
|
registerDaisoRoutes(app);
|
|
230
|
+
registerGs25Routes(app);
|
|
231
|
+
registerSevenElevenRoutes(app);
|
|
232
|
+
registerCuRoutes(app);
|
|
233
|
+
registerEmart24Routes(app);
|
|
234
|
+
registerLotteMartRoutes(app);
|
|
113
235
|
registerOliveyoungRoutes(app);
|
|
114
236
|
registerMegaboxRoutes(app);
|
|
237
|
+
registerLotteCinemaRoutes(app);
|
|
115
238
|
registerCgvRoutes(app);
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
239
|
+
app.get('/api/actions/query', async (c) => {
|
|
240
|
+
try {
|
|
241
|
+
const targetUrl = buildActionQueryTargetUrl(c.req.url);
|
|
242
|
+
const headers = new Headers(c.req.raw.headers);
|
|
243
|
+
headers.delete('host');
|
|
244
|
+
return app.fetch(new Request(targetUrl.toString(), {
|
|
245
|
+
method: 'GET',
|
|
246
|
+
headers,
|
|
247
|
+
}), c.env);
|
|
248
|
+
}
|
|
249
|
+
catch (error) {
|
|
250
|
+
const message = error instanceof Error ? error.message : '์ ์ ์๋ ์ค๋ฅ๊ฐ ๋ฐ์ํ์ต๋๋ค.';
|
|
251
|
+
return c.json({
|
|
252
|
+
success: false,
|
|
253
|
+
error: {
|
|
254
|
+
code: 'INVALID_ACTION_QUERY',
|
|
255
|
+
message,
|
|
256
|
+
},
|
|
257
|
+
}, 400);
|
|
258
|
+
}
|
|
122
259
|
});
|
|
260
|
+
// MCP ์๋ํฌ์ธํธ
|
|
261
|
+
app.all('/mcp', handleMcpRequest);
|
|
123
262
|
export default app;
|
package/dist/pages/openapi.js
CHANGED
|
@@ -2,5 +2,6 @@
|
|
|
2
2
|
* OpenAPI ํ์ด์ง ์ํธ๋ฆฌ
|
|
3
3
|
*/
|
|
4
4
|
export { generateOpenApiSpec } from './openapiSpec.js';
|
|
5
|
-
export {
|
|
5
|
+
export { generateFullOpenApiSpec } from './openapiFullSpec.js';
|
|
6
|
+
export { createOpenApiJsonResponse, createOpenApiYamlResponse, createFullOpenApiJsonResponse, createFullOpenApiYamlResponse, } from './openapiResponse.js';
|
|
6
7
|
export { __testOnlyJsonToYaml } from './openapiYaml.js';
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ์ ์ฒด OpenAPI ์คํ ์กฐํฉ ๋ชจ๋
|
|
3
|
+
*/
|
|
4
|
+
import { OPENAPI_PATHS_DAISO_OLIVEYOUNG } from './openapiSpecPathsDaisoOliveyoung.js';
|
|
5
|
+
import { OPENAPI_PATHS_CU } from './openapiSpecPathsCu.js';
|
|
6
|
+
import { OPENAPI_PATHS_EMART24 } from './openapiSpecPathsEmart24.js';
|
|
7
|
+
import { OPENAPI_PATHS_LOTTEMART } from './openapiSpecPathsLotteMart.js';
|
|
8
|
+
import { OPENAPI_PATHS_MEGABOX } from './openapiSpecPathsMegabox.js';
|
|
9
|
+
import { OPENAPI_PATHS_CGV } from './openapiSpecPathsCgv.js';
|
|
10
|
+
import { OPENAPI_PATHS_LOTTECINEMA } from './openapiSpecPathsLottecinema.js';
|
|
11
|
+
import { OPENAPI_PATHS_GS25 } from './openapiSpecPathsGs25.js';
|
|
12
|
+
import { OPENAPI_PATHS_SEVENELEVEN } from './openapiSpecPathsSeveneleven.js';
|
|
13
|
+
import { OPENAPI_COMPONENTS } from './openapiSpecComponents.js';
|
|
14
|
+
export function generateFullOpenApiSpec(baseUrl) {
|
|
15
|
+
return {
|
|
16
|
+
openapi: '3.1.0',
|
|
17
|
+
info: {
|
|
18
|
+
title: '๋ค์ด์ MCP API (์ ์ฒด ์คํ)',
|
|
19
|
+
description: `๋ค์ด์ ์ ํ ๊ฒ์, ๋งค์ฅ ์ฐพ๊ธฐ, ์ฌ๊ณ ํ์ธ์ ์ํ API์
๋๋ค.
|
|
20
|
+
|
|
21
|
+
## ์ฃผ์ ๊ธฐ๋ฅ
|
|
22
|
+
- ๐ **์ ํ ๊ฒ์**: ํค์๋๋ก ๋ค์ด์ ์ ํ ๊ฒ์
|
|
23
|
+
- ๐ช **๋งค์ฅ ์ฐพ๊ธฐ**: ์ง์ญ/ํค์๋๋ก ๋งค์ฅ ๊ฒ์
|
|
24
|
+
- ๐ฆ **์ฌ๊ณ ํ์ธ**: ์จ๋ผ์ธ ๋ฐ ์คํ๋ผ์ธ ๋งค์ฅ ์ฌ๊ณ ์กฐํ
|
|
25
|
+
- ๐งญ **์ง์ด ์์น ์กฐํ**: ๋งค์ฅ ๋ด ์ํ ๊ตฌ์ญ/์ธต ์ ๋ณด ์กฐํ
|
|
26
|
+
- ๐ช **GS25 ๋งค์ฅ/์ํ/์ฌ๊ณ ์กฐํ**: GS25 ๋งค์ฅ ํ์, ์ํ ๊ฒ์, ์ฌ๊ณ ์กฐํ
|
|
27
|
+
- 7๏ธโฃ **์ธ๋ธ์ผ๋ ๋ธ ์ํ/๋งค์ฅ/์ฌ๊ณ ์กฐํ**: ์ํ ๊ฒ์, ๋งค์ฅ ๊ฒ์, ์ค์ฌ๊ณ ์กฐํ
|
|
28
|
+
- ๐ช **CU ๋งค์ฅ/์ฌ๊ณ ์กฐํ**: CU ๋งค์ฅ ํ์ ๋ฐ ์ํ ์ฌ๊ณ ๊ฒ์
|
|
29
|
+
- ๐ฌ **๋ฉ๊ฐ๋ฐ์ค ์ง์ /์ํ ์กฐํ**: ์ฃผ๋ณ ์ง์ , ์์ ๋ชฉ๋ก, ์์ฌ ์ข์ ์กฐํ
|
|
30
|
+
- ๐๏ธ **๋กฏ๋ฐ์๋ค๋ง ์ง์ /์ํ ์กฐํ**: ์ฃผ๋ณ ์ง์ , ์์ ๋ชฉ๋ก, ์์ฌ ์ข์ ์กฐํ
|
|
31
|
+
- ๐ฅ **CGV ์ง์ /์ํ ์กฐํ**: ๊ทน์ฅ ๋ชฉ๋ก, ์ํ ๋ชฉ๋ก, ์๊ฐํ ์กฐํ
|
|
32
|
+
|
|
33
|
+
## ์ฌ์ฉ ํ
|
|
34
|
+
1. ํ๊ธ ๊ฒ์์ด๋ URL ์ธ์ฝ๋ฉ์ด ์๋ ์ฒ๋ฆฌ๋ฉ๋๋ค
|
|
35
|
+
2. ์ฌ๊ณ ํ์ธ ์ ๋จผ์ ์ ํ ๊ฒ์์ผ๋ก ์ ํ ID๋ฅผ ํ์ธํ์ธ์
|
|
36
|
+
3. ์์น ๊ธฐ๋ฐ ์ฌ๊ณ ์กฐํ ์ lat, lng ํ๋ผ๋ฏธํฐ๋ฅผ ํ์ฉํ์ธ์
|
|
37
|
+
4. ์ธ๋ธ์ผ๋ ๋ธ ์ฌ๊ณ ์กฐํ๋ keyword์ storeKeyword๋ฅผ ํจ๊ป ์ฌ์ฉํ๋ฉด ์ ํ๋๊ฐ ๋์์ง๋๋ค`,
|
|
38
|
+
version: '1.0.0',
|
|
39
|
+
contact: {
|
|
40
|
+
name: 'GitHub Repository',
|
|
41
|
+
url: 'https://github.com/hmmhmmhm/daiso-mcp',
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
servers: [{ url: baseUrl, description: 'Production Server' }],
|
|
45
|
+
paths: {
|
|
46
|
+
...OPENAPI_PATHS_DAISO_OLIVEYOUNG,
|
|
47
|
+
...OPENAPI_PATHS_CU,
|
|
48
|
+
...OPENAPI_PATHS_EMART24,
|
|
49
|
+
...OPENAPI_PATHS_LOTTEMART,
|
|
50
|
+
...OPENAPI_PATHS_GS25,
|
|
51
|
+
...OPENAPI_PATHS_SEVENELEVEN,
|
|
52
|
+
...OPENAPI_PATHS_MEGABOX,
|
|
53
|
+
...OPENAPI_PATHS_LOTTECINEMA,
|
|
54
|
+
...OPENAPI_PATHS_CGV,
|
|
55
|
+
},
|
|
56
|
+
components: OPENAPI_COMPONENTS,
|
|
57
|
+
};
|
|
58
|
+
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* OpenAPI ์๋ต ์์ฑ ๋ชจ๋
|
|
3
3
|
*/
|
|
4
4
|
import { generateOpenApiSpec } from './openapiSpec.js';
|
|
5
|
+
import { generateFullOpenApiSpec } from './openapiFullSpec.js';
|
|
5
6
|
import { jsonToYaml } from './openapiYaml.js';
|
|
6
7
|
/**
|
|
7
8
|
* OpenAPI ์คํ ์๋ต ์์ฑ (JSON)
|
|
@@ -30,3 +31,30 @@ export function createOpenApiYamlResponse(baseUrl) {
|
|
|
30
31
|
},
|
|
31
32
|
});
|
|
32
33
|
}
|
|
34
|
+
/**
|
|
35
|
+
* ์ ์ฒด OpenAPI ์คํ ์๋ต ์์ฑ (JSON)
|
|
36
|
+
*/
|
|
37
|
+
export function createFullOpenApiJsonResponse(baseUrl) {
|
|
38
|
+
const spec = generateFullOpenApiSpec(baseUrl);
|
|
39
|
+
return new Response(JSON.stringify(spec, null, 2), {
|
|
40
|
+
headers: {
|
|
41
|
+
'Content-Type': 'application/json; charset=utf-8',
|
|
42
|
+
'Cache-Control': 'public, max-age=3600',
|
|
43
|
+
'Access-Control-Allow-Origin': '*',
|
|
44
|
+
},
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* ์ ์ฒด OpenAPI ์คํ ์๋ต ์์ฑ (YAML)
|
|
49
|
+
*/
|
|
50
|
+
export function createFullOpenApiYamlResponse(baseUrl) {
|
|
51
|
+
const spec = generateFullOpenApiSpec(baseUrl);
|
|
52
|
+
const yaml = jsonToYaml(spec);
|
|
53
|
+
return new Response(yaml, {
|
|
54
|
+
headers: {
|
|
55
|
+
'Content-Type': 'text/yaml; charset=utf-8',
|
|
56
|
+
'Cache-Control': 'public, max-age=3600',
|
|
57
|
+
'Access-Control-Allow-Origin': '*',
|
|
58
|
+
},
|
|
59
|
+
});
|
|
60
|
+
}
|
|
@@ -1,43 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* OpenAPI ์คํ
|
|
2
|
+
* OpenAI Actions์ฉ ๊ธฐ๋ณธ OpenAPI ์คํ ์ํธ๋ฆฌ
|
|
3
3
|
*/
|
|
4
|
-
|
|
5
|
-
import { OPENAPI_PATHS_MEGABOX } from './openapiSpecPathsMegabox.js';
|
|
6
|
-
import { OPENAPI_PATHS_CGV } from './openapiSpecPathsCgv.js';
|
|
7
|
-
import { OPENAPI_COMPONENTS } from './openapiSpecComponents.js';
|
|
8
|
-
/**
|
|
9
|
-
* OpenAPI ์คํ ์์ฑ
|
|
10
|
-
*/
|
|
11
|
-
export function generateOpenApiSpec(baseUrl) {
|
|
12
|
-
return {
|
|
13
|
-
openapi: '3.1.0',
|
|
14
|
-
info: {
|
|
15
|
-
title: '๋ค์ด์ MCP API',
|
|
16
|
-
description: `๋ค์ด์ ์ ํ ๊ฒ์, ๋งค์ฅ ์ฐพ๊ธฐ, ์ฌ๊ณ ํ์ธ์ ์ํ API์
๋๋ค.
|
|
17
|
-
|
|
18
|
-
## ์ฃผ์ ๊ธฐ๋ฅ
|
|
19
|
-
- ๐ **์ ํ ๊ฒ์**: ํค์๋๋ก ๋ค์ด์ ์ ํ ๊ฒ์
|
|
20
|
-
- ๐ช **๋งค์ฅ ์ฐพ๊ธฐ**: ์ง์ญ/ํค์๋๋ก ๋งค์ฅ ๊ฒ์
|
|
21
|
-
- ๐ฆ **์ฌ๊ณ ํ์ธ**: ์จ๋ผ์ธ ๋ฐ ์คํ๋ผ์ธ ๋งค์ฅ ์ฌ๊ณ ์กฐํ
|
|
22
|
-
- ๐ฌ **๋ฉ๊ฐ๋ฐ์ค ์ง์ /์ํ ์กฐํ**: ์ฃผ๋ณ ์ง์ , ์์ ๋ชฉ๋ก, ์์ฌ ์ข์ ์กฐํ
|
|
23
|
-
- ๐ฅ **CGV ์ง์ /์ํ ์กฐํ**: ๊ทน์ฅ ๋ชฉ๋ก, ์ํ ๋ชฉ๋ก, ์๊ฐํ ์กฐํ
|
|
24
|
-
|
|
25
|
-
## ์ฌ์ฉ ํ
|
|
26
|
-
1. ํ๊ธ ๊ฒ์์ด๋ URL ์ธ์ฝ๋ฉ์ด ์๋ ์ฒ๋ฆฌ๋ฉ๋๋ค
|
|
27
|
-
2. ์ฌ๊ณ ํ์ธ ์ ๋จผ์ ์ ํ ๊ฒ์์ผ๋ก ์ ํ ID๋ฅผ ํ์ธํ์ธ์
|
|
28
|
-
3. ์์น ๊ธฐ๋ฐ ์ฌ๊ณ ์กฐํ ์ lat, lng ํ๋ผ๋ฏธํฐ๋ฅผ ํ์ฉํ์ธ์`,
|
|
29
|
-
version: '1.0.0',
|
|
30
|
-
contact: {
|
|
31
|
-
name: 'GitHub Repository',
|
|
32
|
-
url: 'https://github.com/hmmhmmhm/daiso-mcp',
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
servers: [{ url: baseUrl, description: 'Production Server' }],
|
|
36
|
-
paths: {
|
|
37
|
-
...OPENAPI_PATHS_DAISO_OLIVEYOUNG,
|
|
38
|
-
...OPENAPI_PATHS_MEGABOX,
|
|
39
|
-
...OPENAPI_PATHS_CGV,
|
|
40
|
-
},
|
|
41
|
-
components: OPENAPI_COMPONENTS,
|
|
42
|
-
};
|
|
43
|
-
}
|
|
4
|
+
export { generateOpenApiSpec } from './openapiSpecActions.js';
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenAI Actions์ฉ ์ถ์ฝ OpenAPI ์คํ
|
|
3
|
+
*/
|
|
4
|
+
import { ACTION_QUERY_ACTIONS } from '../api/actionsProxy.js';
|
|
5
|
+
import { OPENAPI_COMPONENTS } from './openapiSpecComponents.js';
|
|
6
|
+
const ACTION_QUERY_PARAMETERS = [
|
|
7
|
+
{
|
|
8
|
+
name: 'action',
|
|
9
|
+
in: 'query',
|
|
10
|
+
required: true,
|
|
11
|
+
description: '์คํํ ์ก์
์ด๋ฆ์
๋๋ค. ์ฌ์ฉ ๊ฐ๋ฅํ ๊ฐ์ enum ๋ชฉ๋ก์ ์ฐธ๊ณ ํ์ธ์.',
|
|
12
|
+
schema: {
|
|
13
|
+
type: 'string',
|
|
14
|
+
enum: ACTION_QUERY_ACTIONS,
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
{ name: 'q', in: 'query', required: false, description: '๋ค์ด์ ์ ํ ๊ฒ์์ด', schema: { type: 'string' } },
|
|
18
|
+
{ name: 'query', in: 'query', required: false, description: '์ธ๋ธ์ผ๋ ๋ธ ์ํ ๊ฒ์์ด', schema: { type: 'string' } },
|
|
19
|
+
{ name: 'itemCode', in: 'query', required: false, description: 'GS25 ์ํ ์ฝ๋', schema: { type: 'string' } },
|
|
20
|
+
{ name: 'productId', in: 'query', required: false, description: '์ ํ ID ๋๋ ์์ธ ์กฐํ์ฉ path ํ๋ผ๋ฏธํฐ', schema: { type: 'string' } },
|
|
21
|
+
{ name: 'keyword', in: 'query', required: false, description: '๊ณตํต ํค์๋ ํ๋ผ๋ฏธํฐ', schema: { type: 'string' } },
|
|
22
|
+
{ name: 'sido', in: 'query', required: false, description: '๋ค์ด์ ์/๋', schema: { type: 'string' } },
|
|
23
|
+
{ name: 'gugun', in: 'query', required: false, description: '๋ค์ด์ ๊ตฌ/๊ตฐ', schema: { type: 'string' } },
|
|
24
|
+
{ name: 'dong', in: 'query', required: false, description: '๋ค์ด์ ๋', schema: { type: 'string' } },
|
|
25
|
+
{ name: 'area', in: 'query', required: false, description: '๋กฏ๋ฐ๋งํธ ์ง์ญ', schema: { type: 'string' } },
|
|
26
|
+
{ name: 'area1', in: 'query', required: false, description: '์ด๋งํธ24 1์ฐจ ์ง์ญ', schema: { type: 'string' } },
|
|
27
|
+
{ name: 'area2', in: 'query', required: false, description: '์ด๋งํธ24 2์ฐจ ์ง์ญ', schema: { type: 'string' } },
|
|
28
|
+
{ name: 'areaCode', in: 'query', required: false, description: '๋ฉ๊ฐ๋ฐ์ค ์ง์ญ ์ฝ๋', schema: { type: 'string' } },
|
|
29
|
+
{ name: 'brandVariant', in: 'query', required: false, description: '๋กฏ๋ฐ๋งํธ ๋ธ๋๋ ๋ณํ', schema: { type: 'string' } },
|
|
30
|
+
{ name: 'lat', in: 'query', required: false, description: '์๋', schema: { type: 'number', format: 'float' } },
|
|
31
|
+
{ name: 'lng', in: 'query', required: false, description: '๊ฒฝ๋', schema: { type: 'number', format: 'float' } },
|
|
32
|
+
{ name: 'page', in: 'query', required: false, description: 'ํ์ด์ง ๋ฒํธ', schema: { type: 'integer' } },
|
|
33
|
+
{ name: 'pageIdx', in: 'query', required: false, description: '์ฌ๋ฆฌ๋ธ์ ํ์ด์ง ๋ฒํธ', schema: { type: 'integer' } },
|
|
34
|
+
{ name: 'pageLimit', in: 'query', required: false, description: '๋กฏ๋ฐ๋งํธ ์ถ๊ฐ ํ์ด์ง ์', schema: { type: 'integer' } },
|
|
35
|
+
{ name: 'pageSize', in: 'query', required: false, description: 'ํ์ด์ง ํฌ๊ธฐ', schema: { type: 'integer' } },
|
|
36
|
+
{ name: 'size', in: 'query', required: false, description: 'ํ์ด์ง ํฌ๊ธฐ ๋๋ ๊ฒ์ ํฌ๊ธฐ', schema: { type: 'integer' } },
|
|
37
|
+
{ name: 'offset', in: 'query', required: false, description: 'CU ๊ฒ์ ์คํ์
', schema: { type: 'integer' } },
|
|
38
|
+
{ name: 'limit', in: 'query', required: false, description: '์ต๋ ๊ฒฐ๊ณผ ์', schema: { type: 'integer' } },
|
|
39
|
+
{ name: 'storeLimit', in: 'query', required: false, description: '๋งค์ฅ ๊ฒฐ๊ณผ ์ ํ ์', schema: { type: 'integer' } },
|
|
40
|
+
{ name: 'storeCode', in: 'query', required: false, description: '๋งค์ฅ ์ฝ๋', schema: { type: 'string' } },
|
|
41
|
+
{ name: 'storeName', in: 'query', required: false, description: '๋งค์ฅ๋ช
', schema: { type: 'string' } },
|
|
42
|
+
{ name: 'storeKeyword', in: 'query', required: false, description: '๋งค์ฅ ํค์๋', schema: { type: 'string' } },
|
|
43
|
+
{ name: 'playDate', in: 'query', required: false, description: '์์์ผ(YYYYMMDD)', schema: { type: 'string' } },
|
|
44
|
+
{ name: 'regionCode', in: 'query', required: false, description: 'CGV ์ง์ญ ์ฝ๋', schema: { type: 'string' } },
|
|
45
|
+
{ name: 'theaterCode', in: 'query', required: false, description: 'CGV ๊ทน์ฅ ์ฝ๋', schema: { type: 'string' } },
|
|
46
|
+
{ name: 'theaterId', in: 'query', required: false, description: '๋ฉ๊ฐ๋ฐ์ค/๋กฏ๋ฐ์๋ค๋ง ์ง์ ID', schema: { type: 'string' } },
|
|
47
|
+
{ name: 'movieCode', in: 'query', required: false, description: 'CGV ์ํ ์ฝ๋', schema: { type: 'string' } },
|
|
48
|
+
{ name: 'movieId', in: 'query', required: false, description: '๋ฉ๊ฐ๋ฐ์ค/๋กฏ๋ฐ์๋ค๋ง ์ํ ID', schema: { type: 'string' } },
|
|
49
|
+
{ name: 'pluCd', in: 'query', required: false, description: '์ด๋งํธ24 ์ํ PLU ์ฝ๋', schema: { type: 'string' } },
|
|
50
|
+
{ name: 'bizNoArr', in: 'query', required: false, description: '์ด๋งํธ24 ์ฌ์
์๋ฒํธ ๋ชฉ๋ก', schema: { type: 'string' } },
|
|
51
|
+
{ name: 'label', in: 'query', required: false, description: '์ธ๋ธ์ผ๋ ๋ธ ์ธ๊ธฐ ๊ฒ์์ด ๋ผ๋ฒจ', schema: { type: 'string' } },
|
|
52
|
+
{ name: 'sort', in: 'query', required: false, description: '์ ๋ ฌ ๊ธฐ์ค', schema: { type: 'string' } },
|
|
53
|
+
{ name: 'searchSort', in: 'query', required: false, description: 'CU ๊ฒ์ ์ ๋ ฌ ๊ธฐ์ค', schema: { type: 'string' } },
|
|
54
|
+
{ name: 'service24h', in: 'query', required: false, description: '์ด๋งํธ24 24์๊ฐ ํํฐ', schema: { type: 'boolean' } },
|
|
55
|
+
{ name: 'includeSoldOut', in: 'query', required: false, description: '์ฌ๋ฆฌ๋ธ์ ํ์ ํฌํจ ์ฌ๋ถ', schema: { type: 'boolean' } },
|
|
56
|
+
{ name: 'includeIssues', in: 'query', required: false, description: '์ธ๋ธ์ผ๋ ๋ธ ์ด๋ฌ์ ํ์ฌ์ง ํฌํจ ์ฌ๋ถ', schema: { type: 'boolean' } },
|
|
57
|
+
{ name: 'includeExhibition', in: 'query', required: false, description: '์ธ๋ธ์ผ๋ ๋ธ ์ ์์ํ ํฌํจ ์ฌ๋ถ', schema: { type: 'boolean' } },
|
|
58
|
+
{ name: 'timeoutMs', in: 'query', required: false, description: '์ธ๋ธ์ผ๋ ๋ธ inventory ํ์์์', schema: { type: 'integer' } },
|
|
59
|
+
];
|
|
60
|
+
export function generateOpenApiSpec(baseUrl) {
|
|
61
|
+
return {
|
|
62
|
+
openapi: '3.1.0',
|
|
63
|
+
info: {
|
|
64
|
+
title: '๋ค์ด์ MCP API (OpenAI Actions์ฉ)',
|
|
65
|
+
description: `OpenAI ์ฑ๋ด์ OpenAPI import ๊ฐ์ ์ ํ์ ํผํ๊ธฐ ์ํด ๋ชจ๋ GET API๋ฅผ ๋จ์ผ facade ์๋ํฌ์ธํธ๋ก ์ง์ฝํ ์คํ์
๋๋ค.
|
|
66
|
+
|
|
67
|
+
์ค์ ๋ฐํ์์ ๊ธฐ์กด /api/{service}/... ์๋ํฌ์ธํธ๋ก ์์ํ๋ฉฐ, ์ด ์คํ์ OpenAI Actions ๋ฑ๋ก ์ ์ฉ์ผ๋ก ์ฌ์ฉํฉ๋๋ค.
|
|
68
|
+
|
|
69
|
+
๋ธ๋๋๋ช
์ด ์์ฒญ ์๋ถ๋ถ์ ๋์ค๋ฉด ๋ค์ ์ํ/์ฌ๊ณ ์์ฒญ๊น์ง ๊ฐ์ ๋ธ๋๋๋ก ํด์ํด์ผ ํฉ๋๋ค. ์: "์์ฐ ์ค์์ญ ์ฃผ๋ณ ๋ค์ด์ ์ฐพ์์ฃผ์๊ณ ํซ์์ค ์ฌ๊ณ ์ฐพ์์ฃผ์ธ์"๋ ๋ค์ด์ ๊ธฐ์ค ์กฐํ๋ฅผ ๋จผ์ ์ํํ๊ณ , ๊ฒฐ๊ณผ๊ฐ ์์ ๋๋ง ๋ค๋ฅธ ๋ธ๋๋๋ฅผ ์ ์ํฉ๋๋ค.
|
|
70
|
+
|
|
71
|
+
์ ์ฒด ๊ฐ๋ณ ์๋ํฌ์ธํธ ์คํ์ด ํ์ํ๋ฉด /openapi-full.json ๋๋ /openapi-full.yaml ์ ์ฌ์ฉํ์ธ์.`,
|
|
72
|
+
version: '1.0.0',
|
|
73
|
+
contact: {
|
|
74
|
+
name: 'GitHub Repository',
|
|
75
|
+
url: 'https://github.com/hmmhmmhm/daiso-mcp',
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
servers: [{ url: baseUrl, description: 'Production Server' }],
|
|
79
|
+
paths: {
|
|
80
|
+
'/api/actions/query': {
|
|
81
|
+
get: {
|
|
82
|
+
operationId: 'queryAction',
|
|
83
|
+
summary: '๊ณตํต GET ์ก์
์คํ',
|
|
84
|
+
description: 'action ๊ฐ์ ๋ฐ๋ผ ๊ธฐ์กด GET API ์๋ํฌ์ธํธ๋ก ํ๋ก์ํฉ๋๋ค. OpenAI Actions ๋ฑ๋ก ์ ์ด ๋จ์ผ ์๋ํฌ์ธํธ๋ฅผ ์ฌ์ฉํ์ธ์.',
|
|
85
|
+
parameters: ACTION_QUERY_PARAMETERS,
|
|
86
|
+
responses: {
|
|
87
|
+
'200': {
|
|
88
|
+
description: 'ํ๋ก์ ํธ์ถ ์ฑ๊ณต',
|
|
89
|
+
content: {
|
|
90
|
+
'application/json': {
|
|
91
|
+
schema: { $ref: '#/components/schemas/ActionQueryResponse' },
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
'400': {
|
|
96
|
+
description: '์๋ชป๋ ์์ฒญ',
|
|
97
|
+
content: {
|
|
98
|
+
'application/json': {
|
|
99
|
+
schema: { $ref: '#/components/schemas/ErrorResponse' },
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
components: OPENAPI_COMPONENTS,
|
|
108
|
+
};
|
|
109
|
+
}
|