@bubblelab/bubble-core 0.1.174 → 0.1.176
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/dist/bubble-bundle.d.ts +105 -27
- package/dist/bubble-factory.d.ts.map +1 -1
- package/dist/bubble-factory.js +8 -0
- package/dist/bubble-factory.js.map +1 -1
- package/dist/bubbles/service-bubble/attio/attio.d.ts +563 -0
- package/dist/bubbles/service-bubble/attio/attio.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/attio/attio.js +484 -0
- package/dist/bubbles/service-bubble/attio/attio.js.map +1 -0
- package/dist/bubbles/service-bubble/attio/attio.schema.d.ts +527 -0
- package/dist/bubbles/service-bubble/attio/attio.schema.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/attio/attio.schema.js +386 -0
- package/dist/bubbles/service-bubble/attio/attio.schema.js.map +1 -0
- package/dist/bubbles/service-bubble/attio/attio.utils.d.ts +1 -0
- package/dist/bubbles/service-bubble/attio/attio.utils.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/attio/attio.utils.js +4 -0
- package/dist/bubbles/service-bubble/attio/attio.utils.js.map +1 -0
- package/dist/bubbles/service-bubble/attio/index.d.ts +3 -0
- package/dist/bubbles/service-bubble/attio/index.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/attio/index.js +3 -0
- package/dist/bubbles/service-bubble/attio/index.js.map +1 -0
- package/dist/bubbles/service-bubble/capability-pipeline.js +2 -2
- package/dist/bubbles/service-bubble/capability-pipeline.js.map +1 -1
- package/dist/bubbles/service-bubble/hubspot/hubspot.d.ts +388 -0
- package/dist/bubbles/service-bubble/hubspot/hubspot.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/hubspot/hubspot.js +241 -0
- package/dist/bubbles/service-bubble/hubspot/hubspot.js.map +1 -0
- package/dist/bubbles/service-bubble/hubspot/hubspot.schema.d.ts +345 -0
- package/dist/bubbles/service-bubble/hubspot/hubspot.schema.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/hubspot/hubspot.schema.js +180 -0
- package/dist/bubbles/service-bubble/hubspot/hubspot.schema.js.map +1 -0
- package/dist/bubbles/service-bubble/hubspot/index.d.ts +3 -0
- package/dist/bubbles/service-bubble/hubspot/index.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/hubspot/index.js +3 -0
- package/dist/bubbles/service-bubble/hubspot/index.js.map +1 -0
- package/dist/bubbles/tool-bubble/browser-tools/_shared/ai/ai-browser-agent.d.ts +5 -30
- package/dist/bubbles/tool-bubble/browser-tools/_shared/ai/ai-browser-agent.d.ts.map +1 -1
- package/dist/bubbles/tool-bubble/browser-tools/_shared/ai/ai-browser-agent.js +70 -204
- package/dist/bubbles/tool-bubble/browser-tools/_shared/ai/ai-browser-agent.js.map +1 -1
- package/dist/bubbles/tool-bubble/browser-tools/_shared/ai/ai-browser-agent.types.d.ts +4 -0
- package/dist/bubbles/tool-bubble/browser-tools/_shared/ai/ai-browser-agent.types.d.ts.map +1 -1
- package/dist/bubbles/tool-bubble/browser-tools/linkedin-connection/tool.d.ts +31 -0
- package/dist/bubbles/tool-bubble/browser-tools/linkedin-connection/tool.d.ts.map +1 -1
- package/dist/bubbles/tool-bubble/browser-tools/linkedin-connection/tool.js +202 -39
- package/dist/bubbles/tool-bubble/browser-tools/linkedin-connection/tool.js.map +1 -1
- package/dist/bubbles.json +1598 -2
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,345 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { CredentialType } from '@bubblelab/shared-schemas';
|
|
3
|
+
export declare const HubSpotParamsSchema: z.ZodDiscriminatedUnion<"operation", [z.ZodObject<{
|
|
4
|
+
operation: z.ZodLiteral<"create_record">;
|
|
5
|
+
object_type: z.ZodEnum<["contacts", "companies", "deals", "tickets"]>;
|
|
6
|
+
properties: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
7
|
+
credentials: z.ZodOptional<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
properties: Record<string, string>;
|
|
10
|
+
operation: "create_record";
|
|
11
|
+
object_type: "deals" | "contacts" | "companies" | "tickets";
|
|
12
|
+
credentials?: Partial<Record<CredentialType, string>> | undefined;
|
|
13
|
+
}, {
|
|
14
|
+
properties: Record<string, string>;
|
|
15
|
+
operation: "create_record";
|
|
16
|
+
object_type: "deals" | "contacts" | "companies" | "tickets";
|
|
17
|
+
credentials?: Partial<Record<CredentialType, string>> | undefined;
|
|
18
|
+
}>, z.ZodObject<{
|
|
19
|
+
operation: z.ZodLiteral<"get_record">;
|
|
20
|
+
object_type: z.ZodEnum<["contacts", "companies", "deals", "tickets"]>;
|
|
21
|
+
record_id: z.ZodString;
|
|
22
|
+
properties: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
23
|
+
credentials: z.ZodOptional<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>;
|
|
24
|
+
}, "strip", z.ZodTypeAny, {
|
|
25
|
+
operation: "get_record";
|
|
26
|
+
record_id: string;
|
|
27
|
+
object_type: "deals" | "contacts" | "companies" | "tickets";
|
|
28
|
+
properties?: string[] | undefined;
|
|
29
|
+
credentials?: Partial<Record<CredentialType, string>> | undefined;
|
|
30
|
+
}, {
|
|
31
|
+
operation: "get_record";
|
|
32
|
+
record_id: string;
|
|
33
|
+
object_type: "deals" | "contacts" | "companies" | "tickets";
|
|
34
|
+
properties?: string[] | undefined;
|
|
35
|
+
credentials?: Partial<Record<CredentialType, string>> | undefined;
|
|
36
|
+
}>, z.ZodObject<{
|
|
37
|
+
operation: z.ZodLiteral<"update_record">;
|
|
38
|
+
object_type: z.ZodEnum<["contacts", "companies", "deals", "tickets"]>;
|
|
39
|
+
record_id: z.ZodString;
|
|
40
|
+
properties: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
41
|
+
credentials: z.ZodOptional<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>;
|
|
42
|
+
}, "strip", z.ZodTypeAny, {
|
|
43
|
+
properties: Record<string, string>;
|
|
44
|
+
operation: "update_record";
|
|
45
|
+
record_id: string;
|
|
46
|
+
object_type: "deals" | "contacts" | "companies" | "tickets";
|
|
47
|
+
credentials?: Partial<Record<CredentialType, string>> | undefined;
|
|
48
|
+
}, {
|
|
49
|
+
properties: Record<string, string>;
|
|
50
|
+
operation: "update_record";
|
|
51
|
+
record_id: string;
|
|
52
|
+
object_type: "deals" | "contacts" | "companies" | "tickets";
|
|
53
|
+
credentials?: Partial<Record<CredentialType, string>> | undefined;
|
|
54
|
+
}>, z.ZodObject<{
|
|
55
|
+
operation: z.ZodLiteral<"search_records">;
|
|
56
|
+
object_type: z.ZodEnum<["contacts", "companies", "deals", "tickets"]>;
|
|
57
|
+
filter_groups: z.ZodArray<z.ZodObject<{
|
|
58
|
+
filters: z.ZodArray<z.ZodObject<{
|
|
59
|
+
propertyName: z.ZodString;
|
|
60
|
+
operator: z.ZodEnum<["EQ", "NEQ", "LT", "LTE", "GT", "GTE", "BETWEEN", "IN", "NOT_IN", "HAS_PROPERTY", "NOT_HAS_PROPERTY", "CONTAINS_TOKEN", "NOT_CONTAINS_TOKEN"]>;
|
|
61
|
+
value: z.ZodOptional<z.ZodString>;
|
|
62
|
+
highValue: z.ZodOptional<z.ZodString>;
|
|
63
|
+
values: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
64
|
+
}, "strip", z.ZodTypeAny, {
|
|
65
|
+
propertyName: string;
|
|
66
|
+
operator: "GT" | "IN" | "LT" | "EQ" | "NEQ" | "LTE" | "GTE" | "BETWEEN" | "NOT_IN" | "HAS_PROPERTY" | "NOT_HAS_PROPERTY" | "CONTAINS_TOKEN" | "NOT_CONTAINS_TOKEN";
|
|
67
|
+
value?: string | undefined;
|
|
68
|
+
values?: string[] | undefined;
|
|
69
|
+
highValue?: string | undefined;
|
|
70
|
+
}, {
|
|
71
|
+
propertyName: string;
|
|
72
|
+
operator: "GT" | "IN" | "LT" | "EQ" | "NEQ" | "LTE" | "GTE" | "BETWEEN" | "NOT_IN" | "HAS_PROPERTY" | "NOT_HAS_PROPERTY" | "CONTAINS_TOKEN" | "NOT_CONTAINS_TOKEN";
|
|
73
|
+
value?: string | undefined;
|
|
74
|
+
values?: string[] | undefined;
|
|
75
|
+
highValue?: string | undefined;
|
|
76
|
+
}>, "many">;
|
|
77
|
+
}, "strip", z.ZodTypeAny, {
|
|
78
|
+
filters: {
|
|
79
|
+
propertyName: string;
|
|
80
|
+
operator: "GT" | "IN" | "LT" | "EQ" | "NEQ" | "LTE" | "GTE" | "BETWEEN" | "NOT_IN" | "HAS_PROPERTY" | "NOT_HAS_PROPERTY" | "CONTAINS_TOKEN" | "NOT_CONTAINS_TOKEN";
|
|
81
|
+
value?: string | undefined;
|
|
82
|
+
values?: string[] | undefined;
|
|
83
|
+
highValue?: string | undefined;
|
|
84
|
+
}[];
|
|
85
|
+
}, {
|
|
86
|
+
filters: {
|
|
87
|
+
propertyName: string;
|
|
88
|
+
operator: "GT" | "IN" | "LT" | "EQ" | "NEQ" | "LTE" | "GTE" | "BETWEEN" | "NOT_IN" | "HAS_PROPERTY" | "NOT_HAS_PROPERTY" | "CONTAINS_TOKEN" | "NOT_CONTAINS_TOKEN";
|
|
89
|
+
value?: string | undefined;
|
|
90
|
+
values?: string[] | undefined;
|
|
91
|
+
highValue?: string | undefined;
|
|
92
|
+
}[];
|
|
93
|
+
}>, "many">;
|
|
94
|
+
properties: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
95
|
+
limit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
96
|
+
after: z.ZodOptional<z.ZodString>;
|
|
97
|
+
credentials: z.ZodOptional<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>;
|
|
98
|
+
}, "strip", z.ZodTypeAny, {
|
|
99
|
+
operation: "search_records";
|
|
100
|
+
limit: number;
|
|
101
|
+
object_type: "deals" | "contacts" | "companies" | "tickets";
|
|
102
|
+
filter_groups: {
|
|
103
|
+
filters: {
|
|
104
|
+
propertyName: string;
|
|
105
|
+
operator: "GT" | "IN" | "LT" | "EQ" | "NEQ" | "LTE" | "GTE" | "BETWEEN" | "NOT_IN" | "HAS_PROPERTY" | "NOT_HAS_PROPERTY" | "CONTAINS_TOKEN" | "NOT_CONTAINS_TOKEN";
|
|
106
|
+
value?: string | undefined;
|
|
107
|
+
values?: string[] | undefined;
|
|
108
|
+
highValue?: string | undefined;
|
|
109
|
+
}[];
|
|
110
|
+
}[];
|
|
111
|
+
properties?: string[] | undefined;
|
|
112
|
+
credentials?: Partial<Record<CredentialType, string>> | undefined;
|
|
113
|
+
after?: string | undefined;
|
|
114
|
+
}, {
|
|
115
|
+
operation: "search_records";
|
|
116
|
+
object_type: "deals" | "contacts" | "companies" | "tickets";
|
|
117
|
+
filter_groups: {
|
|
118
|
+
filters: {
|
|
119
|
+
propertyName: string;
|
|
120
|
+
operator: "GT" | "IN" | "LT" | "EQ" | "NEQ" | "LTE" | "GTE" | "BETWEEN" | "NOT_IN" | "HAS_PROPERTY" | "NOT_HAS_PROPERTY" | "CONTAINS_TOKEN" | "NOT_CONTAINS_TOKEN";
|
|
121
|
+
value?: string | undefined;
|
|
122
|
+
values?: string[] | undefined;
|
|
123
|
+
highValue?: string | undefined;
|
|
124
|
+
}[];
|
|
125
|
+
}[];
|
|
126
|
+
properties?: string[] | undefined;
|
|
127
|
+
credentials?: Partial<Record<CredentialType, string>> | undefined;
|
|
128
|
+
limit?: number | undefined;
|
|
129
|
+
after?: string | undefined;
|
|
130
|
+
}>]>;
|
|
131
|
+
export declare const HubSpotResultSchema: z.ZodDiscriminatedUnion<"operation", [z.ZodObject<{
|
|
132
|
+
operation: z.ZodLiteral<"create_record">;
|
|
133
|
+
success: z.ZodBoolean;
|
|
134
|
+
record: z.ZodOptional<z.ZodObject<{
|
|
135
|
+
id: z.ZodString;
|
|
136
|
+
properties: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
137
|
+
createdAt: z.ZodOptional<z.ZodString>;
|
|
138
|
+
updatedAt: z.ZodOptional<z.ZodString>;
|
|
139
|
+
archived: z.ZodOptional<z.ZodBoolean>;
|
|
140
|
+
}, "strip", z.ZodTypeAny, {
|
|
141
|
+
properties: Record<string, unknown>;
|
|
142
|
+
id: string;
|
|
143
|
+
createdAt?: string | undefined;
|
|
144
|
+
archived?: boolean | undefined;
|
|
145
|
+
updatedAt?: string | undefined;
|
|
146
|
+
}, {
|
|
147
|
+
properties: Record<string, unknown>;
|
|
148
|
+
id: string;
|
|
149
|
+
createdAt?: string | undefined;
|
|
150
|
+
archived?: boolean | undefined;
|
|
151
|
+
updatedAt?: string | undefined;
|
|
152
|
+
}>>;
|
|
153
|
+
error: z.ZodString;
|
|
154
|
+
}, "strip", z.ZodTypeAny, {
|
|
155
|
+
success: boolean;
|
|
156
|
+
error: string;
|
|
157
|
+
operation: "create_record";
|
|
158
|
+
record?: {
|
|
159
|
+
properties: Record<string, unknown>;
|
|
160
|
+
id: string;
|
|
161
|
+
createdAt?: string | undefined;
|
|
162
|
+
archived?: boolean | undefined;
|
|
163
|
+
updatedAt?: string | undefined;
|
|
164
|
+
} | undefined;
|
|
165
|
+
}, {
|
|
166
|
+
success: boolean;
|
|
167
|
+
error: string;
|
|
168
|
+
operation: "create_record";
|
|
169
|
+
record?: {
|
|
170
|
+
properties: Record<string, unknown>;
|
|
171
|
+
id: string;
|
|
172
|
+
createdAt?: string | undefined;
|
|
173
|
+
archived?: boolean | undefined;
|
|
174
|
+
updatedAt?: string | undefined;
|
|
175
|
+
} | undefined;
|
|
176
|
+
}>, z.ZodObject<{
|
|
177
|
+
operation: z.ZodLiteral<"get_record">;
|
|
178
|
+
success: z.ZodBoolean;
|
|
179
|
+
record: z.ZodOptional<z.ZodObject<{
|
|
180
|
+
id: z.ZodString;
|
|
181
|
+
properties: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
182
|
+
createdAt: z.ZodOptional<z.ZodString>;
|
|
183
|
+
updatedAt: z.ZodOptional<z.ZodString>;
|
|
184
|
+
archived: z.ZodOptional<z.ZodBoolean>;
|
|
185
|
+
}, "strip", z.ZodTypeAny, {
|
|
186
|
+
properties: Record<string, unknown>;
|
|
187
|
+
id: string;
|
|
188
|
+
createdAt?: string | undefined;
|
|
189
|
+
archived?: boolean | undefined;
|
|
190
|
+
updatedAt?: string | undefined;
|
|
191
|
+
}, {
|
|
192
|
+
properties: Record<string, unknown>;
|
|
193
|
+
id: string;
|
|
194
|
+
createdAt?: string | undefined;
|
|
195
|
+
archived?: boolean | undefined;
|
|
196
|
+
updatedAt?: string | undefined;
|
|
197
|
+
}>>;
|
|
198
|
+
error: z.ZodString;
|
|
199
|
+
}, "strip", z.ZodTypeAny, {
|
|
200
|
+
success: boolean;
|
|
201
|
+
error: string;
|
|
202
|
+
operation: "get_record";
|
|
203
|
+
record?: {
|
|
204
|
+
properties: Record<string, unknown>;
|
|
205
|
+
id: string;
|
|
206
|
+
createdAt?: string | undefined;
|
|
207
|
+
archived?: boolean | undefined;
|
|
208
|
+
updatedAt?: string | undefined;
|
|
209
|
+
} | undefined;
|
|
210
|
+
}, {
|
|
211
|
+
success: boolean;
|
|
212
|
+
error: string;
|
|
213
|
+
operation: "get_record";
|
|
214
|
+
record?: {
|
|
215
|
+
properties: Record<string, unknown>;
|
|
216
|
+
id: string;
|
|
217
|
+
createdAt?: string | undefined;
|
|
218
|
+
archived?: boolean | undefined;
|
|
219
|
+
updatedAt?: string | undefined;
|
|
220
|
+
} | undefined;
|
|
221
|
+
}>, z.ZodObject<{
|
|
222
|
+
operation: z.ZodLiteral<"update_record">;
|
|
223
|
+
success: z.ZodBoolean;
|
|
224
|
+
record: z.ZodOptional<z.ZodObject<{
|
|
225
|
+
id: z.ZodString;
|
|
226
|
+
properties: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
227
|
+
createdAt: z.ZodOptional<z.ZodString>;
|
|
228
|
+
updatedAt: z.ZodOptional<z.ZodString>;
|
|
229
|
+
archived: z.ZodOptional<z.ZodBoolean>;
|
|
230
|
+
}, "strip", z.ZodTypeAny, {
|
|
231
|
+
properties: Record<string, unknown>;
|
|
232
|
+
id: string;
|
|
233
|
+
createdAt?: string | undefined;
|
|
234
|
+
archived?: boolean | undefined;
|
|
235
|
+
updatedAt?: string | undefined;
|
|
236
|
+
}, {
|
|
237
|
+
properties: Record<string, unknown>;
|
|
238
|
+
id: string;
|
|
239
|
+
createdAt?: string | undefined;
|
|
240
|
+
archived?: boolean | undefined;
|
|
241
|
+
updatedAt?: string | undefined;
|
|
242
|
+
}>>;
|
|
243
|
+
error: z.ZodString;
|
|
244
|
+
}, "strip", z.ZodTypeAny, {
|
|
245
|
+
success: boolean;
|
|
246
|
+
error: string;
|
|
247
|
+
operation: "update_record";
|
|
248
|
+
record?: {
|
|
249
|
+
properties: Record<string, unknown>;
|
|
250
|
+
id: string;
|
|
251
|
+
createdAt?: string | undefined;
|
|
252
|
+
archived?: boolean | undefined;
|
|
253
|
+
updatedAt?: string | undefined;
|
|
254
|
+
} | undefined;
|
|
255
|
+
}, {
|
|
256
|
+
success: boolean;
|
|
257
|
+
error: string;
|
|
258
|
+
operation: "update_record";
|
|
259
|
+
record?: {
|
|
260
|
+
properties: Record<string, unknown>;
|
|
261
|
+
id: string;
|
|
262
|
+
createdAt?: string | undefined;
|
|
263
|
+
archived?: boolean | undefined;
|
|
264
|
+
updatedAt?: string | undefined;
|
|
265
|
+
} | undefined;
|
|
266
|
+
}>, z.ZodObject<{
|
|
267
|
+
operation: z.ZodLiteral<"search_records">;
|
|
268
|
+
success: z.ZodBoolean;
|
|
269
|
+
results: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
270
|
+
id: z.ZodString;
|
|
271
|
+
properties: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
272
|
+
createdAt: z.ZodOptional<z.ZodString>;
|
|
273
|
+
updatedAt: z.ZodOptional<z.ZodString>;
|
|
274
|
+
archived: z.ZodOptional<z.ZodBoolean>;
|
|
275
|
+
}, "strip", z.ZodTypeAny, {
|
|
276
|
+
properties: Record<string, unknown>;
|
|
277
|
+
id: string;
|
|
278
|
+
createdAt?: string | undefined;
|
|
279
|
+
archived?: boolean | undefined;
|
|
280
|
+
updatedAt?: string | undefined;
|
|
281
|
+
}, {
|
|
282
|
+
properties: Record<string, unknown>;
|
|
283
|
+
id: string;
|
|
284
|
+
createdAt?: string | undefined;
|
|
285
|
+
archived?: boolean | undefined;
|
|
286
|
+
updatedAt?: string | undefined;
|
|
287
|
+
}>, "many">>;
|
|
288
|
+
total: z.ZodOptional<z.ZodNumber>;
|
|
289
|
+
paging: z.ZodOptional<z.ZodObject<{
|
|
290
|
+
next: z.ZodOptional<z.ZodObject<{
|
|
291
|
+
after: z.ZodString;
|
|
292
|
+
}, "strip", z.ZodTypeAny, {
|
|
293
|
+
after: string;
|
|
294
|
+
}, {
|
|
295
|
+
after: string;
|
|
296
|
+
}>>;
|
|
297
|
+
}, "strip", z.ZodTypeAny, {
|
|
298
|
+
next?: {
|
|
299
|
+
after: string;
|
|
300
|
+
} | undefined;
|
|
301
|
+
}, {
|
|
302
|
+
next?: {
|
|
303
|
+
after: string;
|
|
304
|
+
} | undefined;
|
|
305
|
+
}>>;
|
|
306
|
+
error: z.ZodString;
|
|
307
|
+
}, "strip", z.ZodTypeAny, {
|
|
308
|
+
success: boolean;
|
|
309
|
+
error: string;
|
|
310
|
+
operation: "search_records";
|
|
311
|
+
total?: number | undefined;
|
|
312
|
+
results?: {
|
|
313
|
+
properties: Record<string, unknown>;
|
|
314
|
+
id: string;
|
|
315
|
+
createdAt?: string | undefined;
|
|
316
|
+
archived?: boolean | undefined;
|
|
317
|
+
updatedAt?: string | undefined;
|
|
318
|
+
}[] | undefined;
|
|
319
|
+
paging?: {
|
|
320
|
+
next?: {
|
|
321
|
+
after: string;
|
|
322
|
+
} | undefined;
|
|
323
|
+
} | undefined;
|
|
324
|
+
}, {
|
|
325
|
+
success: boolean;
|
|
326
|
+
error: string;
|
|
327
|
+
operation: "search_records";
|
|
328
|
+
total?: number | undefined;
|
|
329
|
+
results?: {
|
|
330
|
+
properties: Record<string, unknown>;
|
|
331
|
+
id: string;
|
|
332
|
+
createdAt?: string | undefined;
|
|
333
|
+
archived?: boolean | undefined;
|
|
334
|
+
updatedAt?: string | undefined;
|
|
335
|
+
}[] | undefined;
|
|
336
|
+
paging?: {
|
|
337
|
+
next?: {
|
|
338
|
+
after: string;
|
|
339
|
+
} | undefined;
|
|
340
|
+
} | undefined;
|
|
341
|
+
}>]>;
|
|
342
|
+
export type HubSpotParams = z.output<typeof HubSpotParamsSchema>;
|
|
343
|
+
export type HubSpotParamsInput = z.input<typeof HubSpotParamsSchema>;
|
|
344
|
+
export type HubSpotResult = z.output<typeof HubSpotResultSchema>;
|
|
345
|
+
//# sourceMappingURL=hubspot.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hubspot.schema.d.ts","sourceRoot":"","sources":["../../../../src/bubbles/service-bubble/hubspot/hubspot.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AA+E3D,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAyD9B,CAAC;AAcH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAqD9B,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,mBAAmB,CAAC,CAAC;AACjE,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AACrE,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { CredentialType } from '@bubblelab/shared-schemas';
|
|
3
|
+
// Shared field helpers
|
|
4
|
+
const credentialsField = z
|
|
5
|
+
.record(z.nativeEnum(CredentialType), z.string())
|
|
6
|
+
.optional()
|
|
7
|
+
.describe('Object mapping credential types to values (injected at runtime)');
|
|
8
|
+
const objectTypeField = z
|
|
9
|
+
.enum(['contacts', 'companies', 'deals', 'tickets'])
|
|
10
|
+
.describe('HubSpot CRM object type to operate on (contacts, companies, deals, or tickets)');
|
|
11
|
+
const propertiesField = z
|
|
12
|
+
.record(z.string(), z.string())
|
|
13
|
+
.describe('Object properties as key-value pairs. Common contact properties: email, firstname, lastname, phone, company. Common company properties: name, domain, industry. Common deal properties: dealname, pipeline, dealstage, amount. Common ticket properties: subject, content, hs_pipeline, hs_pipeline_stage.');
|
|
14
|
+
const propertiesListField = z
|
|
15
|
+
.array(z.string())
|
|
16
|
+
.optional()
|
|
17
|
+
.describe('List of property names to include in the response. If not specified, default properties are returned.');
|
|
18
|
+
const recordIdField = z
|
|
19
|
+
.string()
|
|
20
|
+
.min(1, 'Record ID is required')
|
|
21
|
+
.describe('HubSpot record ID');
|
|
22
|
+
// Filter schema for search operations
|
|
23
|
+
const FilterSchema = z
|
|
24
|
+
.object({
|
|
25
|
+
propertyName: z
|
|
26
|
+
.string()
|
|
27
|
+
.describe('Property name to filter on (e.g., "email", "firstname")'),
|
|
28
|
+
operator: z
|
|
29
|
+
.enum([
|
|
30
|
+
'EQ',
|
|
31
|
+
'NEQ',
|
|
32
|
+
'LT',
|
|
33
|
+
'LTE',
|
|
34
|
+
'GT',
|
|
35
|
+
'GTE',
|
|
36
|
+
'BETWEEN',
|
|
37
|
+
'IN',
|
|
38
|
+
'NOT_IN',
|
|
39
|
+
'HAS_PROPERTY',
|
|
40
|
+
'NOT_HAS_PROPERTY',
|
|
41
|
+
'CONTAINS_TOKEN',
|
|
42
|
+
'NOT_CONTAINS_TOKEN',
|
|
43
|
+
])
|
|
44
|
+
.describe('Filter operator'),
|
|
45
|
+
value: z.string().optional().describe('Value to compare against'),
|
|
46
|
+
highValue: z
|
|
47
|
+
.string()
|
|
48
|
+
.optional()
|
|
49
|
+
.describe('Upper bound value for BETWEEN operator'),
|
|
50
|
+
values: z
|
|
51
|
+
.array(z.string())
|
|
52
|
+
.optional()
|
|
53
|
+
.describe('Array of values for IN/NOT_IN operators'),
|
|
54
|
+
})
|
|
55
|
+
.describe('A single filter condition');
|
|
56
|
+
const FilterGroupSchema = z
|
|
57
|
+
.object({
|
|
58
|
+
filters: z
|
|
59
|
+
.array(FilterSchema)
|
|
60
|
+
.min(1)
|
|
61
|
+
.describe('Filters within this group (combined with AND)'),
|
|
62
|
+
})
|
|
63
|
+
.describe('A group of filters combined with AND. Multiple groups are combined with OR.');
|
|
64
|
+
// Parameter schema using discriminated union
|
|
65
|
+
export const HubSpotParamsSchema = z.discriminatedUnion('operation', [
|
|
66
|
+
// Create record
|
|
67
|
+
z.object({
|
|
68
|
+
operation: z.literal('create_record').describe('Create a new CRM record'),
|
|
69
|
+
object_type: objectTypeField,
|
|
70
|
+
properties: propertiesField,
|
|
71
|
+
credentials: credentialsField,
|
|
72
|
+
}),
|
|
73
|
+
// Get record
|
|
74
|
+
z.object({
|
|
75
|
+
operation: z
|
|
76
|
+
.literal('get_record')
|
|
77
|
+
.describe('Retrieve a single CRM record by ID'),
|
|
78
|
+
object_type: objectTypeField,
|
|
79
|
+
record_id: recordIdField,
|
|
80
|
+
properties: propertiesListField,
|
|
81
|
+
credentials: credentialsField,
|
|
82
|
+
}),
|
|
83
|
+
// Update record
|
|
84
|
+
z.object({
|
|
85
|
+
operation: z
|
|
86
|
+
.literal('update_record')
|
|
87
|
+
.describe('Update an existing CRM record'),
|
|
88
|
+
object_type: objectTypeField,
|
|
89
|
+
record_id: recordIdField,
|
|
90
|
+
properties: propertiesField,
|
|
91
|
+
credentials: credentialsField,
|
|
92
|
+
}),
|
|
93
|
+
// Search records
|
|
94
|
+
z.object({
|
|
95
|
+
operation: z
|
|
96
|
+
.literal('search_records')
|
|
97
|
+
.describe('Search CRM records with filters'),
|
|
98
|
+
object_type: objectTypeField,
|
|
99
|
+
filter_groups: z
|
|
100
|
+
.array(FilterGroupSchema)
|
|
101
|
+
.min(1)
|
|
102
|
+
.describe('Filter groups for the search query. Groups are combined with OR, filters within a group with AND.'),
|
|
103
|
+
properties: propertiesListField,
|
|
104
|
+
limit: z
|
|
105
|
+
.number()
|
|
106
|
+
.min(1)
|
|
107
|
+
.max(200)
|
|
108
|
+
.optional()
|
|
109
|
+
.default(10)
|
|
110
|
+
.describe('Maximum number of results to return (1-200, default 10)'),
|
|
111
|
+
after: z
|
|
112
|
+
.string()
|
|
113
|
+
.optional()
|
|
114
|
+
.describe('Pagination cursor for next page of results'),
|
|
115
|
+
credentials: credentialsField,
|
|
116
|
+
}),
|
|
117
|
+
]);
|
|
118
|
+
// HubSpot record schema for response data
|
|
119
|
+
const HubSpotRecordSchema = z
|
|
120
|
+
.object({
|
|
121
|
+
id: z.string().describe('Record ID'),
|
|
122
|
+
properties: z.record(z.string(), z.unknown()).describe('Record properties'),
|
|
123
|
+
createdAt: z.string().optional().describe('Creation timestamp'),
|
|
124
|
+
updatedAt: z.string().optional().describe('Last update timestamp'),
|
|
125
|
+
archived: z.boolean().optional().describe('Whether the record is archived'),
|
|
126
|
+
})
|
|
127
|
+
.describe('A HubSpot CRM record');
|
|
128
|
+
// Result schema
|
|
129
|
+
export const HubSpotResultSchema = z.discriminatedUnion('operation', [
|
|
130
|
+
// Create result
|
|
131
|
+
z.object({
|
|
132
|
+
operation: z.literal('create_record').describe('Create a new CRM record'),
|
|
133
|
+
success: z.boolean().describe('Whether the operation was successful'),
|
|
134
|
+
record: HubSpotRecordSchema.optional().describe('Created record'),
|
|
135
|
+
error: z.string().describe('Error message if operation failed'),
|
|
136
|
+
}),
|
|
137
|
+
// Get result
|
|
138
|
+
z.object({
|
|
139
|
+
operation: z
|
|
140
|
+
.literal('get_record')
|
|
141
|
+
.describe('Retrieve a single CRM record by ID'),
|
|
142
|
+
success: z.boolean().describe('Whether the operation was successful'),
|
|
143
|
+
record: HubSpotRecordSchema.optional().describe('Retrieved record'),
|
|
144
|
+
error: z.string().describe('Error message if operation failed'),
|
|
145
|
+
}),
|
|
146
|
+
// Update result
|
|
147
|
+
z.object({
|
|
148
|
+
operation: z
|
|
149
|
+
.literal('update_record')
|
|
150
|
+
.describe('Update an existing CRM record'),
|
|
151
|
+
success: z.boolean().describe('Whether the operation was successful'),
|
|
152
|
+
record: HubSpotRecordSchema.optional().describe('Updated record'),
|
|
153
|
+
error: z.string().describe('Error message if operation failed'),
|
|
154
|
+
}),
|
|
155
|
+
// Search result
|
|
156
|
+
z.object({
|
|
157
|
+
operation: z
|
|
158
|
+
.literal('search_records')
|
|
159
|
+
.describe('Search CRM records with filters'),
|
|
160
|
+
success: z.boolean().describe('Whether the operation was successful'),
|
|
161
|
+
results: z
|
|
162
|
+
.array(HubSpotRecordSchema)
|
|
163
|
+
.optional()
|
|
164
|
+
.describe('Matching records'),
|
|
165
|
+
total: z.number().optional().describe('Total number of matching records'),
|
|
166
|
+
paging: z
|
|
167
|
+
.object({
|
|
168
|
+
next: z
|
|
169
|
+
.object({
|
|
170
|
+
after: z.string().describe('Cursor for the next page'),
|
|
171
|
+
})
|
|
172
|
+
.optional()
|
|
173
|
+
.describe('Pagination info for the next page'),
|
|
174
|
+
})
|
|
175
|
+
.optional()
|
|
176
|
+
.describe('Pagination information'),
|
|
177
|
+
error: z.string().describe('Error message if operation failed'),
|
|
178
|
+
}),
|
|
179
|
+
]);
|
|
180
|
+
//# sourceMappingURL=hubspot.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hubspot.schema.js","sourceRoot":"","sources":["../../../../src/bubbles/service-bubble/hubspot/hubspot.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D,uBAAuB;AACvB,MAAM,gBAAgB,GAAG,CAAC;KACvB,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;KAChD,QAAQ,EAAE;KACV,QAAQ,CAAC,iEAAiE,CAAC,CAAC;AAE/E,MAAM,eAAe,GAAG,CAAC;KACtB,IAAI,CAAC,CAAC,UAAU,EAAE,WAAW,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC;KACnD,QAAQ,CACP,gFAAgF,CACjF,CAAC;AAEJ,MAAM,eAAe,GAAG,CAAC;KACtB,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;KAC9B,QAAQ,CACP,4SAA4S,CAC7S,CAAC;AAEJ,MAAM,mBAAmB,GAAG,CAAC;KAC1B,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;KACjB,QAAQ,EAAE;KACV,QAAQ,CACP,uGAAuG,CACxG,CAAC;AAEJ,MAAM,aAAa,GAAG,CAAC;KACpB,MAAM,EAAE;KACR,GAAG,CAAC,CAAC,EAAE,uBAAuB,CAAC;KAC/B,QAAQ,CAAC,mBAAmB,CAAC,CAAC;AAEjC,sCA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AC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,mCAAmC,CAAC;KAChE,CAAC;CACH,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/bubbles/service-bubble/hubspot/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,kBAAkB,GACxB,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/bubbles/service-bubble/hubspot/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EACL,mBAAmB,EACnB,mBAAmB,GAIpB,MAAM,qBAAqB,CAAC"}
|
|
@@ -3,8 +3,9 @@ import type { AIBrowserAction, AIBrowserAgentConfig } from './ai-browser-agent.t
|
|
|
3
3
|
/**
|
|
4
4
|
* AI Browser Agent for error recovery and data extraction.
|
|
5
5
|
*
|
|
6
|
-
* Uses
|
|
7
|
-
*
|
|
6
|
+
* Uses vision AI to analyze screenshots and suggest recovery actions
|
|
7
|
+
* or extract structured data. No DOM inspection needed — the AI
|
|
8
|
+
* looks at the screenshot and decides coordinates directly.
|
|
8
9
|
*/
|
|
9
10
|
export declare class AIBrowserAgent {
|
|
10
11
|
private sessionId;
|
|
@@ -13,51 +14,25 @@ export declare class AIBrowserAgent {
|
|
|
13
14
|
constructor(config: AIBrowserAgentConfig);
|
|
14
15
|
/**
|
|
15
16
|
* Suggest a recovery action for a failed step.
|
|
16
|
-
*
|
|
17
|
-
* @param task - Description of what the step was trying to accomplish
|
|
18
|
-
* @param error - The error message from the failed step
|
|
19
|
-
* @returns The suggested recovery action
|
|
17
|
+
* Takes a screenshot and lets the AI decide what to do.
|
|
20
18
|
*/
|
|
21
19
|
suggestRecoveryAction(task: string, error: string): Promise<AIBrowserAction>;
|
|
22
20
|
/**
|
|
23
21
|
* Extract structured data from the page using AI vision.
|
|
24
|
-
*
|
|
25
|
-
* @param schema - Zod schema defining the expected data structure
|
|
26
|
-
* @param task - Description of what data to extract
|
|
27
|
-
* @returns The extracted data matching the schema, or null if extraction fails
|
|
28
22
|
*/
|
|
29
23
|
extractData<T>(schema: z.ZodType<T>, task: string): Promise<T | null>;
|
|
30
24
|
/**
|
|
31
25
|
* Execute the suggested recovery action on the page.
|
|
32
|
-
*
|
|
33
|
-
* @param action - The action to execute
|
|
34
|
-
* @returns true if the action was executed successfully
|
|
35
26
|
*/
|
|
36
27
|
executeAction(action: AIBrowserAction): Promise<boolean>;
|
|
37
|
-
/**
|
|
38
|
-
* Capture a screenshot from the current browser session.
|
|
39
|
-
*/
|
|
40
28
|
private captureScreenshot;
|
|
41
|
-
/**
|
|
42
|
-
* Get the current page URL.
|
|
43
|
-
*/
|
|
44
29
|
private getCurrentUrl;
|
|
45
|
-
/**
|
|
46
|
-
* Extract interactive elements from the page.
|
|
47
|
-
*/
|
|
48
|
-
private extractInteractiveElements;
|
|
49
|
-
/**
|
|
50
|
-
* Call the AI agent with a message and optional screenshot.
|
|
51
|
-
*/
|
|
52
30
|
private callAI;
|
|
53
|
-
/**
|
|
54
|
-
* Build the prompt for recovery action suggestion.
|
|
55
|
-
*/
|
|
56
|
-
private buildRecoveryPrompt;
|
|
57
31
|
/**
|
|
58
32
|
* Parse the AI response into a typed action.
|
|
59
33
|
*/
|
|
60
34
|
private parseRecoveryAction;
|
|
35
|
+
private hasValidCoordinates;
|
|
61
36
|
/**
|
|
62
37
|
* Generate a human-readable description of a Zod schema.
|
|
63
38
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai-browser-agent.d.ts","sourceRoot":"","sources":["../../../../../../src/bubbles/tool-bubble/browser-tools/_shared/ai/ai-browser-agent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAK7B,OAAO,KAAK,EACV,eAAe,EACf,oBAAoB,
|
|
1
|
+
{"version":3,"file":"ai-browser-agent.d.ts","sourceRoot":"","sources":["../../../../../../src/bubbles/tool-bubble/browser-tools/_shared/ai/ai-browser-agent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAK7B,OAAO,KAAK,EACV,eAAe,EACf,oBAAoB,EACrB,MAAM,6BAA6B,CAAC;AAmDrC;;;;;;GAMG;AACH,qBAAa,cAAc;IACzB,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,OAAO,CAAC,CAAgB;IAChC,OAAO,CAAC,WAAW,CAAC,CAAyB;gBAEjC,MAAM,EAAE,oBAAoB;IAMxC;;;OAGG;IACG,qBAAqB,CACzB,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,eAAe,CAAC;IAsC3B;;OAEG;IACG,WAAW,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC;IA2C3E;;OAEG;IACG,aAAa,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,OAAO,CAAC;YA4EhD,iBAAiB;YAejB,aAAa;YAWb,MAAM;IA4CpB;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAuE3B,OAAO,CAAC,mBAAmB;IAW3B;;OAEG;IACH,OAAO,CAAC,iBAAiB;CA4B1B"}
|