@mapbox/mcp-server 0.0.2 → 0.1.0
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/dist/cjs/package.json +3 -0
- package/dist/esm/package.json +3 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +38 -0
- package/dist/index.js.map +1 -0
- package/dist/tools/MapboxApiBasedTool.d.ts +75 -0
- package/dist/tools/MapboxApiBasedTool.d.ts.map +1 -0
- package/dist/tools/MapboxApiBasedTool.js +78 -0
- package/dist/tools/MapboxApiBasedTool.js.map +1 -0
- package/dist/tools/category-search-tool/CategorySearchTool.d.ts +39 -0
- package/dist/tools/category-search-tool/CategorySearchTool.d.ts.map +1 -0
- package/dist/tools/category-search-tool/CategorySearchTool.js +638 -0
- package/dist/tools/category-search-tool/CategorySearchTool.js.map +1 -0
- package/dist/tools/category-search-tool/CategorySearchTool.test.d.ts +2 -0
- package/dist/tools/category-search-tool/CategorySearchTool.test.d.ts.map +1 -0
- package/dist/tools/category-search-tool/CategorySearchTool.test.js +289 -0
- package/dist/tools/category-search-tool/CategorySearchTool.test.js.map +1 -0
- package/dist/tools/directions-tool/DirectionsTool.d.ts +53 -0
- package/dist/tools/directions-tool/DirectionsTool.d.ts.map +1 -0
- package/dist/tools/directions-tool/DirectionsTool.js +405 -0
- package/dist/tools/directions-tool/DirectionsTool.js.map +1 -0
- package/dist/tools/directions-tool/DirectionsTool.test.d.ts +2 -0
- package/dist/tools/directions-tool/DirectionsTool.test.d.ts.map +1 -0
- package/dist/tools/directions-tool/DirectionsTool.test.js +867 -0
- package/dist/tools/directions-tool/DirectionsTool.test.js.map +1 -0
- package/dist/tools/forward-geocode-tool/ForwardGeocodeTool.d.ts +51 -0
- package/dist/tools/forward-geocode-tool/ForwardGeocodeTool.d.ts.map +1 -0
- package/dist/tools/forward-geocode-tool/ForwardGeocodeTool.js +182 -0
- package/dist/tools/forward-geocode-tool/ForwardGeocodeTool.js.map +1 -0
- package/dist/tools/forward-geocode-tool/ForwardGeocodeTool.test.d.ts +2 -0
- package/dist/tools/forward-geocode-tool/ForwardGeocodeTool.test.d.ts.map +1 -0
- package/dist/tools/forward-geocode-tool/ForwardGeocodeTool.test.js +335 -0
- package/dist/tools/forward-geocode-tool/ForwardGeocodeTool.test.js.map +1 -0
- package/dist/tools/isochrone-tool/IsochroneTool.d.ts +44 -0
- package/dist/tools/isochrone-tool/IsochroneTool.d.ts.map +1 -0
- package/dist/tools/isochrone-tool/IsochroneTool.js +108 -0
- package/dist/tools/isochrone-tool/IsochroneTool.js.map +1 -0
- package/dist/tools/isochrone-tool/IsochroneTool.test.d.ts +2 -0
- package/dist/tools/isochrone-tool/IsochroneTool.test.d.ts.map +1 -0
- package/dist/tools/isochrone-tool/IsochroneTool.test.js +110 -0
- package/dist/tools/isochrone-tool/IsochroneTool.test.js.map +1 -0
- package/dist/tools/matrix-tool/MatrixTool.d.ts +35 -0
- package/dist/tools/matrix-tool/MatrixTool.d.ts.map +1 -0
- package/dist/tools/matrix-tool/MatrixTool.js +195 -0
- package/dist/tools/matrix-tool/MatrixTool.js.map +1 -0
- package/dist/tools/matrix-tool/MatrixTool.test.d.ts +2 -0
- package/dist/tools/matrix-tool/MatrixTool.test.d.ts.map +1 -0
- package/dist/tools/matrix-tool/MatrixTool.test.js +803 -0
- package/dist/tools/matrix-tool/MatrixTool.test.js.map +1 -0
- package/dist/tools/poi-search-tool/PoiSearchTool.d.ts +54 -0
- package/dist/tools/poi-search-tool/PoiSearchTool.d.ts.map +1 -0
- package/dist/tools/poi-search-tool/PoiSearchTool.js +193 -0
- package/dist/tools/poi-search-tool/PoiSearchTool.js.map +1 -0
- package/dist/tools/poi-search-tool/PoiSearchTool.test.d.ts +2 -0
- package/dist/tools/poi-search-tool/PoiSearchTool.test.d.ts.map +1 -0
- package/dist/tools/poi-search-tool/PoiSearchTool.test.js +338 -0
- package/dist/tools/poi-search-tool/PoiSearchTool.test.js.map +1 -0
- package/dist/tools/reverse-geocode-tool/ReverseGeocodeTool.d.ts +42 -0
- package/dist/tools/reverse-geocode-tool/ReverseGeocodeTool.d.ts.map +1 -0
- package/dist/tools/reverse-geocode-tool/ReverseGeocodeTool.js +131 -0
- package/dist/tools/reverse-geocode-tool/ReverseGeocodeTool.js.map +1 -0
- package/dist/tools/reverse-geocode-tool/ReverseGeocodeTool.test.d.ts +2 -0
- package/dist/tools/reverse-geocode-tool/ReverseGeocodeTool.test.d.ts.map +1 -0
- package/dist/tools/reverse-geocode-tool/ReverseGeocodeTool.test.js +340 -0
- package/dist/tools/reverse-geocode-tool/ReverseGeocodeTool.test.js.map +1 -0
- package/dist/tools/static-map-image-tool/StaticMapImageTool.d.ts +148 -0
- package/dist/tools/static-map-image-tool/StaticMapImageTool.d.ts.map +1 -0
- package/dist/tools/static-map-image-tool/StaticMapImageTool.js +406 -0
- package/dist/tools/static-map-image-tool/StaticMapImageTool.js.map +1 -0
- package/dist/tools/static-map-image-tool/StaticMapImageTool.test.d.ts +2 -0
- package/dist/tools/static-map-image-tool/StaticMapImageTool.test.d.ts.map +1 -0
- package/dist/tools/static-map-image-tool/StaticMapImageTool.test.js +440 -0
- package/dist/tools/static-map-image-tool/StaticMapImageTool.test.js.map +1 -0
- package/dist/utils/requestUtils.d.ts +6 -0
- package/dist/utils/requestUtils.d.ts.map +1 -0
- package/dist/utils/requestUtils.js +29 -0
- package/dist/utils/requestUtils.js.map +1 -0
- package/dist/utils/requestUtils.test-helpers.d.ts +3 -0
- package/dist/utils/requestUtils.test-helpers.d.ts.map +1 -0
- package/dist/utils/requestUtils.test-helpers.js +28 -0
- package/dist/utils/requestUtils.test-helpers.js.map +1 -0
- package/dist/utils/versionUtils.d.ts +9 -0
- package/dist/utils/versionUtils.d.ts.map +1 -0
- package/dist/utils/versionUtils.js +25 -0
- package/dist/utils/versionUtils.js.map +1 -0
- package/dist/version.json +6 -0
- package/package.json +2 -2
|
@@ -0,0 +1,340 @@
|
|
|
1
|
+
// Set the token before importing the tool
|
|
2
|
+
process.env.MAPBOX_ACCESS_TOKEN = 'test-token';
|
|
3
|
+
import { setupFetch, assertHeadersSent } from '../../utils/requestUtils.test-helpers.js';
|
|
4
|
+
import { ReverseGeocodeTool } from './ReverseGeocodeTool.js';
|
|
5
|
+
describe('ReverseGeocodeTool', () => {
|
|
6
|
+
afterEach(() => {
|
|
7
|
+
jest.restoreAllMocks();
|
|
8
|
+
});
|
|
9
|
+
it('sends custom header', async () => {
|
|
10
|
+
const mockFetch = setupFetch();
|
|
11
|
+
await new ReverseGeocodeTool().run({
|
|
12
|
+
longitude: -73.989,
|
|
13
|
+
latitude: 40.733
|
|
14
|
+
});
|
|
15
|
+
assertHeadersSent(mockFetch);
|
|
16
|
+
});
|
|
17
|
+
it('constructs correct URL for reverse geocoding', async () => {
|
|
18
|
+
const mockFetch = setupFetch();
|
|
19
|
+
await new ReverseGeocodeTool().run({
|
|
20
|
+
longitude: -73.989,
|
|
21
|
+
latitude: 40.733
|
|
22
|
+
});
|
|
23
|
+
const calledUrl = mockFetch.mock.calls[0][0];
|
|
24
|
+
expect(calledUrl).toContain('search/geocode/v6/reverse');
|
|
25
|
+
expect(calledUrl).toContain('longitude=-73.989');
|
|
26
|
+
expect(calledUrl).toContain('latitude=40.733');
|
|
27
|
+
expect(calledUrl).toContain('access_token=');
|
|
28
|
+
});
|
|
29
|
+
it('includes all optional parameters', async () => {
|
|
30
|
+
const mockFetch = setupFetch();
|
|
31
|
+
await new ReverseGeocodeTool().run({
|
|
32
|
+
longitude: -74.006,
|
|
33
|
+
latitude: 40.7128,
|
|
34
|
+
permanent: true,
|
|
35
|
+
country: ['US'],
|
|
36
|
+
language: 'fr',
|
|
37
|
+
limit: 3,
|
|
38
|
+
types: ['address'],
|
|
39
|
+
worldview: 'jp'
|
|
40
|
+
});
|
|
41
|
+
const calledUrl = mockFetch.mock.calls[0][0];
|
|
42
|
+
expect(calledUrl).toContain('longitude=-74.006');
|
|
43
|
+
expect(calledUrl).toContain('latitude=40.7128');
|
|
44
|
+
expect(calledUrl).toContain('permanent=true');
|
|
45
|
+
expect(calledUrl).toContain('country=US');
|
|
46
|
+
expect(calledUrl).toContain('language=fr');
|
|
47
|
+
expect(calledUrl).toContain('limit=3');
|
|
48
|
+
expect(calledUrl).toContain('types=address');
|
|
49
|
+
expect(calledUrl).toContain('worldview=jp');
|
|
50
|
+
});
|
|
51
|
+
it('uses default values', async () => {
|
|
52
|
+
const mockFetch = setupFetch();
|
|
53
|
+
await new ReverseGeocodeTool().run({
|
|
54
|
+
longitude: -73.989,
|
|
55
|
+
latitude: 40.733
|
|
56
|
+
});
|
|
57
|
+
const calledUrl = mockFetch.mock.calls[0][0];
|
|
58
|
+
expect(calledUrl).toContain('permanent=false');
|
|
59
|
+
expect(calledUrl).toContain('limit=1');
|
|
60
|
+
expect(calledUrl).toContain('worldview=us');
|
|
61
|
+
});
|
|
62
|
+
it('validates limit constraints', async () => {
|
|
63
|
+
const tool = new ReverseGeocodeTool();
|
|
64
|
+
// Test limit too high
|
|
65
|
+
await expect(tool.run({
|
|
66
|
+
longitude: -73.989,
|
|
67
|
+
latitude: 40.733,
|
|
68
|
+
limit: 6
|
|
69
|
+
})).resolves.toMatchObject({
|
|
70
|
+
is_error: true
|
|
71
|
+
});
|
|
72
|
+
// Test limit too low
|
|
73
|
+
await expect(tool.run({
|
|
74
|
+
longitude: -73.989,
|
|
75
|
+
latitude: 40.733,
|
|
76
|
+
limit: 0
|
|
77
|
+
})).resolves.toMatchObject({
|
|
78
|
+
is_error: true
|
|
79
|
+
});
|
|
80
|
+
});
|
|
81
|
+
it('validates coordinate constraints', async () => {
|
|
82
|
+
const tool = new ReverseGeocodeTool();
|
|
83
|
+
// Test invalid longitude
|
|
84
|
+
await expect(tool.run({
|
|
85
|
+
longitude: -181,
|
|
86
|
+
latitude: 40.733
|
|
87
|
+
})).resolves.toMatchObject({
|
|
88
|
+
is_error: true
|
|
89
|
+
});
|
|
90
|
+
await expect(tool.run({
|
|
91
|
+
longitude: 181,
|
|
92
|
+
latitude: 40.733
|
|
93
|
+
})).resolves.toMatchObject({
|
|
94
|
+
is_error: true
|
|
95
|
+
});
|
|
96
|
+
// Test invalid latitude
|
|
97
|
+
await expect(tool.run({
|
|
98
|
+
longitude: -73.989,
|
|
99
|
+
latitude: 91
|
|
100
|
+
})).resolves.toMatchObject({
|
|
101
|
+
is_error: true
|
|
102
|
+
});
|
|
103
|
+
await expect(tool.run({
|
|
104
|
+
longitude: -73.989,
|
|
105
|
+
latitude: -91
|
|
106
|
+
})).resolves.toMatchObject({
|
|
107
|
+
is_error: true
|
|
108
|
+
});
|
|
109
|
+
});
|
|
110
|
+
it('enforces types constraint when limit > 1', async () => {
|
|
111
|
+
const tool = new ReverseGeocodeTool();
|
|
112
|
+
// Should succeed with exactly one type
|
|
113
|
+
const mockFetch = setupFetch();
|
|
114
|
+
await tool.run({
|
|
115
|
+
longitude: -73.989,
|
|
116
|
+
latitude: 40.733,
|
|
117
|
+
limit: 3,
|
|
118
|
+
types: ['address']
|
|
119
|
+
});
|
|
120
|
+
expect(mockFetch).toHaveBeenCalled();
|
|
121
|
+
// Should fail without types when limit > 1
|
|
122
|
+
await expect(tool.run({
|
|
123
|
+
longitude: -73.989,
|
|
124
|
+
latitude: 40.733,
|
|
125
|
+
limit: 3
|
|
126
|
+
})).resolves.toMatchObject({
|
|
127
|
+
is_error: true
|
|
128
|
+
});
|
|
129
|
+
// Should fail with multiple types when limit > 1
|
|
130
|
+
await expect(tool.run({
|
|
131
|
+
longitude: -73.989,
|
|
132
|
+
latitude: 40.733,
|
|
133
|
+
limit: 3,
|
|
134
|
+
types: ['address', 'place']
|
|
135
|
+
})).resolves.toMatchObject({
|
|
136
|
+
is_error: true
|
|
137
|
+
});
|
|
138
|
+
});
|
|
139
|
+
it('allows limit of 1 without types constraint', async () => {
|
|
140
|
+
const mockFetch = setupFetch();
|
|
141
|
+
// Should succeed with limit=1 and no types
|
|
142
|
+
await new ReverseGeocodeTool().run({
|
|
143
|
+
longitude: -73.989,
|
|
144
|
+
latitude: 40.733,
|
|
145
|
+
limit: 1
|
|
146
|
+
});
|
|
147
|
+
expect(mockFetch).toHaveBeenCalled();
|
|
148
|
+
// Should also succeed with limit=1 and multiple types
|
|
149
|
+
await new ReverseGeocodeTool().run({
|
|
150
|
+
longitude: -73.989,
|
|
151
|
+
latitude: 40.733,
|
|
152
|
+
limit: 1,
|
|
153
|
+
types: ['address', 'place']
|
|
154
|
+
});
|
|
155
|
+
expect(mockFetch).toHaveBeenCalledTimes(2);
|
|
156
|
+
});
|
|
157
|
+
it('handles fetch errors gracefully', async () => {
|
|
158
|
+
const mockFetch = setupFetch({
|
|
159
|
+
ok: false,
|
|
160
|
+
status: 404,
|
|
161
|
+
statusText: 'Not Found'
|
|
162
|
+
});
|
|
163
|
+
const result = await new ReverseGeocodeTool().run({
|
|
164
|
+
longitude: -73.989,
|
|
165
|
+
latitude: 40.733
|
|
166
|
+
});
|
|
167
|
+
expect(result.is_error).toBe(true);
|
|
168
|
+
expect(result.content[0]).toMatchObject({
|
|
169
|
+
type: 'text',
|
|
170
|
+
text: 'Internal error has occurred.'
|
|
171
|
+
});
|
|
172
|
+
});
|
|
173
|
+
it('validates country code format', async () => {
|
|
174
|
+
const tool = new ReverseGeocodeTool();
|
|
175
|
+
// Should fail with invalid country code length
|
|
176
|
+
await expect(tool.run({
|
|
177
|
+
longitude: -73.989,
|
|
178
|
+
latitude: 40.733,
|
|
179
|
+
country: ['USA'] // Should be 2 characters
|
|
180
|
+
})).resolves.toMatchObject({
|
|
181
|
+
is_error: true
|
|
182
|
+
});
|
|
183
|
+
});
|
|
184
|
+
it('formats GeoJSON response to text with basic information', async () => {
|
|
185
|
+
const mockResponse = {
|
|
186
|
+
type: 'FeatureCollection',
|
|
187
|
+
features: [
|
|
188
|
+
{
|
|
189
|
+
type: 'Feature',
|
|
190
|
+
properties: {
|
|
191
|
+
name: '123 Main Street',
|
|
192
|
+
full_address: '123 Main Street, New York, NY 10001, United States',
|
|
193
|
+
feature_type: 'address'
|
|
194
|
+
},
|
|
195
|
+
geometry: {
|
|
196
|
+
type: 'Point',
|
|
197
|
+
coordinates: [-73.989, 40.733]
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
]
|
|
201
|
+
};
|
|
202
|
+
const mockFetch = setupFetch({
|
|
203
|
+
json: async () => mockResponse
|
|
204
|
+
});
|
|
205
|
+
const result = await new ReverseGeocodeTool().run({
|
|
206
|
+
longitude: -73.989,
|
|
207
|
+
latitude: 40.733
|
|
208
|
+
});
|
|
209
|
+
expect(result.is_error).toBe(false);
|
|
210
|
+
expect(result.content[0].type).toBe('text');
|
|
211
|
+
const textContent = result.content[0].text;
|
|
212
|
+
expect(textContent).toContain('1. 123 Main Street');
|
|
213
|
+
expect(textContent).toContain('Address: 123 Main Street, New York, NY 10001, United States');
|
|
214
|
+
expect(textContent).toContain('Coordinates: 40.733, -73.989');
|
|
215
|
+
expect(textContent).toContain('Type: address');
|
|
216
|
+
});
|
|
217
|
+
it('formats GeoJSON response with name_preferred', async () => {
|
|
218
|
+
const mockResponse = {
|
|
219
|
+
type: 'FeatureCollection',
|
|
220
|
+
features: [
|
|
221
|
+
{
|
|
222
|
+
type: 'Feature',
|
|
223
|
+
properties: {
|
|
224
|
+
name: 'Manhattan',
|
|
225
|
+
name_preferred: 'Manhattan Borough',
|
|
226
|
+
place_formatted: 'Manhattan, New York, NY, United States'
|
|
227
|
+
},
|
|
228
|
+
geometry: {
|
|
229
|
+
type: 'Point',
|
|
230
|
+
coordinates: [-73.971, 40.776]
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
]
|
|
234
|
+
};
|
|
235
|
+
const mockFetch = setupFetch({
|
|
236
|
+
json: async () => mockResponse
|
|
237
|
+
});
|
|
238
|
+
const result = await new ReverseGeocodeTool().run({
|
|
239
|
+
longitude: -73.971,
|
|
240
|
+
latitude: 40.776
|
|
241
|
+
});
|
|
242
|
+
expect(result.is_error).toBe(false);
|
|
243
|
+
const textContent = result.content[0].text;
|
|
244
|
+
expect(textContent).toContain('1. Manhattan (Manhattan Borough)');
|
|
245
|
+
expect(textContent).toContain('Address: Manhattan, New York, NY, United States');
|
|
246
|
+
expect(textContent).toContain('Coordinates: 40.776, -73.971');
|
|
247
|
+
});
|
|
248
|
+
it('handles multiple results in formatted text', async () => {
|
|
249
|
+
const mockResponse = {
|
|
250
|
+
type: 'FeatureCollection',
|
|
251
|
+
features: [
|
|
252
|
+
{
|
|
253
|
+
type: 'Feature',
|
|
254
|
+
properties: {
|
|
255
|
+
name: '456 Oak Street',
|
|
256
|
+
full_address: '456 Oak Street, Brooklyn, NY 11201, United States',
|
|
257
|
+
feature_type: 'address'
|
|
258
|
+
},
|
|
259
|
+
geometry: {
|
|
260
|
+
type: 'Point',
|
|
261
|
+
coordinates: [-73.990, 40.694]
|
|
262
|
+
}
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
type: 'Feature',
|
|
266
|
+
properties: {
|
|
267
|
+
name: '458 Oak Street',
|
|
268
|
+
full_address: '458 Oak Street, Brooklyn, NY 11201, United States',
|
|
269
|
+
feature_type: 'address'
|
|
270
|
+
},
|
|
271
|
+
geometry: {
|
|
272
|
+
type: 'Point',
|
|
273
|
+
coordinates: [-73.991, 40.695]
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
]
|
|
277
|
+
};
|
|
278
|
+
const mockFetch = setupFetch({
|
|
279
|
+
json: async () => mockResponse
|
|
280
|
+
});
|
|
281
|
+
const result = await new ReverseGeocodeTool().run({
|
|
282
|
+
longitude: -73.990,
|
|
283
|
+
latitude: 40.694,
|
|
284
|
+
limit: 2,
|
|
285
|
+
types: ['address']
|
|
286
|
+
});
|
|
287
|
+
expect(result.is_error).toBe(false);
|
|
288
|
+
const textContent = result.content[0].text;
|
|
289
|
+
expect(textContent).toContain('1. 456 Oak Street');
|
|
290
|
+
expect(textContent).toContain('2. 458 Oak Street');
|
|
291
|
+
expect(textContent).toContain('456 Oak Street, Brooklyn, NY 11201, United States');
|
|
292
|
+
expect(textContent).toContain('458 Oak Street, Brooklyn, NY 11201, United States');
|
|
293
|
+
});
|
|
294
|
+
it('handles empty results gracefully', async () => {
|
|
295
|
+
const mockResponse = {
|
|
296
|
+
type: 'FeatureCollection',
|
|
297
|
+
features: []
|
|
298
|
+
};
|
|
299
|
+
const mockFetch = setupFetch({
|
|
300
|
+
json: async () => mockResponse
|
|
301
|
+
});
|
|
302
|
+
const result = await new ReverseGeocodeTool().run({
|
|
303
|
+
longitude: 0.0,
|
|
304
|
+
latitude: 0.0
|
|
305
|
+
});
|
|
306
|
+
expect(result.is_error).toBe(false);
|
|
307
|
+
expect(result.content[0].type).toBe('text');
|
|
308
|
+
expect(result.content[0].text).toBe('No results found.');
|
|
309
|
+
});
|
|
310
|
+
it('handles results with minimal properties', async () => {
|
|
311
|
+
const mockResponse = {
|
|
312
|
+
type: 'FeatureCollection',
|
|
313
|
+
features: [
|
|
314
|
+
{
|
|
315
|
+
type: 'Feature',
|
|
316
|
+
properties: {
|
|
317
|
+
name: 'Some Location'
|
|
318
|
+
},
|
|
319
|
+
geometry: {
|
|
320
|
+
type: 'Point',
|
|
321
|
+
coordinates: [-100.123, 35.456]
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
]
|
|
325
|
+
};
|
|
326
|
+
const mockFetch = setupFetch({
|
|
327
|
+
json: async () => mockResponse
|
|
328
|
+
});
|
|
329
|
+
const result = await new ReverseGeocodeTool().run({
|
|
330
|
+
longitude: -100.123,
|
|
331
|
+
latitude: 35.456
|
|
332
|
+
});
|
|
333
|
+
expect(result.is_error).toBe(false);
|
|
334
|
+
const textContent = result.content[0].text;
|
|
335
|
+
expect(textContent).toContain('1. Some Location');
|
|
336
|
+
expect(textContent).toContain('Coordinates: 35.456, -100.123');
|
|
337
|
+
expect(textContent).not.toContain('Address:');
|
|
338
|
+
});
|
|
339
|
+
});
|
|
340
|
+
//# sourceMappingURL=ReverseGeocodeTool.test.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apboxApiBasedTool } from '../MapboxApiBasedTool.js';
|
|
3
|
+
declare const StaticMapImageInputSchema: z.ZodObject<{
|
|
4
|
+
center: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
5
|
+
zoom: z.ZodNumber;
|
|
6
|
+
size: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
7
|
+
style: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
8
|
+
highDensity: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
9
|
+
overlays: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
10
|
+
type: z.ZodLiteral<"marker">;
|
|
11
|
+
longitude: z.ZodNumber;
|
|
12
|
+
latitude: z.ZodNumber;
|
|
13
|
+
size: z.ZodDefault<z.ZodOptional<z.ZodEnum<["small", "large"]>>>;
|
|
14
|
+
label: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, string | undefined>;
|
|
15
|
+
color: z.ZodOptional<z.ZodString>;
|
|
16
|
+
}, "strip", z.ZodTypeAny, {
|
|
17
|
+
type: "marker";
|
|
18
|
+
longitude: number;
|
|
19
|
+
latitude: number;
|
|
20
|
+
size: "small" | "large";
|
|
21
|
+
label?: string | undefined;
|
|
22
|
+
color?: string | undefined;
|
|
23
|
+
}, {
|
|
24
|
+
type: "marker";
|
|
25
|
+
longitude: number;
|
|
26
|
+
latitude: number;
|
|
27
|
+
size?: "small" | "large" | undefined;
|
|
28
|
+
label?: string | undefined;
|
|
29
|
+
color?: string | undefined;
|
|
30
|
+
}>, z.ZodObject<{
|
|
31
|
+
type: z.ZodLiteral<"custom-marker">;
|
|
32
|
+
longitude: z.ZodNumber;
|
|
33
|
+
latitude: z.ZodNumber;
|
|
34
|
+
url: z.ZodString;
|
|
35
|
+
}, "strip", z.ZodTypeAny, {
|
|
36
|
+
type: "custom-marker";
|
|
37
|
+
longitude: number;
|
|
38
|
+
latitude: number;
|
|
39
|
+
url: string;
|
|
40
|
+
}, {
|
|
41
|
+
type: "custom-marker";
|
|
42
|
+
longitude: number;
|
|
43
|
+
latitude: number;
|
|
44
|
+
url: string;
|
|
45
|
+
}>, z.ZodObject<{
|
|
46
|
+
type: z.ZodLiteral<"path">;
|
|
47
|
+
encodedPolyline: z.ZodString;
|
|
48
|
+
strokeWidth: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
49
|
+
strokeColor: z.ZodOptional<z.ZodString>;
|
|
50
|
+
strokeOpacity: z.ZodOptional<z.ZodNumber>;
|
|
51
|
+
fillColor: z.ZodOptional<z.ZodString>;
|
|
52
|
+
fillOpacity: z.ZodOptional<z.ZodNumber>;
|
|
53
|
+
}, "strip", z.ZodTypeAny, {
|
|
54
|
+
type: "path";
|
|
55
|
+
encodedPolyline: string;
|
|
56
|
+
strokeWidth: number;
|
|
57
|
+
strokeColor?: string | undefined;
|
|
58
|
+
strokeOpacity?: number | undefined;
|
|
59
|
+
fillColor?: string | undefined;
|
|
60
|
+
fillOpacity?: number | undefined;
|
|
61
|
+
}, {
|
|
62
|
+
type: "path";
|
|
63
|
+
encodedPolyline: string;
|
|
64
|
+
strokeWidth?: number | undefined;
|
|
65
|
+
strokeColor?: string | undefined;
|
|
66
|
+
strokeOpacity?: number | undefined;
|
|
67
|
+
fillColor?: string | undefined;
|
|
68
|
+
fillOpacity?: number | undefined;
|
|
69
|
+
}>, z.ZodObject<{
|
|
70
|
+
type: z.ZodLiteral<"geojson">;
|
|
71
|
+
data: z.ZodAny;
|
|
72
|
+
}, "strip", z.ZodTypeAny, {
|
|
73
|
+
type: "geojson";
|
|
74
|
+
data?: any;
|
|
75
|
+
}, {
|
|
76
|
+
type: "geojson";
|
|
77
|
+
data?: any;
|
|
78
|
+
}>]>, "many">>;
|
|
79
|
+
}, "strip", z.ZodTypeAny, {
|
|
80
|
+
size: [number, number];
|
|
81
|
+
center: [number, number];
|
|
82
|
+
zoom: number;
|
|
83
|
+
style: string;
|
|
84
|
+
highDensity: boolean;
|
|
85
|
+
overlays?: ({
|
|
86
|
+
type: "marker";
|
|
87
|
+
longitude: number;
|
|
88
|
+
latitude: number;
|
|
89
|
+
size: "small" | "large";
|
|
90
|
+
label?: string | undefined;
|
|
91
|
+
color?: string | undefined;
|
|
92
|
+
} | {
|
|
93
|
+
type: "custom-marker";
|
|
94
|
+
longitude: number;
|
|
95
|
+
latitude: number;
|
|
96
|
+
url: string;
|
|
97
|
+
} | {
|
|
98
|
+
type: "path";
|
|
99
|
+
encodedPolyline: string;
|
|
100
|
+
strokeWidth: number;
|
|
101
|
+
strokeColor?: string | undefined;
|
|
102
|
+
strokeOpacity?: number | undefined;
|
|
103
|
+
fillColor?: string | undefined;
|
|
104
|
+
fillOpacity?: number | undefined;
|
|
105
|
+
} | {
|
|
106
|
+
type: "geojson";
|
|
107
|
+
data?: any;
|
|
108
|
+
})[] | undefined;
|
|
109
|
+
}, {
|
|
110
|
+
size: [number, number];
|
|
111
|
+
center: [number, number];
|
|
112
|
+
zoom: number;
|
|
113
|
+
style?: string | undefined;
|
|
114
|
+
highDensity?: boolean | undefined;
|
|
115
|
+
overlays?: ({
|
|
116
|
+
type: "marker";
|
|
117
|
+
longitude: number;
|
|
118
|
+
latitude: number;
|
|
119
|
+
size?: "small" | "large" | undefined;
|
|
120
|
+
label?: string | undefined;
|
|
121
|
+
color?: string | undefined;
|
|
122
|
+
} | {
|
|
123
|
+
type: "custom-marker";
|
|
124
|
+
longitude: number;
|
|
125
|
+
latitude: number;
|
|
126
|
+
url: string;
|
|
127
|
+
} | {
|
|
128
|
+
type: "path";
|
|
129
|
+
encodedPolyline: string;
|
|
130
|
+
strokeWidth?: number | undefined;
|
|
131
|
+
strokeColor?: string | undefined;
|
|
132
|
+
strokeOpacity?: number | undefined;
|
|
133
|
+
fillColor?: string | undefined;
|
|
134
|
+
fillOpacity?: number | undefined;
|
|
135
|
+
} | {
|
|
136
|
+
type: "geojson";
|
|
137
|
+
data?: any;
|
|
138
|
+
})[] | undefined;
|
|
139
|
+
}>;
|
|
140
|
+
export declare class StaticMapImageTool extends MapboxApiBasedTool<typeof StaticMapImageInputSchema> {
|
|
141
|
+
name: string;
|
|
142
|
+
description: string;
|
|
143
|
+
constructor();
|
|
144
|
+
private encodeOverlay;
|
|
145
|
+
protected execute(input: z.infer<typeof StaticMapImageInputSchema>): Promise<any>;
|
|
146
|
+
}
|
|
147
|
+
export {};
|
|
148
|
+
//# sourceMappingURL=StaticMapImageTool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StaticMapImageTool.d.ts","sourceRoot":"","sources":["../../../src/tools/static-map-image-tool/StaticMapImageTool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAwT9D,QAAA,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuC7B,CAAC;AAEH,qBAAa,kBAAmB,SAAQ,kBAAkB,CACxD,OAAO,yBAAyB,CACjC;IACC,IAAI,SAAwB;IAC5B,WAAW,SAC8P;;IAMzQ,OAAO,CAAC,aAAa;cAkDL,OAAO,CACrB,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,GAC/C,OAAO,CAAC,GAAG,CAAC;CAsChB"}
|