@meetbot/mcp 1.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.
- package/LICENSE +21 -0
- package/README.md +246 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +32 -0
- package/dist/cli.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +26 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp-server.d.ts +20 -0
- package/dist/mcp-server.d.ts.map +1 -0
- package/dist/mcp-server.js +294 -0
- package/dist/mcp-server.js.map +1 -0
- package/dist/meetbot-client.d.ts +34 -0
- package/dist/meetbot-client.d.ts.map +1 -0
- package/dist/meetbot-client.js +108 -0
- package/dist/meetbot-client.js.map +1 -0
- package/dist/schemas.d.ts +213 -0
- package/dist/schemas.d.ts.map +1 -0
- package/dist/schemas.js +70 -0
- package/dist/schemas.js.map +1 -0
- package/dist/types.d.ts +68 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +7 -0
- package/dist/types.js.map +1 -0
- package/package.json +63 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Meetbot Team
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
# Meetbot MCP (Model Context Protocol)
|
|
2
|
+
|
|
3
|
+
A Model Context Protocol (MCP) server for the Meetbot Booking Page API, enabling AI assistants to interact with scheduling and booking functionality.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- **Complete API Coverage**: Implements all endpoints from the Meetbot Booking Page API v1
|
|
8
|
+
- **Type Safety**: Full TypeScript support with comprehensive type definitions
|
|
9
|
+
- **Runtime Validation**: Zod schemas for input validation and data integrity
|
|
10
|
+
- **Authentication Support**: Bearer token and session-based authentication
|
|
11
|
+
- **Error Handling**: Robust error handling with detailed error messages
|
|
12
|
+
- **Health Checks**: Built-in health monitoring for API connectivity
|
|
13
|
+
|
|
14
|
+
## Installation
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npm install @meetbot/mcp
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Quick Start
|
|
21
|
+
|
|
22
|
+
### 1. Configure the MCP Server
|
|
23
|
+
|
|
24
|
+
First, configure the Meetbot API client with your API endpoint and authentication:
|
|
25
|
+
|
|
26
|
+
```typescript
|
|
27
|
+
// Configure with bearer token
|
|
28
|
+
await configure_meetbot({
|
|
29
|
+
baseUrl: "https://api.meet.bot",
|
|
30
|
+
authToken: "your_bearer_token_here"
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
// Or configure with session ID
|
|
34
|
+
await configure_meetbot({
|
|
35
|
+
baseUrl: "https://api.meet.bot",
|
|
36
|
+
sessionId: "your_session_id_here"
|
|
37
|
+
});
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### 2. Use the Available Tools
|
|
41
|
+
|
|
42
|
+
The MCP server provides the following tools:
|
|
43
|
+
|
|
44
|
+
#### Get Scheduling Pages
|
|
45
|
+
```typescript
|
|
46
|
+
await get_scheduling_pages();
|
|
47
|
+
// Returns all scheduling pages for the authenticated user
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
#### Get Page Information
|
|
51
|
+
```typescript
|
|
52
|
+
await get_page_info({
|
|
53
|
+
page: "https://meet.bot/user/30min"
|
|
54
|
+
});
|
|
55
|
+
// Returns detailed information about a specific scheduling page
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
#### Get Available Slots
|
|
59
|
+
```typescript
|
|
60
|
+
await get_available_slots({
|
|
61
|
+
page: "https://meet.bot/user/30min",
|
|
62
|
+
count: 10,
|
|
63
|
+
start: "2025-01-01",
|
|
64
|
+
end: "2025-01-31",
|
|
65
|
+
timezone: "America/New_York",
|
|
66
|
+
booking_link: true
|
|
67
|
+
});
|
|
68
|
+
// Returns available booking slots with optional filters
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
#### Book a Meeting
|
|
72
|
+
```typescript
|
|
73
|
+
await book_meeting({
|
|
74
|
+
page: "https://meet.bot/user/30min",
|
|
75
|
+
guest_email: "guest@example.com",
|
|
76
|
+
guest_name: "Jane Doe",
|
|
77
|
+
notes: "Meeting to discuss project requirements",
|
|
78
|
+
start: "2025-01-15T14:00:00Z"
|
|
79
|
+
});
|
|
80
|
+
// Books a new meeting slot
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
#### Health Check
|
|
84
|
+
```typescript
|
|
85
|
+
await health_check();
|
|
86
|
+
// Verifies API connectivity and configuration
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## API Reference
|
|
90
|
+
|
|
91
|
+
### MeetbotClient
|
|
92
|
+
|
|
93
|
+
The core API client for direct integration:
|
|
94
|
+
|
|
95
|
+
```typescript
|
|
96
|
+
import { MeetbotClient } from '@meetbot/mcp';
|
|
97
|
+
|
|
98
|
+
const client = new MeetbotClient({
|
|
99
|
+
baseUrl: 'https://api.meet.bot',
|
|
100
|
+
authToken: 'your_token'
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
// Get all scheduling pages
|
|
104
|
+
const pages = await client.getPages();
|
|
105
|
+
|
|
106
|
+
// Get page information
|
|
107
|
+
const pageInfo = await client.getPageInfo({
|
|
108
|
+
page: 'https://meet.bot/user/30min'
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
// Get available slots
|
|
112
|
+
const slots = await client.getSlots({
|
|
113
|
+
page: 'https://meet.bot/user/30min',
|
|
114
|
+
count: 20
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
// Book a meeting
|
|
118
|
+
const booking = await client.bookSlot({
|
|
119
|
+
page: 'https://meet.bot/user/30min',
|
|
120
|
+
guest_email: 'guest@example.com',
|
|
121
|
+
guest_name: 'Jane Doe',
|
|
122
|
+
start: '2025-01-15T14:00:00Z'
|
|
123
|
+
});
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### Data Types
|
|
127
|
+
|
|
128
|
+
All API responses are fully typed:
|
|
129
|
+
|
|
130
|
+
```typescript
|
|
131
|
+
interface BookSlot {
|
|
132
|
+
success: boolean;
|
|
133
|
+
page: string;
|
|
134
|
+
guest_email: string;
|
|
135
|
+
guest_name: string;
|
|
136
|
+
notes?: string;
|
|
137
|
+
start: string;
|
|
138
|
+
ical_uid: string;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
interface PageInfo {
|
|
142
|
+
title: string;
|
|
143
|
+
duration: number;
|
|
144
|
+
url: string;
|
|
145
|
+
owner_name: string;
|
|
146
|
+
max_days_into_the_future: number;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
interface Slots {
|
|
150
|
+
count: number;
|
|
151
|
+
duration: number;
|
|
152
|
+
slots: SlotDetails[];
|
|
153
|
+
}
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
## Configuration
|
|
157
|
+
|
|
158
|
+
### Environment Variables
|
|
159
|
+
|
|
160
|
+
You can configure the MCP server using environment variables:
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
export MEETBOT_BASE_URL="https://api.meet.bot"
|
|
164
|
+
export MEETBOT_AUTH_TOKEN="your_bearer_token"
|
|
165
|
+
export MEETBOT_SESSION_ID="your_session_id"
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
### Authentication
|
|
169
|
+
|
|
170
|
+
The MCP server supports two authentication methods:
|
|
171
|
+
|
|
172
|
+
1. **Bearer Token**: Use `authToken` for API key authentication
|
|
173
|
+
2. **Session ID**: Use `sessionId` for cookie-based authentication
|
|
174
|
+
|
|
175
|
+
## Development
|
|
176
|
+
|
|
177
|
+
### Building from Source
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
git clone https://github.com/meetbot/meetbot-mcp.git
|
|
181
|
+
cd meetbot-mcp
|
|
182
|
+
npm install
|
|
183
|
+
npm run build
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
### Running Tests
|
|
187
|
+
|
|
188
|
+
```bash
|
|
189
|
+
npm test
|
|
190
|
+
npm run test:watch
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
### Linting
|
|
194
|
+
|
|
195
|
+
```bash
|
|
196
|
+
npm run lint
|
|
197
|
+
npm run lint:fix
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
## CLI Usage
|
|
201
|
+
|
|
202
|
+
The package includes a command-line interface:
|
|
203
|
+
|
|
204
|
+
```bash
|
|
205
|
+
# Install globally
|
|
206
|
+
npm install -g @meetbot/mcp
|
|
207
|
+
|
|
208
|
+
# Run the MCP server
|
|
209
|
+
meetbot-mcp
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
## Error Handling
|
|
213
|
+
|
|
214
|
+
The MCP server provides detailed error messages for common issues:
|
|
215
|
+
|
|
216
|
+
- **Configuration Errors**: Missing or invalid configuration parameters
|
|
217
|
+
- **Authentication Errors**: Invalid tokens or session IDs
|
|
218
|
+
- **API Errors**: Detailed error messages from the Meetbot API
|
|
219
|
+
- **Validation Errors**: Input validation failures with specific field errors
|
|
220
|
+
|
|
221
|
+
## Contributing
|
|
222
|
+
|
|
223
|
+
1. Fork the repository
|
|
224
|
+
2. Create a feature branch
|
|
225
|
+
3. Make your changes
|
|
226
|
+
4. Add tests for new functionality
|
|
227
|
+
5. Submit a merge request
|
|
228
|
+
|
|
229
|
+
## License
|
|
230
|
+
|
|
231
|
+
MIT License - see [LICENSE](LICENSE) file for details.
|
|
232
|
+
|
|
233
|
+
## Support
|
|
234
|
+
|
|
235
|
+
- **Documentation**: [https://docs.meet.bot](https://docs.meet.bot)
|
|
236
|
+
- **Issues**: [GitLab Issues](https://gitlab.com/meetbot/meetbot-mcp/-/issues)
|
|
237
|
+
- **Discussions**: [GitLab Discussions](https://gitlab.com/meetbot/meetbot-mcp/-/issues)
|
|
238
|
+
|
|
239
|
+
## Changelog
|
|
240
|
+
|
|
241
|
+
### 1.0.0
|
|
242
|
+
- Initial release
|
|
243
|
+
- Complete API coverage
|
|
244
|
+
- TypeScript support
|
|
245
|
+
- Runtime validation
|
|
246
|
+
- MCP server implementation
|
package/dist/cli.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":""}
|
package/dist/cli.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
const mcp_server_js_1 = require("./mcp-server.js");
|
|
5
|
+
/**
|
|
6
|
+
* CLI entry point for the Meetbot MCP server
|
|
7
|
+
*/
|
|
8
|
+
async function main() {
|
|
9
|
+
try {
|
|
10
|
+
const server = new mcp_server_js_1.MeetbotMCPServer();
|
|
11
|
+
await server.run();
|
|
12
|
+
}
|
|
13
|
+
catch (error) {
|
|
14
|
+
console.error('Failed to start Meetbot MCP server:', error);
|
|
15
|
+
process.exit(1);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
// Handle process termination gracefully
|
|
19
|
+
process.on('SIGINT', () => {
|
|
20
|
+
console.error('Meetbot MCP server shutting down...');
|
|
21
|
+
process.exit(0);
|
|
22
|
+
});
|
|
23
|
+
process.on('SIGTERM', () => {
|
|
24
|
+
console.error('Meetbot MCP server shutting down...');
|
|
25
|
+
process.exit(0);
|
|
26
|
+
});
|
|
27
|
+
// Start the server
|
|
28
|
+
main().catch((error) => {
|
|
29
|
+
console.error('Unhandled error:', error);
|
|
30
|
+
process.exit(1);
|
|
31
|
+
});
|
|
32
|
+
//# sourceMappingURL=cli.js.map
|
package/dist/cli.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";;;AAEA,mDAAmD;AAEnD;;GAEG;AACH,KAAK,UAAU,IAAI;IACjB,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,IAAI,gCAAgB,EAAE,CAAC;QACtC,MAAM,MAAM,CAAC,GAAG,EAAE,CAAC;IACrB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,qCAAqC,EAAE,KAAK,CAAC,CAAC;QAC5D,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC;AAED,wCAAwC;AACxC,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE;IACxB,OAAO,CAAC,KAAK,CAAC,qCAAqC,CAAC,CAAC;IACrD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC;AAEH,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,GAAG,EAAE;IACzB,OAAO,CAAC,KAAK,CAAC,qCAAqC,CAAC,CAAC;IACrD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC;AAEH,mBAAmB;AACnB,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACrB,OAAO,CAAC,KAAK,CAAC,kBAAkB,EAAE,KAAK,CAAC,CAAC;IACzC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Meetbot MCP Package
|
|
3
|
+
* Model Context Protocol server for Meetbot Booking Page API
|
|
4
|
+
*/
|
|
5
|
+
export { MeetbotMCPServer } from './mcp-server.js';
|
|
6
|
+
export { MeetbotClient } from './meetbot-client.js';
|
|
7
|
+
export type { BookSlot, BookSlotRequest, GetSlotsParams, GetInfoParams, PageInfo, Pages, SchedulingPage, Slots, SlotDetails, MeetbotConfig, ApiError, ApiResponse, } from './types.js';
|
|
8
|
+
export { BookSlotSchema, BookSlotRequestSchema, GetSlotsParamsSchema, GetInfoParamsSchema, PageInfoSchema, PagesSchema, SchedulingPageSchema, SlotsSchema, SlotDetailsSchema, MeetbotConfigSchema, ApiErrorSchema, } from './schemas.js';
|
|
9
|
+
export type { ValidatedBookSlot, ValidatedPageInfo, ValidatedSchedulingPage, ValidatedPages, ValidatedSlots, ValidatedBookSlotRequest, ValidatedGetSlotsParams, ValidatedGetInfoParams, ValidatedMeetbotConfig, } from './schemas.js';
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGpD,YAAY,EACV,QAAQ,EACR,eAAe,EACf,cAAc,EACd,aAAa,EACb,QAAQ,EACR,KAAK,EACL,cAAc,EACd,KAAK,EACL,WAAW,EACX,aAAa,EACb,QAAQ,EACR,WAAW,GACZ,MAAM,YAAY,CAAC;AAGpB,OAAO,EACL,cAAc,EACd,qBAAqB,EACrB,oBAAoB,EACpB,mBAAmB,EACnB,cAAc,EACd,WAAW,EACX,oBAAoB,EACpB,WAAW,EACX,iBAAiB,EACjB,mBAAmB,EACnB,cAAc,GACf,MAAM,cAAc,CAAC;AAGtB,YAAY,EACV,iBAAiB,EACjB,iBAAiB,EACjB,uBAAuB,EACvB,cAAc,EACd,cAAc,EACd,wBAAwB,EACxB,uBAAuB,EACvB,sBAAsB,EACtB,sBAAsB,GACvB,MAAM,cAAc,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Meetbot MCP Package
|
|
4
|
+
* Model Context Protocol server for Meetbot Booking Page API
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.ApiErrorSchema = exports.MeetbotConfigSchema = exports.SlotDetailsSchema = exports.SlotsSchema = exports.SchedulingPageSchema = exports.PagesSchema = exports.PageInfoSchema = exports.GetInfoParamsSchema = exports.GetSlotsParamsSchema = exports.BookSlotRequestSchema = exports.BookSlotSchema = exports.MeetbotClient = exports.MeetbotMCPServer = void 0;
|
|
8
|
+
// Export main classes
|
|
9
|
+
var mcp_server_js_1 = require("./mcp-server.js");
|
|
10
|
+
Object.defineProperty(exports, "MeetbotMCPServer", { enumerable: true, get: function () { return mcp_server_js_1.MeetbotMCPServer; } });
|
|
11
|
+
var meetbot_client_js_1 = require("./meetbot-client.js");
|
|
12
|
+
Object.defineProperty(exports, "MeetbotClient", { enumerable: true, get: function () { return meetbot_client_js_1.MeetbotClient; } });
|
|
13
|
+
// Export schemas
|
|
14
|
+
var schemas_js_1 = require("./schemas.js");
|
|
15
|
+
Object.defineProperty(exports, "BookSlotSchema", { enumerable: true, get: function () { return schemas_js_1.BookSlotSchema; } });
|
|
16
|
+
Object.defineProperty(exports, "BookSlotRequestSchema", { enumerable: true, get: function () { return schemas_js_1.BookSlotRequestSchema; } });
|
|
17
|
+
Object.defineProperty(exports, "GetSlotsParamsSchema", { enumerable: true, get: function () { return schemas_js_1.GetSlotsParamsSchema; } });
|
|
18
|
+
Object.defineProperty(exports, "GetInfoParamsSchema", { enumerable: true, get: function () { return schemas_js_1.GetInfoParamsSchema; } });
|
|
19
|
+
Object.defineProperty(exports, "PageInfoSchema", { enumerable: true, get: function () { return schemas_js_1.PageInfoSchema; } });
|
|
20
|
+
Object.defineProperty(exports, "PagesSchema", { enumerable: true, get: function () { return schemas_js_1.PagesSchema; } });
|
|
21
|
+
Object.defineProperty(exports, "SchedulingPageSchema", { enumerable: true, get: function () { return schemas_js_1.SchedulingPageSchema; } });
|
|
22
|
+
Object.defineProperty(exports, "SlotsSchema", { enumerable: true, get: function () { return schemas_js_1.SlotsSchema; } });
|
|
23
|
+
Object.defineProperty(exports, "SlotDetailsSchema", { enumerable: true, get: function () { return schemas_js_1.SlotDetailsSchema; } });
|
|
24
|
+
Object.defineProperty(exports, "MeetbotConfigSchema", { enumerable: true, get: function () { return schemas_js_1.MeetbotConfigSchema; } });
|
|
25
|
+
Object.defineProperty(exports, "ApiErrorSchema", { enumerable: true, get: function () { return schemas_js_1.ApiErrorSchema; } });
|
|
26
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,sBAAsB;AACtB,iDAAmD;AAA1C,iHAAA,gBAAgB,OAAA;AACzB,yDAAoD;AAA3C,kHAAA,aAAa,OAAA;AAkBtB,iBAAiB;AACjB,2CAYsB;AAXpB,4GAAA,cAAc,OAAA;AACd,mHAAA,qBAAqB,OAAA;AACrB,kHAAA,oBAAoB,OAAA;AACpB,iHAAA,mBAAmB,OAAA;AACnB,4GAAA,cAAc,OAAA;AACd,yGAAA,WAAW,OAAA;AACX,kHAAA,oBAAoB,OAAA;AACpB,yGAAA,WAAW,OAAA;AACX,+GAAA,iBAAiB,OAAA;AACjB,iHAAA,mBAAmB,OAAA;AACnB,4GAAA,cAAc,OAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Server for Meetbot Booking Page API
|
|
3
|
+
*/
|
|
4
|
+
export declare class MeetbotMCPServer {
|
|
5
|
+
private server;
|
|
6
|
+
private client;
|
|
7
|
+
constructor();
|
|
8
|
+
private setupToolHandlers;
|
|
9
|
+
private handleConfigureMeetbot;
|
|
10
|
+
private handleGetSchedulingPages;
|
|
11
|
+
private handleGetPageInfo;
|
|
12
|
+
private handleGetAvailableSlots;
|
|
13
|
+
private handleBookMeeting;
|
|
14
|
+
private handleHealthCheck;
|
|
15
|
+
/**
|
|
16
|
+
* Start the MCP server
|
|
17
|
+
*/
|
|
18
|
+
run(): Promise<void>;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=mcp-server.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp-server.d.ts","sourceRoot":"","sources":["../src/mcp-server.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,MAAM,CAA8B;;IAa5C,OAAO,CAAC,iBAAiB;YAsKX,sBAAsB;YAyBtB,wBAAwB;YAqBxB,iBAAiB;YAgBjB,uBAAuB;YAsBvB,iBAAiB;YAgBjB,iBAAiB;IAkB/B;;OAEG;IACG,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAK3B"}
|
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MeetbotMCPServer = void 0;
|
|
4
|
+
const index_js_1 = require("@modelcontextprotocol/sdk/server/index.js");
|
|
5
|
+
const stdio_js_1 = require("@modelcontextprotocol/sdk/server/stdio.js");
|
|
6
|
+
const types_js_1 = require("@modelcontextprotocol/sdk/types.js");
|
|
7
|
+
const meetbot_client_js_1 = require("./meetbot-client.js");
|
|
8
|
+
/**
|
|
9
|
+
* MCP Server for Meetbot Booking Page API
|
|
10
|
+
*/
|
|
11
|
+
class MeetbotMCPServer {
|
|
12
|
+
server;
|
|
13
|
+
client = null;
|
|
14
|
+
constructor() {
|
|
15
|
+
this.server = new index_js_1.Server({
|
|
16
|
+
name: 'meetbot-mcp',
|
|
17
|
+
version: '1.0.0',
|
|
18
|
+
});
|
|
19
|
+
this.setupToolHandlers();
|
|
20
|
+
}
|
|
21
|
+
setupToolHandlers() {
|
|
22
|
+
// List available tools
|
|
23
|
+
this.server.setRequestHandler(types_js_1.ListToolsRequestSchema, async () => {
|
|
24
|
+
return {
|
|
25
|
+
tools: [
|
|
26
|
+
{
|
|
27
|
+
name: 'configure_meetbot',
|
|
28
|
+
description: 'Configure the Meetbot API client with base URL and authentication',
|
|
29
|
+
inputSchema: {
|
|
30
|
+
type: 'object',
|
|
31
|
+
properties: {
|
|
32
|
+
baseUrl: {
|
|
33
|
+
type: 'string',
|
|
34
|
+
description: 'Base URL for the Meetbot API (e.g., https://api.meet.bot)',
|
|
35
|
+
},
|
|
36
|
+
authToken: {
|
|
37
|
+
type: 'string',
|
|
38
|
+
description: 'Bearer token for authentication (optional)',
|
|
39
|
+
},
|
|
40
|
+
sessionId: {
|
|
41
|
+
type: 'string',
|
|
42
|
+
description: 'Session ID for cookie authentication (optional)',
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
required: ['baseUrl'],
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
name: 'get_scheduling_pages',
|
|
50
|
+
description: 'Get all scheduling pages for the authenticated user',
|
|
51
|
+
inputSchema: {
|
|
52
|
+
type: 'object',
|
|
53
|
+
properties: {},
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
name: 'get_page_info',
|
|
58
|
+
description: 'Get information about a specific scheduling page',
|
|
59
|
+
inputSchema: {
|
|
60
|
+
type: 'object',
|
|
61
|
+
properties: {
|
|
62
|
+
page: {
|
|
63
|
+
type: 'string',
|
|
64
|
+
description: 'The URL of the scheduling page',
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
required: ['page'],
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
name: 'get_available_slots',
|
|
72
|
+
description: 'Get available booking slots for a scheduling page',
|
|
73
|
+
inputSchema: {
|
|
74
|
+
type: 'object',
|
|
75
|
+
properties: {
|
|
76
|
+
page: {
|
|
77
|
+
type: 'string',
|
|
78
|
+
description: 'The URL of the scheduling page',
|
|
79
|
+
},
|
|
80
|
+
count: {
|
|
81
|
+
type: 'number',
|
|
82
|
+
description: 'Maximum number of slots to return',
|
|
83
|
+
},
|
|
84
|
+
start: {
|
|
85
|
+
type: 'string',
|
|
86
|
+
description: 'Start date in YYYY-MM-DD format',
|
|
87
|
+
},
|
|
88
|
+
end: {
|
|
89
|
+
type: 'string',
|
|
90
|
+
description: 'End date in YYYY-MM-DD format',
|
|
91
|
+
},
|
|
92
|
+
timezone: {
|
|
93
|
+
type: 'string',
|
|
94
|
+
description: 'Timezone in IANA format (e.g., America/New_York)',
|
|
95
|
+
},
|
|
96
|
+
booking_link: {
|
|
97
|
+
type: 'boolean',
|
|
98
|
+
description: 'Include shareable booking links',
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
required: ['page'],
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
name: 'book_meeting',
|
|
106
|
+
description: 'Book a new meeting slot',
|
|
107
|
+
inputSchema: {
|
|
108
|
+
type: 'object',
|
|
109
|
+
properties: {
|
|
110
|
+
page: {
|
|
111
|
+
type: 'string',
|
|
112
|
+
description: 'The URL of the scheduling page',
|
|
113
|
+
},
|
|
114
|
+
guest_email: {
|
|
115
|
+
type: 'string',
|
|
116
|
+
description: 'Email address of the guest',
|
|
117
|
+
},
|
|
118
|
+
guest_name: {
|
|
119
|
+
type: 'string',
|
|
120
|
+
description: 'Name of the guest',
|
|
121
|
+
},
|
|
122
|
+
notes: {
|
|
123
|
+
type: 'string',
|
|
124
|
+
description: 'Additional notes for the meeting',
|
|
125
|
+
},
|
|
126
|
+
start: {
|
|
127
|
+
type: 'string',
|
|
128
|
+
description: 'Start time in ISO 8601 format',
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
required: ['page', 'guest_email', 'guest_name', 'start'],
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
name: 'health_check',
|
|
136
|
+
description: 'Check if the Meetbot API client is properly configured and can connect',
|
|
137
|
+
inputSchema: {
|
|
138
|
+
type: 'object',
|
|
139
|
+
properties: {},
|
|
140
|
+
},
|
|
141
|
+
},
|
|
142
|
+
],
|
|
143
|
+
};
|
|
144
|
+
});
|
|
145
|
+
// Handle tool calls
|
|
146
|
+
this.server.setRequestHandler(types_js_1.CallToolRequestSchema, async (request) => {
|
|
147
|
+
const { name, arguments: args } = request.params;
|
|
148
|
+
try {
|
|
149
|
+
switch (name) {
|
|
150
|
+
case 'configure_meetbot':
|
|
151
|
+
return await this.handleConfigureMeetbot(args);
|
|
152
|
+
case 'get_scheduling_pages':
|
|
153
|
+
return await this.handleGetSchedulingPages(args);
|
|
154
|
+
case 'get_page_info':
|
|
155
|
+
return await this.handleGetPageInfo(args);
|
|
156
|
+
case 'get_available_slots':
|
|
157
|
+
return await this.handleGetAvailableSlots(args);
|
|
158
|
+
case 'book_meeting':
|
|
159
|
+
return await this.handleBookMeeting(args);
|
|
160
|
+
case 'health_check':
|
|
161
|
+
return await this.handleHealthCheck(args);
|
|
162
|
+
default:
|
|
163
|
+
throw new Error(`Unknown tool: ${name}`);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
catch (error) {
|
|
167
|
+
return {
|
|
168
|
+
content: [
|
|
169
|
+
{
|
|
170
|
+
type: 'text',
|
|
171
|
+
text: `Error: ${error instanceof Error ? error.message : String(error)}`,
|
|
172
|
+
},
|
|
173
|
+
],
|
|
174
|
+
isError: true,
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
async handleConfigureMeetbot(args) {
|
|
180
|
+
if (!this.client) {
|
|
181
|
+
this.client = new meetbot_client_js_1.MeetbotClient(args);
|
|
182
|
+
return {
|
|
183
|
+
content: [
|
|
184
|
+
{
|
|
185
|
+
type: 'text',
|
|
186
|
+
text: 'Meetbot API client configured successfully.',
|
|
187
|
+
},
|
|
188
|
+
],
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
else {
|
|
192
|
+
// Reconfigure existing client
|
|
193
|
+
this.client = new meetbot_client_js_1.MeetbotClient(args);
|
|
194
|
+
return {
|
|
195
|
+
content: [
|
|
196
|
+
{
|
|
197
|
+
type: 'text',
|
|
198
|
+
text: 'Meetbot API client reconfigured successfully.',
|
|
199
|
+
},
|
|
200
|
+
],
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
async handleGetSchedulingPages(_args) {
|
|
205
|
+
if (!this.client) {
|
|
206
|
+
throw new Error('Meetbot client not configured. Please run configure_meetbot first.');
|
|
207
|
+
}
|
|
208
|
+
const pages = await this.client.getPages();
|
|
209
|
+
return {
|
|
210
|
+
content: [
|
|
211
|
+
{
|
|
212
|
+
type: 'text',
|
|
213
|
+
text: `Found ${pages.pages.length} scheduling pages for ${pages.email}:\n\n${pages.pages
|
|
214
|
+
.map((page) => `• ${page.title} (${page.duration} min) - ${page.url}`)
|
|
215
|
+
.join('\n')}`,
|
|
216
|
+
},
|
|
217
|
+
],
|
|
218
|
+
};
|
|
219
|
+
}
|
|
220
|
+
async handleGetPageInfo(args) {
|
|
221
|
+
if (!this.client) {
|
|
222
|
+
throw new Error('Meetbot client not configured. Please run configure_meetbot first.');
|
|
223
|
+
}
|
|
224
|
+
const pageInfo = await this.client.getPageInfo(args);
|
|
225
|
+
return {
|
|
226
|
+
content: [
|
|
227
|
+
{
|
|
228
|
+
type: 'text',
|
|
229
|
+
text: `Page Information:\n\nTitle: ${pageInfo.title}\nDuration: ${pageInfo.duration} minutes\nOwner: ${pageInfo.owner_name}\nMax days ahead: ${pageInfo.max_days_into_the_future}\nURL: ${pageInfo.url}`,
|
|
230
|
+
},
|
|
231
|
+
],
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
async handleGetAvailableSlots(args) {
|
|
235
|
+
if (!this.client) {
|
|
236
|
+
throw new Error('Meetbot client not configured. Please run configure_meetbot first.');
|
|
237
|
+
}
|
|
238
|
+
const slots = await this.client.getSlots(args);
|
|
239
|
+
return {
|
|
240
|
+
content: [
|
|
241
|
+
{
|
|
242
|
+
type: 'text',
|
|
243
|
+
text: `Found ${slots.count} available slots (${slots.duration} min each):\n\n${slots.slots
|
|
244
|
+
.map((slot) => {
|
|
245
|
+
const date = new Date(slot.start).toLocaleString();
|
|
246
|
+
const urlInfo = slot.url ? `\n Booking link: ${slot.url}` : '';
|
|
247
|
+
return `• ${date}${urlInfo}`;
|
|
248
|
+
})
|
|
249
|
+
.join('\n\n')}`,
|
|
250
|
+
},
|
|
251
|
+
],
|
|
252
|
+
};
|
|
253
|
+
}
|
|
254
|
+
async handleBookMeeting(args) {
|
|
255
|
+
if (!this.client) {
|
|
256
|
+
throw new Error('Meetbot client not configured. Please run configure_meetbot first.');
|
|
257
|
+
}
|
|
258
|
+
const booking = await this.client.bookSlot(args);
|
|
259
|
+
return {
|
|
260
|
+
content: [
|
|
261
|
+
{
|
|
262
|
+
type: 'text',
|
|
263
|
+
text: `Meeting booked successfully!\n\nGuest: ${booking.guest_name} (${booking.guest_email})\nStart: ${new Date(booking.start).toLocaleString()}\nCalendar ID: ${booking.ical_uid}\nPage: ${booking.page}`,
|
|
264
|
+
},
|
|
265
|
+
],
|
|
266
|
+
};
|
|
267
|
+
}
|
|
268
|
+
async handleHealthCheck(_args) {
|
|
269
|
+
if (!this.client) {
|
|
270
|
+
throw new Error('Meetbot client not configured. Please run configure_meetbot first.');
|
|
271
|
+
}
|
|
272
|
+
const isHealthy = await this.client.healthCheck();
|
|
273
|
+
return {
|
|
274
|
+
content: [
|
|
275
|
+
{
|
|
276
|
+
type: 'text',
|
|
277
|
+
text: isHealthy
|
|
278
|
+
? '✅ Meetbot API client is healthy and can connect to the API.'
|
|
279
|
+
: '❌ Meetbot API client cannot connect to the API. Please check your configuration.',
|
|
280
|
+
},
|
|
281
|
+
],
|
|
282
|
+
};
|
|
283
|
+
}
|
|
284
|
+
/**
|
|
285
|
+
* Start the MCP server
|
|
286
|
+
*/
|
|
287
|
+
async run() {
|
|
288
|
+
const transport = new stdio_js_1.StdioServerTransport();
|
|
289
|
+
await this.server.connect(transport);
|
|
290
|
+
console.error('Meetbot MCP server started');
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
exports.MeetbotMCPServer = MeetbotMCPServer;
|
|
294
|
+
//# sourceMappingURL=mcp-server.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp-server.js","sourceRoot":"","sources":["../src/mcp-server.ts"],"names":[],"mappings":";;;AAAA,wEAAmE;AACnE,wEAAiF;AACjF,iEAAmG;AACnG,2DAAoD;AAEpD;;GAEG;AACH,MAAa,gBAAgB;IACnB,MAAM,CAAS;IACf,MAAM,GAAyB,IAAI,CAAC;IAE5C;QACE,IAAI,CAAC,MAAM,GAAG,IAAI,iBA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,oEAAoE,CAAC,CAAC;QACxF,CAAC;QAED,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACjD,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,0CAA0C,OAAO,CAAC,UAAU,KAAK,OAAO,CAAC,WAAW,aAAa,IAAI,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,cAAc,EAAE,kBAAkB,OAAO,CAAC,QAAQ,WAAW,OAAO,CAAC,IAAI,EAAE;iBAC3M;aACF;SACF,CAAC;IACJ,CAAC;IAEO,KAAK,CAAC,iBAAiB,CAAC,KAAU;QACxC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;YACjB,MAAM,IAAI,KAAK,CAAC,oEAAoE,CAAC,CAAC;QACxF,CAAC;QAED,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC;QAClD,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,SAAS;wBACb,CAAC,CAAC,6DAA6D;wBAC/D,CAAC,CAAC,kFAAkF;iBACvF;aACF;SACF,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,GAAG;QACP,MAAM,SAAS,GAAG,IAAI,+BAAoB,EAAE,CAAC;QAC7C,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;QACrC,OAAO,CAAC,KAAK,CAAC,4BAA4B,CAAC,CAAC;IAC9C,CAAC;CACF;AAnTD,4CAmTC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { BookSlot, BookSlotRequest, GetSlotsParams, GetInfoParams, PageInfo, Pages, Slots, MeetbotConfig } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Meetbot API Client for interacting with the booking page API
|
|
4
|
+
*/
|
|
5
|
+
export declare class MeetbotClient {
|
|
6
|
+
private readonly client;
|
|
7
|
+
private readonly config;
|
|
8
|
+
constructor(config: MeetbotConfig);
|
|
9
|
+
/**
|
|
10
|
+
* Get the scheduling pages for the authenticated user
|
|
11
|
+
*/
|
|
12
|
+
getPages(): Promise<Pages>;
|
|
13
|
+
/**
|
|
14
|
+
* Get information about a scheduling page
|
|
15
|
+
*/
|
|
16
|
+
getPageInfo(params: GetInfoParams): Promise<PageInfo>;
|
|
17
|
+
/**
|
|
18
|
+
* Get available booking slots with optional filters
|
|
19
|
+
*/
|
|
20
|
+
getSlots(params: GetSlotsParams): Promise<Slots>;
|
|
21
|
+
/**
|
|
22
|
+
* Book a new meeting
|
|
23
|
+
*/
|
|
24
|
+
bookSlot(request: BookSlotRequest): Promise<BookSlot>;
|
|
25
|
+
/**
|
|
26
|
+
* Check if the client is properly configured and can connect
|
|
27
|
+
*/
|
|
28
|
+
healthCheck(): Promise<boolean>;
|
|
29
|
+
/**
|
|
30
|
+
* Get the current configuration
|
|
31
|
+
*/
|
|
32
|
+
getConfig(): MeetbotConfig;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=meetbot-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"meetbot-client.d.ts","sourceRoot":"","sources":["../src/meetbot-client.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,EACR,eAAe,EACf,cAAc,EACd,aAAa,EACb,QAAQ,EACR,KAAK,EACL,KAAK,EACL,aAAa,EACd,MAAM,SAAS,CAAC;AAQjB;;GAEG;AACH,qBAAa,aAAa;IACxB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAgB;IACvC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAgB;gBAE3B,MAAM,EAAE,aAAa;IAsCjC;;OAEG;IACG,QAAQ,IAAI,OAAO,CAAC,KAAK,CAAC;IAKhC;;OAEG;IACG,WAAW,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,QAAQ,CAAC;IAQ3D;;OAEG;IACG,QAAQ,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,KAAK,CAAC;IAQtD;;OAEG;IACG,QAAQ,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,QAAQ,CAAC;IAM3D;;OAEG;IACG,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC;IAgBrC;;OAEG;IACH,SAAS,IAAI,aAAa;CAG3B"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.MeetbotClient = void 0;
|
|
7
|
+
const axios_1 = __importDefault(require("axios"));
|
|
8
|
+
const schemas_1 = require("./schemas");
|
|
9
|
+
/**
|
|
10
|
+
* Meetbot API Client for interacting with the booking page API
|
|
11
|
+
*/
|
|
12
|
+
class MeetbotClient {
|
|
13
|
+
client;
|
|
14
|
+
config;
|
|
15
|
+
constructor(config) {
|
|
16
|
+
// Validate configuration
|
|
17
|
+
const validatedConfig = schemas_1.MeetbotConfigSchema.parse(config);
|
|
18
|
+
this.config = validatedConfig;
|
|
19
|
+
// Create axios instance
|
|
20
|
+
this.client = axios_1.default.create({
|
|
21
|
+
baseURL: this.config.baseUrl,
|
|
22
|
+
timeout: 30000,
|
|
23
|
+
headers: {
|
|
24
|
+
'Content-Type': 'application/json',
|
|
25
|
+
'Accept': 'application/json',
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
// Add request interceptor for authentication
|
|
29
|
+
this.client.interceptors.request.use((config) => {
|
|
30
|
+
if (this.config.authToken) {
|
|
31
|
+
config.headers.Authorization = `Bearer ${this.config.authToken}`;
|
|
32
|
+
}
|
|
33
|
+
if (this.config.sessionId) {
|
|
34
|
+
config.headers['Cookie'] = `sessionid=${this.config.sessionId}`;
|
|
35
|
+
}
|
|
36
|
+
return config;
|
|
37
|
+
});
|
|
38
|
+
// Add response interceptor for error handling
|
|
39
|
+
this.client.interceptors.response.use((response) => response, (error) => {
|
|
40
|
+
if (error.response?.data) {
|
|
41
|
+
throw new Error(`API Error: ${JSON.stringify(error.response.data)}`);
|
|
42
|
+
}
|
|
43
|
+
throw error;
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Get the scheduling pages for the authenticated user
|
|
48
|
+
*/
|
|
49
|
+
async getPages() {
|
|
50
|
+
const response = await this.client.get('/v1/pages');
|
|
51
|
+
return response.data;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Get information about a scheduling page
|
|
55
|
+
*/
|
|
56
|
+
async getPageInfo(params) {
|
|
57
|
+
const validatedParams = schemas_1.GetInfoParamsSchema.parse(params);
|
|
58
|
+
const response = await this.client.get('/v1/info', {
|
|
59
|
+
params: validatedParams,
|
|
60
|
+
});
|
|
61
|
+
return response.data;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Get available booking slots with optional filters
|
|
65
|
+
*/
|
|
66
|
+
async getSlots(params) {
|
|
67
|
+
const validatedParams = schemas_1.GetSlotsParamsSchema.parse(params);
|
|
68
|
+
const response = await this.client.get('/v1/slots', {
|
|
69
|
+
params: validatedParams,
|
|
70
|
+
});
|
|
71
|
+
return response.data;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Book a new meeting
|
|
75
|
+
*/
|
|
76
|
+
async bookSlot(request) {
|
|
77
|
+
const validatedRequest = schemas_1.BookSlotRequestSchema.parse(request);
|
|
78
|
+
const response = await this.client.post('/v1/book', validatedRequest);
|
|
79
|
+
return response.data;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Check if the client is properly configured and can connect
|
|
83
|
+
*/
|
|
84
|
+
async healthCheck() {
|
|
85
|
+
try {
|
|
86
|
+
await this.client.get('/v1/info', {
|
|
87
|
+
params: { page: 'https://example.com/test' },
|
|
88
|
+
timeout: 5000,
|
|
89
|
+
});
|
|
90
|
+
return true;
|
|
91
|
+
}
|
|
92
|
+
catch (error) {
|
|
93
|
+
// We expect this to fail with a 400 due to invalid page URL, but it means the API is reachable
|
|
94
|
+
if (axios_1.default.isAxiosError(error) && error.response?.status === 400) {
|
|
95
|
+
return true;
|
|
96
|
+
}
|
|
97
|
+
return false;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Get the current configuration
|
|
102
|
+
*/
|
|
103
|
+
getConfig() {
|
|
104
|
+
return { ...this.config };
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
exports.MeetbotClient = MeetbotClient;
|
|
108
|
+
//# sourceMappingURL=meetbot-client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"meetbot-client.js","sourceRoot":"","sources":["../src/meetbot-client.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA6C;AAW7C,uCAKmB;AAEnB;;GAEG;AACH,MAAa,aAAa;IACP,MAAM,CAAgB;IACtB,MAAM,CAAgB;IAEvC,YAAY,MAAqB;QAC/B,yBAAyB;QACzB,MAAM,eAAe,GAAG,6BAAmB,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QAC1D,IAAI,CAAC,MAAM,GAAG,eAAe,CAAC;QAE9B,wBAAwB;QACxB,IAAI,CAAC,MAAM,GAAG,eAAK,CAAC,MAAM,CAAC;YACzB,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO;YAC5B,OAAO,EAAE,KAAK;YACd,OAAO,EAAE;gBACP,cAAc,EAAE,kBAAkB;gBAClC,QAAQ,EAAE,kBAAkB;aAC7B;SACF,CAAC,CAAC;QAEH,6CAA6C;QAC7C,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;YAC9C,IAAI,IAAI,CAAC,MAAM,CA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5
|
+
export declare const BookSlotSchema: z.ZodObject<{
|
|
6
|
+
success: z.ZodBoolean;
|
|
7
|
+
page: z.ZodString;
|
|
8
|
+
guest_email: z.ZodString;
|
|
9
|
+
guest_name: z.ZodString;
|
|
10
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
11
|
+
start: z.ZodString;
|
|
12
|
+
ical_uid: z.ZodString;
|
|
13
|
+
}, "strip", z.ZodTypeAny, {
|
|
14
|
+
success: boolean;
|
|
15
|
+
page: string;
|
|
16
|
+
guest_email: string;
|
|
17
|
+
guest_name: string;
|
|
18
|
+
start: string;
|
|
19
|
+
ical_uid: string;
|
|
20
|
+
notes?: string | undefined;
|
|
21
|
+
}, {
|
|
22
|
+
success: boolean;
|
|
23
|
+
page: string;
|
|
24
|
+
guest_email: string;
|
|
25
|
+
guest_name: string;
|
|
26
|
+
start: string;
|
|
27
|
+
ical_uid: string;
|
|
28
|
+
notes?: string | undefined;
|
|
29
|
+
}>;
|
|
30
|
+
export declare const PageInfoSchema: z.ZodObject<{
|
|
31
|
+
title: z.ZodString;
|
|
32
|
+
duration: z.ZodNumber;
|
|
33
|
+
url: z.ZodString;
|
|
34
|
+
owner_name: z.ZodString;
|
|
35
|
+
max_days_into_the_future: z.ZodNumber;
|
|
36
|
+
}, "strip", z.ZodTypeAny, {
|
|
37
|
+
title: string;
|
|
38
|
+
duration: number;
|
|
39
|
+
url: string;
|
|
40
|
+
owner_name: string;
|
|
41
|
+
max_days_into_the_future: number;
|
|
42
|
+
}, {
|
|
43
|
+
title: string;
|
|
44
|
+
duration: number;
|
|
45
|
+
url: string;
|
|
46
|
+
owner_name: string;
|
|
47
|
+
max_days_into_the_future: number;
|
|
48
|
+
}>;
|
|
49
|
+
export declare const SchedulingPageSchema: z.ZodObject<{
|
|
50
|
+
title: z.ZodString;
|
|
51
|
+
duration: z.ZodNumber;
|
|
52
|
+
url: z.ZodString;
|
|
53
|
+
}, "strip", z.ZodTypeAny, {
|
|
54
|
+
title: string;
|
|
55
|
+
duration: number;
|
|
56
|
+
url: string;
|
|
57
|
+
}, {
|
|
58
|
+
title: string;
|
|
59
|
+
duration: number;
|
|
60
|
+
url: string;
|
|
61
|
+
}>;
|
|
62
|
+
export declare const PagesSchema: z.ZodObject<{
|
|
63
|
+
email: z.ZodString;
|
|
64
|
+
pages: z.ZodArray<z.ZodObject<{
|
|
65
|
+
title: z.ZodString;
|
|
66
|
+
duration: z.ZodNumber;
|
|
67
|
+
url: z.ZodString;
|
|
68
|
+
}, "strip", z.ZodTypeAny, {
|
|
69
|
+
title: string;
|
|
70
|
+
duration: number;
|
|
71
|
+
url: string;
|
|
72
|
+
}, {
|
|
73
|
+
title: string;
|
|
74
|
+
duration: number;
|
|
75
|
+
url: string;
|
|
76
|
+
}>, "many">;
|
|
77
|
+
}, "strip", z.ZodTypeAny, {
|
|
78
|
+
email: string;
|
|
79
|
+
pages: {
|
|
80
|
+
title: string;
|
|
81
|
+
duration: number;
|
|
82
|
+
url: string;
|
|
83
|
+
}[];
|
|
84
|
+
}, {
|
|
85
|
+
email: string;
|
|
86
|
+
pages: {
|
|
87
|
+
title: string;
|
|
88
|
+
duration: number;
|
|
89
|
+
url: string;
|
|
90
|
+
}[];
|
|
91
|
+
}>;
|
|
92
|
+
export declare const SlotDetailsSchema: z.ZodObject<{
|
|
93
|
+
start: z.ZodString;
|
|
94
|
+
url: z.ZodOptional<z.ZodString>;
|
|
95
|
+
}, "strip", z.ZodTypeAny, {
|
|
96
|
+
start: string;
|
|
97
|
+
url?: string | undefined;
|
|
98
|
+
}, {
|
|
99
|
+
start: string;
|
|
100
|
+
url?: string | undefined;
|
|
101
|
+
}>;
|
|
102
|
+
export declare const SlotsSchema: z.ZodObject<{
|
|
103
|
+
count: z.ZodNumber;
|
|
104
|
+
duration: z.ZodNumber;
|
|
105
|
+
slots: z.ZodArray<z.ZodObject<{
|
|
106
|
+
start: z.ZodString;
|
|
107
|
+
url: z.ZodOptional<z.ZodString>;
|
|
108
|
+
}, "strip", z.ZodTypeAny, {
|
|
109
|
+
start: string;
|
|
110
|
+
url?: string | undefined;
|
|
111
|
+
}, {
|
|
112
|
+
start: string;
|
|
113
|
+
url?: string | undefined;
|
|
114
|
+
}>, "many">;
|
|
115
|
+
}, "strip", z.ZodTypeAny, {
|
|
116
|
+
duration: number;
|
|
117
|
+
count: number;
|
|
118
|
+
slots: {
|
|
119
|
+
start: string;
|
|
120
|
+
url?: string | undefined;
|
|
121
|
+
}[];
|
|
122
|
+
}, {
|
|
123
|
+
duration: number;
|
|
124
|
+
count: number;
|
|
125
|
+
slots: {
|
|
126
|
+
start: string;
|
|
127
|
+
url?: string | undefined;
|
|
128
|
+
}[];
|
|
129
|
+
}>;
|
|
130
|
+
export declare const BookSlotRequestSchema: z.ZodObject<{
|
|
131
|
+
page: z.ZodString;
|
|
132
|
+
guest_email: z.ZodString;
|
|
133
|
+
guest_name: z.ZodString;
|
|
134
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
135
|
+
start: z.ZodString;
|
|
136
|
+
}, "strip", z.ZodTypeAny, {
|
|
137
|
+
page: string;
|
|
138
|
+
guest_email: string;
|
|
139
|
+
guest_name: string;
|
|
140
|
+
start: string;
|
|
141
|
+
notes?: string | undefined;
|
|
142
|
+
}, {
|
|
143
|
+
page: string;
|
|
144
|
+
guest_email: string;
|
|
145
|
+
guest_name: string;
|
|
146
|
+
start: string;
|
|
147
|
+
notes?: string | undefined;
|
|
148
|
+
}>;
|
|
149
|
+
export declare const GetSlotsParamsSchema: z.ZodObject<{
|
|
150
|
+
page: z.ZodString;
|
|
151
|
+
count: z.ZodOptional<z.ZodNumber>;
|
|
152
|
+
start: z.ZodOptional<z.ZodString>;
|
|
153
|
+
end: z.ZodOptional<z.ZodString>;
|
|
154
|
+
timezone: z.ZodOptional<z.ZodString>;
|
|
155
|
+
booking_link: z.ZodOptional<z.ZodBoolean>;
|
|
156
|
+
}, "strip", z.ZodTypeAny, {
|
|
157
|
+
page: string;
|
|
158
|
+
start?: string | undefined;
|
|
159
|
+
count?: number | undefined;
|
|
160
|
+
end?: string | undefined;
|
|
161
|
+
timezone?: string | undefined;
|
|
162
|
+
booking_link?: boolean | undefined;
|
|
163
|
+
}, {
|
|
164
|
+
page: string;
|
|
165
|
+
start?: string | undefined;
|
|
166
|
+
count?: number | undefined;
|
|
167
|
+
end?: string | undefined;
|
|
168
|
+
timezone?: string | undefined;
|
|
169
|
+
booking_link?: boolean | undefined;
|
|
170
|
+
}>;
|
|
171
|
+
export declare const GetInfoParamsSchema: z.ZodObject<{
|
|
172
|
+
page: z.ZodString;
|
|
173
|
+
}, "strip", z.ZodTypeAny, {
|
|
174
|
+
page: string;
|
|
175
|
+
}, {
|
|
176
|
+
page: string;
|
|
177
|
+
}>;
|
|
178
|
+
export declare const ApiErrorSchema: z.ZodObject<{
|
|
179
|
+
success: z.ZodLiteral<false>;
|
|
180
|
+
error: z.ZodString;
|
|
181
|
+
errors: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>;
|
|
182
|
+
}, "strip", z.ZodTypeAny, {
|
|
183
|
+
success: false;
|
|
184
|
+
error: string;
|
|
185
|
+
errors?: Record<string, string[]> | undefined;
|
|
186
|
+
}, {
|
|
187
|
+
success: false;
|
|
188
|
+
error: string;
|
|
189
|
+
errors?: Record<string, string[]> | undefined;
|
|
190
|
+
}>;
|
|
191
|
+
export declare const MeetbotConfigSchema: z.ZodObject<{
|
|
192
|
+
baseUrl: z.ZodString;
|
|
193
|
+
authToken: z.ZodOptional<z.ZodString>;
|
|
194
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
195
|
+
}, "strip", z.ZodTypeAny, {
|
|
196
|
+
baseUrl: string;
|
|
197
|
+
authToken?: string | undefined;
|
|
198
|
+
sessionId?: string | undefined;
|
|
199
|
+
}, {
|
|
200
|
+
baseUrl: string;
|
|
201
|
+
authToken?: string | undefined;
|
|
202
|
+
sessionId?: string | undefined;
|
|
203
|
+
}>;
|
|
204
|
+
export type ValidatedBookSlot = z.infer<typeof BookSlotSchema>;
|
|
205
|
+
export type ValidatedPageInfo = z.infer<typeof PageInfoSchema>;
|
|
206
|
+
export type ValidatedSchedulingPage = z.infer<typeof SchedulingPageSchema>;
|
|
207
|
+
export type ValidatedPages = z.infer<typeof PagesSchema>;
|
|
208
|
+
export type ValidatedSlots = z.infer<typeof SlotsSchema>;
|
|
209
|
+
export type ValidatedBookSlotRequest = z.infer<typeof BookSlotRequestSchema>;
|
|
210
|
+
export type ValidatedGetSlotsParams = z.infer<typeof GetSlotsParamsSchema>;
|
|
211
|
+
export type ValidatedGetInfoParams = z.infer<typeof GetInfoParamsSchema>;
|
|
212
|
+
export type ValidatedMeetbotConfig = z.infer<typeof MeetbotConfigSchema>;
|
|
213
|
+
//# sourceMappingURL=schemas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AAEH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;EAQzB,CAAC;AAEH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;EAMzB,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;EAI/B,CAAC;AAEH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGtB,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;;EAG5B,CAAC;AAEH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;EAItB,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;EAMhC,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;EAO/B,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;EAE9B,CAAC;AAEH,eAAO,MAAM,cAAc;;;;;;;;;;;;EAIzB,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;EAI9B,CAAC;AAGH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAC/D,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAC/D,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAC3E,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AACzD,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AACzD,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAC7E,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAC3E,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AACzE,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
|
package/dist/schemas.js
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MeetbotConfigSchema = exports.ApiErrorSchema = exports.GetInfoParamsSchema = exports.GetSlotsParamsSchema = exports.BookSlotRequestSchema = exports.SlotsSchema = exports.SlotDetailsSchema = exports.PagesSchema = exports.SchedulingPageSchema = exports.PageInfoSchema = exports.BookSlotSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
/**
|
|
6
|
+
* Zod schemas for runtime validation of Meetbot API data
|
|
7
|
+
*/
|
|
8
|
+
exports.BookSlotSchema = zod_1.z.object({
|
|
9
|
+
success: zod_1.z.boolean(),
|
|
10
|
+
page: zod_1.z.string().url(),
|
|
11
|
+
guest_email: zod_1.z.string().email(),
|
|
12
|
+
guest_name: zod_1.z.string().min(1),
|
|
13
|
+
notes: zod_1.z.string().optional(),
|
|
14
|
+
start: zod_1.z.string().datetime(),
|
|
15
|
+
ical_uid: zod_1.z.string(),
|
|
16
|
+
});
|
|
17
|
+
exports.PageInfoSchema = zod_1.z.object({
|
|
18
|
+
title: zod_1.z.string(),
|
|
19
|
+
duration: zod_1.z.number().int().positive(),
|
|
20
|
+
url: zod_1.z.string().url(),
|
|
21
|
+
owner_name: zod_1.z.string(),
|
|
22
|
+
max_days_into_the_future: zod_1.z.number().int().positive(),
|
|
23
|
+
});
|
|
24
|
+
exports.SchedulingPageSchema = zod_1.z.object({
|
|
25
|
+
title: zod_1.z.string(),
|
|
26
|
+
duration: zod_1.z.number().int().positive(),
|
|
27
|
+
url: zod_1.z.string().url(),
|
|
28
|
+
});
|
|
29
|
+
exports.PagesSchema = zod_1.z.object({
|
|
30
|
+
email: zod_1.z.string().email(),
|
|
31
|
+
pages: zod_1.z.array(exports.SchedulingPageSchema),
|
|
32
|
+
});
|
|
33
|
+
exports.SlotDetailsSchema = zod_1.z.object({
|
|
34
|
+
start: zod_1.z.string().datetime(),
|
|
35
|
+
url: zod_1.z.string().url().optional(),
|
|
36
|
+
});
|
|
37
|
+
exports.SlotsSchema = zod_1.z.object({
|
|
38
|
+
count: zod_1.z.number().int().nonnegative(),
|
|
39
|
+
duration: zod_1.z.number().int().positive(),
|
|
40
|
+
slots: zod_1.z.array(exports.SlotDetailsSchema),
|
|
41
|
+
});
|
|
42
|
+
exports.BookSlotRequestSchema = zod_1.z.object({
|
|
43
|
+
page: zod_1.z.string().url(),
|
|
44
|
+
guest_email: zod_1.z.string().email(),
|
|
45
|
+
guest_name: zod_1.z.string().min(1),
|
|
46
|
+
notes: zod_1.z.string().optional(),
|
|
47
|
+
start: zod_1.z.string().datetime(),
|
|
48
|
+
});
|
|
49
|
+
exports.GetSlotsParamsSchema = zod_1.z.object({
|
|
50
|
+
page: zod_1.z.string().url(),
|
|
51
|
+
count: zod_1.z.number().int().positive().optional(),
|
|
52
|
+
start: zod_1.z.string().regex(/^\d{4}-\d{2}-\d{2}$/).optional(),
|
|
53
|
+
end: zod_1.z.string().regex(/^\d{4}-\d{2}-\d{2}$/).optional(),
|
|
54
|
+
timezone: zod_1.z.string().min(1).optional(),
|
|
55
|
+
booking_link: zod_1.z.boolean().optional(),
|
|
56
|
+
});
|
|
57
|
+
exports.GetInfoParamsSchema = zod_1.z.object({
|
|
58
|
+
page: zod_1.z.string().url(),
|
|
59
|
+
});
|
|
60
|
+
exports.ApiErrorSchema = zod_1.z.object({
|
|
61
|
+
success: zod_1.z.literal(false),
|
|
62
|
+
error: zod_1.z.string(),
|
|
63
|
+
errors: zod_1.z.record(zod_1.z.array(zod_1.z.string())).optional(),
|
|
64
|
+
});
|
|
65
|
+
exports.MeetbotConfigSchema = zod_1.z.object({
|
|
66
|
+
baseUrl: zod_1.z.string().url(),
|
|
67
|
+
authToken: zod_1.z.string().optional(),
|
|
68
|
+
sessionId: zod_1.z.string().optional(),
|
|
69
|
+
});
|
|
70
|
+
//# sourceMappingURL=schemas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB;;GAEG;AAEU,QAAA,cAAc,GAAG,OAAC,CAAC,MAAM,CAAC;IACrC,OAAO,EAAE,OAAC,CAAC,OAAO,EAAE;IACpB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;IACtB,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE;IAC/B,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC7B,KAAK,EAAE,OAAC,CAAC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CAAC;IAC1C,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;CACvB,CAAC,CAAC;AAEU,QAAA,cAAc,GAAG,OAAC,CAAC,MAAM,CAAC;IACrC,OAAO,EAAE,OAAC,CAAC,OAAO,CAAC,KAAK,CAAC;IACzB,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE;IACjB,MAAM,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,QAAQ,EAAE;CACjD,CAAC,CAAC;AAEU,QAAA,mBAAmB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC1C,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;IACzB,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACjC,CAAC,CAAC"}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type definitions for the Meetbot Booking Page API
|
|
3
|
+
* Based on OpenAPI 3.0.3 specification
|
|
4
|
+
*/
|
|
5
|
+
export interface BookSlot {
|
|
6
|
+
success: boolean;
|
|
7
|
+
page: string;
|
|
8
|
+
guest_email: string;
|
|
9
|
+
guest_name: string;
|
|
10
|
+
notes?: string;
|
|
11
|
+
start: string;
|
|
12
|
+
ical_uid: string;
|
|
13
|
+
}
|
|
14
|
+
export interface PageInfo {
|
|
15
|
+
title: string;
|
|
16
|
+
duration: number;
|
|
17
|
+
url: string;
|
|
18
|
+
owner_name: string;
|
|
19
|
+
max_days_into_the_future: number;
|
|
20
|
+
}
|
|
21
|
+
export interface SchedulingPage {
|
|
22
|
+
title: string;
|
|
23
|
+
duration: number;
|
|
24
|
+
url: string;
|
|
25
|
+
}
|
|
26
|
+
export interface Pages {
|
|
27
|
+
email: string;
|
|
28
|
+
pages: SchedulingPage[];
|
|
29
|
+
}
|
|
30
|
+
export interface SlotDetails {
|
|
31
|
+
start: string;
|
|
32
|
+
url?: string;
|
|
33
|
+
}
|
|
34
|
+
export interface Slots {
|
|
35
|
+
count: number;
|
|
36
|
+
duration: number;
|
|
37
|
+
slots: SlotDetails[];
|
|
38
|
+
}
|
|
39
|
+
export interface BookSlotRequest {
|
|
40
|
+
page: string;
|
|
41
|
+
guest_email: string;
|
|
42
|
+
guest_name: string;
|
|
43
|
+
notes?: string;
|
|
44
|
+
start: string;
|
|
45
|
+
}
|
|
46
|
+
export interface GetSlotsParams {
|
|
47
|
+
page: string;
|
|
48
|
+
count?: number;
|
|
49
|
+
start?: string;
|
|
50
|
+
end?: string;
|
|
51
|
+
timezone?: string;
|
|
52
|
+
booking_link?: boolean;
|
|
53
|
+
}
|
|
54
|
+
export interface GetInfoParams {
|
|
55
|
+
page: string;
|
|
56
|
+
}
|
|
57
|
+
export interface ApiError {
|
|
58
|
+
success: boolean;
|
|
59
|
+
error: string;
|
|
60
|
+
errors?: Record<string, string[]>;
|
|
61
|
+
}
|
|
62
|
+
export type ApiResponse<T> = T | ApiError;
|
|
63
|
+
export interface MeetbotConfig {
|
|
64
|
+
baseUrl: string;
|
|
65
|
+
authToken?: string | undefined;
|
|
66
|
+
sessionId?: string | undefined;
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,QAAQ;IACvB,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CA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E,MAAM,EAAE,CAAC,CAAC;CACnC;AAED,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC;AAE1C,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAChC"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";AAAA;;;GAGG"}
|
package/package.json
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@meetbot/mcp",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Model Context Protocol (MCP) server for Meetbot booking page API",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"bin": {
|
|
8
|
+
"meetbot-mcp": "dist/cli.js"
|
|
9
|
+
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"build": "tsc",
|
|
12
|
+
"dev": "tsc --watch",
|
|
13
|
+
"start": "node dist/cli.js",
|
|
14
|
+
"test": "jest",
|
|
15
|
+
"test:watch": "jest --watch",
|
|
16
|
+
"lint": "eslint src/**/*.ts",
|
|
17
|
+
"lint:fix": "eslint src/**/*.ts --fix",
|
|
18
|
+
"clean": "rm -rf dist",
|
|
19
|
+
"prebuild": "npm run clean"
|
|
20
|
+
},
|
|
21
|
+
"keywords": [
|
|
22
|
+
"mcp",
|
|
23
|
+
"model-context-protocol",
|
|
24
|
+
"meetbot",
|
|
25
|
+
"booking",
|
|
26
|
+
"scheduling",
|
|
27
|
+
"calendar",
|
|
28
|
+
"api"
|
|
29
|
+
],
|
|
30
|
+
"author": "Meetbot Team",
|
|
31
|
+
"license": "MIT",
|
|
32
|
+
"repository": {
|
|
33
|
+
"type": "git",
|
|
34
|
+
"url": "https://gitlab.com/meetbot/meetbot-mcp.git"
|
|
35
|
+
},
|
|
36
|
+
"bugs": {
|
|
37
|
+
"url": "https://gitlab.com/meetbot/meetbot-mcp/-/issues"
|
|
38
|
+
},
|
|
39
|
+
"homepage": "https://gitlab.com/meetbot/meetbot-mcp",
|
|
40
|
+
"dependencies": {
|
|
41
|
+
"@modelcontextprotocol/sdk": "^0.4.0",
|
|
42
|
+
"axios": "^1.6.0",
|
|
43
|
+
"zod": "^3.22.0"
|
|
44
|
+
},
|
|
45
|
+
"devDependencies": {
|
|
46
|
+
"@types/jest": "^30.0.0",
|
|
47
|
+
"@types/node": "^20.0.0",
|
|
48
|
+
"@typescript-eslint/eslint-plugin": "^6.0.0",
|
|
49
|
+
"@typescript-eslint/parser": "^6.0.0",
|
|
50
|
+
"eslint": "^8.0.0",
|
|
51
|
+
"jest": "^29.0.0",
|
|
52
|
+
"ts-jest": "^29.0.0",
|
|
53
|
+
"typescript": "^5.0.0"
|
|
54
|
+
},
|
|
55
|
+
"engines": {
|
|
56
|
+
"node": ">=18.0.0"
|
|
57
|
+
},
|
|
58
|
+
"files": [
|
|
59
|
+
"dist/**/*",
|
|
60
|
+
"README.md",
|
|
61
|
+
"LICENSE"
|
|
62
|
+
]
|
|
63
|
+
}
|