airport-data-js 3.0.2 → 4.0.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.
@@ -0,0 +1,50 @@
1
+ /**
2
+ * @module airport-data/tools
3
+ *
4
+ * Pre-built JSON Schema tool definitions for all airport-data functions.
5
+ * Use these with LLM tool-calling frameworks like OpenAI function calling,
6
+ * Anthropic tool use, Vercel AI SDK, or LangChain.
7
+ *
8
+ * @example
9
+ * ```typescript
10
+ * import { airportTools } from 'airport-data-js/tools';
11
+ *
12
+ * // OpenAI function calling
13
+ * const response = await openai.chat.completions.create({
14
+ * model: 'gpt-4',
15
+ * messages: [...],
16
+ * tools: airportTools.map(t => ({ type: 'function', function: t })),
17
+ * });
18
+ *
19
+ * // Anthropic tool use
20
+ * const response = await anthropic.messages.create({
21
+ * model: 'claude-sonnet-4-20250514',
22
+ * messages: [...],
23
+ * tools: airportTools.map(t => ({
24
+ * name: t.name,
25
+ * description: t.description,
26
+ * input_schema: t.parameters,
27
+ * })),
28
+ * });
29
+ * ```
30
+ */
31
+ export interface ToolDefinition {
32
+ name: string;
33
+ description: string;
34
+ parameters: {
35
+ type: 'object';
36
+ properties: Record<string, {
37
+ type: string;
38
+ description: string;
39
+ enum?: string[];
40
+ items?: {
41
+ type: string;
42
+ };
43
+ default?: unknown;
44
+ minimum?: number;
45
+ maximum?: number;
46
+ }>;
47
+ required: string[];
48
+ };
49
+ }
50
+ export declare const airportTools: ToolDefinition[];
@@ -1 +0,0 @@
1
- /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */