langflow-mcp-server 1.2.0 → 2.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.
Files changed (67) hide show
  1. package/.env.example +5 -0
  2. package/LICENSE +1 -1
  3. package/README.md +174 -3
  4. package/dist/__tests__/fixtures/advanced-execution.d.ts +22 -0
  5. package/dist/__tests__/fixtures/advanced-execution.d.ts.map +1 -0
  6. package/dist/__tests__/fixtures/advanced-execution.js +77 -0
  7. package/dist/__tests__/fixtures/advanced-execution.js.map +1 -0
  8. package/dist/__tests__/fixtures/api-keys.d.ts +8 -0
  9. package/dist/__tests__/fixtures/api-keys.d.ts.map +1 -0
  10. package/dist/__tests__/fixtures/api-keys.js +38 -0
  11. package/dist/__tests__/fixtures/api-keys.js.map +1 -0
  12. package/dist/__tests__/fixtures/auth.d.ts +9 -0
  13. package/dist/__tests__/fixtures/auth.d.ts.map +1 -0
  14. package/dist/__tests__/fixtures/auth.js +26 -0
  15. package/dist/__tests__/fixtures/auth.js.map +1 -0
  16. package/dist/__tests__/fixtures/custom-components.d.ts +5 -0
  17. package/dist/__tests__/fixtures/custom-components.d.ts.map +1 -0
  18. package/dist/__tests__/fixtures/custom-components.js +49 -0
  19. package/dist/__tests__/fixtures/custom-components.js.map +1 -0
  20. package/dist/__tests__/fixtures/files.d.ts +14 -0
  21. package/dist/__tests__/fixtures/files.d.ts.map +1 -0
  22. package/dist/__tests__/fixtures/files.js +41 -0
  23. package/dist/__tests__/fixtures/files.js.map +1 -0
  24. package/dist/__tests__/fixtures/misc.d.ts +18 -0
  25. package/dist/__tests__/fixtures/misc.d.ts.map +1 -0
  26. package/dist/__tests__/fixtures/misc.js +101 -0
  27. package/dist/__tests__/fixtures/misc.js.map +1 -0
  28. package/dist/__tests__/fixtures/monitoring.d.ts +13 -0
  29. package/dist/__tests__/fixtures/monitoring.d.ts.map +1 -0
  30. package/dist/__tests__/fixtures/monitoring.js +88 -0
  31. package/dist/__tests__/fixtures/monitoring.js.map +1 -0
  32. package/dist/__tests__/fixtures/store.d.ts +18 -0
  33. package/dist/__tests__/fixtures/store.d.ts.map +1 -0
  34. package/dist/__tests__/fixtures/store.js +96 -0
  35. package/dist/__tests__/fixtures/store.js.map +1 -0
  36. package/dist/__tests__/fixtures/users.d.ts +9 -0
  37. package/dist/__tests__/fixtures/users.d.ts.map +1 -0
  38. package/dist/__tests__/fixtures/users.js +55 -0
  39. package/dist/__tests__/fixtures/users.js.map +1 -0
  40. package/dist/__tests__/fixtures/validation.d.ts +10 -0
  41. package/dist/__tests__/fixtures/validation.d.ts.map +1 -0
  42. package/dist/__tests__/fixtures/validation.js +43 -0
  43. package/dist/__tests__/fixtures/validation.js.map +1 -0
  44. package/dist/__tests__/fixtures/vertices.d.ts +29 -0
  45. package/dist/__tests__/fixtures/vertices.d.ts.map +1 -0
  46. package/dist/__tests__/fixtures/vertices.js +51 -0
  47. package/dist/__tests__/fixtures/vertices.js.map +1 -0
  48. package/dist/mcp/index.js +0 -0
  49. package/dist/mcp/server.d.ts +2 -0
  50. package/dist/mcp/server.d.ts.map +1 -1
  51. package/dist/mcp/server.js +416 -9
  52. package/dist/mcp/server.js.map +1 -1
  53. package/dist/mcp/tools.d.ts.map +1 -1
  54. package/dist/mcp/tools.js +1218 -0
  55. package/dist/mcp/tools.js.map +1 -1
  56. package/dist/mcp/validation.d.ts +241 -0
  57. package/dist/mcp/validation.d.ts.map +1 -1
  58. package/dist/mcp/validation.js +213 -4
  59. package/dist/mcp/validation.js.map +1 -1
  60. package/dist/services/langflow-client.d.ts +131 -1
  61. package/dist/services/langflow-client.d.ts.map +1 -1
  62. package/dist/services/langflow-client.js +864 -18
  63. package/dist/services/langflow-client.js.map +1 -1
  64. package/dist/types/index.d.ts +226 -0
  65. package/dist/types/index.d.ts.map +1 -1
  66. package/healthcheck.js +41 -0
  67. package/package.json +6 -4
package/.env.example CHANGED
@@ -28,6 +28,11 @@ LOG_LEVEL=info
28
28
  # Node Environment (development, production)
29
29
  NODE_ENV=development
30
30
 
31
+ # Enable deprecated tools (true/false)
32
+ # Set to false to hide deprecated tools from the tool list
33
+ # Deprecated tools are marked with ⚠️ in their descriptions
34
+ ENABLE_DEPRECATED_TOOLS=true
35
+
31
36
  # ====================
32
37
  # HTTP MODE CONFIGURATION
33
38
  # ====================
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2025 Aras
3
+ Copyright (c) 2025 Arkadiusz Mastalerz - nobrainer.tech
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -4,12 +4,17 @@
4
4
  [![npm downloads](https://img.shields.io/npm/dm/langflow-mcp-server.svg)](https://www.npmjs.com/package/langflow-mcp-server)
5
5
  [![GitHub release](https://img.shields.io/github/v/release/nobrainer-tech/langflow-mcp)](https://github.com/nobrainer-tech/langflow-mcp/releases)
6
6
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
7
+ [![Tests](https://img.shields.io/badge/tests-635%20passing-brightgreen.svg)](https://github.com/nobrainer-tech/langflow-mcp)
7
8
 
8
- A Model Context Protocol (MCP) server that provides AI assistants with comprehensive access to Langflow workflow automation platform. Inspired by [czlonkowski/n8n-mcp](https://github.com/czlonkowski/n8n-mcp).
9
+ A Model Context Protocol (MCP) server that provides AI assistants with comprehensive access to Langflow workflow automation platform.
9
10
 
10
11
  ## Overview
11
12
 
12
- langflow-mcp-server serves as a bridge between Langflow's workflow automation platform and AI models, enabling them to understand and work with Langflow flows effectively. It provides structured access to:
13
+ langflow-mcp-server serves as a bridge between Langflow's workflow automation platform and AI models, enabling them to understand and work with Langflow flows effectively.
14
+
15
+ **API Compatibility**: This server is built on the [Langflow API documentation](https://docs.langflow.org/api) and supports Langflow API version **1.6.4**.
16
+
17
+ It provides structured access to:
13
18
 
14
19
  - **Flow Management** - Create, read, update, delete, and execute Langflow flows
15
20
  - **Flow Execution** - Run flows with inputs and trigger webhooks
@@ -105,9 +110,88 @@ Add to your Claude Desktop config file:
105
110
 
106
111
  Restart Claude Desktop after updating configuration.
107
112
 
113
+ ### Docker Deployment
114
+
115
+ The MCP server can be run in a Docker container for easier deployment and isolation.
116
+
117
+ #### Quick Start with Docker
118
+
119
+ ```bash
120
+ # Clone the repository
121
+ git clone https://github.com/nobrainer-tech/langflow-mcp.git
122
+ cd langflow-mcp
123
+
124
+ # Create .env file with your configuration
125
+ cp .env.example .env
126
+ # Edit .env with your Langflow instance URL and API key
127
+
128
+ # Build and run with docker-compose
129
+ docker-compose up -d
130
+
131
+ # View logs
132
+ docker-compose logs -f
133
+
134
+ # Stop the server
135
+ docker-compose down
136
+ ```
137
+
138
+ #### Building Docker Image
139
+
140
+ ```bash
141
+ # Build the image
142
+ docker build -t langflow-mcp-server:latest .
143
+
144
+ # Run in stdio mode (for Claude Desktop)
145
+ docker run -it --rm \
146
+ -e LANGFLOW_BASE_URL=http://localhost:7860 \
147
+ -e LANGFLOW_API_KEY=your-api-key \
148
+ langflow-mcp-server:latest
149
+
150
+ # Run in HTTP mode (for remote access)
151
+ docker run -d \
152
+ -p 3000:3000 \
153
+ -e MCP_MODE=http \
154
+ -e PORT=3000 \
155
+ -e AUTH_TOKEN=your-secure-token \
156
+ -e LANGFLOW_BASE_URL=http://langflow:7860 \
157
+ -e LANGFLOW_API_KEY=your-api-key \
158
+ langflow-mcp-server:latest
159
+ ```
160
+
161
+ #### Docker Compose Configuration
162
+
163
+ The included `docker-compose.yml` supports both stdio and HTTP modes:
164
+
165
+ ```yaml
166
+ # STDIO mode (default)
167
+ environment:
168
+ - MCP_MODE=stdio
169
+ - LANGFLOW_BASE_URL=http://localhost:7860
170
+ - LANGFLOW_API_KEY=your-key
171
+
172
+ # HTTP mode
173
+ environment:
174
+ - MCP_MODE=http
175
+ - PORT=3000
176
+ - AUTH_TOKEN=your-secure-token
177
+ ```
178
+
179
+ ## Deprecated Tools
180
+
181
+ ⚠️ **Important**: This server includes 4 deprecated tools that match deprecated endpoints in Langflow API 1.6.4:
182
+ - `build_vertices` - Use `build_flow` instead
183
+ - `get_vertex` - Use `build_flow` or `get_flow` instead
184
+ - `stream_vertex_build` - Use `get_build_status` with streaming instead
185
+ - `get_task_status` - Use `get_build_status` instead
186
+
187
+ These tools are **enabled by default** but marked with ⚠️ warnings. To disable them, set:
188
+ ```bash
189
+ ENABLE_DEPRECATED_TOOLS=false
190
+ ```
191
+
108
192
  ## Available MCP Tools
109
193
 
110
- Once connected, Claude can use these 35 tools:
194
+ Once connected, Claude can use **90 tools** (94 with deprecated tools enabled):
111
195
 
112
196
  ### Flow Management (6 tools)
113
197
  - **`create_flow`** - Create a new Langflow flow
@@ -162,6 +246,93 @@ Once connected, Claude can use these 35 tools:
162
246
  ### Component Discovery (1 tool)
163
247
  - **`list_components`** - List all available Langflow components
164
248
 
249
+ ### File Management (5 tools)
250
+ - **`upload_file`** - Upload a file to a specific flow
251
+ - **`download_file`** - Download a file from a flow
252
+ - **`list_files`** - List all files in a flow
253
+ - **`delete_file`** - Delete a file from a flow
254
+ - **`get_file_image`** - Get an image file from a flow
255
+
256
+ ### Monitoring & Analytics (9 tools)
257
+ - **`get_monitor_builds`** - Get build execution history for a flow
258
+ - **`get_monitor_messages`** - Query chat/message history with filtering
259
+ - **`get_monitor_message`** - Get details of a specific message
260
+ - **`get_monitor_sessions`** - List all chat session IDs
261
+ - **`get_monitor_session_messages`** - Get all messages for a session
262
+ - **`migrate_monitor_session`** - Migrate messages between sessions
263
+ - **`get_monitor_transactions`** - List transaction logs for a flow
264
+ - **`delete_monitor_builds`** - Delete build history for a flow
265
+ - **`delete_monitor_messages`** - Delete multiple messages by ID
266
+
267
+ ### Vertex Operations ⚠️ *DEPRECATED* (3 tools)
268
+ - **`build_vertices`** ⚠️ *DEPRECATED* - Get vertex build order for a flow (use `build_flow` instead)
269
+ - **`get_vertex`** ⚠️ *DEPRECATED* - Get details of a specific vertex/component (use `build_flow` or `get_flow` instead)
270
+ - **`stream_vertex_build`** ⚠️ *DEPRECATED* - Stream real-time build events for a vertex (use `get_build_status` with streaming instead)
271
+
272
+ ### User Management (5 tools)
273
+ - **`list_users`** - List all users (admin only)
274
+ - **`get_current_user`** - Get current authenticated user info
275
+ - **`get_user`** - Get details of a specific user
276
+ - **`update_user`** - Update user profile information
277
+ - **`reset_user_password`** - Reset password for a user (admin only)
278
+
279
+ ### API Key Management (3 tools)
280
+ - **`list_api_keys`** - List all API keys for the user
281
+ - **`create_api_key`** - Create a new API key
282
+ - **`delete_api_key`** - Delete an API key
283
+
284
+ ### Custom Components (2 tools)
285
+ - **`list_custom_components`** - List all custom components
286
+ - **`create_custom_component`** - Create a new custom component
287
+
288
+ ### Authentication (4 tools)
289
+ - **`login`** - Authenticate with username and password
290
+ - **`auto_login`** - Auto-login with stored credentials
291
+ - **`refresh_token`** - Refresh authentication token
292
+ - **`logout`** - Logout and invalidate session
293
+
294
+ ### Store & Marketplace (6 tools)
295
+ - **`check_store`** - Check if component store is enabled
296
+ - **`check_store_api_key`** - Validate a store API key
297
+ - **`list_store_components`** - Browse available components in the store
298
+ - **`get_store_component`** - Get details of a store component
299
+ - **`list_store_tags`** - List all component tags in the store
300
+ - **`get_user_likes`** - Get components liked by user
301
+
302
+ ### Validation Tools (2 tools)
303
+ - **`validate_code`** - Validate Python code for custom components
304
+ - **`validate_prompt`** - Validate prompt template syntax
305
+
306
+ ### Advanced Execution (3 tools)
307
+ - **`run_flow_advanced`** - Advanced flow execution with full control
308
+ - **`process_flow`** - Legacy process endpoint for flows
309
+ - **`predict_flow`** - Legacy predict endpoint for flows
310
+
311
+ ### Batch & Public Operations (3 tools)
312
+ - **`get_public_flow`** - Get a public flow without authentication
313
+ - **`batch_create_flows`** - Create multiple flows in one operation
314
+ - **`get_task_status`** ⚠️ *DEPRECATED* - Get status of an async task (use `get_build_status` instead)
315
+
316
+ ### Folder Operations (2 tools)
317
+ - **`download_folder`** - Download entire folder as archive
318
+ - **`upload_folder`** - Upload folder from archive
319
+
320
+ ### Starter & Templates (2 tools)
321
+ - **`list_starter_projects`** - List available starter templates
322
+ - **`upload_knowledge_base`** - Upload file to create/update knowledge base
323
+
324
+ ### Profile & Media (2 tools)
325
+ - **`list_profile_pictures`** - List available profile pictures
326
+ - **`get_profile_picture`** - Get a specific profile picture
327
+
328
+ ### Integration Tools (1 tool)
329
+ - **`list_elevenlabs_voices`** - List ElevenLabs text-to-speech voices
330
+
331
+ ### System & Health (3 tools)
332
+ - **`get_version`** - Get Langflow API version information
333
+ - **`health_check`** - Check Langflow instance health status
334
+ - **`get_logs`** - Retrieve system logs (supports streaming)
335
+
165
336
  ## Example Usage
166
337
 
167
338
  ```typescript
@@ -0,0 +1,22 @@
1
+ import { RunFlowAdvancedRequest, ProcessFlowRequest, PredictFlowRequest, RunResponse } from '../../types';
2
+ export declare const mockRunFlowAdvancedRequest: RunFlowAdvancedRequest;
3
+ export declare const mockRunFlowAdvancedResponse: RunResponse;
4
+ export declare const mockProcessFlowRequest: ProcessFlowRequest;
5
+ export declare const mockProcessFlowResponse: {
6
+ result: string;
7
+ data: {
8
+ processed_items: number;
9
+ duration: number;
10
+ };
11
+ };
12
+ export declare const mockPredictFlowRequest: PredictFlowRequest;
13
+ export declare const mockPredictFlowResponse: {
14
+ prediction: string;
15
+ confidence: number;
16
+ probabilities: {
17
+ class_A: number;
18
+ class_B: number;
19
+ class_C: number;
20
+ };
21
+ };
22
+ //# sourceMappingURL=advanced-execution.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"advanced-execution.d.ts","sourceRoot":"","sources":["../../../src/__tests__/fixtures/advanced-execution.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EACtB,kBAAkB,EAClB,kBAAkB,EAClB,WAAW,EACZ,MAAM,aAAa,CAAC;AAErB,eAAO,MAAM,0BAA0B,EAAE,sBAYxC,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,WAsBzC,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,kBAUpC,CAAC;AAEF,eAAO,MAAM,uBAAuB;;;;;;CAMnC,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,kBASpC,CAAC;AAEF,eAAO,MAAM,uBAAuB;;;;;;;;CAQnC,CAAC"}
@@ -0,0 +1,77 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.mockPredictFlowResponse = exports.mockPredictFlowRequest = exports.mockProcessFlowResponse = exports.mockProcessFlowRequest = exports.mockRunFlowAdvancedResponse = exports.mockRunFlowAdvancedRequest = void 0;
4
+ exports.mockRunFlowAdvancedRequest = {
5
+ input_value: 'advanced test input',
6
+ input_type: 'text',
7
+ output_type: 'chat',
8
+ output_component: 'ChatOutput-123',
9
+ tweaks: {
10
+ 'llm-component': {
11
+ temperature: 0.7,
12
+ max_tokens: 100
13
+ }
14
+ },
15
+ session_id: 'session-adv-123'
16
+ };
17
+ exports.mockRunFlowAdvancedResponse = {
18
+ session_id: 'session-adv-123',
19
+ execution_id: 'exec-adv-123',
20
+ outputs: [
21
+ {
22
+ inputs: { input: 'advanced test input' },
23
+ outputs: [
24
+ {
25
+ results: {
26
+ message: {
27
+ text: 'Advanced output response',
28
+ metadata: { model: 'gpt-4' }
29
+ }
30
+ },
31
+ artifacts: { execution_time: 1.23 },
32
+ messages: [],
33
+ component_display_name: 'ChatOutput',
34
+ component_id: 'ChatOutput-123'
35
+ }
36
+ ]
37
+ }
38
+ ]
39
+ };
40
+ exports.mockProcessFlowRequest = {
41
+ inputs: {
42
+ param1: 'value1',
43
+ param2: 'value2'
44
+ },
45
+ tweaks: {
46
+ 'processor-1': {
47
+ batch_size: 10
48
+ }
49
+ }
50
+ };
51
+ exports.mockProcessFlowResponse = {
52
+ result: 'processed',
53
+ data: {
54
+ processed_items: 100,
55
+ duration: 2500
56
+ }
57
+ };
58
+ exports.mockPredictFlowRequest = {
59
+ inputs: {
60
+ features: [1, 2, 3, 4, 5]
61
+ },
62
+ tweaks: {
63
+ 'model-component': {
64
+ confidence_threshold: 0.85
65
+ }
66
+ }
67
+ };
68
+ exports.mockPredictFlowResponse = {
69
+ prediction: 'class_A',
70
+ confidence: 0.92,
71
+ probabilities: {
72
+ class_A: 0.92,
73
+ class_B: 0.06,
74
+ class_C: 0.02
75
+ }
76
+ };
77
+ //# sourceMappingURL=advanced-execution.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"advanced-execution.js","sourceRoot":"","sources":["../../../src/__tests__/fixtures/advanced-execution.ts"],"names":[],"mappings":";;;AAOa,QAAA,0BAA0B,GAA2B;IAChE,WAAW,EAAE,qBAAqB;IAClC,UAAU,EAAE,MAAM;IAClB,WAAW,EAAE,MAAM;IACnB,gBAAgB,EAAE,gBAAgB;IAClC,MAAM,EAAE;QACN,eAAe,EAAE;YACf,WAAW,EAAE,GAAG;YAChB,UAAU,EAAE,GAAG;SAChB;KACF;IACD,UAAU,EAAE,iBAAiB;CAC9B,CAAC;AAEW,QAAA,2BAA2B,GAAgB;IACtD,UAAU,EAAE,iBAAiB;IAC7B,YAAY,EAAE,cAAc;IAC5B,OAAO,EAAE;QACP;YACE,MAAM,EAAE,EAAE,KAAK,EAAE,qBAAqB,EAAE;YACxC,OAAO,EAAE;gBACP;oBACE,OAAO,EAAE;wBACP,OAAO,EAAE;4BACP,IAAI,EAAE,0BAA0B;4BAChC,QAAQ,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE;yBAC7B;qBACF;oBACD,SAAS,EAAE,EAAE,cAAc,EAAE,IAAI,EAAE;oBACnC,QAAQ,EAAE,EAAE;oBACZ,sBAAsB,EAAE,YAAY;oBACpC,YAAY,EAAE,gBAAgB;iBAC/B;aACF;SACF;KACF;CACF,CAAC;AAEW,QAAA,sBAAsB,GAAuB;IACxD,MAAM,EAAE;QACN,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE,QAAQ;KACjB;IACD,MAAM,EAAE;QACN,aAAa,EAAE;YACb,UAAU,EAAE,EAAE;SACf;KACF;CACF,CAAC;AAEW,QAAA,uBAAuB,GAAG;IACrC,MAAM,EAAE,WAAW;IACnB,IAAI,EAAE;QACJ,eAAe,EAAE,GAAG;QACpB,QAAQ,EAAE,IAAI;KACf;CACF,CAAC;AAEW,QAAA,sBAAsB,GAAuB;IACxD,MAAM,EAAE;QACN,QAAQ,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;KAC1B;IACD,MAAM,EAAE;QACN,iBAAiB,EAAE;YACjB,oBAAoB,EAAE,IAAI;SAC3B;KACF;CACF,CAAC;AAEW,QAAA,uBAAuB,GAAG;IACrC,UAAU,EAAE,SAAS;IACrB,UAAU,EAAE,IAAI;IAChB,aAAa,EAAE;QACb,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,IAAI;KACd;CACF,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { ApiKeyRead, ApiKeyCreate } from '../../types';
2
+ export declare const mockApiKeyRead: ApiKeyRead;
3
+ export declare const mockApiKeyCreate: ApiKeyCreate;
4
+ export declare const mockApiKeyWithToken: ApiKeyRead & {
5
+ api_key: string;
6
+ };
7
+ export declare const mockApiKeysList: ApiKeyRead[];
8
+ //# sourceMappingURL=api-keys.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-keys.d.ts","sourceRoot":"","sources":["../../../src/__tests__/fixtures/api-keys.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEvD,eAAO,MAAM,cAAc,EAAE,UAO5B,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,YAE9B,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,UAAU,GAAG;IAAE,OAAO,EAAE,MAAM,CAAA;CAG/D,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,UAAU,EAkBvC,CAAC"}
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.mockApiKeysList = exports.mockApiKeyWithToken = exports.mockApiKeyCreate = exports.mockApiKeyRead = void 0;
4
+ exports.mockApiKeyRead = {
5
+ id: 'apikey-123',
6
+ name: 'Production API Key',
7
+ created_at: '2024-01-01T00:00:00Z',
8
+ last_used_at: '2024-01-15T12:30:00Z',
9
+ total_uses: 1500,
10
+ is_active: true
11
+ };
12
+ exports.mockApiKeyCreate = {
13
+ name: 'New API Key'
14
+ };
15
+ exports.mockApiKeyWithToken = {
16
+ ...exports.mockApiKeyRead,
17
+ api_key: 'sk-test-1234567890abcdefghijklmnopqrstuvwxyz'
18
+ };
19
+ exports.mockApiKeysList = [
20
+ exports.mockApiKeyRead,
21
+ {
22
+ id: 'apikey-124',
23
+ name: 'Development API Key',
24
+ created_at: '2024-01-05T00:00:00Z',
25
+ last_used_at: '2024-01-18T09:15:00Z',
26
+ total_uses: 850,
27
+ is_active: true
28
+ },
29
+ {
30
+ id: 'apikey-125',
31
+ name: 'Testing API Key',
32
+ created_at: '2024-01-10T00:00:00Z',
33
+ last_used_at: '2024-01-12T14:20:00Z',
34
+ total_uses: 120,
35
+ is_active: false
36
+ }
37
+ ];
38
+ //# sourceMappingURL=api-keys.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-keys.js","sourceRoot":"","sources":["../../../src/__tests__/fixtures/api-keys.ts"],"names":[],"mappings":";;;AAEa,QAAA,cAAc,GAAe;IACxC,EAAE,EAAE,YAAY;IAChB,IAAI,EAAE,oBAAoB;IAC1B,UAAU,EAAE,sBAAsB;IAClC,YAAY,EAAE,sBAAsB;IACpC,UAAU,EAAE,IAAI;IAChB,SAAS,EAAE,IAAI;CAChB,CAAC;AAEW,QAAA,gBAAgB,GAAiB;IAC5C,IAAI,EAAE,aAAa;CACpB,CAAC;AAEW,QAAA,mBAAmB,GAAqC;IACnE,GAAG,sBAAc;IACjB,OAAO,EAAE,8CAA8C;CACxD,CAAC;AAEW,QAAA,eAAe,GAAiB;IAC3C,sBAAc;IACd;QACE,EAAE,EAAE,YAAY;QAChB,IAAI,EAAE,qBAAqB;QAC3B,UAAU,EAAE,sBAAsB;QAClC,YAAY,EAAE,sBAAsB;QACpC,UAAU,EAAE,GAAG;QACf,SAAS,EAAE,IAAI;KAChB;IACD;QACE,EAAE,EAAE,YAAY;QAChB,IAAI,EAAE,iBAAiB;QACvB,UAAU,EAAE,sBAAsB;QAClC,YAAY,EAAE,sBAAsB;QACpC,UAAU,EAAE,GAAG;QACf,SAAS,EAAE,KAAK;KACjB;CACF,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { LoginRequest, LoginResponse } from '../../types';
2
+ export declare const mockLoginRequest: LoginRequest;
3
+ export declare const mockLoginResponse: LoginResponse;
4
+ export declare const mockAutoLoginResponse: LoginResponse;
5
+ export declare const mockRefreshTokenResponse: LoginResponse;
6
+ export declare const mockLogoutResponse: {
7
+ message: string;
8
+ };
9
+ //# sourceMappingURL=auth.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../src/__tests__/fixtures/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE1D,eAAO,MAAM,gBAAgB,EAAE,YAG9B,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,aAI/B,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,aAInC,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,aAItC,CAAC;AAEF,eAAO,MAAM,kBAAkB;;CAE9B,CAAC"}
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.mockLogoutResponse = exports.mockRefreshTokenResponse = exports.mockAutoLoginResponse = exports.mockLoginResponse = exports.mockLoginRequest = void 0;
4
+ exports.mockLoginRequest = {
5
+ username: 'testuser',
6
+ password: 'securePassword123!'
7
+ };
8
+ exports.mockLoginResponse = {
9
+ access_token: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJ1c2VyLTEyMyIsImV4cCI6MTcwNjc4NDAwMH0',
10
+ refresh_token: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJ1c2VyLTEyMyIsImV4cCI6MTcwNjg3MDQwMH0',
11
+ token_type: 'bearer'
12
+ };
13
+ exports.mockAutoLoginResponse = {
14
+ access_token: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.auto_token',
15
+ refresh_token: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.auto_refresh',
16
+ token_type: 'bearer'
17
+ };
18
+ exports.mockRefreshTokenResponse = {
19
+ access_token: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.new_access_token',
20
+ refresh_token: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.new_refresh_token',
21
+ token_type: 'bearer'
22
+ };
23
+ exports.mockLogoutResponse = {
24
+ message: 'Successfully logged out'
25
+ };
26
+ //# sourceMappingURL=auth.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../src/__tests__/fixtures/auth.ts"],"names":[],"mappings":";;;AAEa,QAAA,gBAAgB,GAAiB;IAC5C,QAAQ,EAAE,UAAU;IACpB,QAAQ,EAAE,oBAAoB;CAC/B,CAAC;AAEW,QAAA,iBAAiB,GAAkB;IAC9C,YAAY,EAAE,sFAAsF;IACpG,aAAa,EAAE,sFAAsF;IACrG,UAAU,EAAE,QAAQ;CACrB,CAAC;AAEW,QAAA,qBAAqB,GAAkB;IAClD,YAAY,EAAE,iDAAiD;IAC/D,aAAa,EAAE,mDAAmD;IAClE,UAAU,EAAE,QAAQ;CACrB,CAAC;AAEW,QAAA,wBAAwB,GAAkB;IACrD,YAAY,EAAE,uDAAuD;IACrE,aAAa,EAAE,wDAAwD;IACvE,UAAU,EAAE,QAAQ;CACrB,CAAC;AAEW,QAAA,kBAAkB,GAAG;IAChC,OAAO,EAAE,yBAAyB;CACnC,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { CustomComponentRead, CustomComponentCreate } from '../../types';
2
+ export declare const mockCustomComponentCreate: CustomComponentCreate;
3
+ export declare const mockCustomComponentRead: CustomComponentRead;
4
+ export declare const mockCustomComponentsList: CustomComponentRead[];
5
+ //# sourceMappingURL=custom-components.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"custom-components.d.ts","sourceRoot":"","sources":["../../../src/__tests__/fixtures/custom-components.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAEzE,eAAO,MAAM,yBAAyB,EAAE,qBAcvC,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,mBAQrC,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,mBAAmB,EAoBzD,CAAC"}
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.mockCustomComponentsList = exports.mockCustomComponentRead = exports.mockCustomComponentCreate = void 0;
4
+ exports.mockCustomComponentCreate = {
5
+ code: `
6
+ from langflow import CustomComponent
7
+
8
+ class MyComponent(CustomComponent):
9
+ display_name = "My Custom Component"
10
+ description = "A custom component for testing"
11
+
12
+ def build(self):
13
+ return "Hello from custom component"
14
+ `,
15
+ name: 'MyCustomComponent',
16
+ description: 'A custom component for testing',
17
+ return_type: 'Message'
18
+ };
19
+ exports.mockCustomComponentRead = {
20
+ id: 'custom-comp-123',
21
+ name: 'MyCustomComponent',
22
+ code: exports.mockCustomComponentCreate.code,
23
+ description: 'A custom component for testing',
24
+ return_type: 'Message',
25
+ created_at: '2024-01-01T00:00:00Z',
26
+ updated_at: '2024-01-01T00:00:00Z'
27
+ };
28
+ exports.mockCustomComponentsList = [
29
+ exports.mockCustomComponentRead,
30
+ {
31
+ id: 'custom-comp-124',
32
+ name: 'DataProcessor',
33
+ code: 'class DataProcessor(CustomComponent):\n pass',
34
+ description: 'Processes data streams',
35
+ return_type: 'Data',
36
+ created_at: '2024-01-05T00:00:00Z',
37
+ updated_at: '2024-01-15T00:00:00Z'
38
+ },
39
+ {
40
+ id: 'custom-comp-125',
41
+ name: 'APIConnector',
42
+ code: 'class APIConnector(CustomComponent):\n pass',
43
+ description: 'Connects to external APIs',
44
+ return_type: 'Text',
45
+ created_at: '2024-01-10T00:00:00Z',
46
+ updated_at: '2024-01-10T00:00:00Z'
47
+ }
48
+ ];
49
+ //# sourceMappingURL=custom-components.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"custom-components.js","sourceRoot":"","sources":["../../../src/__tests__/fixtures/custom-components.ts"],"names":[],"mappings":";;;AAEa,QAAA,yBAAyB,GAA0B;IAC9D,IAAI,EAAE;;;;;;;;;GASL;IACD,IAAI,EAAE,mBAAmB;IACzB,WAAW,EAAE,gCAAgC;IAC7C,WAAW,EAAE,SAAS;CACvB,CAAC;AAEW,QAAA,uBAAuB,GAAwB;IAC1D,EAAE,EAAE,iBAAiB;IACrB,IAAI,EAAE,mBAAmB;IACzB,IAAI,EAAE,iCAAyB,CAAC,IAAI;IACpC,WAAW,EAAE,gCAAgC;IAC7C,WAAW,EAAE,SAAS;IACtB,UAAU,EAAE,sBAAsB;IAClC,UAAU,EAAE,sBAAsB;CACnC,CAAC;AAEW,QAAA,wBAAwB,GAA0B;IAC7D,+BAAuB;IACvB;QACE,EAAE,EAAE,iBAAiB;QACrB,IAAI,EAAE,eAAe;QACrB,IAAI,EAAE,iDAAiD;QACvD,WAAW,EAAE,wBAAwB;QACrC,WAAW,EAAE,MAAM;QACnB,UAAU,EAAE,sBAAsB;QAClC,UAAU,EAAE,sBAAsB;KACnC;IACD;QACE,EAAE,EAAE,iBAAiB;QACrB,IAAI,EAAE,cAAc;QACpB,IAAI,EAAE,gDAAgD;QACtD,WAAW,EAAE,2BAA2B;QACxC,WAAW,EAAE,MAAM;QACnB,UAAU,EAAE,sBAAsB;QAClC,UAAU,EAAE,sBAAsB;KACnC;CACF,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { FileListItem } from '../../types';
2
+ export declare const mockFileListItem: FileListItem;
3
+ export declare const mockFilesList: FileListItem[];
4
+ export declare const mockFileUploadResponse: {
5
+ file_path: string;
6
+ file_name: string;
7
+ flow_id: string;
8
+ size: number;
9
+ success: boolean;
10
+ };
11
+ export declare const mockFileBuffer: Buffer<ArrayBuffer>;
12
+ export declare const mockImageBuffer: Buffer<ArrayBuffer>;
13
+ export declare const mockProfilePicturesList: string[];
14
+ //# sourceMappingURL=files.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../../../src/__tests__/fixtures/files.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,eAAO,MAAM,gBAAgB,EAAE,YAK9B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,YAAY,EAcvC,CAAC;AAEF,eAAO,MAAM,sBAAsB;;;;;;CAMlC,CAAC;AAEF,eAAO,MAAM,cAAc,qBAA4C,CAAC;AAExE,eAAO,MAAM,eAAe,qBAE1B,CAAC;AAEH,eAAO,MAAM,uBAAuB,EAAE,MAAM,EAI3C,CAAC"}
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.mockProfilePicturesList = exports.mockImageBuffer = exports.mockFileBuffer = exports.mockFileUploadResponse = exports.mockFilesList = exports.mockFileListItem = void 0;
4
+ exports.mockFileListItem = {
5
+ name: 'test-file.txt',
6
+ path: '/uploads/flow-123/test-file.txt',
7
+ size: 1024,
8
+ modified: '2024-01-01T00:00:00Z'
9
+ };
10
+ exports.mockFilesList = [
11
+ exports.mockFileListItem,
12
+ {
13
+ name: 'data.json',
14
+ path: '/uploads/flow-123/data.json',
15
+ size: 2048,
16
+ modified: '2024-01-01T00:05:00Z'
17
+ },
18
+ {
19
+ name: 'image.png',
20
+ path: '/uploads/flow-123/image.png',
21
+ size: 15360,
22
+ modified: '2024-01-01T00:10:00Z'
23
+ }
24
+ ];
25
+ exports.mockFileUploadResponse = {
26
+ file_path: '/uploads/flow-123/test-file.txt',
27
+ file_name: 'test-file.txt',
28
+ flow_id: 'flow-123',
29
+ size: 1024,
30
+ success: true
31
+ };
32
+ exports.mockFileBuffer = Buffer.from('Test file content', 'utf-8');
33
+ exports.mockImageBuffer = Buffer.from([
34
+ 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a
35
+ ]);
36
+ exports.mockProfilePicturesList = [
37
+ 'avatar1.png',
38
+ 'avatar2.jpg',
39
+ 'company-logo.svg'
40
+ ];
41
+ //# sourceMappingURL=files.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"files.js","sourceRoot":"","sources":["../../../src/__tests__/fixtures/files.ts"],"names":[],"mappings":";;;AAEa,QAAA,gBAAgB,GAAiB;IAC5C,IAAI,EAAE,eAAe;IACrB,IAAI,EAAE,iCAAiC;IACvC,IAAI,EAAE,IAAI;IACV,QAAQ,EAAE,sBAAsB;CACjC,CAAC;AAEW,QAAA,aAAa,GAAmB;IAC3C,wBAAgB;IAChB;QACE,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,6BAA6B;QACnC,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,sBAAsB;KACjC;IACD;QACE,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,6BAA6B;QACnC,IAAI,EAAE,KAAK;QACX,QAAQ,EAAE,sBAAsB;KACjC;CACF,CAAC;AAEW,QAAA,sBAAsB,GAAG;IACpC,SAAS,EAAE,iCAAiC;IAC5C,SAAS,EAAE,eAAe;IAC1B,OAAO,EAAE,UAAU;IACnB,IAAI,EAAE,IAAI;IACV,OAAO,EAAE,IAAI;CACd,CAAC;AAEW,QAAA,cAAc,GAAG,MAAM,CAAC,IAAI,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAC;AAE3D,QAAA,eAAe,GAAG,MAAM,CAAC,IAAI,CAAC;IACzC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI;CAC/C,CAAC,CAAC;AAEU,QAAA,uBAAuB,GAAa;IAC/C,aAAa;IACb,aAAa;IACb,kBAAkB;CACnB,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { VersionResponse, TaskStatusResponse, StarterProject, ElevenLabsVoice, HealthResponse } from '../../types';
2
+ export declare const mockVersionResponse: VersionResponse;
3
+ export declare const mockTaskStatusResponse: TaskStatusResponse;
4
+ export declare const mockTaskStatusPending: TaskStatusResponse;
5
+ export declare const mockTaskStatusFailed: TaskStatusResponse;
6
+ export declare const mockStarterProject: StarterProject;
7
+ export declare const mockStarterProjectsList: StarterProject[];
8
+ export declare const mockElevenLabsVoice: ElevenLabsVoice;
9
+ export declare const mockElevenLabsVoicesList: ElevenLabsVoice[];
10
+ export declare const mockHealthResponse: HealthResponse;
11
+ export declare const mockLogsResponse: {
12
+ logs: {
13
+ timestamp: string;
14
+ level: string;
15
+ message: string;
16
+ }[];
17
+ };
18
+ //# sourceMappingURL=misc.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"misc.d.ts","sourceRoot":"","sources":["../../../src/__tests__/fixtures/misc.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,eAAe,EACf,cAAc,EACf,MAAM,aAAa,CAAC;AAErB,eAAO,MAAM,mBAAmB,EAAE,eAIjC,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,kBAOpC,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,kBAInC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,kBAIlC,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,cAchC,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,cAAc,EAkBnD,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,eAKjC,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,eAAe,EAcrD,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,cAIhC,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;;;;CAa5B,CAAC"}