@bubblelab/bubble-core 0.1.11 → 0.1.13

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 (143) hide show
  1. package/dist/bubble-bundle.d.ts +183 -117
  2. package/dist/bubble-factory.d.ts +2 -3
  3. package/dist/bubble-factory.d.ts.map +1 -1
  4. package/dist/bubble-factory.js +28 -96
  5. package/dist/bubble-factory.js.map +1 -1
  6. package/dist/bubbles/service-bubble/ai-agent.d.ts +14 -14
  7. package/dist/bubbles/service-bubble/ai-agent.d.ts.map +1 -1
  8. package/dist/bubbles/service-bubble/ai-agent.js +3 -6
  9. package/dist/bubbles/service-bubble/ai-agent.js.map +1 -1
  10. package/dist/bubbles/service-bubble/apify/apify.d.ts +5 -5
  11. package/dist/bubbles/service-bubble/apify/apify.d.ts.map +1 -1
  12. package/dist/bubbles/service-bubble/apify/apify.js +20 -8
  13. package/dist/bubbles/service-bubble/apify/apify.js.map +1 -1
  14. package/dist/bubbles/service-bubble/browserbase/browserbase.d.ts +542 -0
  15. package/dist/bubbles/service-bubble/browserbase/browserbase.d.ts.map +1 -0
  16. package/dist/bubbles/service-bubble/browserbase/browserbase.integration.flow.d.ts +37 -0
  17. package/dist/bubbles/service-bubble/browserbase/browserbase.integration.flow.d.ts.map +1 -0
  18. package/dist/bubbles/service-bubble/browserbase/browserbase.integration.flow.js +203 -0
  19. package/dist/bubbles/service-bubble/browserbase/browserbase.integration.flow.js.map +1 -0
  20. package/dist/bubbles/service-bubble/browserbase/browserbase.js +593 -0
  21. package/dist/bubbles/service-bubble/browserbase/browserbase.js.map +1 -0
  22. package/dist/bubbles/service-bubble/browserbase/browserbase.schema.d.ts +518 -0
  23. package/dist/bubbles/service-bubble/browserbase/browserbase.schema.d.ts.map +1 -0
  24. package/dist/bubbles/service-bubble/browserbase/browserbase.schema.js +311 -0
  25. package/dist/bubbles/service-bubble/browserbase/browserbase.schema.js.map +1 -0
  26. package/dist/bubbles/service-bubble/browserbase/index.d.ts +3 -0
  27. package/dist/bubbles/service-bubble/browserbase/index.d.ts.map +1 -0
  28. package/dist/bubbles/service-bubble/browserbase/index.js +3 -0
  29. package/dist/bubbles/service-bubble/browserbase/index.js.map +1 -0
  30. package/dist/bubbles/service-bubble/crustdata/crustdata.d.ts +1358 -0
  31. package/dist/bubbles/service-bubble/crustdata/crustdata.d.ts.map +1 -0
  32. package/dist/bubbles/service-bubble/crustdata/crustdata.js +219 -0
  33. package/dist/bubbles/service-bubble/crustdata/crustdata.js.map +1 -0
  34. package/dist/bubbles/service-bubble/crustdata/crustdata.schema.d.ts +1604 -0
  35. package/dist/bubbles/service-bubble/crustdata/crustdata.schema.d.ts.map +1 -0
  36. package/dist/bubbles/service-bubble/crustdata/crustdata.schema.js +194 -0
  37. package/dist/bubbles/service-bubble/crustdata/crustdata.schema.js.map +1 -0
  38. package/dist/bubbles/service-bubble/crustdata/index.d.ts +3 -0
  39. package/dist/bubbles/service-bubble/crustdata/index.d.ts.map +1 -0
  40. package/dist/bubbles/service-bubble/crustdata/index.js +3 -0
  41. package/dist/bubbles/service-bubble/crustdata/index.js.map +1 -0
  42. package/dist/bubbles/service-bubble/firecrawl.d.ts +4 -4
  43. package/dist/bubbles/service-bubble/firecrawl.js +1 -1
  44. package/dist/bubbles/service-bubble/firecrawl.js.map +1 -1
  45. package/dist/bubbles/service-bubble/github.d.ts +0 -6
  46. package/dist/bubbles/service-bubble/github.d.ts.map +1 -1
  47. package/dist/bubbles/service-bubble/github.js +1 -7
  48. package/dist/bubbles/service-bubble/github.js.map +1 -1
  49. package/dist/bubbles/service-bubble/gmail.d.ts +84 -84
  50. package/dist/bubbles/service-bubble/google-drive.d.ts +32 -32
  51. package/dist/bubbles/service-bubble/http.d.ts +13 -1
  52. package/dist/bubbles/service-bubble/http.d.ts.map +1 -1
  53. package/dist/bubbles/service-bubble/http.integration.flow.d.ts +49 -0
  54. package/dist/bubbles/service-bubble/http.integration.flow.d.ts.map +1 -0
  55. package/dist/bubbles/service-bubble/http.integration.flow.js +425 -0
  56. package/dist/bubbles/service-bubble/http.integration.flow.js.map +1 -0
  57. package/dist/bubbles/service-bubble/http.js +40 -4
  58. package/dist/bubbles/service-bubble/http.js.map +1 -1
  59. package/dist/bubbles/service-bubble/resend.d.ts +4 -4
  60. package/dist/bubbles/service-bubble/slack.d.ts +978 -35
  61. package/dist/bubbles/service-bubble/slack.d.ts.map +1 -1
  62. package/dist/bubbles/service-bubble/slack.js +320 -26
  63. package/dist/bubbles/service-bubble/slack.js.map +1 -1
  64. package/dist/bubbles/service-bubble/storage.d.ts +1 -1
  65. package/dist/bubbles/service-bubble/storage.d.ts.map +1 -1
  66. package/dist/bubbles/service-bubble/storage.js +2 -2
  67. package/dist/bubbles/service-bubble/storage.js.map +1 -1
  68. package/dist/bubbles/tool-bubble/amazon-shopping-tool/amazon-shopping-tool.d.ts +494 -0
  69. package/dist/bubbles/tool-bubble/amazon-shopping-tool/amazon-shopping-tool.d.ts.map +1 -0
  70. package/dist/bubbles/tool-bubble/amazon-shopping-tool/amazon-shopping-tool.integration.flow.d.ts +31 -0
  71. package/dist/bubbles/tool-bubble/amazon-shopping-tool/amazon-shopping-tool.integration.flow.d.ts.map +1 -0
  72. package/dist/bubbles/tool-bubble/amazon-shopping-tool/amazon-shopping-tool.integration.flow.js +100 -0
  73. package/dist/bubbles/tool-bubble/amazon-shopping-tool/amazon-shopping-tool.integration.flow.js.map +1 -0
  74. package/dist/bubbles/tool-bubble/amazon-shopping-tool/amazon-shopping-tool.js +1301 -0
  75. package/dist/bubbles/tool-bubble/amazon-shopping-tool/amazon-shopping-tool.js.map +1 -0
  76. package/dist/bubbles/tool-bubble/amazon-shopping-tool/amazon-shopping-tool.schema.d.ts +473 -0
  77. package/dist/bubbles/tool-bubble/amazon-shopping-tool/amazon-shopping-tool.schema.d.ts.map +1 -0
  78. package/dist/bubbles/tool-bubble/amazon-shopping-tool/amazon-shopping-tool.schema.js +230 -0
  79. package/dist/bubbles/tool-bubble/amazon-shopping-tool/amazon-shopping-tool.schema.js.map +1 -0
  80. package/dist/bubbles/tool-bubble/amazon-shopping-tool/index.d.ts +3 -0
  81. package/dist/bubbles/tool-bubble/amazon-shopping-tool/index.d.ts.map +1 -0
  82. package/dist/bubbles/tool-bubble/amazon-shopping-tool/index.js +3 -0
  83. package/dist/bubbles/tool-bubble/amazon-shopping-tool/index.js.map +1 -0
  84. package/dist/bubbles/tool-bubble/bubbleflow-validation-tool.d.ts +8 -8
  85. package/dist/bubbles/tool-bubble/company-enrichment-tool.d.ts +740 -0
  86. package/dist/bubbles/tool-bubble/company-enrichment-tool.d.ts.map +1 -0
  87. package/dist/bubbles/tool-bubble/company-enrichment-tool.js +350 -0
  88. package/dist/bubbles/tool-bubble/company-enrichment-tool.js.map +1 -0
  89. package/dist/bubbles/tool-bubble/get-trigger-detail-tool.d.ts +146 -0
  90. package/dist/bubbles/tool-bubble/get-trigger-detail-tool.d.ts.map +1 -0
  91. package/dist/bubbles/tool-bubble/get-trigger-detail-tool.js +128 -0
  92. package/dist/bubbles/tool-bubble/get-trigger-detail-tool.js.map +1 -0
  93. package/dist/bubbles/tool-bubble/google-maps-tool.d.ts.map +1 -1
  94. package/dist/bubbles/tool-bubble/google-maps-tool.js +1 -0
  95. package/dist/bubbles/tool-bubble/google-maps-tool.js.map +1 -1
  96. package/dist/bubbles/tool-bubble/instagram-tool.d.ts.map +1 -1
  97. package/dist/bubbles/tool-bubble/instagram-tool.js +2 -0
  98. package/dist/bubbles/tool-bubble/instagram-tool.js.map +1 -1
  99. package/dist/bubbles/tool-bubble/linkedin-tool.d.ts +6 -6
  100. package/dist/bubbles/tool-bubble/linkedin-tool.d.ts.map +1 -1
  101. package/dist/bubbles/tool-bubble/linkedin-tool.js +6 -4
  102. package/dist/bubbles/tool-bubble/linkedin-tool.js.map +1 -1
  103. package/dist/bubbles/tool-bubble/research-agent-tool.d.ts.map +1 -1
  104. package/dist/bubbles/tool-bubble/research-agent-tool.js +6 -1
  105. package/dist/bubbles/tool-bubble/research-agent-tool.js.map +1 -1
  106. package/dist/bubbles/tool-bubble/tiktok-tool.d.ts +8 -8
  107. package/dist/bubbles/tool-bubble/twitter-tool.d.ts +10 -10
  108. package/dist/bubbles/tool-bubble/twitter-tool.d.ts.map +1 -1
  109. package/dist/bubbles/tool-bubble/twitter-tool.js +3 -0
  110. package/dist/bubbles/tool-bubble/twitter-tool.js.map +1 -1
  111. package/dist/bubbles/tool-bubble/web-scrape-tool.d.ts +6 -6
  112. package/dist/bubbles/tool-bubble/web-scrape-tool.d.ts.map +1 -1
  113. package/dist/bubbles/tool-bubble/web-scrape-tool.js +4 -1
  114. package/dist/bubbles/tool-bubble/web-scrape-tool.js.map +1 -1
  115. package/dist/bubbles/tool-bubble/youtube-tool.d.ts.map +1 -1
  116. package/dist/bubbles/tool-bubble/youtube-tool.js +3 -0
  117. package/dist/bubbles/tool-bubble/youtube-tool.js.map +1 -1
  118. package/dist/bubbles/workflow-bubble/pdf-form-operations.workflow.d.ts +24 -24
  119. package/dist/bubbles/workflow-bubble/slack-formatter-agent.d.ts +8 -8
  120. package/dist/bubbles.json +64 -15
  121. package/dist/index.d.ts +3 -0
  122. package/dist/index.d.ts.map +1 -1
  123. package/dist/index.js +3 -0
  124. package/dist/index.js.map +1 -1
  125. package/dist/logging/BubbleLogger.d.ts +10 -0
  126. package/dist/logging/BubbleLogger.d.ts.map +1 -1
  127. package/dist/logging/BubbleLogger.js +14 -0
  128. package/dist/logging/BubbleLogger.js.map +1 -1
  129. package/dist/logging/StreamingBubbleLogger.d.ts +8 -0
  130. package/dist/logging/StreamingBubbleLogger.d.ts.map +1 -1
  131. package/dist/logging/StreamingBubbleLogger.js +29 -0
  132. package/dist/logging/StreamingBubbleLogger.js.map +1 -1
  133. package/dist/types/available-tools.d.ts +1 -1
  134. package/dist/types/available-tools.d.ts.map +1 -1
  135. package/dist/types/available-tools.js +7 -0
  136. package/dist/types/available-tools.js.map +1 -1
  137. package/dist/types/base-bubble-class.d.ts.map +1 -1
  138. package/dist/types/base-bubble-class.js +0 -8
  139. package/dist/types/base-bubble-class.js.map +1 -1
  140. package/dist/types/tool-bubble-class.d.ts.map +1 -1
  141. package/dist/types/tool-bubble-class.js +58 -8
  142. package/dist/types/tool-bubble-class.js.map +1 -1
  143. package/package.json +3 -2
@@ -0,0 +1 @@
1
+ {"version":3,"file":"company-enrichment-tool.d.ts","sourceRoot":"","sources":["../../../src/bubbles/tool-bubble/company-enrichment-tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,KAAK,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAQ5E,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiEjB,CAAC;AAkBH,QAAA,MAAM,iCAAiC;;;;;;;;;;;;EAiBrC,CAAC;AAGH,QAAA,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAMrC,CAAC;AAGH,KAAK,2BAA2B,GAAG,CAAC,CAAC,MAAM,CACzC,OAAO,iCAAiC,CACzC,CAAC;AACF,KAAK,2BAA2B,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C,iBAAiB;IAmCzB;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAgDxB;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAqB5B;;OAEG;IACH,OAAO,CAAC,iBAAiB;CAS1B"}
@@ -0,0 +1,350 @@
1
+ import { z } from 'zod';
2
+ import { ToolBubble } from '../../types/tool-bubble-class.js';
3
+ import { CredentialType } from '@bubblelab/shared-schemas';
4
+ import { CrustdataBubble, } from '../service-bubble/crustdata/index.js';
5
+ // Contact schema with full profile information
6
+ const ContactSchema = z.object({
7
+ // Basic info
8
+ name: z.string().nullable().describe('Full name'),
9
+ title: z.string().nullable().describe('Current job title'),
10
+ headline: z.string().nullable().describe('LinkedIn headline'),
11
+ linkedinUrl: z.string().nullable().describe('LinkedIn profile URL'),
12
+ profilePictureUrl: z.string().nullable().describe('Profile picture URL'),
13
+ // Contact info
14
+ email: z.string().nullable().describe('Email address'),
15
+ twitterHandle: z.string().nullable().describe('Twitter/X handle'),
16
+ // Classification (CXOs prioritized)
17
+ role: z
18
+ .enum(['cxo', 'decision_maker', 'founder'])
19
+ .describe('Role classification'),
20
+ // Location
21
+ location: z.string().nullable().describe('Location'),
22
+ // Professional background
23
+ skills: z.array(z.string()).nullable().describe('Professional skills'),
24
+ languages: z.array(z.string()).nullable().describe('Languages spoken'),
25
+ summary: z.string().nullable().describe('Professional summary'),
26
+ // Work history
27
+ currentEmployment: z
28
+ .array(z.object({
29
+ title: z.string().nullable().describe('Job title'),
30
+ companyName: z.string().nullable().describe('Company name'),
31
+ companyLinkedinUrl: z
32
+ .string()
33
+ .nullable()
34
+ .describe('Company LinkedIn URL'),
35
+ startDate: z.string().nullable().describe('Start date'),
36
+ description: z.string().nullable().describe('Role description'),
37
+ }))
38
+ .nullable()
39
+ .describe('Current employment positions'),
40
+ pastEmployment: z
41
+ .array(z.object({
42
+ title: z.string().nullable().describe('Job title'),
43
+ companyName: z.string().nullable().describe('Company name'),
44
+ startDate: z.string().nullable().describe('Start date'),
45
+ endDate: z.string().nullable().describe('End date'),
46
+ }))
47
+ .nullable()
48
+ .describe('Past employment positions'),
49
+ // Education
50
+ education: z
51
+ .array(z.object({
52
+ instituteName: z.string().nullable().describe('Institution name'),
53
+ degreeName: z.string().nullable().describe('Degree name'),
54
+ fieldOfStudy: z.string().nullable().describe('Field of study'),
55
+ }))
56
+ .nullable()
57
+ .describe('Education history'),
58
+ });
59
+ // Company info schema for the result
60
+ const CompanyInfoOutputSchema = z.object({
61
+ name: z.string().nullable().describe('Company name'),
62
+ linkedinUrl: z.string().nullable().describe('Company LinkedIn URL'),
63
+ website: z.string().nullable().describe('Company website'),
64
+ industry: z.string().nullable().describe('Industry'),
65
+ description: z.string().nullable().describe('Company description'),
66
+ headcount: z.number().nullable().describe('Employee count'),
67
+ hqCity: z.string().nullable().describe('Headquarters city'),
68
+ hqCountry: z.string().nullable().describe('Headquarters country'),
69
+ yearFounded: z.number().nullable().describe('Year founded'),
70
+ fundingStage: z.string().nullable().describe('Funding stage'),
71
+ totalFunding: z.string().nullable().describe('Total funding raised'),
72
+ });
73
+ // Tool parameters - simple, agent-friendly interface
74
+ const CompanyEnrichmentToolParamsSchema = z.object({
75
+ companyIdentifier: z
76
+ .string()
77
+ .min(1)
78
+ .describe('Company name, domain (e.g., "stripe.com"), or LinkedIn URL. Auto-detects type.'),
79
+ limit: z
80
+ .number()
81
+ .max(50)
82
+ .default(10)
83
+ .optional()
84
+ .describe('Maximum contacts to return (default: 10)'),
85
+ credentials: z
86
+ .record(z.nativeEnum(CredentialType), z.string())
87
+ .optional()
88
+ .describe('Required credentials (auto-injected)'),
89
+ });
90
+ // Tool result schema
91
+ const CompanyEnrichmentToolResultSchema = z.object({
92
+ contacts: z.array(ContactSchema).describe('List of contacts at the company'),
93
+ company: CompanyInfoOutputSchema.nullable().describe('Company information'),
94
+ totalContacts: z.number().describe('Total number of contacts found'),
95
+ success: z.boolean().describe('Whether the operation was successful'),
96
+ error: z.string().describe('Error message if operation failed'),
97
+ });
98
+ /**
99
+ * Company Enrichment Tool
100
+ *
101
+ * Agent-friendly tool for company enrichment and lead generation.
102
+ * Takes a simple company identifier (name, domain, or LinkedIn URL)
103
+ * and returns key contacts with full profiles.
104
+ *
105
+ * Features:
106
+ * - Auto-detects identifier type (name, domain, LinkedIn URL)
107
+ * - Returns CXOs, decision makers, and founders
108
+ * - Full contact profiles with work history and education
109
+ * - Prioritized results (CXOs first, then decision makers, then founders)
110
+ *
111
+ * Uses CrustdataBubble under the hood with a two-step process:
112
+ * 1. Identify company (FREE) to get company_id
113
+ * 2. Enrich company (1 credit) to get contacts
114
+ */
115
+ export class CompanyEnrichmentTool extends ToolBubble {
116
+ static bubbleName = 'company-enrichment-tool';
117
+ static schema = CompanyEnrichmentToolParamsSchema;
118
+ static resultSchema = CompanyEnrichmentToolResultSchema;
119
+ static shortDescription = 'Get key contacts (executives, decision makers) from any company for lead generation';
120
+ static longDescription = `
121
+ Company enrichment tool for lead generation and sales prospecting.
122
+
123
+ **SIMPLE INTERFACE:**
124
+ Just provide a company name, domain, or LinkedIn URL to get key contacts.
125
+ The tool automatically:
126
+ - Detects the identifier type
127
+ - Identifies the company
128
+ - Enriches with contact data
129
+ - Returns prioritized contacts (CXOs first)
130
+
131
+ **WHAT YOU GET:**
132
+ - Contact names and titles
133
+ - LinkedIn profiles and email addresses
134
+ - Work history and education
135
+ - Skills and professional summary
136
+
137
+ **CONTACT TYPES (prioritized):**
138
+ 1. CXOs - C-level executives (CEO, CTO, CFO, etc.)
139
+ 2. Decision makers - VP, Director, Head of, etc.
140
+ 3. Founders - Company founders
141
+
142
+ **USE CASES:**
143
+ - Sales prospecting - find decision makers to reach out to
144
+ - Lead generation - build contact lists for outreach
145
+ - Company research - understand company leadership
146
+ - Competitive intelligence - track competitor executives
147
+ - Partnership opportunities - find the right contacts
148
+
149
+ **EXAMPLES:**
150
+ - "stripe.com" - get contacts from Stripe
151
+ - "Anthropic" - search by company name
152
+ - "https://www.linkedin.com/company/openai" - use LinkedIn URL
153
+
154
+ **CREDITS:**
155
+ - Identify operation: FREE
156
+ - Enrich operation: 1 credit per company
157
+ `;
158
+ static alias = 'enrich';
159
+ static type = 'tool';
160
+ constructor(params = {
161
+ companyIdentifier: 'stripe.com',
162
+ limit: 10,
163
+ }, context) {
164
+ super(params, context);
165
+ }
166
+ async performAction() {
167
+ const credentials = this.params?.credentials;
168
+ if (!credentials || !credentials[CredentialType.CRUSTDATA_API_KEY]) {
169
+ return this.createErrorResult('Company enrichment requires CRUSTDATA_API_KEY credential. Please configure it in your settings.');
170
+ }
171
+ try {
172
+ const { companyIdentifier, limit = 10 } = this.params;
173
+ // Step 1: Detect identifier type and identify company
174
+ const identifierType = this.detectIdentifierType(companyIdentifier);
175
+ const identifyParams = this.buildIdentifyParams(identifierType, companyIdentifier);
176
+ const identifyBubble = new CrustdataBubble({
177
+ operation: 'identify',
178
+ ...identifyParams,
179
+ credentials,
180
+ }, this.context);
181
+ const identifyResult = await identifyBubble.action();
182
+ if (!identifyResult.data.success) {
183
+ return this.createErrorResult(`Failed to identify company: ${identifyResult.data.error}`);
184
+ }
185
+ const results = identifyResult.data.results || [];
186
+ if (results.length === 0 || !results[0]?.company_id) {
187
+ return this.createErrorResult(`No company found matching "${companyIdentifier}". Try using a domain (e.g., "stripe.com") or LinkedIn URL for better results.`);
188
+ }
189
+ const companyId = results[0].company_id;
190
+ // Step 2: Enrich company to get contacts
191
+ const enrichBubble = new CrustdataBubble({
192
+ operation: 'enrich',
193
+ company_id: companyId,
194
+ fields: 'decision_makers,cxos,founders.profiles',
195
+ credentials,
196
+ }, this.context);
197
+ const enrichResult = await enrichBubble.action();
198
+ if (!enrichResult.data.success) {
199
+ return this.createErrorResult(`Failed to enrich company: ${enrichResult.data.error}`);
200
+ }
201
+ // Step 3: Transform and merge contacts
202
+ const contacts = this.transformContacts(enrichResult.data.cxos || [], enrichResult.data.decision_makers || [], enrichResult.data.founders?.profiles || [], limit);
203
+ const company = this.transformCompanyInfo(enrichResult.data.company);
204
+ return {
205
+ contacts,
206
+ company,
207
+ totalContacts: contacts.length,
208
+ success: true,
209
+ error: '',
210
+ };
211
+ }
212
+ catch (error) {
213
+ return this.createErrorResult(error instanceof Error ? error.message : 'Unknown error occurred');
214
+ }
215
+ }
216
+ /**
217
+ * Detect identifier type from the input string
218
+ */
219
+ detectIdentifierType(identifier) {
220
+ // LinkedIn URL
221
+ if (identifier.includes('linkedin.com/company') ||
222
+ identifier.includes('linkedin.com/in')) {
223
+ return 'linkedin';
224
+ }
225
+ // Domain: has dot and no spaces, doesn't look like a sentence
226
+ if (identifier.includes('.') && !identifier.includes(' ')) {
227
+ return 'domain';
228
+ }
229
+ // Default to name
230
+ return 'name';
231
+ }
232
+ /**
233
+ * Build identify params based on identifier type
234
+ */
235
+ buildIdentifyParams(type, identifier) {
236
+ switch (type) {
237
+ case 'linkedin':
238
+ return { query_company_linkedin_url: identifier };
239
+ case 'domain':
240
+ return { query_company_website: identifier };
241
+ case 'name':
242
+ return { query_company_name: identifier };
243
+ }
244
+ }
245
+ /**
246
+ * Transform and merge contacts from different sources
247
+ * Priority: CXOs > Decision Makers > Founders
248
+ */
249
+ transformContacts(cxos, decisionMakers, founders, limit) {
250
+ const contacts = [];
251
+ const seenLinkedInUrls = new Set();
252
+ // Helper to add contacts without duplicates
253
+ const addContacts = (profiles, role) => {
254
+ for (const profile of profiles) {
255
+ if (contacts.length >= limit)
256
+ break;
257
+ // Dedupe by LinkedIn URL
258
+ const linkedinUrl = profile.linkedin_profile_url || profile.linkedin_flagship_url;
259
+ if (linkedinUrl && seenLinkedInUrls.has(linkedinUrl))
260
+ continue;
261
+ if (linkedinUrl)
262
+ seenLinkedInUrls.add(linkedinUrl);
263
+ contacts.push(this.transformProfile(profile, role));
264
+ }
265
+ };
266
+ // Add in priority order
267
+ addContacts(cxos, 'cxo');
268
+ addContacts(decisionMakers, 'decision_maker');
269
+ addContacts(founders, 'founder');
270
+ return contacts;
271
+ }
272
+ /**
273
+ * Transform a single profile to Contact format
274
+ */
275
+ transformProfile(profile, role) {
276
+ return {
277
+ name: profile.name ||
278
+ [profile.first_name, profile.last_name].filter(Boolean).join(' ') ||
279
+ null,
280
+ title: profile.title || null,
281
+ headline: profile.headline || null,
282
+ linkedinUrl: profile.linkedin_profile_url || profile.linkedin_flagship_url || null,
283
+ profilePictureUrl: profile.profile_picture_url || null,
284
+ email: profile.email || null,
285
+ twitterHandle: profile.twitter_handle || null,
286
+ role,
287
+ location: profile.location || null,
288
+ skills: profile.skills || null,
289
+ languages: profile.languages || null,
290
+ summary: profile.summary || null,
291
+ currentEmployment: profile.current_positions
292
+ ? profile.current_positions.map((pos) => ({
293
+ title: pos.title || null,
294
+ companyName: pos.company_name || null,
295
+ companyLinkedinUrl: pos.company_linkedin_url || null,
296
+ startDate: pos.start_date || null,
297
+ description: pos.description || null,
298
+ }))
299
+ : null,
300
+ pastEmployment: profile.past_positions
301
+ ? profile.past_positions.map((pos) => ({
302
+ title: pos.title || null,
303
+ companyName: pos.company_name || null,
304
+ startDate: pos.start_date || null,
305
+ endDate: pos.end_date || null,
306
+ }))
307
+ : null,
308
+ education: profile.education
309
+ ? profile.education.map((edu) => ({
310
+ instituteName: edu.institute_name || null,
311
+ degreeName: edu.degree_name || null,
312
+ fieldOfStudy: edu.field_of_study || null,
313
+ }))
314
+ : null,
315
+ };
316
+ }
317
+ /**
318
+ * Transform company info to output format
319
+ */
320
+ transformCompanyInfo(company) {
321
+ if (!company)
322
+ return null;
323
+ return {
324
+ name: company.name || null,
325
+ linkedinUrl: company.linkedin_profile_url || null,
326
+ website: company.company_website || company.company_website_domain || null,
327
+ industry: company.industry || null,
328
+ description: company.description || null,
329
+ headcount: company.headcount || company.linkedin_headcount || null,
330
+ hqCity: company.hq_city || null,
331
+ hqCountry: company.hq_country || null,
332
+ yearFounded: company.year_founded || null,
333
+ fundingStage: company.funding_stage || null,
334
+ totalFunding: company.total_funding || null,
335
+ };
336
+ }
337
+ /**
338
+ * Create an error result
339
+ */
340
+ createErrorResult(errorMessage) {
341
+ return {
342
+ contacts: [],
343
+ company: null,
344
+ totalContacts: 0,
345
+ success: false,
346
+ error: errorMessage,
347
+ };
348
+ }
349
+ }
350
+ //# sourceMappingURL=company-enrichment-tool.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"company-enrichment-tool.js","sourceRoot":"","sources":["../../../src/bubbles/tool-bubble/company-enrichment-tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAE9D,OAAO,EAAE,cAAc,EAAmB,MAAM,2BAA2B,CAAC;AAC5E,OAAO,EACL,eAAe,GAGhB,MAAM,sCAAsC,CAAC;AAE9C,+CAA+C;AAC/C,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7B,aAAa;IACb,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,WAAW,CAAC;IACjD,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,mBAAmB,CAAC;IAC1D,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,mBAAmB,CAAC;IAC7D,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,sBAAsB,CAAC;IACnE,iBAAiB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,qBAAqB,CAAC;IAExE,eAAe;IACf,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,eAAe,CAAC;IACtD,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,kBAAkB,CAAC;IAEjE,oCAAoC;IACpC,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E,OAAO,CAAC,SAAS,IAAI,OAAO,CAAC,kBAAkB,IAAI,IAAI;YAClE,MAAM,EAAE,OAAO,CAAC,OAAO,IAAI,IAAI;YAC/B,SAAS,EAAE,OAAO,CAAC,UAAU,IAAI,IAAI;YACrC,WAAW,EAAE,OAAO,CAAC,YAAY,IAAI,IAAI;YACzC,YAAY,EAAE,OAAO,CAAC,aAAa,IAAI,IAAI;YAC3C,YAAY,EAAE,OAAO,CAAC,aAAa,IAAI,IAAI;SAC5C,CAAC;IACJ,CAAC;IAED;;OAEG;IACK,iBAAiB,CAAC,YAAoB;QAC5C,OAAO;YACL,QAAQ,EAAE,EAAE;YACZ,OAAO,EAAE,IAAI;YACb,aAAa,EAAE,CAAC;YAChB,OAAO,EAAE,KAAK;YACd,KAAK,EAAE,YAAY;SACpB,CAAC;IACJ,CAAC"}
@@ -0,0 +1,146 @@
1
+ import { z } from 'zod';
2
+ import { ToolBubble } from '../../types/tool-bubble-class.js';
3
+ import type { BubbleContext } from '../../types/bubble.js';
4
+ import { CredentialType } from '@bubblelab/shared-schemas';
5
+ declare const GetTriggerDetailToolParamsSchema: z.ZodObject<{
6
+ triggerType: z.ZodOptional<z.ZodString>;
7
+ credentials: z.ZodOptional<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>;
8
+ }, "strip", z.ZodTypeAny, {
9
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
10
+ triggerType?: string | undefined;
11
+ }, {
12
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
13
+ triggerType?: string | undefined;
14
+ }>;
15
+ type GetTriggerDetailToolParamsInput = z.input<typeof GetTriggerDetailToolParamsSchema>;
16
+ type GetTriggerDetailToolParams = z.output<typeof GetTriggerDetailToolParamsSchema>;
17
+ declare const GetTriggerDetailToolResultSchema: z.ZodObject<{
18
+ triggerType: z.ZodOptional<z.ZodString>;
19
+ serviceName: z.ZodOptional<z.ZodString>;
20
+ friendlyName: z.ZodOptional<z.ZodString>;
21
+ description: z.ZodOptional<z.ZodString>;
22
+ setupGuide: z.ZodOptional<z.ZodString>;
23
+ payloadSchema: z.ZodOptional<z.ZodString>;
24
+ payloadTypeInterface: z.ZodOptional<z.ZodString>;
25
+ availableTriggers: z.ZodOptional<z.ZodArray<z.ZodObject<{
26
+ type: z.ZodString;
27
+ friendlyName: z.ZodString;
28
+ description: z.ZodString;
29
+ }, "strip", z.ZodTypeAny, {
30
+ type: string;
31
+ description: string;
32
+ friendlyName: string;
33
+ }, {
34
+ type: string;
35
+ description: string;
36
+ friendlyName: string;
37
+ }>, "many">>;
38
+ success: z.ZodBoolean;
39
+ error: z.ZodString;
40
+ }, "strip", z.ZodTypeAny, {
41
+ error: string;
42
+ success: boolean;
43
+ description?: string | undefined;
44
+ triggerType?: string | undefined;
45
+ serviceName?: string | undefined;
46
+ friendlyName?: string | undefined;
47
+ setupGuide?: string | undefined;
48
+ payloadSchema?: string | undefined;
49
+ payloadTypeInterface?: string | undefined;
50
+ availableTriggers?: {
51
+ type: string;
52
+ description: string;
53
+ friendlyName: string;
54
+ }[] | undefined;
55
+ }, {
56
+ error: string;
57
+ success: boolean;
58
+ description?: string | undefined;
59
+ triggerType?: string | undefined;
60
+ serviceName?: string | undefined;
61
+ friendlyName?: string | undefined;
62
+ setupGuide?: string | undefined;
63
+ payloadSchema?: string | undefined;
64
+ payloadTypeInterface?: string | undefined;
65
+ availableTriggers?: {
66
+ type: string;
67
+ description: string;
68
+ friendlyName: string;
69
+ }[] | undefined;
70
+ }>;
71
+ type GetTriggerDetailToolResult = z.output<typeof GetTriggerDetailToolResultSchema>;
72
+ export declare class GetTriggerDetailTool extends ToolBubble<GetTriggerDetailToolParams, GetTriggerDetailToolResult> {
73
+ static readonly type: "tool";
74
+ static readonly bubbleName = "get-trigger-detail-tool";
75
+ static readonly schema: z.ZodObject<{
76
+ triggerType: z.ZodOptional<z.ZodString>;
77
+ credentials: z.ZodOptional<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>;
78
+ }, "strip", z.ZodTypeAny, {
79
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
80
+ triggerType?: string | undefined;
81
+ }, {
82
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
83
+ triggerType?: string | undefined;
84
+ }>;
85
+ static readonly resultSchema: z.ZodObject<{
86
+ triggerType: z.ZodOptional<z.ZodString>;
87
+ serviceName: z.ZodOptional<z.ZodString>;
88
+ friendlyName: z.ZodOptional<z.ZodString>;
89
+ description: z.ZodOptional<z.ZodString>;
90
+ setupGuide: z.ZodOptional<z.ZodString>;
91
+ payloadSchema: z.ZodOptional<z.ZodString>;
92
+ payloadTypeInterface: z.ZodOptional<z.ZodString>;
93
+ availableTriggers: z.ZodOptional<z.ZodArray<z.ZodObject<{
94
+ type: z.ZodString;
95
+ friendlyName: z.ZodString;
96
+ description: z.ZodString;
97
+ }, "strip", z.ZodTypeAny, {
98
+ type: string;
99
+ description: string;
100
+ friendlyName: string;
101
+ }, {
102
+ type: string;
103
+ description: string;
104
+ friendlyName: string;
105
+ }>, "many">>;
106
+ success: z.ZodBoolean;
107
+ error: z.ZodString;
108
+ }, "strip", z.ZodTypeAny, {
109
+ error: string;
110
+ success: boolean;
111
+ description?: string | undefined;
112
+ triggerType?: string | undefined;
113
+ serviceName?: string | undefined;
114
+ friendlyName?: string | undefined;
115
+ setupGuide?: string | undefined;
116
+ payloadSchema?: string | undefined;
117
+ payloadTypeInterface?: string | undefined;
118
+ availableTriggers?: {
119
+ type: string;
120
+ description: string;
121
+ friendlyName: string;
122
+ }[] | undefined;
123
+ }, {
124
+ error: string;
125
+ success: boolean;
126
+ description?: string | undefined;
127
+ triggerType?: string | undefined;
128
+ serviceName?: string | undefined;
129
+ friendlyName?: string | undefined;
130
+ setupGuide?: string | undefined;
131
+ payloadSchema?: string | undefined;
132
+ payloadTypeInterface?: string | undefined;
133
+ availableTriggers?: {
134
+ type: string;
135
+ description: string;
136
+ friendlyName: string;
137
+ }[] | undefined;
138
+ }>;
139
+ static readonly shortDescription = "Provides detailed information about BubbleFlow trigger types including setup guides and payload schemas";
140
+ static readonly longDescription = "\n A tool that retrieves comprehensive information about BubbleFlow trigger types.\n\n Returns detailed information including:\n - Service name and friendly display name\n - Description of what the trigger does\n - Setup guide with step-by-step configuration instructions\n - Payload schema (JSON Schema format)\n - TypeScript interface name for proper typing\n\n Use cases:\n - Understanding how to configure a specific trigger (Slack, Cron, Webhook)\n - Getting the correct payload interface to extend in your BubbleFlow\n - Learning about available trigger types\n - Generating properly typed BubbleFlow code\n\n If no triggerType is specified, returns a list of all available triggers.\n ";
141
+ static readonly alias = "trigger";
142
+ constructor(params: GetTriggerDetailToolParamsInput, context?: BubbleContext);
143
+ performAction(context?: BubbleContext): Promise<GetTriggerDetailToolResult>;
144
+ }
145
+ export {};
146
+ //# sourceMappingURL=get-trigger-detail-tool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-trigger-detail-tool.d.ts","sourceRoot":"","sources":["../../../src/bubbles/tool-bubble/get-trigger-detail-tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EACL,cAAc,EAIf,MAAM,2BAA2B,CAAC;AAgBnC,QAAA,MAAM,gCAAgC;;;;;;;;;EAapC,CAAC;AAGH,KAAK,+BAA+B,GAAG,CAAC,CAAC,KAAK,CAC5C,OAAO,gCAAgC,CACxC,CAAC;AACF,KAAK,0BAA0B,GAAG,CAAC,CAAC,MAAM,CACxC,OAAO,gCAAgC,CACxC,CAAC;AAGF,QAAA,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuCpC,CAAC;AAEH,KAAK,0BAA0B,GAAG,CAAC,CAAC,MAAM,CACxC,OAAO,gCAAgC,CACxC,CAAC;AAEF,qBAAa,oBAAqB,SAAQ,UAAU,CAClD,0BAA0B,EAC1B,0BAA0B,CAC3B;IACC,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAG,MAAM,CAAU;IACvC,MAAM,CAAC,QAAQ,CAAC,UAAU,6BAA6B;IACvD,MAAM,CAAC,QAAQ,CAAC,MAAM;;;;;;;;;OAAoC;IAC1D,MAAM,CAAC,QAAQ,CAAC,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAAoC;IAChE,MAAM,CAAC,QAAQ,CAAC,gBAAgB,6GAC4E;IAC5G,MAAM,CAAC,QAAQ,CAAC,eAAe,kuBAiB7B;IACF,MAAM,CAAC,QAAQ,CAAC,KAAK,aAAa;gBAGhC,MAAM,EAAE,+BAA+B,EACvC,OAAO,CAAC,EAAE,aAAa;IAKnB,aAAa,CACjB,OAAO,CAAC,EAAE,aAAa,GACtB,OAAO,CAAC,0BAA0B,CAAC;CAoDvC"}
@@ -0,0 +1,128 @@
1
+ import { z } from 'zod';
2
+ import { ToolBubble } from '../../types/tool-bubble-class.js';
3
+ import { CredentialType, TRIGGER_EVENT_CONFIGS, getTriggerEventConfig, } from '@bubblelab/shared-schemas';
4
+ /**
5
+ * Map trigger types to their TypeScript payload interface names
6
+ */
7
+ const TRIGGER_PAYLOAD_TYPE_MAP = {
8
+ 'slack/bot_mentioned': 'SlackMentionEvent',
9
+ 'slack/message_received': 'SlackMessageReceivedEvent',
10
+ 'schedule/cron': 'CronEvent',
11
+ 'webhook/http': 'WebhookEvent',
12
+ };
13
+ // Define the parameters schema
14
+ const GetTriggerDetailToolParamsSchema = z.object({
15
+ triggerType: z
16
+ .string()
17
+ .optional()
18
+ .describe("The trigger type to get details about (e.g., 'slack/bot_mentioned', 'webhook/http'). If not provided, returns a list of all available triggers."),
19
+ credentials: z
20
+ .record(z.nativeEnum(CredentialType), z.string())
21
+ .optional()
22
+ .describe('Object mapping credential types to values (injected at runtime)'),
23
+ });
24
+ // Result schema for validation
25
+ const GetTriggerDetailToolResultSchema = z.object({
26
+ triggerType: z.string().optional().describe('The requested trigger type'),
27
+ serviceName: z
28
+ .string()
29
+ .optional()
30
+ .describe('Service name for logo lookup (e.g., Slack, Cron)'),
31
+ friendlyName: z.string().optional().describe('Human-friendly trigger name'),
32
+ description: z
33
+ .string()
34
+ .optional()
35
+ .describe('Description of what this trigger does'),
36
+ setupGuide: z
37
+ .string()
38
+ .optional()
39
+ .describe('Markdown setup guide for configuring this trigger'),
40
+ payloadSchema: z
41
+ .string()
42
+ .optional()
43
+ .describe('JSON Schema string for the payload'),
44
+ payloadTypeInterface: z
45
+ .string()
46
+ .optional()
47
+ .describe('TypeScript interface name to use for the payload (e.g., SlackMentionEvent)'),
48
+ availableTriggers: z
49
+ .array(z.object({
50
+ type: z.string(),
51
+ friendlyName: z.string(),
52
+ description: z.string(),
53
+ }))
54
+ .optional()
55
+ .describe('List of all available triggers (when no specific trigger requested)'),
56
+ success: z.boolean().describe('Whether the operation was successful'),
57
+ error: z.string().describe('Error message if operation failed'),
58
+ });
59
+ export class GetTriggerDetailTool extends ToolBubble {
60
+ static type = 'tool';
61
+ static bubbleName = 'get-trigger-detail-tool';
62
+ static schema = GetTriggerDetailToolParamsSchema;
63
+ static resultSchema = GetTriggerDetailToolResultSchema;
64
+ static shortDescription = 'Provides detailed information about BubbleFlow trigger types including setup guides and payload schemas';
65
+ static longDescription = `
66
+ A tool that retrieves comprehensive information about BubbleFlow trigger types.
67
+
68
+ Returns detailed information including:
69
+ - Service name and friendly display name
70
+ - Description of what the trigger does
71
+ - Setup guide with step-by-step configuration instructions
72
+ - Payload schema (JSON Schema format)
73
+ - TypeScript interface name for proper typing
74
+
75
+ Use cases:
76
+ - Understanding how to configure a specific trigger (Slack, Cron, Webhook)
77
+ - Getting the correct payload interface to extend in your BubbleFlow
78
+ - Learning about available trigger types
79
+ - Generating properly typed BubbleFlow code
80
+
81
+ If no triggerType is specified, returns a list of all available triggers.
82
+ `;
83
+ static alias = 'trigger';
84
+ constructor(params, context) {
85
+ super(params, context);
86
+ }
87
+ async performAction(context) {
88
+ void context; // Context available but not currently used
89
+ const { triggerType } = this.params;
90
+ // If no trigger type specified, return list of all available triggers
91
+ if (!triggerType) {
92
+ const availableTriggers = Object.entries(TRIGGER_EVENT_CONFIGS).map(([type, config]) => ({
93
+ type,
94
+ friendlyName: config.friendlyName,
95
+ description: config.description,
96
+ }));
97
+ return {
98
+ availableTriggers,
99
+ success: true,
100
+ error: '',
101
+ };
102
+ }
103
+ // Validate trigger type
104
+ if (!(triggerType in TRIGGER_EVENT_CONFIGS)) {
105
+ const validTypes = Object.keys(TRIGGER_EVENT_CONFIGS).join(', ');
106
+ return {
107
+ success: false,
108
+ error: `Invalid trigger type '${triggerType}'. Valid types are: ${validTypes}`,
109
+ };
110
+ }
111
+ // Get the trigger configuration
112
+ const config = getTriggerEventConfig(triggerType);
113
+ // Get the TypeScript payload interface name
114
+ const payloadTypeInterface = TRIGGER_PAYLOAD_TYPE_MAP[triggerType];
115
+ return {
116
+ triggerType,
117
+ serviceName: config.serviceName,
118
+ friendlyName: config.friendlyName,
119
+ description: config.description,
120
+ setupGuide: config.setupGuide,
121
+ payloadSchema: JSON.stringify(config.payloadSchema, null, 2),
122
+ payloadTypeInterface,
123
+ success: true,
124
+ error: '',
125
+ };
126
+ }
127
+ }
128
+ //# sourceMappingURL=get-trigger-detail-tool.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-trigger-detail-tool.js","sourceRoot":"","sources":["../../../src/bubbles/tool-bubble/get-trigger-detail-tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAE9D,OAAO,EACL,cAAc,EACd,qBAAqB,EACrB,qBAAqB,GAEtB,MAAM,2BAA2B,CAAC;AAEnC;;GAEG;AACH,MAAM,wBAA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