@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,278 @@
1
+ /**
2
+ * MCP Tools for WAP Dynamic Entity Records CRUD
3
+ * DynamicEntities = actual data records stored in entity-defined tables
4
+ * entityId = the Entity schema GUID (table definition)
5
+ * id = the individual record GUID
6
+ */
7
+ export function getDynamicEntityTools(client) {
8
+ return {
9
+ // ─── List Records ─────────────────────────────────────
10
+ list_dynamic_entity_records: {
11
+ description: `Bir entity'nin veri kayıtlarını listeler.
12
+ 'entityId': Entity şema ID'si (entity tanımının GUID'i, get_entity ile bulabilirsiniz).
13
+ Örnek: Blog yazıları, haber içerikleri, ürünler gibi CMS içeriklerini listeler.`,
14
+ inputSchema: {
15
+ type: "object",
16
+ properties: {
17
+ entityId: { type: "string", description: "Entity şema ID (GUID)" },
18
+ status: {
19
+ type: "string",
20
+ description: "Durum filtresi: Published | Draft | Deleted",
21
+ enum: ["Published", "Draft", "Deleted"],
22
+ },
23
+ pageIndex: {
24
+ type: "number",
25
+ description: "Sayfa numarası (0-based)",
26
+ },
27
+ pageLength: {
28
+ type: "number",
29
+ description: "Sayfa boyutu (varsayılan: 20)",
30
+ },
31
+ order: {
32
+ type: "string",
33
+ description: 'Sıralama alanı (örn: "createdAt")',
34
+ },
35
+ isDescending: { type: "boolean", description: "Azalan sıralama mı?" },
36
+ },
37
+ required: ["entityId"],
38
+ },
39
+ handler: async (args) => {
40
+ const { entityId, ...rest } = args;
41
+ const params = {};
42
+ if (rest.status)
43
+ params.status = rest.status;
44
+ if (rest.pageIndex !== undefined)
45
+ params.pageIndex = String(rest.pageIndex);
46
+ if (rest.pageLength !== undefined)
47
+ params.pageLength = String(rest.pageLength);
48
+ if (rest.order)
49
+ params.order = rest.order;
50
+ if (rest.isDescending !== undefined)
51
+ params.isDescending = String(rest.isDescending);
52
+ const result = await client.getDynamicEntities(entityId, params);
53
+ return {
54
+ content: [
55
+ { type: "text", text: JSON.stringify(result, null, 2) },
56
+ ],
57
+ };
58
+ },
59
+ },
60
+ // ─── Get Single Record ────────────────────────────────
61
+ get_dynamic_entity_record: {
62
+ description: "Belirli bir entity kaydının tüm detaylarını getirir.",
63
+ inputSchema: {
64
+ type: "object",
65
+ properties: {
66
+ entityId: { type: "string", description: "Entity şema ID (GUID)" },
67
+ id: { type: "string", description: "Kayıt ID (GUID)" },
68
+ },
69
+ required: ["entityId", "id"],
70
+ },
71
+ handler: async (args) => {
72
+ const result = await client.getDynamicEntity(args.entityId, args.id);
73
+ return {
74
+ content: [
75
+ { type: "text", text: JSON.stringify(result, null, 2) },
76
+ ],
77
+ };
78
+ },
79
+ },
80
+ // ─── Create Record ────────────────────────────────────
81
+ create_dynamic_entity_record: {
82
+ description: `Yeni bir entity kaydı oluşturur.
83
+ 'columns': Entity şemasındaki kolonlara göre doldurulacak alanlar.
84
+ Her kolon: { key: "kolonAdı", value: "değer" } formatında.
85
+ 'status': "Published" (yayında) veya "Draft" (taslak).
86
+
87
+ Örnek columns:
88
+ [
89
+ { "key": "title", "value": "Merhaba Dünya" },
90
+ { "key": "content", "value": "İçerik..." },
91
+ { "key": "slug", "value": "merhaba-dunya" }
92
+ ]`,
93
+ inputSchema: {
94
+ type: "object",
95
+ properties: {
96
+ entityId: { type: "string", description: "Entity şema ID (GUID)" },
97
+ status: {
98
+ type: "string",
99
+ description: "Kayıt durumu: Published | Draft",
100
+ enum: ["Published", "Draft"],
101
+ },
102
+ columns: {
103
+ type: "array",
104
+ description: 'Kolon değerleri: [{ key: "kolonAdı", value: "değer" }]',
105
+ },
106
+ },
107
+ required: ["entityId", "columns"],
108
+ },
109
+ handler: async (args) => {
110
+ const result = await client.createDynamicEntity(args.entityId, {
111
+ status: args.status ?? "Published",
112
+ columns: args.columns,
113
+ });
114
+ return {
115
+ content: [
116
+ { type: "text", text: JSON.stringify(result, null, 2) },
117
+ ],
118
+ };
119
+ },
120
+ },
121
+ // ─── Update Record ────────────────────────────────────
122
+ update_dynamic_entity_record: {
123
+ description: "Mevcut bir entity kaydını günceller. Tüm alanları içeren columns dizisi gönderin.",
124
+ inputSchema: {
125
+ type: "object",
126
+ properties: {
127
+ entityId: { type: "string", description: "Entity şema ID (GUID)" },
128
+ id: { type: "string", description: "Güncellenecek kayıt ID" },
129
+ status: {
130
+ type: "string",
131
+ description: "Kayıt durumu: Published | Draft",
132
+ enum: ["Published", "Draft"],
133
+ },
134
+ columns: {
135
+ type: "array",
136
+ description: 'Güncellenmiş kolon değerleri: [{ key: "kolonAdı", value: "değer" }]',
137
+ },
138
+ },
139
+ required: ["entityId", "id", "columns"],
140
+ },
141
+ handler: async (args) => {
142
+ const result = await client.updateDynamicEntity(args.entityId, args.id, {
143
+ status: args.status ?? "Published",
144
+ columns: args.columns,
145
+ });
146
+ return {
147
+ content: [
148
+ { type: "text", text: JSON.stringify(result, null, 2) },
149
+ ],
150
+ };
151
+ },
152
+ },
153
+ // ─── Update Record Status ─────────────────────────────
154
+ update_dynamic_entity_status: {
155
+ description: "Bir entity kaydının yayın durumunu değiştirir (yayınla/taslağa al).",
156
+ inputSchema: {
157
+ type: "object",
158
+ properties: {
159
+ entityId: { type: "string", description: "Entity şema ID (GUID)" },
160
+ id: { type: "string", description: "Kayıt ID" },
161
+ status: {
162
+ type: "string",
163
+ description: "Yeni durum: Published | Draft | Deleted",
164
+ enum: ["Published", "Draft", "Deleted"],
165
+ },
166
+ },
167
+ required: ["entityId", "id", "status"],
168
+ },
169
+ handler: async (args) => {
170
+ const result = await client.updateDynamicEntityStatus(args.entityId, args.id, args.status);
171
+ return {
172
+ content: [
173
+ { type: "text", text: JSON.stringify(result, null, 2) },
174
+ ],
175
+ };
176
+ },
177
+ },
178
+ // ─── Delete Record ────────────────────────────────────
179
+ delete_dynamic_entity_record: {
180
+ description: "Bir entity kaydını siler.",
181
+ inputSchema: {
182
+ type: "object",
183
+ properties: {
184
+ entityId: { type: "string", description: "Entity şema ID (GUID)" },
185
+ id: { type: "string", description: "Silinecek kayıt ID" },
186
+ },
187
+ required: ["entityId", "id"],
188
+ },
189
+ handler: async (args) => {
190
+ const result = await client.deleteDynamicEntity(args.entityId, args.id);
191
+ return {
192
+ content: [
193
+ { type: "text", text: JSON.stringify(result, null, 2) },
194
+ ],
195
+ };
196
+ },
197
+ },
198
+ // ─── Clone Record ─────────────────────────────────────
199
+ clone_dynamic_entity_record: {
200
+ description: "Mevcut bir entity kaydını kopyalar (clone). Yeni bir taslak kayıt oluşturur.",
201
+ inputSchema: {
202
+ type: "object",
203
+ properties: {
204
+ entityId: { type: "string", description: "Entity şema ID (GUID)" },
205
+ id: { type: "string", description: "Kopyalanacak kayıt ID" },
206
+ },
207
+ required: ["entityId", "id"],
208
+ },
209
+ handler: async (args) => {
210
+ const result = await client.cloneDynamicEntity(args.entityId, args.id);
211
+ return {
212
+ content: [
213
+ { type: "text", text: JSON.stringify(result, null, 2) },
214
+ ],
215
+ };
216
+ },
217
+ },
218
+ // ─── Create Localization ──────────────────────────────
219
+ create_dynamic_entity_localization: {
220
+ description: "Bir entity kaydının belirli bir dile çevirisini oluşturur. Opsiyonel olarak otomatik çeviri API kullanabilir.",
221
+ inputSchema: {
222
+ type: "object",
223
+ properties: {
224
+ entityId: { type: "string", description: "Entity şema ID (GUID)" },
225
+ id: { type: "string", description: "Kaydın ID'si" },
226
+ sourceLanguageId: {
227
+ type: "string",
228
+ description: 'Kaynak dil kodu (örn: "tr-tr", "en-us")',
229
+ },
230
+ useTranslateApi: {
231
+ type: "boolean",
232
+ description: "Otomatik çeviri API kullanılsın mı?",
233
+ },
234
+ },
235
+ required: ["entityId", "id", "sourceLanguageId"],
236
+ },
237
+ handler: async (args) => {
238
+ const result = await client.createDynamicEntityLocalization(args.entityId, args.id, {
239
+ sourceLanguageId: args.sourceLanguageId,
240
+ useTranslateApi: args.useTranslateApi,
241
+ });
242
+ return {
243
+ content: [
244
+ { type: "text", text: JSON.stringify(result, null, 2) },
245
+ ],
246
+ };
247
+ },
248
+ },
249
+ // ─── Get Versions ─────────────────────────────────────
250
+ get_dynamic_entity_versions: {
251
+ description: "Bir entity kaydının tüm versiyonlarını listeler.",
252
+ inputSchema: {
253
+ type: "object",
254
+ properties: {
255
+ entityId: { type: "string", description: "Entity şema ID (GUID)" },
256
+ id: { type: "string", description: "Kayıt ID" },
257
+ pageIndex: { type: "number", description: "Sayfa numarası" },
258
+ pageLength: { type: "number", description: "Sayfa boyutu" },
259
+ },
260
+ required: ["entityId", "id"],
261
+ },
262
+ handler: async (args) => {
263
+ const params = {};
264
+ if (args.pageIndex !== undefined)
265
+ params.pageIndex = String(args.pageIndex);
266
+ if (args.pageLength !== undefined)
267
+ params.pageLength = String(args.pageLength);
268
+ const result = await client.getDynamicEntityVersions(args.entityId, args.id, params);
269
+ return {
270
+ content: [
271
+ { type: "text", text: JSON.stringify(result, null, 2) },
272
+ ],
273
+ };
274
+ },
275
+ },
276
+ };
277
+ }
278
+ //# sourceMapping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EAAE,CAAC,CAAC,EAAE;qBACjE;iBACF,CAAC;YACJ,CAAC;SACF;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,212 @@
1
+ /**
2
+ * MCP Tools for WAP Entity Schema CRUD operations
3
+ * Entities = database table schema definitions (columns, relations, UI flows)
4
+ * NOT to be confused with DynamicEntities which are the actual data records.
5
+ */
6
+ import { WapClient } from "../client.js";
7
+ export declare function getEntityTools(client: WapClient): {
8
+ list_entities: {
9
+ description: string;
10
+ inputSchema: {
11
+ type: "object";
12
+ properties: {
13
+ title: {
14
+ type: string;
15
+ description: string;
16
+ };
17
+ table: {
18
+ type: string;
19
+ description: string;
20
+ };
21
+ hasPageRelation: {
22
+ type: string;
23
+ description: string;
24
+ };
25
+ pageIndex: {
26
+ type: string;
27
+ description: string;
28
+ };
29
+ pageLength: {
30
+ type: string;
31
+ description: string;
32
+ };
33
+ };
34
+ };
35
+ handler: (args: {
36
+ title?: string;
37
+ table?: string;
38
+ hasPageRelation?: boolean;
39
+ pageIndex?: number;
40
+ pageLength?: number;
41
+ }) => Promise<{
42
+ content: {
43
+ type: "text";
44
+ text: string;
45
+ }[];
46
+ }>;
47
+ };
48
+ get_entity: {
49
+ description: string;
50
+ inputSchema: {
51
+ type: "object";
52
+ properties: {
53
+ id: {
54
+ type: string;
55
+ description: string;
56
+ };
57
+ };
58
+ required: string[];
59
+ };
60
+ handler: (args: {
61
+ id: string;
62
+ }) => Promise<{
63
+ content: {
64
+ type: "text";
65
+ text: string;
66
+ }[];
67
+ }>;
68
+ };
69
+ create_entity: {
70
+ description: string;
71
+ inputSchema: {
72
+ type: "object";
73
+ properties: {
74
+ title: {
75
+ type: string;
76
+ description: string;
77
+ };
78
+ table: {
79
+ type: string;
80
+ description: string;
81
+ };
82
+ hasPageRelation: {
83
+ type: string;
84
+ description: string;
85
+ };
86
+ isCommonData: {
87
+ type: string;
88
+ description: string;
89
+ };
90
+ accessType: {
91
+ type: string;
92
+ description: string;
93
+ };
94
+ columns: {
95
+ type: string;
96
+ description: string;
97
+ };
98
+ schema: {
99
+ type: string;
100
+ description: string;
101
+ };
102
+ selectedSiteIds: {
103
+ type: string;
104
+ description: string;
105
+ };
106
+ };
107
+ required: string[];
108
+ };
109
+ handler: (args: Record<string, unknown>) => Promise<{
110
+ content: {
111
+ type: "text";
112
+ text: string;
113
+ }[];
114
+ }>;
115
+ };
116
+ update_entity: {
117
+ description: string;
118
+ inputSchema: {
119
+ type: "object";
120
+ properties: {
121
+ id: {
122
+ type: string;
123
+ description: string;
124
+ };
125
+ title: {
126
+ type: string;
127
+ description: string;
128
+ };
129
+ columns: {
130
+ type: string;
131
+ description: string;
132
+ };
133
+ accessType: {
134
+ type: string;
135
+ description: string;
136
+ };
137
+ selectedSiteIds: {
138
+ type: string;
139
+ description: string;
140
+ };
141
+ schema: {
142
+ type: string;
143
+ description: string;
144
+ };
145
+ isCommonData: {
146
+ type: string;
147
+ description: string;
148
+ };
149
+ };
150
+ required: string[];
151
+ };
152
+ handler: (args: Record<string, unknown>) => Promise<{
153
+ content: {
154
+ type: "text";
155
+ text: string;
156
+ }[];
157
+ }>;
158
+ };
159
+ delete_entity: {
160
+ description: string;
161
+ inputSchema: {
162
+ type: "object";
163
+ properties: {
164
+ id: {
165
+ type: string;
166
+ description: string;
167
+ };
168
+ };
169
+ required: string[];
170
+ };
171
+ handler: (args: {
172
+ id: string;
173
+ }) => Promise<{
174
+ content: {
175
+ type: "text";
176
+ text: string;
177
+ }[];
178
+ }>;
179
+ };
180
+ get_entity_relations: {
181
+ description: string;
182
+ inputSchema: {
183
+ type: "object";
184
+ properties: {
185
+ id: {
186
+ type: string;
187
+ description: string;
188
+ };
189
+ isRecurrent: {
190
+ type: string;
191
+ description: string;
192
+ };
193
+ includeSystemFields: {
194
+ type: string;
195
+ description: string;
196
+ };
197
+ };
198
+ required: string[];
199
+ };
200
+ handler: (args: {
201
+ id: string;
202
+ isRecurrent?: boolean;
203
+ includeSystemFields?: boolean;
204
+ }) => Promise<{
205
+ content: {
206
+ type: "text";
207
+ text: string;
208
+ }[];
209
+ }>;
210
+ };
211
+ };
212
+ //# sourceMappingURL=entities.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entities.d.ts","sourceRoot":"","sources":["../../src/tools/entities.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,wBAAgB,cAAc,CAAC,MAAM,EAAE,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAuBpB;YACpB,KAAK,CAAC,EAAE,MAAM,CAAC;YACf,KAAK,CAAC,EAAE,MAAM,CAAC;YACf,eAAe,CAAC,EAAE,OAAO,CAAC;YAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;YACnB,UAAU,CAAC,EAAE,MAAM,CAAC;SACrB;;;;;;;;;;;;;;;;;;;wBA8BqB;YAAE,EAAE,EAAE,MAAM,CAAA;SAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAmEd,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAuCvB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;;;;;;;;;;;;;;;;;;wBAyBvB;YAAE,EAAE,EAAE,MAAM,CAAA;SAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;wBA6Bd;YACpB,EAAE,EAAE,MAAM,CAAC;YACX,WAAW,CAAC,EAAE,OAAO,CAAC;YACtB,mBAAmB,CAAC,EAAE,OAAO,CAAC;SAC/B;;;;;;;EAeN"}