@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,221 @@
1
+ /**
2
+ * MCP Tools for WAP Query CRUD + run operations
3
+ * Queries = data fetching definitions (SQL, REST API calls, JS transforms)
4
+ * Used by pages, layouts, and widgets to fetch dynamic data
5
+ */
6
+ import { WapClient } from "../client.js";
7
+ export declare function getQueryTools(client: WapClient): {
8
+ list_queries: {
9
+ description: string;
10
+ inputSchema: {
11
+ type: "object";
12
+ properties: {
13
+ name: {
14
+ type: string;
15
+ description: string;
16
+ };
17
+ title: {
18
+ type: string;
19
+ description: string;
20
+ };
21
+ type: {
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
+ name?: string;
37
+ title?: string;
38
+ type?: string;
39
+ pageIndex?: number;
40
+ pageLength?: number;
41
+ }) => Promise<{
42
+ content: {
43
+ type: "text";
44
+ text: string;
45
+ }[];
46
+ }>;
47
+ };
48
+ get_query: {
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
+ run_query: {
70
+ description: string;
71
+ inputSchema: {
72
+ type: "object";
73
+ properties: {
74
+ name: {
75
+ type: string;
76
+ description: string;
77
+ };
78
+ queryParams: {
79
+ type: string;
80
+ description: string;
81
+ };
82
+ };
83
+ required: string[];
84
+ };
85
+ handler: (args: {
86
+ name: string;
87
+ queryParams?: Record<string, string>;
88
+ }) => Promise<{
89
+ content: {
90
+ type: "text";
91
+ text: string;
92
+ }[];
93
+ }>;
94
+ };
95
+ create_query: {
96
+ description: string;
97
+ inputSchema: {
98
+ type: "object";
99
+ properties: {
100
+ name: {
101
+ type: string;
102
+ description: string;
103
+ };
104
+ title: {
105
+ type: string;
106
+ description: string;
107
+ };
108
+ type: {
109
+ type: string;
110
+ description: string;
111
+ enum: string[];
112
+ };
113
+ rawQuery: {
114
+ type: string;
115
+ description: string;
116
+ };
117
+ parameters: {
118
+ type: string;
119
+ description: string;
120
+ };
121
+ cache: {
122
+ type: string;
123
+ description: string;
124
+ };
125
+ transformTemplate: {
126
+ type: string;
127
+ description: string;
128
+ };
129
+ isCustomTransformTemplate: {
130
+ type: string;
131
+ description: string;
132
+ };
133
+ httpMethod: {
134
+ type: string;
135
+ description: string;
136
+ enum: string[];
137
+ };
138
+ categoryId: {
139
+ type: string;
140
+ description: string;
141
+ };
142
+ };
143
+ required: string[];
144
+ };
145
+ handler: (args: Record<string, unknown>) => Promise<{
146
+ content: {
147
+ type: "text";
148
+ text: string;
149
+ }[];
150
+ }>;
151
+ };
152
+ update_query: {
153
+ description: string;
154
+ inputSchema: {
155
+ type: "object";
156
+ properties: {
157
+ id: {
158
+ type: string;
159
+ description: string;
160
+ };
161
+ name: {
162
+ type: string;
163
+ description: string;
164
+ };
165
+ title: {
166
+ type: string;
167
+ description: string;
168
+ };
169
+ rawQuery: {
170
+ type: string;
171
+ description: string;
172
+ };
173
+ parameters: {
174
+ type: string;
175
+ description: string;
176
+ };
177
+ cache: {
178
+ type: string;
179
+ description: string;
180
+ };
181
+ transformTemplate: {
182
+ type: string;
183
+ description: string;
184
+ };
185
+ httpMethod: {
186
+ type: string;
187
+ description: string;
188
+ };
189
+ };
190
+ required: string[];
191
+ };
192
+ handler: (args: Record<string, unknown>) => Promise<{
193
+ content: {
194
+ type: "text";
195
+ text: string;
196
+ }[];
197
+ }>;
198
+ };
199
+ delete_query: {
200
+ description: string;
201
+ inputSchema: {
202
+ type: "object";
203
+ properties: {
204
+ id: {
205
+ type: string;
206
+ description: string;
207
+ };
208
+ };
209
+ required: string[];
210
+ };
211
+ handler: (args: {
212
+ id: string;
213
+ }) => Promise<{
214
+ content: {
215
+ type: "text";
216
+ text: string;
217
+ }[];
218
+ }>;
219
+ };
220
+ };
221
+ //# sourceMappingURL=queries.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../src/tools/queries.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,wBAAgB,aAAa,CAAC,MAAM,EAAE,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAsBnB;YACpB,IAAI,CAAC,EAAE,MAAM,CAAC;YACd,KAAK,CAAC,EAAE,MAAM,CAAC;YACf,IAAI,CAAC,EAAE,MAAM,CAAC;YACd,SAAS,CAAC,EAAE,MAAM,CAAC;YACnB,UAAU,CAAC,EAAE,MAAM,CAAC;SACrB;;;;;;;;;;;;;;;;;;;wBA6BqB;YAAE,EAAE,EAAE,MAAM,CAAA;SAAE;;;;;;;;;;;;;;;;;;;;;;;wBA6Bd;YACpB,IAAI,EAAE,MAAM,CAAC;YACb,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;SACtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAqEqB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBA8BvB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;;;;;;;;;;;;;;;;;;wBAwBvB;YAAE,EAAE,EAAE,MAAM,CAAA;SAAE;;;;;;;EAUzC"}
@@ -0,0 +1,210 @@
1
+ /**
2
+ * MCP Tools for WAP Query CRUD + run operations
3
+ * Queries = data fetching definitions (SQL, REST API calls, JS transforms)
4
+ * Used by pages, layouts, and widgets to fetch dynamic data
5
+ */
6
+ export function getQueryTools(client) {
7
+ return {
8
+ // ─── List Queries ─────────────────────────────────────
9
+ list_queries: {
10
+ description: "WAP query'lerini listeler. Query'ler veri çekme tanımlarıdır (SQL, REST, JS).",
11
+ inputSchema: {
12
+ type: "object",
13
+ properties: {
14
+ name: { type: "string", description: "Query adı ile filtrele" },
15
+ title: { type: "string", description: "Başlık ile filtrele" },
16
+ type: {
17
+ type: "string",
18
+ description: "Query tipi: sql | rest | js",
19
+ },
20
+ pageIndex: {
21
+ type: "number",
22
+ description: "Sayfa numarası (0-based)",
23
+ },
24
+ pageLength: { type: "number", description: "Sayfa boyutu" },
25
+ },
26
+ },
27
+ handler: async (args) => {
28
+ const params = {};
29
+ if (args.name)
30
+ params.name = args.name;
31
+ if (args.title)
32
+ params.title = args.title;
33
+ if (args.type)
34
+ params.type = args.type;
35
+ if (args.pageIndex !== undefined)
36
+ params.pageIndex = String(args.pageIndex);
37
+ if (args.pageLength !== undefined)
38
+ params.pageLength = String(args.pageLength);
39
+ const result = await client.getQueries(params);
40
+ return {
41
+ content: [
42
+ { type: "text", text: JSON.stringify(result, null, 2) },
43
+ ],
44
+ };
45
+ },
46
+ },
47
+ // ─── Get Query ────────────────────────────────────────
48
+ get_query: {
49
+ description: "Belirli bir query'nin tüm detaylarını getirir (SQL/endpoint, parametreler, response şeması).",
50
+ inputSchema: {
51
+ type: "object",
52
+ properties: {
53
+ id: { type: "string", description: "Query ID (GUID)" },
54
+ },
55
+ required: ["id"],
56
+ },
57
+ handler: async (args) => {
58
+ const result = await client.getQuery(args.id);
59
+ return {
60
+ content: [
61
+ { type: "text", text: JSON.stringify(result, null, 2) },
62
+ ],
63
+ };
64
+ },
65
+ },
66
+ // ─── Run Query ────────────────────────────────────────
67
+ run_query: {
68
+ description: `Bir query\'yi çalıştırır ve sonuçları döndürür.
69
+ 'name': Query adı (ID değil, "name" alanı).
70
+ 'queryParams': Query parametreleri (örn: { "pageSize": "10", "language": "tr-tr" }).`,
71
+ inputSchema: {
72
+ type: "object",
73
+ properties: {
74
+ name: {
75
+ type: "string",
76
+ description: 'Query adı (örn: "get-blog-posts")',
77
+ },
78
+ queryParams: {
79
+ type: "object",
80
+ description: "Query parametreleri (key-value, tümü string olmalı)",
81
+ },
82
+ },
83
+ required: ["name"],
84
+ },
85
+ handler: async (args) => {
86
+ const result = await client.runQuery(args.name, args.queryParams);
87
+ return {
88
+ content: [
89
+ { type: "text", text: JSON.stringify(result, null, 2) },
90
+ ],
91
+ };
92
+ },
93
+ },
94
+ // ─── Create Query ─────────────────────────────────────
95
+ create_query: {
96
+ description: `Yeni bir query tanımı oluşturur.
97
+ 'type': "sql" (PostgreSQL sorgusu), "rest" (dış API çağrısı), "js" (JS transform).
98
+ 'rawQuery': SQL sorgu metni (sql tipi için) veya REST endpoint URL'i.
99
+ 'parameters': Query parametreleri tanımı.
100
+ 'cache': Önbellekleme ayarları: { enabled: true, durationSeconds: 300 }.
101
+ 'transformTemplate': Sonuç dönüştürme şablonu (JSONata veya JS).
102
+
103
+ SQL örnek rawQuery: "SELECT * FROM blog_posts WHERE language = @language LIMIT @pageSize"
104
+ REST örnek: "https://api.example.com/posts?lang={{language}}"`,
105
+ inputSchema: {
106
+ type: "object",
107
+ properties: {
108
+ name: {
109
+ type: "string",
110
+ description: 'Query benzersiz adı (kebab-case, örn: "get-blog-posts")',
111
+ },
112
+ title: { type: "string", description: "Query başlığı" },
113
+ type: {
114
+ type: "string",
115
+ description: "Query tipi: sql | rest | js",
116
+ enum: ["sql", "rest", "js"],
117
+ },
118
+ rawQuery: {
119
+ type: "string",
120
+ description: "SQL sorgu metni veya REST endpoint URL'i",
121
+ },
122
+ parameters: {
123
+ type: "array",
124
+ description: "Query parametre tanımları: [{ name, type, defaultValue }]",
125
+ },
126
+ cache: {
127
+ type: "object",
128
+ description: "Önbellekleme: { enabled: bool, durationSeconds: number }",
129
+ },
130
+ transformTemplate: {
131
+ type: "string",
132
+ description: "Sonuç dönüştürme şablonu (JSONata)",
133
+ },
134
+ isCustomTransformTemplate: {
135
+ type: "boolean",
136
+ description: "Özel transform şablonu kullanılsın mı?",
137
+ },
138
+ httpMethod: {
139
+ type: "string",
140
+ description: "REST query HTTP metodu: get | post | put | delete",
141
+ enum: ["get", "post", "put", "delete"],
142
+ },
143
+ categoryId: {
144
+ type: "string",
145
+ description: "Kategori ID (opsiyonel)",
146
+ },
147
+ },
148
+ required: ["name", "title"],
149
+ },
150
+ handler: async (args) => {
151
+ const result = await client.createQuery(args);
152
+ return {
153
+ content: [
154
+ { type: "text", text: JSON.stringify(result, null, 2) },
155
+ ],
156
+ };
157
+ },
158
+ },
159
+ // ─── Update Query ─────────────────────────────────────
160
+ update_query: {
161
+ description: "Mevcut bir query'yi günceller.",
162
+ inputSchema: {
163
+ type: "object",
164
+ properties: {
165
+ id: { type: "string", description: "Güncellenecek query ID" },
166
+ name: { type: "string", description: "Query adı" },
167
+ title: { type: "string", description: "Query başlığı" },
168
+ rawQuery: { type: "string", description: "SQL veya endpoint" },
169
+ parameters: { type: "array", description: "Parametre tanımları" },
170
+ cache: { type: "object", description: "Önbellekleme ayarları" },
171
+ transformTemplate: {
172
+ type: "string",
173
+ description: "Dönüştürme şablonu",
174
+ },
175
+ httpMethod: { type: "string", description: "HTTP metodu" },
176
+ },
177
+ required: ["id"],
178
+ },
179
+ handler: async (args) => {
180
+ const { id, ...data } = args;
181
+ const result = await client.updateQuery(id, data);
182
+ return {
183
+ content: [
184
+ { type: "text", text: JSON.stringify(result, null, 2) },
185
+ ],
186
+ };
187
+ },
188
+ },
189
+ // ─── Delete Query ─────────────────────────────────────
190
+ delete_query: {
191
+ description: "Bir query tanımını siler.",
192
+ inputSchema: {
193
+ type: "object",
194
+ properties: {
195
+ id: { type: "string", description: "Silinecek query ID" },
196
+ },
197
+ required: ["id"],
198
+ },
199
+ handler: async (args) => {
200
+ const result = await client.deleteQuery(args.id);
201
+ return {
202
+ content: [
203
+ { type: "text", text: JSON.stringify(result, null, 2) },
204
+ ],
205
+ };
206
+ },
207
+ },
208
+ };
209
+ }
210
+ //# sourceMappingURL=queries.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"queries.js","sourceRoot":"","sources":["../../src/tools/queries.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,MAAM,UAAU,aAAa,CAAC,MAAiB;IAC7C,OAAO;QACL,yDAAyD;QACzD,YAAY,EAAE;YACZ,WAAW,EACT,+EAA+E;YACjF,WAAW,EAAE;gBACX,IAAI,EAAE,QAAiB;gBACvB,UAAU,EAAE;oBACV,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,wBAAwB,EAAE;oBAC/D,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,qBAAqB,EAAE;oBAC7D,IAAI,EAAE;wBACJ,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,6BAA6B;qBAC3C;oBACD,SAAS,EAAE;wBACT,IAAI,EAAE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I,EAAE,QAAQ,EAAE,WAAW,EAAE,oBAAoB,EAAE;iBAC1D;gBACD,QAAQ,EAAE,CAAC,IAAI,CAAC;aACjB;YACD,OAAO,EAAE,KAAK,EAAE,IAAoB,EAAE,EAAE;gBACtC,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;gBACjD,OAAO;oBACL,OAAO,EAAE;wBACP,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE;qBACjE;iBACF,CAAC;YACJ,CAAC;SACF;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,187 @@
1
+ /**
2
+ * MCP Tools for WAP Sites CRUD operations
3
+ * Sites = tenant/domain definitions in the platform
4
+ */
5
+ import { WapClient } from "../client.js";
6
+ export declare function getSiteTools(client: WapClient): {
7
+ list_sites: {
8
+ description: string;
9
+ inputSchema: {
10
+ type: "object";
11
+ properties: {
12
+ key: {
13
+ type: string;
14
+ description: string;
15
+ };
16
+ title: {
17
+ type: string;
18
+ description: string;
19
+ };
20
+ pageIndex: {
21
+ type: string;
22
+ description: string;
23
+ };
24
+ pageLength: {
25
+ type: string;
26
+ description: string;
27
+ };
28
+ };
29
+ };
30
+ handler: (args: {
31
+ key?: string;
32
+ title?: string;
33
+ pageIndex?: number;
34
+ pageLength?: number;
35
+ }) => Promise<{
36
+ content: {
37
+ type: "text";
38
+ text: string;
39
+ }[];
40
+ }>;
41
+ };
42
+ get_site: {
43
+ description: string;
44
+ inputSchema: {
45
+ type: "object";
46
+ properties: {
47
+ id: {
48
+ type: string;
49
+ description: string;
50
+ };
51
+ };
52
+ required: string[];
53
+ };
54
+ handler: (args: {
55
+ id: string;
56
+ }) => Promise<{
57
+ content: {
58
+ type: "text";
59
+ text: string;
60
+ }[];
61
+ }>;
62
+ };
63
+ create_site: {
64
+ description: string;
65
+ inputSchema: {
66
+ type: "object";
67
+ properties: {
68
+ key: {
69
+ type: string;
70
+ description: string;
71
+ };
72
+ title: {
73
+ type: string;
74
+ description: string;
75
+ };
76
+ service: {
77
+ type: string;
78
+ description: string;
79
+ };
80
+ url: {
81
+ type: string;
82
+ description: string;
83
+ };
84
+ };
85
+ required: string[];
86
+ };
87
+ handler: (args: {
88
+ key: string;
89
+ title: string;
90
+ service?: string;
91
+ url?: string;
92
+ }) => Promise<{
93
+ content: {
94
+ type: "text";
95
+ text: string;
96
+ }[];
97
+ }>;
98
+ };
99
+ update_site: {
100
+ description: string;
101
+ inputSchema: {
102
+ type: "object";
103
+ properties: {
104
+ id: {
105
+ type: string;
106
+ description: string;
107
+ };
108
+ title: {
109
+ type: string;
110
+ description: string;
111
+ };
112
+ service: {
113
+ type: string;
114
+ description: string;
115
+ };
116
+ url: {
117
+ type: string;
118
+ description: string;
119
+ };
120
+ };
121
+ required: string[];
122
+ };
123
+ handler: (args: {
124
+ id: string;
125
+ title: string;
126
+ service?: string;
127
+ url?: string;
128
+ }) => Promise<{
129
+ content: {
130
+ type: "text";
131
+ text: string;
132
+ }[];
133
+ }>;
134
+ };
135
+ delete_site: {
136
+ description: string;
137
+ inputSchema: {
138
+ type: "object";
139
+ properties: {
140
+ id: {
141
+ type: string;
142
+ description: string;
143
+ };
144
+ };
145
+ required: string[];
146
+ };
147
+ handler: (args: {
148
+ id: string;
149
+ }) => Promise<{
150
+ content: {
151
+ type: "text";
152
+ text: string;
153
+ }[];
154
+ }>;
155
+ };
156
+ get_sites_with_entities: {
157
+ description: string;
158
+ inputSchema: {
159
+ type: "object";
160
+ properties: {
161
+ search: {
162
+ type: string;
163
+ description: string;
164
+ };
165
+ pageIndex: {
166
+ type: string;
167
+ description: string;
168
+ };
169
+ pageLength: {
170
+ type: string;
171
+ description: string;
172
+ };
173
+ };
174
+ };
175
+ handler: (args: {
176
+ search?: string;
177
+ pageIndex?: number;
178
+ pageLength?: number;
179
+ }) => Promise<{
180
+ content: {
181
+ type: "text";
182
+ text: string;
183
+ }[];
184
+ }>;
185
+ };
186
+ };
187
+ //# sourceMappingURL=sites.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sites.d.ts","sourceRoot":"","sources":["../../src/tools/sites.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,wBAAgB,YAAY,CAAC,MAAM,EAAE,SAAS;;;;;;;;;;;;;;;;;;;;;;;;wBAqBlB;YACpB,GAAG,CAAC,EAAE,MAAM,CAAC;YACb,KAAK,CAAC,EAAE,MAAM,CAAC;YACf,SAAS,CAAC,EAAE,MAAM,CAAC;YACnB,UAAU,CAAC,EAAE,MAAM,CAAC;SACrB;;;;;;;;;;;;;;;;;;;wBA2BqB;YAAE,EAAE,EAAE,MAAM,CAAA;SAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAmCd;YACpB,GAAG,EAAE,MAAM,CAAC;YACZ,KAAK,EAAE,MAAM,CAAC;YACd,OAAO,CAAC,EAAE,MAAM,CAAC;YACjB,GAAG,CAAC,EAAE,MAAM,CAAC;SACd;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAuBqB;YACpB,EAAE,EAAE,MAAM,CAAC;YACX,KAAK,EAAE,MAAM,CAAC;YACd,OAAO,CAAC,EAAE,MAAM,CAAC;YACjB,GAAG,CAAC,EAAE,MAAM,CAAC;SACd;;;;;;;;;;;;;;;;;;;wBAqBqB;YAAE,EAAE,EAAE,MAAM,CAAA;SAAE;;;;;;;;;;;;;;;;;;;;;;;;;;wBAsBd;YACpB,MAAM,CAAC,EAAE,MAAM,CAAC;YAChB,SAAS,CAAC,EAAE,MAAM,CAAC;YACnB,UAAU,CAAC,EAAE,MAAM,CAAC;SACrB;;;;;;;EAgBN"}