@bubblelab/bubble-core 0.1.156 → 0.1.158

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 (130) hide show
  1. package/dist/bubble-bundle.d.ts +161 -122
  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/agi-inc.d.ts +144 -144
  15. package/dist/bubbles/service-bubble/ai-agent.d.ts +8 -8
  16. package/dist/bubbles/service-bubble/airtable.d.ts +184 -184
  17. package/dist/bubbles/service-bubble/apify/apify.d.ts +24 -24
  18. package/dist/bubbles/service-bubble/ashby/ashby.d.ts +152 -152
  19. package/dist/bubbles/service-bubble/browserbase/browserbase.d.ts +55 -55
  20. package/dist/bubbles/service-bubble/confluence/confluence.d.ts +63 -63
  21. package/dist/bubbles/service-bubble/crustdata/crustdata.d.ts +98 -98
  22. package/dist/bubbles/service-bubble/eleven-labs.d.ts +56 -56
  23. package/dist/bubbles/service-bubble/firecrawl.d.ts +264 -264
  24. package/dist/bubbles/service-bubble/followupboss.d.ts +282 -282
  25. package/dist/bubbles/service-bubble/fullenrich/fullenrich.d.ts +40 -40
  26. package/dist/bubbles/service-bubble/github.d.ts +216 -216
  27. package/dist/bubbles/service-bubble/gmail.d.ts +228 -228
  28. package/dist/bubbles/service-bubble/google-calendar.d.ts +62 -62
  29. package/dist/bubbles/service-bubble/google-drive.d.ts +152 -152
  30. package/dist/bubbles/service-bubble/google-sheets/google-sheets.d.ts +44 -44
  31. package/dist/bubbles/service-bubble/google-sheets.d.ts +1811 -0
  32. package/dist/bubbles/service-bubble/google-sheets.d.ts.map +1 -0
  33. package/dist/bubbles/service-bubble/google-sheets.js +904 -0
  34. package/dist/bubbles/service-bubble/google-sheets.js.map +1 -0
  35. package/dist/bubbles/service-bubble/hello-world.d.ts +4 -4
  36. package/dist/bubbles/service-bubble/http.d.ts +12 -12
  37. package/dist/bubbles/service-bubble/insforge-db.d.ts +6 -6
  38. package/dist/bubbles/service-bubble/jira/jira.d.ts +107 -107
  39. package/dist/bubbles/service-bubble/notion/notion.d.ts +932 -932
  40. package/dist/bubbles/service-bubble/postgresql.d.ts +6 -6
  41. package/dist/bubbles/service-bubble/posthog/index.d.ts +3 -0
  42. package/dist/bubbles/service-bubble/posthog/index.d.ts.map +1 -0
  43. package/dist/bubbles/service-bubble/posthog/index.js +3 -0
  44. package/dist/bubbles/service-bubble/posthog/index.js.map +1 -0
  45. package/dist/bubbles/service-bubble/posthog/posthog.d.ts +469 -0
  46. package/dist/bubbles/service-bubble/posthog/posthog.d.ts.map +1 -0
  47. package/dist/bubbles/service-bubble/posthog/posthog.js +309 -0
  48. package/dist/bubbles/service-bubble/posthog/posthog.js.map +1 -0
  49. package/dist/bubbles/service-bubble/posthog/posthog.schema.d.ts +545 -0
  50. package/dist/bubbles/service-bubble/posthog/posthog.schema.d.ts.map +1 -0
  51. package/dist/bubbles/service-bubble/posthog/posthog.schema.js +352 -0
  52. package/dist/bubbles/service-bubble/posthog/posthog.schema.js.map +1 -0
  53. package/dist/bubbles/service-bubble/resend.d.ts +16 -16
  54. package/dist/bubbles/service-bubble/slack/slack.d.ts +325 -325
  55. package/dist/bubbles/service-bubble/slack.d.ts +5869 -0
  56. package/dist/bubbles/service-bubble/slack.d.ts.map +1 -0
  57. package/dist/bubbles/service-bubble/slack.js +1536 -0
  58. package/dist/bubbles/service-bubble/slack.js.map +1 -0
  59. package/dist/bubbles/service-bubble/storage.d.ts +40 -40
  60. package/dist/bubbles/service-bubble/stripe/stripe.d.ts +161 -161
  61. package/dist/bubbles/service-bubble/telegram.d.ts +264 -264
  62. package/dist/bubbles/tool-bubble/amazon-shopping-tool/amazon-shopping-tool.d.ts +26 -26
  63. package/dist/bubbles/tool-bubble/browser-tools/linkedin-accept-invitations/tool.d.ts +4 -4
  64. package/dist/bubbles/tool-bubble/browser-tools/linkedin-connection/tool.d.ts +4 -4
  65. package/dist/bubbles/tool-bubble/browser-tools/linkedin-received-invitations/tool.d.ts +4 -4
  66. package/dist/bubbles/tool-bubble/browser-tools/linkedin-sent-invitations/tool.d.ts +4 -4
  67. package/dist/bubbles/tool-bubble/bubbleflow-validation-tool.d.ts +8 -8
  68. package/dist/bubbles/tool-bubble/chart-js-tool.d.ts +4 -4
  69. package/dist/bubbles/tool-bubble/code-edit-tool.d.ts +4 -4
  70. package/dist/bubbles/tool-bubble/company-enrichment-tool.d.ts +18 -18
  71. package/dist/bubbles/tool-bubble/get-bubble-details-tool.d.ts +4 -4
  72. package/dist/bubbles/tool-bubble/get-trigger-detail-tool.d.ts +4 -4
  73. package/dist/bubbles/tool-bubble/google-maps-tool.d.ts +12 -12
  74. package/dist/bubbles/tool-bubble/instagram-tool.d.ts +22 -22
  75. package/dist/bubbles/tool-bubble/linkedin-connection-tool/index.d.ts +3 -0
  76. package/dist/bubbles/tool-bubble/linkedin-connection-tool/index.d.ts.map +1 -0
  77. package/dist/bubbles/tool-bubble/linkedin-connection-tool/index.js +3 -0
  78. package/dist/bubbles/tool-bubble/linkedin-connection-tool/index.js.map +1 -0
  79. package/dist/bubbles/tool-bubble/linkedin-connection-tool/linkedin-connection-tool.d.ts +160 -0
  80. package/dist/bubbles/tool-bubble/linkedin-connection-tool/linkedin-connection-tool.d.ts.map +1 -0
  81. package/dist/bubbles/tool-bubble/linkedin-connection-tool/linkedin-connection-tool.js +706 -0
  82. package/dist/bubbles/tool-bubble/linkedin-connection-tool/linkedin-connection-tool.js.map +1 -0
  83. package/dist/bubbles/tool-bubble/linkedin-connection-tool/linkedin-connection-tool.schema.d.ts +93 -0
  84. package/dist/bubbles/tool-bubble/linkedin-connection-tool/linkedin-connection-tool.schema.d.ts.map +1 -0
  85. package/dist/bubbles/tool-bubble/linkedin-connection-tool/linkedin-connection-tool.schema.js +50 -0
  86. package/dist/bubbles/tool-bubble/linkedin-connection-tool/linkedin-connection-tool.schema.js.map +1 -0
  87. package/dist/bubbles/tool-bubble/linkedin-tool.d.ts +108 -108
  88. package/dist/bubbles/tool-bubble/list-airtable-bases-tool.d.ts +12 -12
  89. package/dist/bubbles/tool-bubble/list-airtable-tables-tool.d.ts +24 -24
  90. package/dist/bubbles/tool-bubble/list-bubbles-tool.d.ts +4 -4
  91. package/dist/bubbles/tool-bubble/list-capabilities-tool.d.ts +12 -12
  92. package/dist/bubbles/tool-bubble/people-search-tool.d.ts +42 -42
  93. package/dist/bubbles/tool-bubble/reddit-scrape-tool.d.ts +16 -16
  94. package/dist/bubbles/tool-bubble/research-agent-tool.d.ts +8 -8
  95. package/dist/bubbles/tool-bubble/sql-query-tool.d.ts +8 -8
  96. package/dist/bubbles/tool-bubble/tiktok-tool.d.ts +12 -12
  97. package/dist/bubbles/tool-bubble/tool-template.d.ts +4 -4
  98. package/dist/bubbles/tool-bubble/twitter-tool.d.ts +36 -36
  99. package/dist/bubbles/tool-bubble/web-crawl-tool.d.ts +8 -8
  100. package/dist/bubbles/tool-bubble/web-extract-tool.d.ts +8 -8
  101. package/dist/bubbles/tool-bubble/web-scrape-tool.d.ts +8 -8
  102. package/dist/bubbles/tool-bubble/web-search-tool.d.ts +16 -16
  103. package/dist/bubbles/tool-bubble/yc-scraper-tool.d.ts +8 -8
  104. package/dist/bubbles/tool-bubble/youtube-tool.d.ts +18 -18
  105. package/dist/bubbles/workflow-bubble/bubbleflow-generator.workflow.d.ts +114 -0
  106. package/dist/bubbles/workflow-bubble/bubbleflow-generator.workflow.d.ts.map +1 -0
  107. package/dist/bubbles/workflow-bubble/bubbleflow-generator.workflow.js +777 -0
  108. package/dist/bubbles/workflow-bubble/bubbleflow-generator.workflow.js.map +1 -0
  109. package/dist/bubbles/workflow-bubble/database-analyzer.workflow.d.ts +4 -4
  110. package/dist/bubbles/workflow-bubble/generate-document.workflow.d.ts +24 -24
  111. package/dist/bubbles/workflow-bubble/parse-document.workflow.d.ts +4 -4
  112. package/dist/bubbles/workflow-bubble/pdf-form-operations.workflow.d.ts +68 -68
  113. package/dist/bubbles/workflow-bubble/pdf-ocr.workflow.d.ts +24 -24
  114. package/dist/bubbles/workflow-bubble/slack-data-assistant.workflow.d.ts +10 -10
  115. package/dist/bubbles/workflow-bubble/slack-formatter-agent.d.ts +62 -62
  116. package/dist/bubbles/workflow-bubble/slack-notifier.workflow.d.ts +4 -4
  117. package/dist/bubbles.json +617 -2
  118. package/dist/index.d.ts +2 -0
  119. package/dist/index.d.ts.map +1 -1
  120. package/dist/index.js +1 -0
  121. package/dist/index.js.map +1 -1
  122. package/dist/types/ai-models.d.ts +4 -0
  123. package/dist/types/ai-models.d.ts.map +1 -0
  124. package/dist/types/ai-models.js +16 -0
  125. package/dist/types/ai-models.js.map +1 -0
  126. package/dist/utils/param-helper.d.ts +2 -0
  127. package/dist/utils/param-helper.d.ts.map +1 -0
  128. package/dist/utils/param-helper.js +5 -0
  129. package/dist/utils/param-helper.js.map +1 -0
  130. package/package.json +2 -2
@@ -12,9 +12,9 @@ declare const PostgreSQLParamsSchema: z.ZodObject<{
12
12
  maxRows: z.ZodDefault<z.ZodNumber>;
13
13
  credentials: z.ZodOptional<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>;
14
14
  }, "strip", z.ZodTypeAny, {
15
+ query: string;
15
16
  timeout: number;
16
17
  ignoreSSL: boolean;
17
- query: string;
18
18
  allowedOperations: ("SELECT" | "INSERT" | "UPDATE" | "DELETE" | "WITH" | "EXPLAIN" | "ANALYZE" | "SHOW" | "DESCRIBE" | "DESC" | "CREATE")[];
19
19
  parameters: unknown[];
20
20
  maxRows: number;
@@ -49,8 +49,8 @@ declare const PostgreSQLResultSchema: z.ZodObject<{
49
49
  error: z.ZodString;
50
50
  cleanedJSONString: z.ZodString;
51
51
  }, "strip", z.ZodTypeAny, {
52
- error: string;
53
52
  success: boolean;
53
+ error: string;
54
54
  rows: Record<string, unknown>[];
55
55
  rowCount: number | null;
56
56
  command: string;
@@ -61,8 +61,8 @@ declare const PostgreSQLResultSchema: z.ZodObject<{
61
61
  dataTypeID: number;
62
62
  }[] | undefined;
63
63
  }, {
64
- error: string;
65
64
  success: boolean;
65
+ error: string;
66
66
  rows: Record<string, unknown>[];
67
67
  rowCount: number | null;
68
68
  command: string;
@@ -89,9 +89,9 @@ export declare class PostgreSQLBubble extends ServiceBubble<PostgreSQLParams, Po
89
89
  maxRows: z.ZodDefault<z.ZodNumber>;
90
90
  credentials: z.ZodOptional<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>;
91
91
  }, "strip", z.ZodTypeAny, {
92
+ query: string;
92
93
  timeout: number;
93
94
  ignoreSSL: boolean;
94
- query: string;
95
95
  allowedOperations: ("SELECT" | "INSERT" | "UPDATE" | "DELETE" | "WITH" | "EXPLAIN" | "ANALYZE" | "SHOW" | "DESCRIBE" | "DESC" | "CREATE")[];
96
96
  parameters: unknown[];
97
97
  maxRows: number;
@@ -124,8 +124,8 @@ export declare class PostgreSQLBubble extends ServiceBubble<PostgreSQLParams, Po
124
124
  error: z.ZodString;
125
125
  cleanedJSONString: z.ZodString;
126
126
  }, "strip", z.ZodTypeAny, {
127
- error: string;
128
127
  success: boolean;
128
+ error: string;
129
129
  rows: Record<string, unknown>[];
130
130
  rowCount: number | null;
131
131
  command: string;
@@ -136,8 +136,8 @@ export declare class PostgreSQLBubble extends ServiceBubble<PostgreSQLParams, Po
136
136
  dataTypeID: number;
137
137
  }[] | undefined;
138
138
  }, {
139
- error: string;
140
139
  success: boolean;
140
+ error: string;
141
141
  rows: Record<string, unknown>[];
142
142
  rowCount: number | null;
143
143
  command: string;
@@ -0,0 +1,3 @@
1
+ export { PosthogBubble } from './posthog.js';
2
+ export { PosthogParamsSchema, PosthogResultSchema, PosthogEventSchema, PosthogPersonSchema, PosthogInsightSchema, PosthogQueryResultSchema, PosthogProjectSchema, type PosthogParams, type PosthogParamsInput, type PosthogResult, type PosthogEvent, type PosthogPerson, type PosthogInsight, type PosthogQueryResult, type PosthogProject, type PosthogListProjectsParams, type PosthogListEventsParams, type PosthogQueryParams, type PosthogGetPersonParams, type PosthogGetInsightParams, } from './posthog.schema.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/bubbles/service-bubble/posthog/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,EACpB,wBAAwB,EACxB,oBAAoB,EACpB,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,yBAAyB,EAC9B,KAAK,uBAAuB,EAC5B,KAAK,kBAAkB,EACvB,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,GAC7B,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { PosthogBubble } from './posthog.js';
2
+ export { PosthogParamsSchema, PosthogResultSchema, PosthogEventSchema, PosthogPersonSchema, PosthogInsightSchema, PosthogQueryResultSchema, PosthogProjectSchema, } from './posthog.schema.js';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/bubbles/service-bubble/posthog/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,EACpB,wBAAwB,EACxB,oBAAoB,GAcrB,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,469 @@
1
+ import { CredentialType } from '@bubblelab/shared-schemas';
2
+ import { ServiceBubble } from '../../../types/service-bubble-class.js';
3
+ import type { BubbleContext } from '../../../types/bubble.js';
4
+ import { type PosthogParamsInput, type PosthogResult } from './posthog.schema.js';
5
+ /**
6
+ * PosthogBubble - Integration with PostHog product analytics
7
+ *
8
+ * Provides read operations for retrieving analytics data from PostHog:
9
+ * - List events with filtering by event type, person, and date range
10
+ * - Execute HogQL queries for custom analytics
11
+ * - Look up person profiles and properties
12
+ * - Retrieve saved insight results
13
+ *
14
+ * @example
15
+ * ```typescript
16
+ * // List recent pageview events
17
+ * const result = await new PosthogBubble({
18
+ * operation: 'list_events',
19
+ * project_id: '12345',
20
+ * event: '$pageview',
21
+ * limit: 50,
22
+ * }).action();
23
+ *
24
+ * // Execute a HogQL query
25
+ * const queryResult = await new PosthogBubble({
26
+ * operation: 'query',
27
+ * project_id: '12345',
28
+ * query: 'SELECT event, count() FROM events GROUP BY event ORDER BY count() DESC LIMIT 10',
29
+ * }).action();
30
+ *
31
+ * // Look up a person by distinct ID
32
+ * const person = await new PosthogBubble({
33
+ * operation: 'get_person',
34
+ * project_id: '12345',
35
+ * distinct_id: 'user_123',
36
+ * }).action();
37
+ * ```
38
+ */
39
+ export declare class PosthogBubble<T extends PosthogParamsInput = PosthogParamsInput> extends ServiceBubble<T, Extract<PosthogResult, {
40
+ operation: T['operation'];
41
+ }>> {
42
+ static readonly service = "posthog";
43
+ static readonly authType: "apikey";
44
+ static readonly bubbleName: "posthog";
45
+ static readonly type: "service";
46
+ static readonly schema: import("zod").ZodDiscriminatedUnion<"operation", [import("zod").ZodObject<{
47
+ operation: import("zod").ZodLiteral<"list_projects">;
48
+ host: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodString>>;
49
+ limit: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodNumber>>;
50
+ credentials: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodNativeEnum<typeof CredentialType>, import("zod").ZodString>>;
51
+ }, "strip", import("zod").ZodTypeAny, {
52
+ limit: number;
53
+ operation: "list_projects";
54
+ host: string;
55
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
56
+ }, {
57
+ operation: "list_projects";
58
+ limit?: number | undefined;
59
+ host?: string | undefined;
60
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
61
+ }>, import("zod").ZodObject<{
62
+ operation: import("zod").ZodLiteral<"list_events">;
63
+ project_id: import("zod").ZodString;
64
+ host: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodString>>;
65
+ event: import("zod").ZodOptional<import("zod").ZodString>;
66
+ person_id: import("zod").ZodOptional<import("zod").ZodString>;
67
+ distinct_id: import("zod").ZodOptional<import("zod").ZodString>;
68
+ after: import("zod").ZodOptional<import("zod").ZodString>;
69
+ before: import("zod").ZodOptional<import("zod").ZodString>;
70
+ properties: import("zod").ZodOptional<import("zod").ZodString>;
71
+ limit: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodNumber>>;
72
+ credentials: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodNativeEnum<typeof CredentialType>, import("zod").ZodString>>;
73
+ }, "strip", import("zod").ZodTypeAny, {
74
+ limit: number;
75
+ operation: "list_events";
76
+ host: string;
77
+ project_id: string;
78
+ event?: string | undefined;
79
+ distinct_id?: string | undefined;
80
+ properties?: string | undefined;
81
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
82
+ person_id?: string | undefined;
83
+ after?: string | undefined;
84
+ before?: string | undefined;
85
+ }, {
86
+ operation: "list_events";
87
+ project_id: string;
88
+ event?: string | undefined;
89
+ distinct_id?: string | undefined;
90
+ properties?: string | undefined;
91
+ limit?: number | undefined;
92
+ host?: string | undefined;
93
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
94
+ person_id?: string | undefined;
95
+ after?: string | undefined;
96
+ before?: string | undefined;
97
+ }>, import("zod").ZodObject<{
98
+ operation: import("zod").ZodLiteral<"query">;
99
+ project_id: import("zod").ZodString;
100
+ host: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodString>>;
101
+ query: import("zod").ZodString;
102
+ credentials: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodNativeEnum<typeof CredentialType>, import("zod").ZodString>>;
103
+ }, "strip", import("zod").ZodTypeAny, {
104
+ operation: "query";
105
+ host: string;
106
+ project_id: string;
107
+ query: string;
108
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
109
+ }, {
110
+ operation: "query";
111
+ project_id: string;
112
+ query: string;
113
+ host?: string | undefined;
114
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
115
+ }>, import("zod").ZodObject<{
116
+ operation: import("zod").ZodLiteral<"get_person">;
117
+ project_id: import("zod").ZodString;
118
+ host: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodString>>;
119
+ distinct_id: import("zod").ZodOptional<import("zod").ZodString>;
120
+ search: import("zod").ZodOptional<import("zod").ZodString>;
121
+ limit: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodNumber>>;
122
+ credentials: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodNativeEnum<typeof CredentialType>, import("zod").ZodString>>;
123
+ }, "strip", import("zod").ZodTypeAny, {
124
+ limit: number;
125
+ operation: "get_person";
126
+ host: string;
127
+ project_id: string;
128
+ distinct_id?: string | undefined;
129
+ search?: string | undefined;
130
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
131
+ }, {
132
+ operation: "get_person";
133
+ project_id: string;
134
+ distinct_id?: string | undefined;
135
+ limit?: number | undefined;
136
+ search?: string | undefined;
137
+ host?: string | undefined;
138
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
139
+ }>, import("zod").ZodObject<{
140
+ operation: import("zod").ZodLiteral<"get_insight">;
141
+ project_id: import("zod").ZodString;
142
+ host: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodString>>;
143
+ insight_id: import("zod").ZodNumber;
144
+ credentials: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodNativeEnum<typeof CredentialType>, import("zod").ZodString>>;
145
+ }, "strip", import("zod").ZodTypeAny, {
146
+ operation: "get_insight";
147
+ host: string;
148
+ project_id: string;
149
+ insight_id: number;
150
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
151
+ }, {
152
+ operation: "get_insight";
153
+ project_id: string;
154
+ insight_id: number;
155
+ host?: string | undefined;
156
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
157
+ }>]>;
158
+ static readonly resultSchema: import("zod").ZodDiscriminatedUnion<"operation", [import("zod").ZodObject<{
159
+ operation: import("zod").ZodLiteral<"list_projects">;
160
+ success: import("zod").ZodBoolean;
161
+ projects: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
162
+ id: import("zod").ZodNumber;
163
+ uuid: import("zod").ZodOptional<import("zod").ZodString>;
164
+ name: import("zod").ZodString;
165
+ organization: import("zod").ZodOptional<import("zod").ZodString>;
166
+ created_at: import("zod").ZodOptional<import("zod").ZodString>;
167
+ timezone: import("zod").ZodOptional<import("zod").ZodString>;
168
+ is_demo: import("zod").ZodOptional<import("zod").ZodBoolean>;
169
+ }, "strip", import("zod").ZodTypeAny, {
170
+ id: number;
171
+ name: string;
172
+ uuid?: string | undefined;
173
+ created_at?: string | undefined;
174
+ organization?: string | undefined;
175
+ timezone?: string | undefined;
176
+ is_demo?: boolean | undefined;
177
+ }, {
178
+ id: number;
179
+ name: string;
180
+ uuid?: string | undefined;
181
+ created_at?: string | undefined;
182
+ organization?: string | undefined;
183
+ timezone?: string | undefined;
184
+ is_demo?: boolean | undefined;
185
+ }>, "many">>;
186
+ next: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodString>>;
187
+ error: import("zod").ZodString;
188
+ }, "strip", import("zod").ZodTypeAny, {
189
+ operation: "list_projects";
190
+ success: boolean;
191
+ error: string;
192
+ projects?: {
193
+ id: number;
194
+ name: string;
195
+ uuid?: string | undefined;
196
+ created_at?: string | undefined;
197
+ organization?: string | undefined;
198
+ timezone?: string | undefined;
199
+ is_demo?: boolean | undefined;
200
+ }[] | undefined;
201
+ next?: string | null | undefined;
202
+ }, {
203
+ operation: "list_projects";
204
+ success: boolean;
205
+ error: string;
206
+ projects?: {
207
+ id: number;
208
+ name: string;
209
+ uuid?: string | undefined;
210
+ created_at?: string | undefined;
211
+ organization?: string | undefined;
212
+ timezone?: string | undefined;
213
+ is_demo?: boolean | undefined;
214
+ }[] | undefined;
215
+ next?: string | null | undefined;
216
+ }>, import("zod").ZodObject<{
217
+ operation: import("zod").ZodLiteral<"list_events">;
218
+ success: import("zod").ZodBoolean;
219
+ events: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
220
+ id: import("zod").ZodOptional<import("zod").ZodString>;
221
+ uuid: import("zod").ZodOptional<import("zod").ZodString>;
222
+ event: import("zod").ZodString;
223
+ distinct_id: import("zod").ZodString;
224
+ properties: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
225
+ timestamp: import("zod").ZodOptional<import("zod").ZodString>;
226
+ created_at: import("zod").ZodOptional<import("zod").ZodString>;
227
+ elements: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodUnknown, "many">>;
228
+ elements_chain: import("zod").ZodOptional<import("zod").ZodString>;
229
+ }, "strip", import("zod").ZodTypeAny, {
230
+ event: string;
231
+ distinct_id: string;
232
+ id?: string | undefined;
233
+ uuid?: string | undefined;
234
+ properties?: Record<string, unknown> | undefined;
235
+ timestamp?: string | undefined;
236
+ created_at?: string | undefined;
237
+ elements?: unknown[] | undefined;
238
+ elements_chain?: string | undefined;
239
+ }, {
240
+ event: string;
241
+ distinct_id: string;
242
+ id?: string | undefined;
243
+ uuid?: string | undefined;
244
+ properties?: Record<string, unknown> | undefined;
245
+ timestamp?: string | undefined;
246
+ created_at?: string | undefined;
247
+ elements?: unknown[] | undefined;
248
+ elements_chain?: string | undefined;
249
+ }>, "many">>;
250
+ next: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodString>>;
251
+ error: import("zod").ZodString;
252
+ }, "strip", import("zod").ZodTypeAny, {
253
+ operation: "list_events";
254
+ success: boolean;
255
+ error: string;
256
+ next?: string | null | undefined;
257
+ events?: {
258
+ event: string;
259
+ distinct_id: string;
260
+ id?: string | undefined;
261
+ uuid?: string | undefined;
262
+ properties?: Record<string, unknown> | undefined;
263
+ timestamp?: string | undefined;
264
+ created_at?: string | undefined;
265
+ elements?: unknown[] | undefined;
266
+ elements_chain?: string | undefined;
267
+ }[] | undefined;
268
+ }, {
269
+ operation: "list_events";
270
+ success: boolean;
271
+ error: string;
272
+ next?: string | null | undefined;
273
+ events?: {
274
+ event: string;
275
+ distinct_id: string;
276
+ id?: string | undefined;
277
+ uuid?: string | undefined;
278
+ properties?: Record<string, unknown> | undefined;
279
+ timestamp?: string | undefined;
280
+ created_at?: string | undefined;
281
+ elements?: unknown[] | undefined;
282
+ elements_chain?: string | undefined;
283
+ }[] | undefined;
284
+ }>, import("zod").ZodObject<{
285
+ operation: import("zod").ZodLiteral<"query">;
286
+ success: import("zod").ZodBoolean;
287
+ columns: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
288
+ results: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodArray<import("zod").ZodUnknown, "many">, "many">>;
289
+ types: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>, "many">>;
290
+ hasMore: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodBoolean>>;
291
+ error: import("zod").ZodString;
292
+ }, "strip", import("zod").ZodTypeAny, {
293
+ operation: "query";
294
+ success: boolean;
295
+ error: string;
296
+ columns?: string[] | undefined;
297
+ results?: unknown[][] | undefined;
298
+ types?: (string | string[])[] | undefined;
299
+ hasMore?: boolean | null | undefined;
300
+ }, {
301
+ operation: "query";
302
+ success: boolean;
303
+ error: string;
304
+ columns?: string[] | undefined;
305
+ results?: unknown[][] | undefined;
306
+ types?: (string | string[])[] | undefined;
307
+ hasMore?: boolean | null | undefined;
308
+ }>, import("zod").ZodObject<{
309
+ operation: import("zod").ZodLiteral<"get_person">;
310
+ success: import("zod").ZodBoolean;
311
+ persons: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
312
+ id: import("zod").ZodString;
313
+ uuid: import("zod").ZodOptional<import("zod").ZodString>;
314
+ distinct_ids: import("zod").ZodArray<import("zod").ZodString, "many">;
315
+ properties: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
316
+ created_at: import("zod").ZodOptional<import("zod").ZodString>;
317
+ }, "strip", import("zod").ZodTypeAny, {
318
+ id: string;
319
+ distinct_ids: string[];
320
+ uuid?: string | undefined;
321
+ properties?: Record<string, unknown> | undefined;
322
+ created_at?: string | undefined;
323
+ }, {
324
+ id: string;
325
+ distinct_ids: string[];
326
+ uuid?: string | undefined;
327
+ properties?: Record<string, unknown> | undefined;
328
+ created_at?: string | undefined;
329
+ }>, "many">>;
330
+ next: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodString>>;
331
+ error: import("zod").ZodString;
332
+ }, "strip", import("zod").ZodTypeAny, {
333
+ operation: "get_person";
334
+ success: boolean;
335
+ error: string;
336
+ next?: string | null | undefined;
337
+ persons?: {
338
+ id: string;
339
+ distinct_ids: string[];
340
+ uuid?: string | undefined;
341
+ properties?: Record<string, unknown> | undefined;
342
+ created_at?: string | undefined;
343
+ }[] | undefined;
344
+ }, {
345
+ operation: "get_person";
346
+ success: boolean;
347
+ error: string;
348
+ next?: string | null | undefined;
349
+ persons?: {
350
+ id: string;
351
+ distinct_ids: string[];
352
+ uuid?: string | undefined;
353
+ properties?: Record<string, unknown> | undefined;
354
+ created_at?: string | undefined;
355
+ }[] | undefined;
356
+ }>, import("zod").ZodObject<{
357
+ operation: import("zod").ZodLiteral<"get_insight">;
358
+ success: import("zod").ZodBoolean;
359
+ insight: import("zod").ZodOptional<import("zod").ZodObject<{
360
+ id: import("zod").ZodNumber;
361
+ short_id: import("zod").ZodOptional<import("zod").ZodString>;
362
+ name: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodString>>;
363
+ description: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodString>>;
364
+ result: import("zod").ZodOptional<import("zod").ZodUnknown>;
365
+ filters: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
366
+ created_at: import("zod").ZodOptional<import("zod").ZodString>;
367
+ last_refresh: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodString>>;
368
+ last_modified_at: import("zod").ZodOptional<import("zod").ZodString>;
369
+ }, "strip", import("zod").ZodTypeAny, {
370
+ id: number;
371
+ description?: string | null | undefined;
372
+ created_at?: string | undefined;
373
+ short_id?: string | undefined;
374
+ name?: string | null | undefined;
375
+ result?: unknown;
376
+ filters?: Record<string, unknown> | undefined;
377
+ last_refresh?: string | null | undefined;
378
+ last_modified_at?: string | undefined;
379
+ }, {
380
+ id: number;
381
+ description?: string | null | undefined;
382
+ created_at?: string | undefined;
383
+ short_id?: string | undefined;
384
+ name?: string | null | undefined;
385
+ result?: unknown;
386
+ filters?: Record<string, unknown> | undefined;
387
+ last_refresh?: string | null | undefined;
388
+ last_modified_at?: string | undefined;
389
+ }>>;
390
+ error: import("zod").ZodString;
391
+ }, "strip", import("zod").ZodTypeAny, {
392
+ operation: "get_insight";
393
+ success: boolean;
394
+ error: string;
395
+ insight?: {
396
+ id: number;
397
+ description?: string | null | undefined;
398
+ created_at?: string | undefined;
399
+ short_id?: string | undefined;
400
+ name?: string | null | undefined;
401
+ result?: unknown;
402
+ filters?: Record<string, unknown> | undefined;
403
+ last_refresh?: string | null | undefined;
404
+ last_modified_at?: string | undefined;
405
+ } | undefined;
406
+ }, {
407
+ operation: "get_insight";
408
+ success: boolean;
409
+ error: string;
410
+ insight?: {
411
+ id: number;
412
+ description?: string | null | undefined;
413
+ created_at?: string | undefined;
414
+ short_id?: string | undefined;
415
+ name?: string | null | undefined;
416
+ result?: unknown;
417
+ filters?: Record<string, unknown> | undefined;
418
+ last_refresh?: string | null | undefined;
419
+ last_modified_at?: string | undefined;
420
+ } | undefined;
421
+ }>]>;
422
+ static readonly shortDescription = "PostHog product analytics for events, persons, and insights";
423
+ static readonly longDescription = "\n PostHog is an open-source product analytics platform.\n This bubble provides read operations for retrieving analytics data:\n - List and filter captured events (pageviews, custom events, etc.)\n - Execute HogQL queries for advanced custom analytics\n - Look up person profiles and their properties\n - Retrieve saved insight results\n\n Authentication:\n - Uses a Personal API Key via Bearer token\n - Supports US Cloud, EU Cloud, and self-hosted instances via configurable host URL\n\n Use Cases:\n - Pull analytics data into automated workflows\n - Query event data with HogQL for custom reports\n - Look up user profiles and their properties\n - Retrieve computed insight results for dashboards\n ";
424
+ static readonly alias = "posthog-analytics";
425
+ constructor(params?: T, context?: BubbleContext);
426
+ /**
427
+ * Choose the appropriate credential for PostHog API
428
+ */
429
+ protected chooseCredential(): string | undefined;
430
+ /**
431
+ * Test if the credential is valid by listing projects
432
+ */
433
+ testCredential(): Promise<boolean>;
434
+ /**
435
+ * Perform the PostHog operation
436
+ */
437
+ protected performAction(context?: BubbleContext): Promise<Extract<PosthogResult, {
438
+ operation: T['operation'];
439
+ }>>;
440
+ /**
441
+ * Make an authenticated GET request to the PostHog API
442
+ */
443
+ private makePosthogGetRequest;
444
+ /**
445
+ * Make an authenticated POST request to the PostHog API
446
+ */
447
+ private makePosthogPostRequest;
448
+ /**
449
+ * List all projects accessible with the API key
450
+ */
451
+ private listProjects;
452
+ /**
453
+ * List events with optional filtering
454
+ */
455
+ private listEvents;
456
+ /**
457
+ * Execute a HogQL query
458
+ */
459
+ private executeQuery;
460
+ /**
461
+ * Get person profiles
462
+ */
463
+ private getPerson;
464
+ /**
465
+ * Get a saved insight's results
466
+ */
467
+ private getInsight;
468
+ }
469
+ //# sourceMappingURL=posthog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"posthog.d.ts","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;AACvE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAIL,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAMnB,MAAM,qBAAqB,CAAC;AAE7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,qBAAa,aAAa,CACxB,CAAC,SAAS,kBAAkB,GAAG,kBAAkB,CACjD,SAAQ,aAAa,CACrB,CAAC,EACD,OAAO,CAAC,aAAa,EAAE;IAAE,SAAS,EAAE,CAAC,CAAC,WAAW,CAAC,CAAA;CAAE,CAAC,CACtD;IAEC,MAAM,CAAC,QAAQ,CAAC,OAAO,aAAa;IACpC,MAAM,CAAC,QAAQ,CAAC,QAAQ,EAAG,QAAQ,CAAU;IAC7C,MAAM,CAAC,QAAQ,CAAC,UAAU,EAAG,SAAS,CAAU;IAChD,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAG,SAAS,CAAU;IAC1C,MAAM,CAAC,QAAQ,CAAC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAAuB;IAC7C,MAAM,CAAC,QAAQ,CAAC,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAAuB;IACnD,MAAM,CAAC,QAAQ,CAAC,gBAAgB,iEACgC;IAChE,MAAM,CAAC,QAAQ,CAAC,eAAe,gvBAiB7B;IACF,MAAM,CAAC,QAAQ,CAAC,KAAK,uBAAuB;gBAG1C,MAAM,GAAE,CAIF,EACN,OAAO,CAAC,EAAE,aAAa;IAKzB;;OAEG;IACH,SAAS,CAAC,gBAAgB,IAAI,MAAM,GAAG,SAAS;IAShD;;OAEG;IACG,cAAc,IAAI,OAAO,CAAC,OAAO,CAAC;IAyBxC;;OAEG;cACa,aAAa,CAC3B,OAAO,CAAC,EAAE,aAAa,GACtB,OAAO,CAAC,OAAO,CAAC,aAAa,EAAE;QAAE,SAAS,EAAE,CAAC,CAAC,WAAW,CAAC,CAAA;KAAE,CAAC,CAAC;IA+CjE;;OAEG;YACW,qBAAqB;IA2CnC;;OAEG;YACW,sBAAsB;IAmCpC;;OAEG;YACW,YAAY;IAyB1B;;OAEG;YACW,UAAU;IA+BxB;;OAEG;YACW,YAAY;IA8B1B;;OAEG;YACW,SAAS;IA2BvB;;OAEG;YACW,UAAU;CAkBzB"}