@bubblelab/bubble-core 0.1.210 → 0.1.211

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 (89) hide show
  1. package/dist/bubble-bundle.d.ts +132 -111
  2. package/dist/bubble-factory.d.ts.map +1 -1
  3. package/dist/bubble-factory.js +4 -0
  4. package/dist/bubble-factory.js.map +1 -1
  5. package/dist/bubbles/service-bubble/ai-agent.d.ts +84 -84
  6. package/dist/bubbles/service-bubble/ai-agent.d.ts.map +1 -1
  7. package/dist/bubbles/service-bubble/ai-agent.js +2 -1
  8. package/dist/bubbles/service-bubble/ai-agent.js.map +1 -1
  9. package/dist/bubbles/service-bubble/airtable.d.ts +100 -100
  10. package/dist/bubbles/service-bubble/apify/actors/instagram-hashtag-scraper.d.ts +2 -2
  11. package/dist/bubbles/service-bubble/apify/actors/instagram-scraper.d.ts +8 -8
  12. package/dist/bubbles/service-bubble/apify/actors/linkedin-jobs-scraper.d.ts +2 -2
  13. package/dist/bubbles/service-bubble/apify/actors/linkedin-posts-search.d.ts +22 -22
  14. package/dist/bubbles/service-bubble/apify/actors/linkedin-profile-detail.d.ts +38 -38
  15. package/dist/bubbles/service-bubble/apify/actors/linkedin-profile-posts.d.ts +52 -52
  16. package/dist/bubbles/service-bubble/apify/actors/tiktok-scraper.d.ts +6 -6
  17. package/dist/bubbles/service-bubble/apify/actors/twitter-scraper.d.ts +12 -12
  18. package/dist/bubbles/service-bubble/apify/actors/youtube-scraper.d.ts +12 -12
  19. package/dist/bubbles/service-bubble/apify/apify-scraper.schema.d.ts +126 -126
  20. package/dist/bubbles/service-bubble/apify/apify.d.ts +22 -22
  21. package/dist/bubbles/service-bubble/ashby/ashby.d.ts +114 -114
  22. package/dist/bubbles/service-bubble/ashby/ashby.schema.d.ts +2 -2
  23. package/dist/bubbles/service-bubble/assembled/assembled.d.ts +489 -0
  24. package/dist/bubbles/service-bubble/assembled/assembled.d.ts.map +1 -0
  25. package/dist/bubbles/service-bubble/assembled/assembled.js +363 -0
  26. package/dist/bubbles/service-bubble/assembled/assembled.js.map +1 -0
  27. package/dist/bubbles/service-bubble/assembled/assembled.schema.d.ts +460 -0
  28. package/dist/bubbles/service-bubble/assembled/assembled.schema.d.ts.map +1 -0
  29. package/dist/bubbles/service-bubble/assembled/assembled.schema.js +295 -0
  30. package/dist/bubbles/service-bubble/assembled/assembled.schema.js.map +1 -0
  31. package/dist/bubbles/service-bubble/assembled/assembled.utils.d.ts +12 -0
  32. package/dist/bubbles/service-bubble/assembled/assembled.utils.d.ts.map +1 -0
  33. package/dist/bubbles/service-bubble/assembled/assembled.utils.js +89 -0
  34. package/dist/bubbles/service-bubble/assembled/assembled.utils.js.map +1 -0
  35. package/dist/bubbles/service-bubble/assembled/index.d.ts +4 -0
  36. package/dist/bubbles/service-bubble/assembled/index.d.ts.map +1 -0
  37. package/dist/bubbles/service-bubble/assembled/index.js +4 -0
  38. package/dist/bubbles/service-bubble/assembled/index.js.map +1 -0
  39. package/dist/bubbles/service-bubble/attio/attio.d.ts +6 -6
  40. package/dist/bubbles/service-bubble/attio/attio.schema.d.ts +6 -6
  41. package/dist/bubbles/service-bubble/browserbase/browserbase.d.ts +5 -5
  42. package/dist/bubbles/service-bubble/browserbase/browserbase.schema.d.ts +1 -1
  43. package/dist/bubbles/service-bubble/crustdata/crustdata.d.ts +78 -78
  44. package/dist/bubbles/service-bubble/firecrawl.d.ts +278 -278
  45. package/dist/bubbles/service-bubble/followupboss.d.ts +4 -4
  46. package/dist/bubbles/service-bubble/github.d.ts +12 -12
  47. package/dist/bubbles/service-bubble/gmail.d.ts +104 -104
  48. package/dist/bubbles/service-bubble/google-calendar.d.ts +80 -80
  49. package/dist/bubbles/service-bubble/google-drive.d.ts +40 -40
  50. package/dist/bubbles/service-bubble/http.d.ts +6 -6
  51. package/dist/bubbles/service-bubble/insforge-db.d.ts +8 -8
  52. package/dist/bubbles/service-bubble/jira/jira.d.ts +16 -16
  53. package/dist/bubbles/service-bubble/jira/jira.schema.d.ts +36 -36
  54. package/dist/bubbles/service-bubble/notion/notion.d.ts +272 -272
  55. package/dist/bubbles/service-bubble/notion/property-schemas.d.ts +8 -8
  56. package/dist/bubbles/service-bubble/postgresql.d.ts +8 -8
  57. package/dist/bubbles/service-bubble/posthog/posthog.d.ts +9 -9
  58. package/dist/bubbles/service-bubble/posthog/posthog.schema.d.ts +14 -14
  59. package/dist/bubbles/service-bubble/resend.d.ts +4 -4
  60. package/dist/bubbles/service-bubble/sendsafely/sendsafely.d.ts +4 -4
  61. package/dist/bubbles/service-bubble/slack/slack.d.ts +294 -294
  62. package/dist/bubbles/service-bubble/stripe/stripe.d.ts +39 -39
  63. package/dist/bubbles/service-bubble/stripe/stripe.schema.d.ts +28 -28
  64. package/dist/bubbles/tool-bubble/amazon-shopping-tool/amazon-shopping-tool.d.ts +6 -6
  65. package/dist/bubbles/tool-bubble/amazon-shopping-tool/amazon-shopping-tool.schema.d.ts +8 -8
  66. package/dist/bubbles/tool-bubble/company-enrichment-tool.d.ts +10 -10
  67. package/dist/bubbles/tool-bubble/linkedin-tool.d.ts +385 -385
  68. package/dist/bubbles/tool-bubble/list-capabilities-tool.d.ts +8 -8
  69. package/dist/bubbles/tool-bubble/people-search-tool.d.ts +10 -10
  70. package/dist/bubbles/tool-bubble/research-agent-tool.d.ts +4 -4
  71. package/dist/bubbles/tool-bubble/sql-query-tool.d.ts +4 -4
  72. package/dist/bubbles/tool-bubble/tiktok-tool.d.ts +60 -60
  73. package/dist/bubbles/tool-bubble/twitter-tool.d.ts +134 -134
  74. package/dist/bubbles/tool-bubble/web-crawl-tool.d.ts +4 -4
  75. package/dist/bubbles/tool-bubble/web-extract-tool.d.ts +4 -4
  76. package/dist/bubbles/tool-bubble/web-scrape-tool.d.ts +8 -8
  77. package/dist/bubbles/tool-bubble/yc-scraper-tool.d.ts +8 -8
  78. package/dist/bubbles/tool-bubble/youtube-tool.d.ts +20 -20
  79. package/dist/bubbles/workflow-bubble/generate-document.workflow.d.ts +12 -12
  80. package/dist/bubbles/workflow-bubble/pdf-form-operations.workflow.d.ts +44 -44
  81. package/dist/bubbles/workflow-bubble/pdf-ocr.workflow.d.ts +16 -16
  82. package/dist/bubbles/workflow-bubble/slack-data-assistant.workflow.d.ts +2 -2
  83. package/dist/bubbles/workflow-bubble/slack-formatter-agent.d.ts +34 -34
  84. package/dist/bubbles.json +927 -2
  85. package/dist/index.d.ts +1 -0
  86. package/dist/index.d.ts.map +1 -1
  87. package/dist/index.js +1 -0
  88. package/dist/index.js.map +1 -1
  89. package/package.json +2 -2
@@ -0,0 +1,295 @@
1
+ import { z } from 'zod';
2
+ // ─── Credentials ────────────────────────────────────────────────────────────
3
+ const credentialsField = z
4
+ .record(z.string())
5
+ .optional()
6
+ .describe('Credentials for authentication');
7
+ // ─── Shared field helpers ───────────────────────────────────────────────────
8
+ const paginationFields = {
9
+ limit: z
10
+ .number()
11
+ .optional()
12
+ .default(20)
13
+ .describe('Maximum number of results to return (default 20, max 500)'),
14
+ offset: z
15
+ .number()
16
+ .optional()
17
+ .default(0)
18
+ .describe('Number of results to skip for pagination'),
19
+ };
20
+ // ─── People schemas ─────────────────────────────────────────────────────────
21
+ const listPeopleSchema = z.object({
22
+ operation: z.literal('list_people').describe('List people/agents'),
23
+ credentials: credentialsField,
24
+ ...paginationFields,
25
+ channel: z
26
+ .string()
27
+ .optional()
28
+ .describe('Filter by channel (phone, email, chat, sms, social, back_office)'),
29
+ team: z.string().optional().describe('Filter by team name'),
30
+ site: z.string().optional().describe('Filter by site name'),
31
+ queue: z.string().optional().describe('Filter by queue name'),
32
+ search: z
33
+ .string()
34
+ .optional()
35
+ .describe('Search by name, email, or imported_id'),
36
+ });
37
+ const getPersonSchema = z.object({
38
+ operation: z.literal('get_person').describe('Get a single person by ID'),
39
+ credentials: credentialsField,
40
+ person_id: z.string().describe('The Assembled person ID'),
41
+ });
42
+ const createPersonSchema = z.object({
43
+ operation: z.literal('create_person').describe('Create a new person/agent'),
44
+ credentials: credentialsField,
45
+ first_name: z.string().describe('First name of the person'),
46
+ last_name: z.string().describe('Last name of the person'),
47
+ email: z.string().optional().describe('Email address of the person'),
48
+ imported_id: z
49
+ .string()
50
+ .optional()
51
+ .describe('External/imported ID for the person'),
52
+ channels: z
53
+ .array(z.string())
54
+ .optional()
55
+ .describe('Channels the person works on (phone, email, chat, sms, social, back_office)'),
56
+ teams: z
57
+ .array(z.string())
58
+ .optional()
59
+ .describe('Team names to assign the person to'),
60
+ queues: z
61
+ .array(z.string())
62
+ .optional()
63
+ .describe('Queue names to assign the person to'),
64
+ site: z.string().optional().describe('Site name for the person'),
65
+ timezone: z
66
+ .string()
67
+ .optional()
68
+ .describe('Timezone for the person (e.g. America/Los_Angeles)'),
69
+ roles: z
70
+ .array(z.string())
71
+ .optional()
72
+ .describe('Roles to assign (e.g. agent, admin)'),
73
+ staffable: z
74
+ .boolean()
75
+ .optional()
76
+ .default(true)
77
+ .describe('Whether the person can be scheduled'),
78
+ });
79
+ const updatePersonSchema = z.object({
80
+ operation: z.literal('update_person').describe('Update an existing person'),
81
+ credentials: credentialsField,
82
+ person_id: z.string().describe('The Assembled person ID to update'),
83
+ first_name: z.string().optional().describe('Updated first name'),
84
+ last_name: z.string().optional().describe('Updated last name'),
85
+ email: z.string().optional().describe('Updated email address'),
86
+ channels: z.array(z.string()).optional().describe('Updated channels list'),
87
+ teams: z.array(z.string()).optional().describe('Updated team names'),
88
+ queues: z.array(z.string()).optional().describe('Updated queue names'),
89
+ site: z.string().optional().describe('Updated site name'),
90
+ timezone: z.string().optional().describe('Updated timezone'),
91
+ staffable: z.boolean().optional().describe('Updated staffable status'),
92
+ });
93
+ // ─── Activities schemas ─────────────────────────────────────────────────────
94
+ const listActivitiesSchema = z.object({
95
+ operation: z
96
+ .literal('list_activities')
97
+ .describe('List activities/schedule events in a time window'),
98
+ credentials: credentialsField,
99
+ start_time: z
100
+ .number()
101
+ .describe('Start of time window as Unix timestamp (seconds)'),
102
+ end_time: z
103
+ .number()
104
+ .describe('End of time window as Unix timestamp (seconds)'),
105
+ agent_ids: z
106
+ .array(z.string())
107
+ .optional()
108
+ .describe('Filter by specific agent IDs'),
109
+ queue: z.string().optional().describe('Filter by queue name'),
110
+ include_agents: z
111
+ .boolean()
112
+ .optional()
113
+ .default(false)
114
+ .describe('Include agent details in response'),
115
+ });
116
+ const createActivitySchema = z.object({
117
+ operation: z
118
+ .literal('create_activity')
119
+ .describe('Create a new activity/schedule event'),
120
+ credentials: credentialsField,
121
+ agent_id: z.string().describe('Agent ID to assign the activity to'),
122
+ type_id: z.string().describe('Activity type ID'),
123
+ start_time: z.number().describe('Activity start as Unix timestamp (seconds)'),
124
+ end_time: z.number().describe('Activity end as Unix timestamp (seconds)'),
125
+ channels: z
126
+ .array(z.string())
127
+ .optional()
128
+ .describe('Channels for this activity (phone, email, chat, etc.)'),
129
+ description: z.string().optional().describe('Description of the activity'),
130
+ allow_conflicts: z
131
+ .boolean()
132
+ .optional()
133
+ .default(false)
134
+ .describe('Whether to allow overlapping activities'),
135
+ });
136
+ const deleteActivitiesSchema = z.object({
137
+ operation: z
138
+ .literal('delete_activities')
139
+ .describe('Delete activities for specified agents within a time window'),
140
+ credentials: credentialsField,
141
+ agent_ids: z
142
+ .array(z.string())
143
+ .describe('Agent IDs whose activities to delete'),
144
+ start_time: z
145
+ .number()
146
+ .describe('Start of deletion window as Unix timestamp (seconds)'),
147
+ end_time: z
148
+ .number()
149
+ .describe('End of deletion window as Unix timestamp (seconds)'),
150
+ });
151
+ // ─── Time Off schemas ───────────────────────────────────────────────────────
152
+ const createTimeOffSchema = z.object({
153
+ operation: z.literal('create_time_off').describe('Create a time off request'),
154
+ credentials: credentialsField,
155
+ agent_id: z.string().describe('Agent ID requesting time off'),
156
+ start_time: z.number().describe('Time off start as Unix timestamp (seconds)'),
157
+ end_time: z.number().describe('Time off end as Unix timestamp (seconds)'),
158
+ type_id: z
159
+ .string()
160
+ .optional()
161
+ .describe('Activity type ID for the time off (must be a time-off type)'),
162
+ status: z
163
+ .enum(['approved', 'pending'])
164
+ .optional()
165
+ .default('pending')
166
+ .describe('Initial status of the time off request'),
167
+ notes: z.string().optional().describe('Notes for the time off request'),
168
+ });
169
+ const listTimeOffSchema = z.object({
170
+ operation: z.literal('list_time_off').describe('List time off requests'),
171
+ credentials: credentialsField,
172
+ ...paginationFields,
173
+ agent_ids: z.array(z.string()).optional().describe('Filter by agent IDs'),
174
+ status: z
175
+ .enum(['approved', 'pending', 'denied', 'cancelled'])
176
+ .optional()
177
+ .describe('Filter by time off request status'),
178
+ });
179
+ const cancelTimeOffSchema = z.object({
180
+ operation: z.literal('cancel_time_off').describe('Cancel a time off request'),
181
+ credentials: credentialsField,
182
+ time_off_id: z.string().describe('ID of the time off request to cancel'),
183
+ });
184
+ // ─── Filter schemas (queues, teams) ─────────────────────────────────────────
185
+ const listQueuesSchema = z.object({
186
+ operation: z.literal('list_queues').describe('List all queues'),
187
+ credentials: credentialsField,
188
+ });
189
+ const listTeamsSchema = z.object({
190
+ operation: z.literal('list_teams').describe('List all teams'),
191
+ credentials: credentialsField,
192
+ });
193
+ // ─── Combined Params Schema ─────────────────────────────────────────────────
194
+ export const AssembledParamsSchema = z.discriminatedUnion('operation', [
195
+ listPeopleSchema,
196
+ getPersonSchema,
197
+ createPersonSchema,
198
+ updatePersonSchema,
199
+ listActivitiesSchema,
200
+ createActivitySchema,
201
+ deleteActivitiesSchema,
202
+ createTimeOffSchema,
203
+ listTimeOffSchema,
204
+ cancelTimeOffSchema,
205
+ listQueuesSchema,
206
+ listTeamsSchema,
207
+ ]);
208
+ // ─── Result Schemas ─────────────────────────────────────────────────────────
209
+ const personResultSchema = z.object({
210
+ operation: z.literal('list_people'),
211
+ success: z.boolean(),
212
+ error: z.string(),
213
+ people: z.array(z.record(z.unknown())).optional(),
214
+ total: z.number().optional(),
215
+ });
216
+ const getPersonResultSchema = z.object({
217
+ operation: z.literal('get_person'),
218
+ success: z.boolean(),
219
+ error: z.string(),
220
+ person: z.record(z.unknown()).optional(),
221
+ });
222
+ const createPersonResultSchema = z.object({
223
+ operation: z.literal('create_person'),
224
+ success: z.boolean(),
225
+ error: z.string(),
226
+ person: z.record(z.unknown()).optional(),
227
+ });
228
+ const updatePersonResultSchema = z.object({
229
+ operation: z.literal('update_person'),
230
+ success: z.boolean(),
231
+ error: z.string(),
232
+ person: z.record(z.unknown()).optional(),
233
+ });
234
+ const listActivitiesResultSchema = z.object({
235
+ operation: z.literal('list_activities'),
236
+ success: z.boolean(),
237
+ error: z.string(),
238
+ activities: z.record(z.record(z.unknown())).optional(),
239
+ agents: z.record(z.record(z.unknown())).optional(),
240
+ });
241
+ const createActivityResultSchema = z.object({
242
+ operation: z.literal('create_activity'),
243
+ success: z.boolean(),
244
+ error: z.string(),
245
+ activity: z.record(z.unknown()).optional(),
246
+ });
247
+ const deleteActivitiesResultSchema = z.object({
248
+ operation: z.literal('delete_activities'),
249
+ success: z.boolean(),
250
+ error: z.string(),
251
+ });
252
+ const createTimeOffResultSchema = z.object({
253
+ operation: z.literal('create_time_off'),
254
+ success: z.boolean(),
255
+ error: z.string(),
256
+ time_off: z.record(z.unknown()).optional(),
257
+ });
258
+ const listTimeOffResultSchema = z.object({
259
+ operation: z.literal('list_time_off'),
260
+ success: z.boolean(),
261
+ error: z.string(),
262
+ requests: z.array(z.record(z.unknown())).optional(),
263
+ });
264
+ const cancelTimeOffResultSchema = z.object({
265
+ operation: z.literal('cancel_time_off'),
266
+ success: z.boolean(),
267
+ error: z.string(),
268
+ });
269
+ const listQueuesResultSchema = z.object({
270
+ operation: z.literal('list_queues'),
271
+ success: z.boolean(),
272
+ error: z.string(),
273
+ queues: z.array(z.record(z.unknown())).optional(),
274
+ });
275
+ const listTeamsResultSchema = z.object({
276
+ operation: z.literal('list_teams'),
277
+ success: z.boolean(),
278
+ error: z.string(),
279
+ teams: z.array(z.record(z.unknown())).optional(),
280
+ });
281
+ export const AssembledResultSchema = z.discriminatedUnion('operation', [
282
+ personResultSchema,
283
+ getPersonResultSchema,
284
+ createPersonResultSchema,
285
+ updatePersonResultSchema,
286
+ listActivitiesResultSchema,
287
+ createActivityResultSchema,
288
+ deleteActivitiesResultSchema,
289
+ createTimeOffResultSchema,
290
+ listTimeOffResultSchema,
291
+ cancelTimeOffResultSchema,
292
+ listQueuesResultSchema,
293
+ listTeamsResultSchema,
294
+ ]);
295
+ //# sourceMappingURL=assembled.schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assembled.schema.js","sourceRoot":"","sources":["../../../../src/bubbles/service-bubble/assembled/assembled.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,+EAA+E;AAE/E,MAAM,gBAAgB,GAAG,CAAC;KACvB,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;KAClB,QAAQ,EAAE;KACV,QAAQ,CAAC,gCAAgC,CAAC,CAAC;AAE9C,+EAA+E;AAE/E,MAAM,gBAAgB,GAAG;IACvB,KAAK,EAAE,CAAC;SACL,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,OAAO,CAAC,EAAE,CAAC;SACX,QAAQ,CAAC,2DAA2D,CAAC;IACxE,MAAM,EAAE,CAAC;SACN,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,OAAO,CAAC,CAAC,CAAC;SACV,QAAQ,CAAC,0CAA0C,CAAC;CACxD,CAAC;AAEF,+EAA+E;AAE/E,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChC,SAAS,EAAE,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,QAAQ,CAAC,oBAAoB,CAAC;IAClE,WAAW,EAAE,gBAAgB;IAC7B,GAAG,gBAAgB;IACnB,OAAO,EAAE,CAAC;SACP,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CACP,kEAAkE,CACnE;IACH,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ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AAG,CAAC,CAAC,kBAAkB,CAAC,WAAW,EAAE;IACrE,kBAAkB;IAClB,qBAAqB;IACrB,wBAAwB;IACxB,wBAAwB;IACxB,0BAA0B;IAC1B,0BAA0B;IAC1B,4BAA4B;IAC5B,yBAAyB;IACzB,uBAAuB;IACvB,yBAAyB;IACzB,sBAAsB;IACtB,qBAAqB;CACtB,CAAC,CAAC"}
@@ -0,0 +1,12 @@
1
+ export interface AssembledRequestOptions {
2
+ method: 'GET' | 'POST' | 'PATCH' | 'DELETE';
3
+ path: string;
4
+ apiKey: string;
5
+ body?: Record<string, unknown>;
6
+ queryParams?: Record<string, string | number | boolean | undefined>;
7
+ }
8
+ /**
9
+ * Make an authenticated request to the Assembled API.
10
+ */
11
+ export declare function makeAssembledRequest<T = unknown>(options: AssembledRequestOptions): Promise<T>;
12
+ //# sourceMappingURL=assembled.utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assembled.utils.d.ts","sourceRoot":"","sources":["../../../../src/bubbles/service-bubble/assembled/assembled.utils.ts"],"names":[],"mappings":"AAqCA,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC,CAAC;CACrE;AAED;;GAEG;AACH,wBAAsB,oBAAoB,CAAC,CAAC,GAAG,OAAO,EACpD,OAAO,EAAE,uBAAuB,GAC/B,OAAO,CAAC,CAAC,CAAC,CA2DZ"}
@@ -0,0 +1,89 @@
1
+ const BASE_URL = 'https://api.assembledhq.com/v0';
2
+ const REQUEST_TIMEOUT_MS = 30_000;
3
+ /**
4
+ * Builds Basic Auth header from an Assembled API key.
5
+ * Assembled uses the API key as the Basic Auth username with no password.
6
+ */
7
+ function buildAuthHeader(apiKey) {
8
+ return `Basic ${Buffer.from(`${apiKey}:`).toString('base64')}`;
9
+ }
10
+ /**
11
+ * Enhance error messages with helpful hints based on HTTP status
12
+ */
13
+ function enhanceErrorMessage(status, body) {
14
+ let detail = body;
15
+ try {
16
+ const parsed = JSON.parse(body);
17
+ detail = parsed.error || parsed.message || parsed.detail || body;
18
+ }
19
+ catch {
20
+ // keep raw body
21
+ }
22
+ switch (status) {
23
+ case 401:
24
+ return `Authentication failed (HTTP 401): Invalid API key. Ensure your Assembled API key starts with "sk_live_". ${detail}`;
25
+ case 403:
26
+ return `Access denied (HTTP 403): Your API key does not have permission for this operation. ${detail}`;
27
+ case 404:
28
+ return `Not found (HTTP 404): The requested resource does not exist. ${detail}`;
29
+ case 429:
30
+ return `Rate limited (HTTP 429): Too many requests. Assembled allows 300 requests/min. ${detail}`;
31
+ default:
32
+ return `HTTP ${status}: ${detail}`;
33
+ }
34
+ }
35
+ /**
36
+ * Make an authenticated request to the Assembled API.
37
+ */
38
+ export async function makeAssembledRequest(options) {
39
+ const { method, path, apiKey, body, queryParams } = options;
40
+ // Build URL with query params
41
+ const url = new URL(`${BASE_URL}${path}`);
42
+ if (queryParams) {
43
+ for (const [key, value] of Object.entries(queryParams)) {
44
+ if (value !== undefined && value !== null && value !== '') {
45
+ url.searchParams.set(key, String(value));
46
+ }
47
+ }
48
+ }
49
+ const controller = new AbortController();
50
+ const timeout = setTimeout(() => controller.abort(), REQUEST_TIMEOUT_MS);
51
+ try {
52
+ const headers = {
53
+ Authorization: buildAuthHeader(apiKey),
54
+ 'Content-Type': 'application/json',
55
+ };
56
+ const fetchOptions = {
57
+ method,
58
+ headers,
59
+ signal: controller.signal,
60
+ };
61
+ if (body && (method === 'POST' || method === 'PATCH')) {
62
+ fetchOptions.body = JSON.stringify(body);
63
+ }
64
+ // For DELETE with body, we still need to send it
65
+ if (body && method === 'DELETE') {
66
+ fetchOptions.body = JSON.stringify(body);
67
+ }
68
+ const response = await fetch(url.toString(), fetchOptions);
69
+ if (!response.ok) {
70
+ const errorBody = await response.text();
71
+ throw new Error(enhanceErrorMessage(response.status, errorBody));
72
+ }
73
+ // Some DELETE operations may return empty body
74
+ const text = await response.text();
75
+ if (!text)
76
+ return {};
77
+ return JSON.parse(text);
78
+ }
79
+ catch (error) {
80
+ if (error instanceof Error && error.name === 'AbortError') {
81
+ throw new Error(`Request to Assembled API timed out after ${REQUEST_TIMEOUT_MS / 1000}s`);
82
+ }
83
+ throw error;
84
+ }
85
+ finally {
86
+ clearTimeout(timeout);
87
+ }
88
+ }
89
+ //# sourceMappingURL=assembled.utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assembled.utils.js","sourceRoot":"","sources":["../../../../src/bubbles/service-bubble/assembled/assembled.utils.ts"],"names":[],"mappings":"AAAA,MAAM,QAAQ,GAAG,gCAAgC,CAAC;AAClD,MAAM,kBAAkB,GAAG,MAAM,CAAC;AAElC;;;GAGG;AACH,SAAS,eAAe,CAAC,MAAc;IACrC,OAAO,SAAS,MAAM,CAAC,IAAI,CAAC,GAAG,MAAM,GAAG,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;AACjE,CAAC;AAED;;GAEG;AACH,SAAS,mBAAmB,CAAC,MAAc,EAAE,IAAY;IACvD,IAAI,MAAM,GAAG,IAAI,CAAC;IAClB,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAChC,MAAM,GAAG,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC,OAAO,IAAI,MAAM,CAAC,MAAM,IAAI,IAAI,CAAC;IACnE,CAAC;IAAC,MAAM,CAAC;QACP,gBAAgB;IAClB,CAAC;IAED,QAAQ,MAAM,EAAE,CAAC;QACf,KAAK,GAAG;YACN,OAAO,4GAA4G,MAAM,EAAE,CAAC;QAC9H,KAAK,GA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,IAAI,CAAC,MAAM,KAAK,MAAM,IAAI,MAAM,KAAK,OAAO,CAAC,EAAE,CAAC;YACtD,YAAY,CAAC,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QAC3C,CAAC;QAED,iDAAiD;QACjD,IAAI,IAAI,IAAI,MAAM,KAAK,QAAQ,EAAE,CAAC;YAChC,YAAY,CAAC,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QAC3C,CAAC;QAED,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,CAAC,QAAQ,EAAE,EAAE,YAAY,CAAC,CAAC;QAE3D,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;YACjB,MAAM,SAAS,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;YACxC,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC;QACnE,CAAC;QAED,+CAA+C;QAC/C,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;QACnC,IAAI,CAAC,IAAI;YAAE,OAAO,EAAO,CAAC;QAE1B,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAM,CAAC;IAC/B,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,KAAK,YAAY,KAAK,IAAI,KAAK,CAAC,IAAI,KAAK,YAAY,EAAE,CAAC;YAC1D,MAAM,IAAI,KAAK,CACb,4CAA4C,kBAAkB,GAAG,IAAI,GAAG,CACzE,CAAC;QACJ,CAAC;QACD,MAAM,KAAK,CAAC;IACd,CAAC;YAAS,CAAC;QACT,YAAY,CAAC,OAAO,CAAC,CAAC;IACxB,CAAC;AACH,CAAC"}
@@ -0,0 +1,4 @@
1
+ export { AssembledBubble } from './assembled.js';
2
+ export { AssembledParamsSchema, AssembledResultSchema, type AssembledParams, type AssembledParamsInput, type AssembledResult, } from './assembled.schema.js';
3
+ export { makeAssembledRequest } from './assembled.utils.js';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/bubbles/service-bubble/assembled/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EACL,qBAAqB,EACrB,qBAAqB,EACrB,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,eAAe,GACrB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,4 @@
1
+ export { AssembledBubble } from './assembled.js';
2
+ export { AssembledParamsSchema, AssembledResultSchema, } from './assembled.schema.js';
3
+ export { makeAssembledRequest } from './assembled.utils.js';
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/bubbles/service-bubble/assembled/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EACL,qBAAqB,EACrB,qBAAqB,GAItB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC"}
@@ -238,15 +238,15 @@ export declare class AttioBubble<T extends AttioParamsInput = AttioParamsInput>
238
238
  }, "strip", import("zod").ZodTypeAny, {
239
239
  operation: "update_task";
240
240
  task_id: string;
241
- content?: string | undefined;
242
241
  credentials?: Partial<Record<CredentialType, string>> | undefined;
242
+ content?: string | undefined;
243
243
  deadline_at?: string | undefined;
244
244
  is_completed?: boolean | undefined;
245
245
  }, {
246
246
  operation: "update_task";
247
247
  task_id: string;
248
- content?: string | undefined;
249
248
  credentials?: Partial<Record<CredentialType, string>> | undefined;
249
+ content?: string | undefined;
250
250
  deadline_at?: string | undefined;
251
251
  is_completed?: boolean | undefined;
252
252
  }>, import("zod").ZodObject<{
@@ -284,15 +284,15 @@ export declare class AttioBubble<T extends AttioParamsInput = AttioParamsInput>
284
284
  entry_values: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>>;
285
285
  credentials: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodNativeEnum<typeof CredentialType>, import("zod").ZodString>>;
286
286
  }, "strip", import("zod").ZodTypeAny, {
287
- operation: "create_entry";
288
287
  list: string;
288
+ operation: "create_entry";
289
289
  parent_object: string;
290
290
  parent_record_id: string;
291
291
  entry_values: Record<string, unknown>;
292
292
  credentials?: Partial<Record<CredentialType, string>> | undefined;
293
293
  }, {
294
- operation: "create_entry";
295
294
  list: string;
295
+ operation: "create_entry";
296
296
  parent_object: string;
297
297
  parent_record_id: string;
298
298
  credentials?: Partial<Record<CredentialType, string>> | undefined;
@@ -305,15 +305,15 @@ export declare class AttioBubble<T extends AttioParamsInput = AttioParamsInput>
305
305
  filter: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
306
306
  credentials: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodNativeEnum<typeof CredentialType>, import("zod").ZodString>>;
307
307
  }, "strip", import("zod").ZodTypeAny, {
308
+ list: string;
308
309
  operation: "list_entries";
309
310
  limit: number;
310
311
  offset: number;
311
- list: string;
312
312
  filter?: Record<string, unknown> | undefined;
313
313
  credentials?: Partial<Record<CredentialType, string>> | undefined;
314
314
  }, {
315
- operation: "list_entries";
316
315
  list: string;
316
+ operation: "list_entries";
317
317
  filter?: Record<string, unknown> | undefined;
318
318
  credentials?: Partial<Record<CredentialType, string>> | undefined;
319
319
  limit?: number | undefined;
@@ -229,15 +229,15 @@ export declare const AttioParamsSchema: z.ZodDiscriminatedUnion<"operation", [z.
229
229
  }, "strip", z.ZodTypeAny, {
230
230
  operation: "update_task";
231
231
  task_id: string;
232
- content?: string | undefined;
233
232
  credentials?: Partial<Record<CredentialType, string>> | undefined;
233
+ content?: string | undefined;
234
234
  deadline_at?: string | undefined;
235
235
  is_completed?: boolean | undefined;
236
236
  }, {
237
237
  operation: "update_task";
238
238
  task_id: string;
239
- content?: string | undefined;
240
239
  credentials?: Partial<Record<CredentialType, string>> | undefined;
240
+ content?: string | undefined;
241
241
  deadline_at?: string | undefined;
242
242
  is_completed?: boolean | undefined;
243
243
  }>, z.ZodObject<{
@@ -275,15 +275,15 @@ export declare const AttioParamsSchema: z.ZodDiscriminatedUnion<"operation", [z.
275
275
  entry_values: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
276
276
  credentials: z.ZodOptional<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>;
277
277
  }, "strip", z.ZodTypeAny, {
278
- operation: "create_entry";
279
278
  list: string;
279
+ operation: "create_entry";
280
280
  parent_object: string;
281
281
  parent_record_id: string;
282
282
  entry_values: Record<string, unknown>;
283
283
  credentials?: Partial<Record<CredentialType, string>> | undefined;
284
284
  }, {
285
- operation: "create_entry";
286
285
  list: string;
286
+ operation: "create_entry";
287
287
  parent_object: string;
288
288
  parent_record_id: string;
289
289
  credentials?: Partial<Record<CredentialType, string>> | undefined;
@@ -296,15 +296,15 @@ export declare const AttioParamsSchema: z.ZodDiscriminatedUnion<"operation", [z.
296
296
  filter: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
297
297
  credentials: z.ZodOptional<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>;
298
298
  }, "strip", z.ZodTypeAny, {
299
+ list: string;
299
300
  operation: "list_entries";
300
301
  limit: number;
301
302
  offset: number;
302
- list: string;
303
303
  filter?: Record<string, unknown> | undefined;
304
304
  credentials?: Partial<Record<CredentialType, string>> | undefined;
305
305
  }, {
306
- operation: "list_entries";
307
306
  list: string;
307
+ operation: "list_entries";
308
308
  filter?: Record<string, unknown> | undefined;
309
309
  credentials?: Partial<Record<CredentialType, string>> | undefined;
310
310
  limit?: number | undefined;
@@ -169,7 +169,6 @@ export declare class BrowserBaseBubble<T extends BrowserBaseParamsInput = Browse
169
169
  captchaImageSelector?: string | undefined;
170
170
  captchaInputSelector?: string | undefined;
171
171
  } | undefined;
172
- context_id?: string | undefined;
173
172
  cookies?: {
174
173
  value: string;
175
174
  path: string;
@@ -179,6 +178,7 @@ export declare class BrowserBaseBubble<T extends BrowserBaseParamsInput = Browse
179
178
  httpOnly: boolean;
180
179
  secure: boolean;
181
180
  }[] | undefined;
181
+ context_id?: string | undefined;
182
182
  proxies?: true | ({
183
183
  type: "browserbase";
184
184
  geolocation?: {
@@ -204,7 +204,6 @@ export declare class BrowserBaseBubble<T extends BrowserBaseParamsInput = Browse
204
204
  captchaImageSelector?: string | undefined;
205
205
  captchaInputSelector?: string | undefined;
206
206
  } | undefined;
207
- context_id?: string | undefined;
208
207
  cookies?: {
209
208
  value: string;
210
209
  path: string;
@@ -214,6 +213,7 @@ export declare class BrowserBaseBubble<T extends BrowserBaseParamsInput = Browse
214
213
  httpOnly: boolean;
215
214
  secure: boolean;
216
215
  }[] | undefined;
216
+ context_id?: string | undefined;
217
217
  viewport_width?: number | undefined;
218
218
  viewport_height?: number | undefined;
219
219
  proxies?: true | ({
@@ -240,8 +240,8 @@ export declare class BrowserBaseBubble<T extends BrowserBaseParamsInput = Browse
240
240
  timeout: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodNumber>>;
241
241
  credentials: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodNativeEnum<typeof CredentialType>, import("zod").ZodString>>;
242
242
  }, "strip", import("zod").ZodTypeAny, {
243
- url: string;
244
243
  timeout: number;
244
+ url: string;
245
245
  operation: "navigate";
246
246
  session_id: string;
247
247
  wait_until: "load" | "domcontentloaded" | "networkidle0" | "networkidle2";
@@ -537,14 +537,14 @@ export declare class BrowserBaseBubble<T extends BrowserBaseParamsInput = Browse
537
537
  error: string;
538
538
  success: boolean;
539
539
  operation: "screenshot";
540
- data?: string | undefined;
541
540
  format?: string | undefined;
541
+ data?: string | undefined;
542
542
  }, {
543
543
  error: string;
544
544
  success: boolean;
545
545
  operation: "screenshot";
546
- data?: string | undefined;
547
546
  format?: string | undefined;
547
+ data?: string | undefined;
548
548
  }>, import("zod").ZodObject<{
549
549
  operation: import("zod").ZodLiteral<"wait">;
550
550
  success: import("zod").ZodBoolean;
@@ -461,8 +461,8 @@ export declare const BrowserBaseParamsSchema: z.ZodDiscriminatedUnion<"operation
461
461
  timeout: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
462
462
  credentials: z.ZodOptional<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>;
463
463
  }, "strip", z.ZodTypeAny, {
464
- url: string;
465
464
  timeout: number;
465
+ url: string;
466
466
  operation: "navigate";
467
467
  session_id: string;
468
468
  wait_until: "load" | "domcontentloaded" | "networkidle0" | "networkidle2";