@appaflytech/wappa-mcp 0.0.1

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 (68) hide show
  1. package/.env.example +5 -0
  2. package/LICENSE +21 -0
  3. package/README.md +200 -0
  4. package/dist/auth.d.ts +20 -0
  5. package/dist/auth.d.ts.map +1 -0
  6. package/dist/auth.js +58 -0
  7. package/dist/auth.js.map +1 -0
  8. package/dist/base-components.d.ts +52 -0
  9. package/dist/base-components.d.ts.map +1 -0
  10. package/dist/base-components.js +552 -0
  11. package/dist/base-components.js.map +1 -0
  12. package/dist/client.d.ts +141 -0
  13. package/dist/client.d.ts.map +1 -0
  14. package/dist/client.js +341 -0
  15. package/dist/client.js.map +1 -0
  16. package/dist/index.d.ts +10 -0
  17. package/dist/index.d.ts.map +1 -0
  18. package/dist/index.js +287 -0
  19. package/dist/index.js.map +1 -0
  20. package/dist/tools/components.d.ts +217 -0
  21. package/dist/tools/components.d.ts.map +1 -0
  22. package/dist/tools/components.js +258 -0
  23. package/dist/tools/components.js.map +1 -0
  24. package/dist/tools/dynamic-entities.d.ts +308 -0
  25. package/dist/tools/dynamic-entities.d.ts.map +1 -0
  26. package/dist/tools/dynamic-entities.js +278 -0
  27. package/dist/tools/dynamic-entities.js.map +1 -0
  28. package/dist/tools/entities.d.ts +212 -0
  29. package/dist/tools/entities.d.ts.map +1 -0
  30. package/dist/tools/entities.js +223 -0
  31. package/dist/tools/entities.js.map +1 -0
  32. package/dist/tools/general.d.ts +93 -0
  33. package/dist/tools/general.d.ts.map +1 -0
  34. package/dist/tools/general.js +218 -0
  35. package/dist/tools/general.js.map +1 -0
  36. package/dist/tools/languages.d.ts +157 -0
  37. package/dist/tools/languages.d.ts.map +1 -0
  38. package/dist/tools/languages.js +142 -0
  39. package/dist/tools/languages.js.map +1 -0
  40. package/dist/tools/layouts.d.ts +244 -0
  41. package/dist/tools/layouts.d.ts.map +1 -0
  42. package/dist/tools/layouts.js +218 -0
  43. package/dist/tools/layouts.js.map +1 -0
  44. package/dist/tools/menus.d.ts +154 -0
  45. package/dist/tools/menus.d.ts.map +1 -0
  46. package/dist/tools/menus.js +173 -0
  47. package/dist/tools/menus.js.map +1 -0
  48. package/dist/tools/pages.d.ts +472 -0
  49. package/dist/tools/pages.d.ts.map +1 -0
  50. package/dist/tools/pages.js +465 -0
  51. package/dist/tools/pages.js.map +1 -0
  52. package/dist/tools/queries.d.ts +221 -0
  53. package/dist/tools/queries.d.ts.map +1 -0
  54. package/dist/tools/queries.js +210 -0
  55. package/dist/tools/queries.js.map +1 -0
  56. package/dist/tools/sites.d.ts +187 -0
  57. package/dist/tools/sites.d.ts.map +1 -0
  58. package/dist/tools/sites.js +167 -0
  59. package/dist/tools/sites.js.map +1 -0
  60. package/dist/tools/themes.d.ts +182 -0
  61. package/dist/tools/themes.d.ts.map +1 -0
  62. package/dist/tools/themes.js +175 -0
  63. package/dist/tools/themes.js.map +1 -0
  64. package/dist/tools/widgets.d.ts +216 -0
  65. package/dist/tools/widgets.d.ts.map +1 -0
  66. package/dist/tools/widgets.js +182 -0
  67. package/dist/tools/widgets.js.map +1 -0
  68. package/package.json +50 -0
@@ -0,0 +1,472 @@
1
+ /**
2
+ * MCP Tools for WAP Page CRUD operations
3
+ *
4
+ * ─── PROP REFERANS SİSTEMİ ────────────────────────────────────────────────
5
+ * WAP'ta component prop değerleri direkt string/nesne değil, referans sistemi
6
+ * kullanır. Prop tiplerine göre format:
7
+ *
8
+ * text / long-text prop:
9
+ * props: { "title": { "type": "string", "label": "Glomil", "ref": "<hex-id>" } }
10
+ * refs: [{ "key": "strings", "values": [{ "id": "<hex-id>", "title": "Glomil" }] }]
11
+ * Not: hex-id = 23 karakterlik rastgele hex string (Math.random tabanlı)
12
+ *
13
+ * image / picture / video / audio / file prop:
14
+ * props: { "image": { "src": { "type": "image", "ref": "<file-guid>", "label": "Root/site/file.jpg" }, "srcset": [] } }
15
+ * refs: [{ "key": "files", "values": ["<file-guid>"] }] ← sadece ID string listesi
16
+ * Not: file GUID'i list_files aracı ile bulunur
17
+ *
18
+ * link prop:
19
+ * props: { "link": { "type": "link", "ref": "<link-id>", "label": "Başlık" } }
20
+ * refs: [{ "key": "links", "values": ["<link-id>"] }]
21
+ *
22
+ * navigation prop:
23
+ * props: { "nav": { "type": "navigation", "ref": "<menu-id>" } }
24
+ * refs: [{ "key": "navigations", "values": ["<menu-id>"] }]
25
+ *
26
+ * query prop:
27
+ * props: { "items": { "type": "query", "ref": "<query-id>" } }
28
+ * refs: [{ "key": "queries", "values": ["<query-id>"] }]
29
+ *
30
+ * raw prop (query gibi ama parametresiz statik):
31
+ * props: { "data": { "type": "raw", "ref": "<raw-id>" } }
32
+ * refs: [{ "key": "raw", "values": ["<raw-id>"] }]
33
+ *
34
+ * dropdown / switch / number / color / dropdown prop:
35
+ * props: { "theme": "light" } ← düz değer, ref gerekmez
36
+ *
37
+ * ─── VIEWS YAPISI ────────────────────────────────────────────────────────
38
+ * views: { "<layout-view-node-id>": [ PageComponent, ... ] }
39
+ * PageComponent: { id, name, title, icon, props, refs:{}, children:[], droppable, appearance }
40
+ *
41
+ * ─── REFS DİZİSİ (payload) ───────────────────────────────────────────────
42
+ * refs: [
43
+ * { "key": "components", "values": [{ "id": "<componentName>", "queryIds": [], "showcaseIds": [] }] },
44
+ * { "key": "strings", "values": [{ "id": "<hex-id>", "title": "değer" }] },
45
+ * { "key": "files", "values": ["<file-guid>"] },
46
+ * { "key": "links", "values": ["<link-id>"] },
47
+ * { "key": "queries", "values": ["<query-id>"] },
48
+ * { "key": "raw", "values": ["<raw-id>"] },
49
+ * { "key": "navigations","values": ["<menu-id>"] },
50
+ * ]
51
+ * ─────────────────────────────────────────────────────────────────────────
52
+ */
53
+ import { WapClient } from "../client.js";
54
+ export declare function getPageTools(client: WapClient): {
55
+ list_pages: {
56
+ description: string;
57
+ inputSchema: {
58
+ type: "object";
59
+ properties: {
60
+ title: {
61
+ type: string;
62
+ description: string;
63
+ };
64
+ path: {
65
+ type: string;
66
+ description: string;
67
+ };
68
+ layoutId: {
69
+ type: string;
70
+ description: string;
71
+ };
72
+ status: {
73
+ type: string;
74
+ description: string;
75
+ enum: string[];
76
+ };
77
+ includeEntities: {
78
+ type: string;
79
+ description: string;
80
+ };
81
+ pageIndex: {
82
+ type: string;
83
+ description: string;
84
+ };
85
+ pageLength: {
86
+ type: string;
87
+ description: string;
88
+ };
89
+ };
90
+ };
91
+ handler: (args: {
92
+ title?: string;
93
+ path?: string;
94
+ layoutId?: string;
95
+ status?: string;
96
+ includeEntities?: boolean;
97
+ pageIndex?: number;
98
+ pageLength?: number;
99
+ }) => Promise<{
100
+ content: {
101
+ type: "text";
102
+ text: string;
103
+ }[];
104
+ }>;
105
+ };
106
+ get_page: {
107
+ description: string;
108
+ inputSchema: {
109
+ type: "object";
110
+ properties: {
111
+ id: {
112
+ type: string;
113
+ description: string;
114
+ };
115
+ };
116
+ required: string[];
117
+ };
118
+ handler: (args: {
119
+ id: string;
120
+ }) => Promise<{
121
+ content: {
122
+ type: "text";
123
+ text: string;
124
+ }[];
125
+ }>;
126
+ };
127
+ create_page: {
128
+ description: string;
129
+ inputSchema: {
130
+ type: "object";
131
+ properties: {
132
+ title: {
133
+ type: string;
134
+ description: string;
135
+ };
136
+ path: {
137
+ type: string;
138
+ description: string;
139
+ };
140
+ layoutId: {
141
+ type: string;
142
+ description: string;
143
+ };
144
+ status: {
145
+ type: string;
146
+ description: string;
147
+ };
148
+ views: {
149
+ type: string;
150
+ description: string;
151
+ };
152
+ refs: {
153
+ type: string;
154
+ description: string;
155
+ };
156
+ mobileViews: {
157
+ type: string;
158
+ description: string;
159
+ };
160
+ mobileRefs: {
161
+ type: string;
162
+ description: string;
163
+ };
164
+ metaTags: {
165
+ type: string;
166
+ description: string;
167
+ };
168
+ image: {
169
+ type: string;
170
+ description: string;
171
+ };
172
+ cacheTime: {
173
+ type: string;
174
+ description: string;
175
+ };
176
+ visibilityFlag: {
177
+ type: string;
178
+ description: string;
179
+ };
180
+ };
181
+ required: string[];
182
+ };
183
+ handler: (args: Record<string, unknown>) => Promise<{
184
+ content: {
185
+ type: "text";
186
+ text: string;
187
+ }[];
188
+ }>;
189
+ };
190
+ update_page: {
191
+ description: string;
192
+ inputSchema: {
193
+ type: "object";
194
+ properties: {
195
+ id: {
196
+ type: string;
197
+ description: string;
198
+ };
199
+ title: {
200
+ type: string;
201
+ description: string;
202
+ };
203
+ path: {
204
+ type: string;
205
+ description: string;
206
+ };
207
+ layoutId: {
208
+ type: string;
209
+ description: string;
210
+ };
211
+ status: {
212
+ type: string;
213
+ description: string;
214
+ };
215
+ views: {
216
+ type: string;
217
+ description: string;
218
+ };
219
+ refs: {
220
+ type: string;
221
+ description: string;
222
+ };
223
+ mobileViews: {
224
+ type: string;
225
+ description: string;
226
+ };
227
+ mobileRefs: {
228
+ type: string;
229
+ description: string;
230
+ };
231
+ metaTags: {
232
+ type: string;
233
+ description: string;
234
+ };
235
+ image: {
236
+ type: string;
237
+ description: string;
238
+ };
239
+ cacheTime: {
240
+ type: string;
241
+ description: string;
242
+ };
243
+ visibilityFlag: {
244
+ type: string;
245
+ description: string;
246
+ };
247
+ };
248
+ required: string[];
249
+ };
250
+ handler: (args: Record<string, unknown>) => Promise<{
251
+ content: {
252
+ type: "text";
253
+ text: string;
254
+ }[];
255
+ }>;
256
+ };
257
+ publish_page: {
258
+ description: string;
259
+ inputSchema: {
260
+ type: "object";
261
+ properties: {
262
+ id: {
263
+ type: string;
264
+ description: string;
265
+ };
266
+ image: {
267
+ type: string;
268
+ description: string;
269
+ };
270
+ layoutId: {
271
+ type: string;
272
+ description: string;
273
+ };
274
+ metaTags: {
275
+ type: string;
276
+ description: string;
277
+ };
278
+ path: {
279
+ type: string;
280
+ description: string;
281
+ };
282
+ title: {
283
+ type: string;
284
+ description: string;
285
+ };
286
+ refs: {
287
+ type: string;
288
+ description: string;
289
+ };
290
+ mobileRefs: {
291
+ type: string;
292
+ description: string;
293
+ };
294
+ views: {
295
+ type: string;
296
+ description: string;
297
+ };
298
+ mobileViews: {
299
+ type: string;
300
+ description: string;
301
+ };
302
+ };
303
+ required: string[];
304
+ };
305
+ handler: (args: Record<string, unknown>) => Promise<{
306
+ content: {
307
+ type: "text";
308
+ text: string;
309
+ }[];
310
+ }>;
311
+ };
312
+ unpublish_page: {
313
+ description: string;
314
+ inputSchema: {
315
+ type: "object";
316
+ properties: {
317
+ id: {
318
+ type: string;
319
+ description: string;
320
+ };
321
+ image: {
322
+ type: string;
323
+ description: string;
324
+ };
325
+ layoutId: {
326
+ type: string;
327
+ description: string;
328
+ };
329
+ metaTags: {
330
+ type: string;
331
+ description: string;
332
+ };
333
+ path: {
334
+ type: string;
335
+ description: string;
336
+ };
337
+ title: {
338
+ type: string;
339
+ description: string;
340
+ };
341
+ refs: {
342
+ type: string;
343
+ description: string;
344
+ };
345
+ mobileRefs: {
346
+ type: string;
347
+ description: string;
348
+ };
349
+ views: {
350
+ type: string;
351
+ description: string;
352
+ };
353
+ mobileViews: {
354
+ type: string;
355
+ description: string;
356
+ };
357
+ };
358
+ required: string[];
359
+ };
360
+ handler: (args: Record<string, unknown>) => Promise<{
361
+ content: {
362
+ type: "text";
363
+ text: string;
364
+ }[];
365
+ }>;
366
+ };
367
+ delete_page: {
368
+ description: string;
369
+ inputSchema: {
370
+ type: "object";
371
+ properties: {
372
+ id: {
373
+ type: string;
374
+ description: string;
375
+ };
376
+ };
377
+ required: string[];
378
+ };
379
+ handler: (args: {
380
+ id: string;
381
+ }) => Promise<{
382
+ content: {
383
+ type: "text";
384
+ text: string;
385
+ }[];
386
+ }>;
387
+ };
388
+ get_page_versions: {
389
+ description: string;
390
+ inputSchema: {
391
+ type: "object";
392
+ properties: {
393
+ id: {
394
+ type: string;
395
+ description: string;
396
+ };
397
+ pageIndex: {
398
+ type: string;
399
+ description: string;
400
+ };
401
+ pageLength: {
402
+ type: string;
403
+ description: string;
404
+ };
405
+ };
406
+ required: string[];
407
+ };
408
+ handler: (args: {
409
+ id: string;
410
+ pageIndex?: number;
411
+ pageLength?: number;
412
+ }) => Promise<{
413
+ content: {
414
+ type: "text";
415
+ text: string;
416
+ }[];
417
+ }>;
418
+ };
419
+ generate_page_path: {
420
+ description: string;
421
+ inputSchema: {
422
+ type: "object";
423
+ properties: {
424
+ path: {
425
+ type: string;
426
+ description: string;
427
+ };
428
+ };
429
+ required: string[];
430
+ };
431
+ handler: (args: {
432
+ path: string;
433
+ }) => Promise<{
434
+ content: {
435
+ type: "text";
436
+ text: string;
437
+ }[];
438
+ }>;
439
+ };
440
+ create_page_localization: {
441
+ description: string;
442
+ inputSchema: {
443
+ type: "object";
444
+ properties: {
445
+ id: {
446
+ type: string;
447
+ description: string;
448
+ };
449
+ sourceLanguageId: {
450
+ type: string;
451
+ description: string;
452
+ };
453
+ useTranslateApi: {
454
+ type: string;
455
+ description: string;
456
+ };
457
+ };
458
+ required: string[];
459
+ };
460
+ handler: (args: {
461
+ id: string;
462
+ sourceLanguageId: string;
463
+ useTranslateApi?: boolean;
464
+ }) => Promise<{
465
+ content: {
466
+ type: "text";
467
+ text: string;
468
+ }[];
469
+ }>;
470
+ };
471
+ };
472
+ //# sourceMappingURL=pages.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pages.d.ts","sourceRoot":"","sources":["../../src/tools/pages.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,wBAAgB,YAAY,CAAC,MAAM,EAAE,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBA4BlB;YACpB,KAAK,CAAC,EAAE,MAAM,CAAC;YACf,IAAI,CAAC,EAAE,MAAM,CAAC;YACd,QAAQ,CAAC,EAAE,MAAM,CAAC;YAClB,MAAM,CAAC,EAAE,MAAM,CAAC;YAChB,eAAe,CAAC,EAAE,OAAO,CA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