@bubblelab/shared-schemas 0.1.6 → 0.1.9
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/README.md +1 -136
- package/dist/ai-models.d.ts +4 -0
- package/dist/ai-models.d.ts.map +1 -0
- package/dist/ai-models.js +20 -0
- package/dist/ai-models.js.map +1 -0
- package/dist/bubble-definition-schema.d.ts +133 -25
- package/dist/bubble-definition-schema.d.ts.map +1 -1
- package/dist/bubble-definition-schema.js +21 -3
- package/dist/bubble-definition-schema.js.map +1 -1
- package/dist/bubbleflow-execution-schema.d.ts +100 -48
- package/dist/bubbleflow-execution-schema.d.ts.map +1 -1
- package/dist/bubbleflow-schema.d.ts +394 -125
- package/dist/bubbleflow-schema.d.ts.map +1 -1
- package/dist/bubbleflow-schema.js +19 -0
- package/dist/bubbleflow-schema.js.map +1 -1
- package/dist/credential-schema.d.ts +46 -46
- package/dist/credential-schema.d.ts.map +1 -1
- package/dist/credential-schema.js +7 -0
- package/dist/credential-schema.js.map +1 -1
- package/dist/cron-utils.d.ts +47 -0
- package/dist/cron-utils.d.ts.map +1 -0
- package/dist/cron-utils.js +228 -0
- package/dist/cron-utils.js.map +1 -0
- package/dist/general-chat.d.ts +81 -0
- package/dist/general-chat.d.ts.map +1 -0
- package/dist/general-chat.js +58 -0
- package/dist/general-chat.js.map +1 -0
- package/dist/generate-bubbleflow-schema.d.ts +92 -40
- package/dist/generate-bubbleflow-schema.d.ts.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/milk-tea.d.ts +108 -0
- package/dist/milk-tea.d.ts.map +1 -0
- package/dist/milk-tea.js +74 -0
- package/dist/milk-tea.js.map +1 -0
- package/dist/pearl.d.ts +276 -0
- package/dist/pearl.d.ts.map +1 -0
- package/dist/pearl.js +75 -0
- package/dist/pearl.js.map +1 -0
- package/dist/streaming-events.d.ts +70 -0
- package/dist/streaming-events.d.ts.map +1 -1
- package/dist/types.d.ts +2 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,138 +1,3 @@
|
|
|
1
1
|
# @bubblelab/shared-schemas
|
|
2
2
|
|
|
3
|
-
This package contains shared Zod schemas and TypeScript types that are used by
|
|
4
|
-
|
|
5
|
-
**IMPORTANT**: All new API schemas should be written in this shared package to ensure type safety and consistency between frontend and backend applications.
|
|
6
|
-
|
|
7
|
-
## Usage
|
|
8
|
-
|
|
9
|
-
### Backend (bubblelab-api)
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
// Import schemas for validation
|
|
13
|
-
import {
|
|
14
|
-
createBubbleFlowSchema,
|
|
15
|
-
createCredentialSchema,
|
|
16
|
-
} from '@bubblelab/shared-schemas';
|
|
17
|
-
|
|
18
|
-
// Import types for TypeScript
|
|
19
|
-
import type {
|
|
20
|
-
CreateBubbleFlowRequest,
|
|
21
|
-
CreateCredentialRequest,
|
|
22
|
-
} from '@bubblelab/shared-schemas';
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
### Frontend (nodex-dashboard)
|
|
26
|
-
|
|
27
|
-
```typescript
|
|
28
|
-
// Import types for API calls
|
|
29
|
-
import type {
|
|
30
|
-
CreateBubbleFlowRequest,
|
|
31
|
-
CreateBubbleFlowResponse,
|
|
32
|
-
CredentialResponse,
|
|
33
|
-
} from '@bubblelab/shared-schemas';
|
|
34
|
-
|
|
35
|
-
// Use in API service functions
|
|
36
|
-
const createBubbleFlow = async (
|
|
37
|
-
data: CreateBubbleFlowRequest
|
|
38
|
-
): Promise<CreateBubbleFlowResponse> => {
|
|
39
|
-
// API call implementation
|
|
40
|
-
};
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
## Available Schemas
|
|
44
|
-
|
|
45
|
-
### BubbleFlow Schemas
|
|
46
|
-
|
|
47
|
-
- `createBubbleFlowSchema` - Create new BubbleFlow
|
|
48
|
-
- `executeBubbleFlowSchema` - Execute BubbleFlow
|
|
49
|
-
- `updateBubbleFlowParametersSchema` - Update BubbleFlow parameters
|
|
50
|
-
- `createBubbleFlowResponseSchema` - Create BubbleFlow response
|
|
51
|
-
- `executeBubbleFlowResponseSchema` - Execute BubbleFlow response
|
|
52
|
-
- `bubbleFlowDetailsResponseSchema` - Get BubbleFlow details response
|
|
53
|
-
- `listBubbleFlowsResponseSchema` - List BubbleFlows response
|
|
54
|
-
|
|
55
|
-
### Credential Schemas
|
|
56
|
-
|
|
57
|
-
- `createCredentialSchema` - Create new credential
|
|
58
|
-
- `credentialResponseSchema` - Credential response
|
|
59
|
-
- `createCredentialResponseSchema` - Create credential response
|
|
60
|
-
|
|
61
|
-
### Webhook Schemas
|
|
62
|
-
|
|
63
|
-
- `webhookResponseSchema` - Webhook response
|
|
64
|
-
- `webhookExecutionResponseSchema` - Webhook execution response
|
|
65
|
-
- `slackUrlVerificationSchema` - Slack URL verification
|
|
66
|
-
- `slackUrlVerificationResponseSchema` - Slack URL verification response
|
|
67
|
-
|
|
68
|
-
### Common Schemas
|
|
69
|
-
|
|
70
|
-
- `errorResponseSchema` - Error response
|
|
71
|
-
- `successMessageResponseSchema` - Success message response
|
|
72
|
-
|
|
73
|
-
## Development
|
|
74
|
-
|
|
75
|
-
### Building
|
|
76
|
-
|
|
77
|
-
To build the package:
|
|
78
|
-
|
|
79
|
-
```bash
|
|
80
|
-
pnpm build
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
### Auto-rebuild Options
|
|
84
|
-
|
|
85
|
-
**Option 1: Watch Mode (Recommended for Development)**
|
|
86
|
-
|
|
87
|
-
```bash
|
|
88
|
-
# From root directory
|
|
89
|
-
pnpm build:core:watch
|
|
90
|
-
|
|
91
|
-
# Or from shared-schemas directory
|
|
92
|
-
pnpm dev
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
**Option 2: Development Mode**
|
|
96
|
-
|
|
97
|
-
```bash
|
|
98
|
-
# Watch both core and schemas
|
|
99
|
-
pnpm dev:core
|
|
100
|
-
|
|
101
|
-
# Watch all packages
|
|
102
|
-
pnpm dev:all
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
**Option 3: Pre-commit Hook (Automatic)**
|
|
106
|
-
The pre-commit hook automatically builds schemas when they change:
|
|
107
|
-
|
|
108
|
-
```bash
|
|
109
|
-
# Make the script executable (one-time setup)
|
|
110
|
-
chmod +x scripts/pre-commit.sh
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
**Option 4: VS Code Extension**
|
|
114
|
-
Install "File Watcher" extension to automatically run build commands when files change.
|
|
115
|
-
|
|
116
|
-
## Adding New Schemas
|
|
117
|
-
|
|
118
|
-
1. **Define the Zod schema** in `src/routes.ts` with proper OpenAPI metadata
|
|
119
|
-
2. **Export the schema** for validation
|
|
120
|
-
3. **Export the TypeScript type** using `z.infer<typeof schemaName>`
|
|
121
|
-
4. **Update the documentation** at the top of `src/routes.ts`
|
|
122
|
-
5. **Rebuild the package**: `pnpm build:core` (from root)
|
|
123
|
-
|
|
124
|
-
## Schema Organization
|
|
125
|
-
|
|
126
|
-
The schemas are organized into sections in `src/routes.ts`:
|
|
127
|
-
|
|
128
|
-
- **Request Schemas**: Input validation for API endpoints
|
|
129
|
-
- **Response Schemas**: Output types for API responses
|
|
130
|
-
- **Webhook Schemas**: Special schemas for webhook handling
|
|
131
|
-
- **TypeScript Types**: Derived types for use in both frontend and backend
|
|
132
|
-
|
|
133
|
-
## Benefits
|
|
134
|
-
|
|
135
|
-
1. **Type Safety**: Shared types ensure frontend and backend are always in sync
|
|
136
|
-
2. **Single Source of Truth**: All API schemas are defined in one place
|
|
137
|
-
3. **Consistency**: Both applications use the same validation rules
|
|
138
|
-
4. **Maintainability**: Changes to schemas automatically propagate to both apps
|
|
3
|
+
This package contains shared Zod schemas and TypeScript types that are used by bubblab's runtime. For more information about bubblelab check out https://github.com/bubblelabai/BubbleLab
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const AvailableModels: z.ZodEnum<["openai/gpt-5", "openai/gpt-5-mini", "openai/gpt-o4-mini", "openai/gpt-4o", "google/gemini-2.5-pro", "google/gemini-2.5-flash", "google/gemini-2.5-flash-lite", "google/gemini-2.5-flash-image-preview", "anthropic/claude-sonnet-4-5-20250929", "openrouter/x-ai/grok-code-fast-1", "openrouter/z-ai/glm-4.6"]>;
|
|
3
|
+
export type AvailableModel = z.infer<typeof AvailableModels>;
|
|
4
|
+
//# sourceMappingURL=ai-models.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai-models.d.ts","sourceRoot":"","sources":["../src/ai-models.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,eAAe,6TAkB1B,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
// Define available models with provider/name combinations
|
|
3
|
+
export const AvailableModels = z.enum([
|
|
4
|
+
// OpenAI models
|
|
5
|
+
'openai/gpt-5',
|
|
6
|
+
'openai/gpt-5-mini',
|
|
7
|
+
'openai/gpt-o4-mini',
|
|
8
|
+
'openai/gpt-4o',
|
|
9
|
+
// Google Gemini models
|
|
10
|
+
'google/gemini-2.5-pro',
|
|
11
|
+
'google/gemini-2.5-flash',
|
|
12
|
+
'google/gemini-2.5-flash-lite',
|
|
13
|
+
'google/gemini-2.5-flash-image-preview',
|
|
14
|
+
// Anthropic models
|
|
15
|
+
'anthropic/claude-sonnet-4-5-20250929',
|
|
16
|
+
// OpenRouter models
|
|
17
|
+
'openrouter/x-ai/grok-code-fast-1',
|
|
18
|
+
'openrouter/z-ai/glm-4.6',
|
|
19
|
+
]);
|
|
20
|
+
//# sourceMappingURL=ai-models.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai-models.js","sourceRoot":"","sources":["../src/ai-models.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,0DAA0D;AAC1D,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,IAAI,CAAC;IACpC,gBAAgB;IAChB,cAAc;IACd,mBAAmB;IACnB,oBAAoB;IACpB,eAAe;IACf,uBAAuB;IACvB,uBAAuB;IACvB,yBAAyB;IACzB,8BAA8B;IAC9B,uCAAuC;IAEvC,mBAAmB;IACnB,sCAAsC;IAEtC,oBAAoB;IACpB,kCAAkC;IAClC,yBAAyB;CAC1B,CAAC,CAAC"}
|
|
@@ -16,7 +16,7 @@ export declare const BUBBLE_NAMES_WITH_CONTEXT_INJECTION: string[];
|
|
|
16
16
|
export interface BubbleParameter {
|
|
17
17
|
variableId?: number;
|
|
18
18
|
name: string;
|
|
19
|
-
value: unknown;
|
|
19
|
+
value: string | number | boolean | Record<string, unknown> | unknown[];
|
|
20
20
|
type: BubbleParameterType;
|
|
21
21
|
}
|
|
22
22
|
export interface ParsedBubble {
|
|
@@ -65,19 +65,47 @@ export interface ParsedBubbleWithInfo extends ParsedBubble {
|
|
|
65
65
|
}
|
|
66
66
|
export declare const BubbleParameterTypeSchema: z.ZodNativeEnum<typeof BubbleParameterType>;
|
|
67
67
|
export declare const BubbleParameterSchema: z.ZodObject<{
|
|
68
|
+
location: z.ZodOptional<z.ZodObject<{
|
|
69
|
+
startLine: z.ZodNumber;
|
|
70
|
+
startCol: z.ZodNumber;
|
|
71
|
+
endLine: z.ZodNumber;
|
|
72
|
+
endCol: z.ZodNumber;
|
|
73
|
+
}, "strip", z.ZodTypeAny, {
|
|
74
|
+
startLine: number;
|
|
75
|
+
startCol: number;
|
|
76
|
+
endLine: number;
|
|
77
|
+
endCol: number;
|
|
78
|
+
}, {
|
|
79
|
+
startLine: number;
|
|
80
|
+
startCol: number;
|
|
81
|
+
endLine: number;
|
|
82
|
+
endCol: number;
|
|
83
|
+
}>>;
|
|
68
84
|
variableId: z.ZodOptional<z.ZodNumber>;
|
|
69
85
|
name: z.ZodString;
|
|
70
|
-
value: z.ZodUnknown
|
|
86
|
+
value: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodArray<z.ZodUnknown, "many">]>;
|
|
71
87
|
type: z.ZodNativeEnum<typeof BubbleParameterType>;
|
|
72
88
|
}, "strip", z.ZodTypeAny, {
|
|
89
|
+
value: string | number | boolean | unknown[] | Record<string, unknown>;
|
|
73
90
|
type: BubbleParameterType;
|
|
74
91
|
name: string;
|
|
75
|
-
|
|
92
|
+
location?: {
|
|
93
|
+
startLine: number;
|
|
94
|
+
startCol: number;
|
|
95
|
+
endLine: number;
|
|
96
|
+
endCol: number;
|
|
97
|
+
} | undefined;
|
|
76
98
|
variableId?: number | undefined;
|
|
77
99
|
}, {
|
|
100
|
+
value: string | number | boolean | unknown[] | Record<string, unknown>;
|
|
78
101
|
type: BubbleParameterType;
|
|
79
102
|
name: string;
|
|
80
|
-
|
|
103
|
+
location?: {
|
|
104
|
+
startLine: number;
|
|
105
|
+
startCol: number;
|
|
106
|
+
endLine: number;
|
|
107
|
+
endCol: number;
|
|
108
|
+
} | undefined;
|
|
81
109
|
variableId?: number | undefined;
|
|
82
110
|
}>;
|
|
83
111
|
export declare const BubbleNodeTypeSchema: z.ZodEnum<["service", "tool", "workflow", "unknown"]>;
|
|
@@ -87,19 +115,47 @@ export declare const ParsedBubbleSchema: z.ZodObject<{
|
|
|
87
115
|
bubbleName: z.ZodString;
|
|
88
116
|
className: z.ZodString;
|
|
89
117
|
parameters: z.ZodArray<z.ZodObject<{
|
|
118
|
+
location: z.ZodOptional<z.ZodObject<{
|
|
119
|
+
startLine: z.ZodNumber;
|
|
120
|
+
startCol: z.ZodNumber;
|
|
121
|
+
endLine: z.ZodNumber;
|
|
122
|
+
endCol: z.ZodNumber;
|
|
123
|
+
}, "strip", z.ZodTypeAny, {
|
|
124
|
+
startLine: number;
|
|
125
|
+
startCol: number;
|
|
126
|
+
endLine: number;
|
|
127
|
+
endCol: number;
|
|
128
|
+
}, {
|
|
129
|
+
startLine: number;
|
|
130
|
+
startCol: number;
|
|
131
|
+
endLine: number;
|
|
132
|
+
endCol: number;
|
|
133
|
+
}>>;
|
|
90
134
|
variableId: z.ZodOptional<z.ZodNumber>;
|
|
91
135
|
name: z.ZodString;
|
|
92
|
-
value: z.ZodUnknown
|
|
136
|
+
value: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodArray<z.ZodUnknown, "many">]>;
|
|
93
137
|
type: z.ZodNativeEnum<typeof BubbleParameterType>;
|
|
94
138
|
}, "strip", z.ZodTypeAny, {
|
|
139
|
+
value: string | number | boolean | unknown[] | Record<string, unknown>;
|
|
95
140
|
type: BubbleParameterType;
|
|
96
141
|
name: string;
|
|
97
|
-
|
|
142
|
+
location?: {
|
|
143
|
+
startLine: number;
|
|
144
|
+
startCol: number;
|
|
145
|
+
endLine: number;
|
|
146
|
+
endCol: number;
|
|
147
|
+
} | undefined;
|
|
98
148
|
variableId?: number | undefined;
|
|
99
149
|
}, {
|
|
150
|
+
value: string | number | boolean | unknown[] | Record<string, unknown>;
|
|
100
151
|
type: BubbleParameterType;
|
|
101
152
|
name: string;
|
|
102
|
-
|
|
153
|
+
location?: {
|
|
154
|
+
startLine: number;
|
|
155
|
+
startCol: number;
|
|
156
|
+
endLine: number;
|
|
157
|
+
endCol: number;
|
|
158
|
+
} | undefined;
|
|
103
159
|
variableId?: number | undefined;
|
|
104
160
|
}>, "many">;
|
|
105
161
|
hasAwait: z.ZodBoolean;
|
|
@@ -111,9 +167,15 @@ export declare const ParsedBubbleSchema: z.ZodObject<{
|
|
|
111
167
|
bubbleName: string;
|
|
112
168
|
className: string;
|
|
113
169
|
parameters: {
|
|
170
|
+
value: string | number | boolean | unknown[] | Record<string, unknown>;
|
|
114
171
|
type: BubbleParameterType;
|
|
115
172
|
name: string;
|
|
116
|
-
|
|
173
|
+
location?: {
|
|
174
|
+
startLine: number;
|
|
175
|
+
startCol: number;
|
|
176
|
+
endLine: number;
|
|
177
|
+
endCol: number;
|
|
178
|
+
} | undefined;
|
|
117
179
|
variableId?: number | undefined;
|
|
118
180
|
}[];
|
|
119
181
|
hasAwait: boolean;
|
|
@@ -125,9 +187,15 @@ export declare const ParsedBubbleSchema: z.ZodObject<{
|
|
|
125
187
|
bubbleName: string;
|
|
126
188
|
className: string;
|
|
127
189
|
parameters: {
|
|
190
|
+
value: string | number | boolean | unknown[] | Record<string, unknown>;
|
|
128
191
|
type: BubbleParameterType;
|
|
129
192
|
name: string;
|
|
130
|
-
|
|
193
|
+
location?: {
|
|
194
|
+
startLine: number;
|
|
195
|
+
startCol: number;
|
|
196
|
+
endLine: number;
|
|
197
|
+
endCol: number;
|
|
198
|
+
} | undefined;
|
|
131
199
|
variableId?: number | undefined;
|
|
132
200
|
}[];
|
|
133
201
|
hasAwait: boolean;
|
|
@@ -150,19 +218,47 @@ export declare const ParsedBubbleWithInfoSchema: z.ZodObject<{
|
|
|
150
218
|
bubbleName: z.ZodString;
|
|
151
219
|
className: z.ZodString;
|
|
152
220
|
parameters: z.ZodArray<z.ZodObject<{
|
|
221
|
+
location: z.ZodOptional<z.ZodObject<{
|
|
222
|
+
startLine: z.ZodNumber;
|
|
223
|
+
startCol: z.ZodNumber;
|
|
224
|
+
endLine: z.ZodNumber;
|
|
225
|
+
endCol: z.ZodNumber;
|
|
226
|
+
}, "strip", z.ZodTypeAny, {
|
|
227
|
+
startLine: number;
|
|
228
|
+
startCol: number;
|
|
229
|
+
endLine: number;
|
|
230
|
+
endCol: number;
|
|
231
|
+
}, {
|
|
232
|
+
startLine: number;
|
|
233
|
+
startCol: number;
|
|
234
|
+
endLine: number;
|
|
235
|
+
endCol: number;
|
|
236
|
+
}>>;
|
|
153
237
|
variableId: z.ZodOptional<z.ZodNumber>;
|
|
154
238
|
name: z.ZodString;
|
|
155
|
-
value: z.ZodUnknown
|
|
239
|
+
value: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodArray<z.ZodUnknown, "many">]>;
|
|
156
240
|
type: z.ZodNativeEnum<typeof BubbleParameterType>;
|
|
157
241
|
}, "strip", z.ZodTypeAny, {
|
|
242
|
+
value: string | number | boolean | unknown[] | Record<string, unknown>;
|
|
158
243
|
type: BubbleParameterType;
|
|
159
244
|
name: string;
|
|
160
|
-
|
|
245
|
+
location?: {
|
|
246
|
+
startLine: number;
|
|
247
|
+
startCol: number;
|
|
248
|
+
endLine: number;
|
|
249
|
+
endCol: number;
|
|
250
|
+
} | undefined;
|
|
161
251
|
variableId?: number | undefined;
|
|
162
252
|
}, {
|
|
253
|
+
value: string | number | boolean | unknown[] | Record<string, unknown>;
|
|
163
254
|
type: BubbleParameterType;
|
|
164
255
|
name: string;
|
|
165
|
-
|
|
256
|
+
location?: {
|
|
257
|
+
startLine: number;
|
|
258
|
+
startCol: number;
|
|
259
|
+
endLine: number;
|
|
260
|
+
endCol: number;
|
|
261
|
+
} | undefined;
|
|
166
262
|
variableId?: number | undefined;
|
|
167
263
|
}>, "many">;
|
|
168
264
|
hasAwait: z.ZodBoolean;
|
|
@@ -188,47 +284,59 @@ export declare const ParsedBubbleWithInfoSchema: z.ZodObject<{
|
|
|
188
284
|
endCol: number;
|
|
189
285
|
}>;
|
|
190
286
|
}, "strip", z.ZodTypeAny, {
|
|
287
|
+
location: {
|
|
288
|
+
startLine: number;
|
|
289
|
+
startCol: number;
|
|
290
|
+
endLine: number;
|
|
291
|
+
endCol: number;
|
|
292
|
+
};
|
|
191
293
|
variableId: number;
|
|
192
294
|
variableName: string;
|
|
193
|
-
nodeType: "unknown" | "service" | "tool" | "workflow";
|
|
194
295
|
bubbleName: string;
|
|
195
296
|
className: string;
|
|
196
297
|
parameters: {
|
|
298
|
+
value: string | number | boolean | unknown[] | Record<string, unknown>;
|
|
197
299
|
type: BubbleParameterType;
|
|
198
300
|
name: string;
|
|
199
|
-
|
|
301
|
+
location?: {
|
|
302
|
+
startLine: number;
|
|
303
|
+
startCol: number;
|
|
304
|
+
endLine: number;
|
|
305
|
+
endCol: number;
|
|
306
|
+
} | undefined;
|
|
200
307
|
variableId?: number | undefined;
|
|
201
308
|
}[];
|
|
202
309
|
hasAwait: boolean;
|
|
203
310
|
hasActionCall: boolean;
|
|
311
|
+
nodeType: "unknown" | "service" | "tool" | "workflow";
|
|
312
|
+
dependencies?: BubbleName[] | undefined;
|
|
313
|
+
dependencyGraph?: DependencyGraphNode | undefined;
|
|
314
|
+
}, {
|
|
204
315
|
location: {
|
|
205
316
|
startLine: number;
|
|
206
317
|
startCol: number;
|
|
207
318
|
endLine: number;
|
|
208
319
|
endCol: number;
|
|
209
320
|
};
|
|
210
|
-
dependencies?: BubbleName[] | undefined;
|
|
211
|
-
dependencyGraph?: DependencyGraphNode | undefined;
|
|
212
|
-
}, {
|
|
213
321
|
variableId: number;
|
|
214
322
|
variableName: string;
|
|
215
|
-
nodeType: "unknown" | "service" | "tool" | "workflow";
|
|
216
323
|
bubbleName: string;
|
|
217
324
|
className: string;
|
|
218
325
|
parameters: {
|
|
326
|
+
value: string | number | boolean | unknown[] | Record<string, unknown>;
|
|
219
327
|
type: BubbleParameterType;
|
|
220
328
|
name: string;
|
|
221
|
-
|
|
329
|
+
location?: {
|
|
330
|
+
startLine: number;
|
|
331
|
+
startCol: number;
|
|
332
|
+
endLine: number;
|
|
333
|
+
endCol: number;
|
|
334
|
+
} | undefined;
|
|
222
335
|
variableId?: number | undefined;
|
|
223
336
|
}[];
|
|
224
337
|
hasAwait: boolean;
|
|
225
338
|
hasActionCall: boolean;
|
|
226
|
-
|
|
227
|
-
startLine: number;
|
|
228
|
-
startCol: number;
|
|
229
|
-
endLine: number;
|
|
230
|
-
endCol: number;
|
|
231
|
-
};
|
|
339
|
+
nodeType: "unknown" | "service" | "tool" | "workflow";
|
|
232
340
|
dependencies?: BubbleName[] | undefined;
|
|
233
341
|
dependencyGraph?: DependencyGraphNode | undefined;
|
|
234
342
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bubble-definition-schema.d.ts","sourceRoot":"","sources":["../src/bubble-definition-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAGrD,oBAAY,mBAAmB;IAC7B,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,GAAG,QAAQ;IACX,QAAQ,aAAa;IACrB,UAAU,eAAe;IACzB,OAAO,YAAY;CACpB;AAGD,eAAO,MAAM,4BAA4B,EAAE,MAAM,CAC/C,cAAc,EACd,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,
|
|
1
|
+
{"version":3,"file":"bubble-definition-schema.d.ts","sourceRoot":"","sources":["../src/bubble-definition-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAGrD,oBAAY,mBAAmB;IAC7B,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,GAAG,QAAQ;IACX,QAAQ,aAAa;IACrB,UAAU,eAAe;IACzB,OAAO,YAAY;CACpB;AAGD,eAAO,MAAM,4BAA4B,EAAE,MAAM,CAC/C,cAAc,EACd,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAoBpC,CAAC;AAGF,eAAO,MAAM,mCAAmC,UAG/C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ACF,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAChD,OAAO,0BAA0B,CAClC,CAAC"}
|
|
@@ -28,6 +28,7 @@ export const CREDENTIAL_CONFIGURATION_MAP = {
|
|
|
28
28
|
[CredentialType.CLOUDFLARE_R2_ACCESS_KEY]: {},
|
|
29
29
|
[CredentialType.CLOUDFLARE_R2_SECRET_KEY]: {},
|
|
30
30
|
[CredentialType.CLOUDFLARE_R2_ACCOUNT_ID]: {},
|
|
31
|
+
[CredentialType.APIFY_CRED]: {},
|
|
31
32
|
[CredentialType.GOOGLE_DRIVE_CRED]: {},
|
|
32
33
|
[CredentialType.GMAIL_CRED]: {},
|
|
33
34
|
[CredentialType.GOOGLE_SHEETS_CRED]: {},
|
|
@@ -41,9 +42,26 @@ export const BUBBLE_NAMES_WITH_CONTEXT_INJECTION = [
|
|
|
41
42
|
// Zod schemas for validation and type inference
|
|
42
43
|
export const BubbleParameterTypeSchema = z.nativeEnum(BubbleParameterType);
|
|
43
44
|
export const BubbleParameterSchema = z.object({
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
location: z.optional(z.object({
|
|
46
|
+
startLine: z.number(),
|
|
47
|
+
startCol: z.number(),
|
|
48
|
+
endLine: z.number(),
|
|
49
|
+
endCol: z.number(),
|
|
50
|
+
})),
|
|
51
|
+
variableId: z
|
|
52
|
+
.number()
|
|
53
|
+
.optional()
|
|
54
|
+
.describe('The variable id of the parameter'),
|
|
55
|
+
name: z.string().describe('The name of the parameter'),
|
|
56
|
+
value: z
|
|
57
|
+
.union([
|
|
58
|
+
z.string(),
|
|
59
|
+
z.number(),
|
|
60
|
+
z.boolean(),
|
|
61
|
+
z.record(z.unknown()),
|
|
62
|
+
z.array(z.unknown()),
|
|
63
|
+
])
|
|
64
|
+
.describe('The value of the parameter'),
|
|
47
65
|
type: BubbleParameterTypeSchema,
|
|
48
66
|
});
|
|
49
67
|
export const BubbleNodeTypeSchema = z.enum([
|
|
@@ -1 +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