@bubblelab/bubble-core 0.1.156 → 0.1.157

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 (66) hide show
  1. package/dist/bubble-bundle.d.ts +67 -28
  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/bubble-flow/bubble-flow-class.js.map +1 -1
  6. package/dist/bubble-trigger/index.d.ts +2 -0
  7. package/dist/bubble-trigger/index.d.ts.map +1 -0
  8. package/dist/bubble-trigger/index.js +2 -0
  9. package/dist/bubble-trigger/index.js.map +1 -0
  10. package/dist/bubble-trigger/types.d.ts +87 -0
  11. package/dist/bubble-trigger/types.d.ts.map +1 -0
  12. package/dist/bubble-trigger/types.js +14 -0
  13. package/dist/bubble-trigger/types.js.map +1 -0
  14. package/dist/bubbles/service-bubble/google-sheets.d.ts +1811 -0
  15. package/dist/bubbles/service-bubble/google-sheets.d.ts.map +1 -0
  16. package/dist/bubbles/service-bubble/google-sheets.js +904 -0
  17. package/dist/bubbles/service-bubble/google-sheets.js.map +1 -0
  18. package/dist/bubbles/service-bubble/notion/notion.d.ts +4 -4
  19. package/dist/bubbles/service-bubble/posthog/index.d.ts +3 -0
  20. package/dist/bubbles/service-bubble/posthog/index.d.ts.map +1 -0
  21. package/dist/bubbles/service-bubble/posthog/index.js +3 -0
  22. package/dist/bubbles/service-bubble/posthog/index.js.map +1 -0
  23. package/dist/bubbles/service-bubble/posthog/posthog.d.ts +387 -0
  24. package/dist/bubbles/service-bubble/posthog/posthog.d.ts.map +1 -0
  25. package/dist/bubbles/service-bubble/posthog/posthog.js +291 -0
  26. package/dist/bubbles/service-bubble/posthog/posthog.js.map +1 -0
  27. package/dist/bubbles/service-bubble/posthog/posthog.schema.d.ts +432 -0
  28. package/dist/bubbles/service-bubble/posthog/posthog.schema.d.ts.map +1 -0
  29. package/dist/bubbles/service-bubble/posthog/posthog.schema.js +298 -0
  30. package/dist/bubbles/service-bubble/posthog/posthog.schema.js.map +1 -0
  31. package/dist/bubbles/service-bubble/slack/slack.d.ts +60 -60
  32. package/dist/bubbles/service-bubble/slack.d.ts +5869 -0
  33. package/dist/bubbles/service-bubble/slack.d.ts.map +1 -0
  34. package/dist/bubbles/service-bubble/slack.js +1536 -0
  35. package/dist/bubbles/service-bubble/slack.js.map +1 -0
  36. package/dist/bubbles/tool-bubble/linkedin-connection-tool/index.d.ts +3 -0
  37. package/dist/bubbles/tool-bubble/linkedin-connection-tool/index.d.ts.map +1 -0
  38. package/dist/bubbles/tool-bubble/linkedin-connection-tool/index.js +3 -0
  39. package/dist/bubbles/tool-bubble/linkedin-connection-tool/index.js.map +1 -0
  40. package/dist/bubbles/tool-bubble/linkedin-connection-tool/linkedin-connection-tool.d.ts +160 -0
  41. package/dist/bubbles/tool-bubble/linkedin-connection-tool/linkedin-connection-tool.d.ts.map +1 -0
  42. package/dist/bubbles/tool-bubble/linkedin-connection-tool/linkedin-connection-tool.js +706 -0
  43. package/dist/bubbles/tool-bubble/linkedin-connection-tool/linkedin-connection-tool.js.map +1 -0
  44. package/dist/bubbles/tool-bubble/linkedin-connection-tool/linkedin-connection-tool.schema.d.ts +93 -0
  45. package/dist/bubbles/tool-bubble/linkedin-connection-tool/linkedin-connection-tool.schema.d.ts.map +1 -0
  46. package/dist/bubbles/tool-bubble/linkedin-connection-tool/linkedin-connection-tool.schema.js +50 -0
  47. package/dist/bubbles/tool-bubble/linkedin-connection-tool/linkedin-connection-tool.schema.js.map +1 -0
  48. package/dist/bubbles/workflow-bubble/bubbleflow-generator.workflow.d.ts +114 -0
  49. package/dist/bubbles/workflow-bubble/bubbleflow-generator.workflow.d.ts.map +1 -0
  50. package/dist/bubbles/workflow-bubble/bubbleflow-generator.workflow.js +777 -0
  51. package/dist/bubbles/workflow-bubble/bubbleflow-generator.workflow.js.map +1 -0
  52. package/dist/bubbles/workflow-bubble/slack-formatter-agent.d.ts +16 -16
  53. package/dist/bubbles.json +494 -2
  54. package/dist/index.d.ts +2 -0
  55. package/dist/index.d.ts.map +1 -1
  56. package/dist/index.js +1 -0
  57. package/dist/index.js.map +1 -1
  58. package/dist/types/ai-models.d.ts +4 -0
  59. package/dist/types/ai-models.d.ts.map +1 -0
  60. package/dist/types/ai-models.js +16 -0
  61. package/dist/types/ai-models.js.map +1 -0
  62. package/dist/utils/param-helper.d.ts +2 -0
  63. package/dist/utils/param-helper.d.ts.map +1 -0
  64. package/dist/utils/param-helper.js +5 -0
  65. package/dist/utils/param-helper.js.map +1 -0
  66. package/package.json +2 -2
@@ -0,0 +1,291 @@
1
+ import { CredentialType } from '@bubblelab/shared-schemas';
2
+ import { ServiceBubble } from '../../../types/service-bubble-class.js';
3
+ import { PosthogParamsSchema, PosthogResultSchema, } from './posthog.schema.js';
4
+ /**
5
+ * PosthogBubble - Integration with PostHog product analytics
6
+ *
7
+ * Provides read operations for retrieving analytics data from PostHog:
8
+ * - List events with filtering by event type, person, and date range
9
+ * - Execute HogQL queries for custom analytics
10
+ * - Look up person profiles and properties
11
+ * - Retrieve saved insight results
12
+ *
13
+ * @example
14
+ * ```typescript
15
+ * // List recent pageview events
16
+ * const result = await new PosthogBubble({
17
+ * operation: 'list_events',
18
+ * project_id: '12345',
19
+ * event: '$pageview',
20
+ * limit: 50,
21
+ * }).action();
22
+ *
23
+ * // Execute a HogQL query
24
+ * const queryResult = await new PosthogBubble({
25
+ * operation: 'query',
26
+ * project_id: '12345',
27
+ * query: 'SELECT event, count() FROM events GROUP BY event ORDER BY count() DESC LIMIT 10',
28
+ * }).action();
29
+ *
30
+ * // Look up a person by distinct ID
31
+ * const person = await new PosthogBubble({
32
+ * operation: 'get_person',
33
+ * project_id: '12345',
34
+ * distinct_id: 'user_123',
35
+ * }).action();
36
+ * ```
37
+ */
38
+ export class PosthogBubble extends ServiceBubble {
39
+ // REQUIRED: Static metadata for BubbleFactory
40
+ static service = 'posthog';
41
+ static authType = 'apikey';
42
+ static bubbleName = 'posthog';
43
+ static type = 'service';
44
+ static schema = PosthogParamsSchema;
45
+ static resultSchema = PosthogResultSchema;
46
+ static shortDescription = 'PostHog product analytics for events, persons, and insights';
47
+ static longDescription = `
48
+ PostHog is an open-source product analytics platform.
49
+ This bubble provides read operations for retrieving analytics data:
50
+ - List and filter captured events (pageviews, custom events, etc.)
51
+ - Execute HogQL queries for advanced custom analytics
52
+ - Look up person profiles and their properties
53
+ - Retrieve saved insight results
54
+
55
+ Authentication:
56
+ - Uses a Personal API Key via Bearer token
57
+ - Supports US Cloud, EU Cloud, and self-hosted instances via configurable host URL
58
+
59
+ Use Cases:
60
+ - Pull analytics data into automated workflows
61
+ - Query event data with HogQL for custom reports
62
+ - Look up user profiles and their properties
63
+ - Retrieve computed insight results for dashboards
64
+ `;
65
+ static alias = 'posthog-analytics';
66
+ constructor(params = {
67
+ operation: 'list_events',
68
+ project_id: '',
69
+ limit: 100,
70
+ }, context) {
71
+ super(params, context);
72
+ }
73
+ /**
74
+ * Choose the appropriate credential for PostHog API
75
+ */
76
+ chooseCredential() {
77
+ const params = this.params;
78
+ const credentials = params.credentials;
79
+ if (!credentials || typeof credentials !== 'object') {
80
+ return undefined;
81
+ }
82
+ return credentials[CredentialType.POSTHOG_API_KEY];
83
+ }
84
+ /**
85
+ * Test if the credential is valid by listing projects
86
+ */
87
+ async testCredential() {
88
+ try {
89
+ const apiKey = this.chooseCredential();
90
+ if (!apiKey) {
91
+ return false;
92
+ }
93
+ const params = this.params;
94
+ const host = params.host || 'https://us.posthog.com';
95
+ // Use the /api/users/@me endpoint to validate the key
96
+ const response = await fetch(`${host}/api/users/@me/`, {
97
+ method: 'GET',
98
+ headers: {
99
+ Authorization: `Bearer ${apiKey}`,
100
+ 'Content-Type': 'application/json',
101
+ },
102
+ });
103
+ return response.ok;
104
+ }
105
+ catch {
106
+ return false;
107
+ }
108
+ }
109
+ /**
110
+ * Perform the PostHog operation
111
+ */
112
+ async performAction(context) {
113
+ void context;
114
+ const params = this.params;
115
+ const { operation } = params;
116
+ try {
117
+ switch (operation) {
118
+ case 'list_events':
119
+ return (await this.listEvents(params));
120
+ case 'query':
121
+ return (await this.executeQuery(params));
122
+ case 'get_person':
123
+ return (await this.getPerson(params));
124
+ case 'get_insight':
125
+ return (await this.getInsight(params));
126
+ default:
127
+ throw new Error(`Unknown operation: ${operation}`);
128
+ }
129
+ }
130
+ catch (error) {
131
+ const errorMessage = error instanceof Error ? error.message : 'Unknown error occurred';
132
+ return {
133
+ operation,
134
+ success: false,
135
+ error: errorMessage,
136
+ };
137
+ }
138
+ }
139
+ /**
140
+ * Make an authenticated GET request to the PostHog API
141
+ */
142
+ async makePosthogGetRequest(host, path, queryParams) {
143
+ const apiKey = this.chooseCredential();
144
+ if (!apiKey) {
145
+ throw new Error('PostHog Personal API Key is required');
146
+ }
147
+ const url = new URL(`${host}${path}`);
148
+ if (queryParams) {
149
+ for (const [key, value] of Object.entries(queryParams)) {
150
+ if (value !== undefined && value !== '') {
151
+ url.searchParams.set(key, value);
152
+ }
153
+ }
154
+ }
155
+ const response = await fetch(url.toString(), {
156
+ method: 'GET',
157
+ headers: {
158
+ Authorization: `Bearer ${apiKey}`,
159
+ 'Content-Type': 'application/json',
160
+ },
161
+ });
162
+ if (!response.ok) {
163
+ const errorText = await response.text();
164
+ let errorMessage;
165
+ try {
166
+ const errorData = JSON.parse(errorText);
167
+ errorMessage =
168
+ errorData.detail || errorData.error || errorData.message || errorText;
169
+ }
170
+ catch {
171
+ errorMessage = errorText;
172
+ }
173
+ throw new Error(`PostHog API error (HTTP ${response.status}): ${errorMessage}`);
174
+ }
175
+ return (await response.json());
176
+ }
177
+ /**
178
+ * Make an authenticated POST request to the PostHog API
179
+ */
180
+ async makePosthogPostRequest(host, path, body) {
181
+ const apiKey = this.chooseCredential();
182
+ if (!apiKey) {
183
+ throw new Error('PostHog Personal API Key is required');
184
+ }
185
+ const response = await fetch(`${host}${path}`, {
186
+ method: 'POST',
187
+ headers: {
188
+ Authorization: `Bearer ${apiKey}`,
189
+ 'Content-Type': 'application/json',
190
+ },
191
+ body: JSON.stringify(body),
192
+ });
193
+ if (!response.ok) {
194
+ const errorText = await response.text();
195
+ let errorMessage;
196
+ try {
197
+ const errorData = JSON.parse(errorText);
198
+ errorMessage =
199
+ errorData.detail || errorData.error || errorData.message || errorText;
200
+ }
201
+ catch {
202
+ errorMessage = errorText;
203
+ }
204
+ throw new Error(`PostHog API error (HTTP ${response.status}): ${errorMessage}`);
205
+ }
206
+ return (await response.json());
207
+ }
208
+ /**
209
+ * List events with optional filtering
210
+ */
211
+ async listEvents(params) {
212
+ const queryParams = {};
213
+ if (params.event)
214
+ queryParams.event = params.event;
215
+ if (params.person_id)
216
+ queryParams.person_id = params.person_id;
217
+ if (params.distinct_id)
218
+ queryParams.distinct_id = params.distinct_id;
219
+ if (params.after)
220
+ queryParams.after = params.after;
221
+ if (params.before)
222
+ queryParams.before = params.before;
223
+ if (params.properties)
224
+ queryParams.properties = params.properties;
225
+ if (params.limit !== undefined)
226
+ queryParams.limit = String(params.limit);
227
+ const response = await this.makePosthogGetRequest(params.host, `/api/projects/${params.project_id}/events/`, queryParams);
228
+ return {
229
+ operation: 'list_events',
230
+ success: true,
231
+ events: response.results,
232
+ next: response.next,
233
+ error: '',
234
+ };
235
+ }
236
+ /**
237
+ * Execute a HogQL query
238
+ */
239
+ async executeQuery(params) {
240
+ const response = await this.makePosthogPostRequest(params.host, `/api/projects/${params.project_id}/query/`, {
241
+ query: {
242
+ kind: 'HogQLQuery',
243
+ query: params.query,
244
+ },
245
+ });
246
+ // The response may have nested results structure
247
+ const results = response.results;
248
+ return {
249
+ operation: 'query',
250
+ success: true,
251
+ columns: (results?.columns || response.columns),
252
+ results: (results?.results || response.results),
253
+ types: (results?.types || response.types),
254
+ hasMore: (results?.hasMore || response.hasMore),
255
+ error: '',
256
+ };
257
+ }
258
+ /**
259
+ * Get person profiles
260
+ */
261
+ async getPerson(params) {
262
+ const queryParams = {};
263
+ if (params.distinct_id)
264
+ queryParams.distinct_id = params.distinct_id;
265
+ if (params.search)
266
+ queryParams.search = params.search;
267
+ if (params.limit !== undefined)
268
+ queryParams.limit = String(params.limit);
269
+ const response = await this.makePosthogGetRequest(params.host, `/api/projects/${params.project_id}/persons/`, queryParams);
270
+ return {
271
+ operation: 'get_person',
272
+ success: true,
273
+ persons: response.results,
274
+ next: response.next,
275
+ error: '',
276
+ };
277
+ }
278
+ /**
279
+ * Get a saved insight's results
280
+ */
281
+ async getInsight(params) {
282
+ const response = await this.makePosthogGetRequest(params.host, `/api/projects/${params.project_id}/insights/${params.insight_id}/`);
283
+ return {
284
+ operation: 'get_insight',
285
+ success: true,
286
+ insight: response,
287
+ error: '',
288
+ };
289
+ }
290
+ }
291
+ //# sourceMappingURL=posthog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"posthog.js","sourceRoot":"","sources":["../../../../src/bubbles/service-bubble/posthog/posthog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AAEvE,OAAO,EACL,mBAAmB,EACnB,mBAAmB,GAQpB,MAAM,qBAAqB,CAAC;AAE7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,MAAM,OAAO,aAEX,SAAQ,aAGT;IACC,8CAA8C;IAC9C,MAAM,CAAU,OAAO,GAAG,SAAS,CAAC;IACpC,MAAM,CAAU,QAAQ,GAAG,QAAiB,CAAC;IAC7C,MAAM,CAAU,UAAU,GAAG,SAAkB,CAAC;IAChD,MAAM,CAAU,IAAI,GAAG,SAAkB,CAAC;IAC1C,MAAM,CAAU,MAAM,GAAG,mBAAmB,CAAC;IAC7C,MAAM,CAAU,YAAY,GAAG,mBAAmB,CAAC;IACnD,MAAM,CAAU,gBAAgB,GAC9B,6DAA6D,CAAC;IAChE,MAAM,CAAU,eAAe,GAAG;;;;;;;;;;;;;;;;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