-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathPreviewStyleTool.schema.ts
More file actions
26 lines (24 loc) · 996 Bytes
/
PreviewStyleTool.schema.ts
File metadata and controls
26 lines (24 loc) · 996 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import { z } from 'zod';
export const PreviewStyleSchema = z.object({
styleId: z.string().describe('Style ID to preview'),
accessToken: z
.string()
.startsWith(
'pk.',
'Invalid access token. Only public tokens (starting with pk.*) are allowed for preview URLs. Secret tokens (sk.*) cannot be used as they cannot be exposed in browser URLs.'
)
.describe(
'Mapbox public access token (required, must start with pk.* and have styles:read permission). Secret tokens (sk.*) cannot be used as they cannot be exposed in browser URLs. Please use an existing public token or get one from list_tokens_tool or create one with create_token_tool with styles:read permission.'
),
title: z
.boolean()
.optional()
.default(false)
.describe('Show title in the preview'),
zoomwheel: z
.boolean()
.optional()
.default(true)
.describe('Enable zoom wheel control')
});
export type PreviewStyleInput = z.infer<typeof PreviewStyleSchema>;