@bubblelab/bubble-core 0.1.151 → 0.1.154

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 (134) hide show
  1. package/dist/bubble-bundle.d.ts +139 -137
  2. package/dist/bubbles/service-bubble/agi-inc.d.ts +88 -88
  3. package/dist/bubbles/service-bubble/ai-agent.d.ts +72 -72
  4. package/dist/bubbles/service-bubble/airtable.d.ts +114 -114
  5. package/dist/bubbles/service-bubble/apify/actors/google-maps-scraper.d.ts +2 -2
  6. package/dist/bubbles/service-bubble/apify/actors/instagram-hashtag-scraper.d.ts +20 -20
  7. package/dist/bubbles/service-bubble/apify/actors/instagram-scraper.d.ts +28 -28
  8. package/dist/bubbles/service-bubble/apify/actors/linkedin-jobs-scraper.d.ts +2 -2
  9. package/dist/bubbles/service-bubble/apify/actors/linkedin-posts-search.d.ts +24 -24
  10. package/dist/bubbles/service-bubble/apify/actors/linkedin-profile-posts.d.ts +58 -58
  11. package/dist/bubbles/service-bubble/apify/actors/tiktok-scraper.d.ts +2 -2
  12. package/dist/bubbles/service-bubble/apify/actors/twitter-scraper.d.ts +8 -8
  13. package/dist/bubbles/service-bubble/apify/actors/youtube-scraper.d.ts +6 -6
  14. package/dist/bubbles/service-bubble/apify/apify-scraper.schema.d.ts +112 -112
  15. package/dist/bubbles/service-bubble/apify/apify.d.ts +30 -30
  16. package/dist/bubbles/service-bubble/ashby/ashby.d.ts +20 -20
  17. package/dist/bubbles/service-bubble/ashby/ashby.schema.d.ts +20 -20
  18. package/dist/bubbles/service-bubble/browserbase/browserbase.d.ts +33 -33
  19. package/dist/bubbles/service-bubble/browserbase/browserbase.schema.d.ts +33 -33
  20. package/dist/bubbles/service-bubble/browserbase/browserbase.schema.d.ts.map +1 -1
  21. package/dist/bubbles/service-bubble/browserbase/browserbase.schema.js +1 -3
  22. package/dist/bubbles/service-bubble/browserbase/browserbase.schema.js.map +1 -1
  23. package/dist/bubbles/service-bubble/confluence/confluence.d.ts +26 -26
  24. package/dist/bubbles/service-bubble/confluence/confluence.schema.d.ts +26 -26
  25. package/dist/bubbles/service-bubble/crustdata/crustdata.d.ts +16 -16
  26. package/dist/bubbles/service-bubble/crustdata/crustdata.schema.d.ts +20 -20
  27. package/dist/bubbles/service-bubble/eleven-labs.d.ts +24 -24
  28. package/dist/bubbles/service-bubble/firecrawl.d.ts +360 -360
  29. package/dist/bubbles/service-bubble/followupboss.d.ts +144 -144
  30. package/dist/bubbles/service-bubble/fullenrich/fullenrich.d.ts +16 -16
  31. package/dist/bubbles/service-bubble/fullenrich/fullenrich.schema.d.ts +16 -16
  32. package/dist/bubbles/service-bubble/github.d.ts +148 -148
  33. package/dist/bubbles/service-bubble/gmail.d.ts +328 -328
  34. package/dist/bubbles/service-bubble/google-calendar.d.ts +34 -34
  35. package/dist/bubbles/service-bubble/google-drive.d.ts +102 -102
  36. package/dist/bubbles/service-bubble/google-sheets/google-sheets.d.ts +30 -30
  37. package/dist/bubbles/service-bubble/google-sheets/google-sheets.schema.d.ts +30 -30
  38. package/dist/bubbles/service-bubble/hello-world.d.ts +4 -4
  39. package/dist/bubbles/service-bubble/http.d.ts +16 -16
  40. package/dist/bubbles/service-bubble/insforge-db.d.ts +18 -18
  41. package/dist/bubbles/service-bubble/jira/jira.d.ts +92 -92
  42. package/dist/bubbles/service-bubble/jira/jira.schema.d.ts +102 -102
  43. package/dist/bubbles/service-bubble/notion/notion.d.ts +651 -651
  44. package/dist/bubbles/service-bubble/notion/property-schemas.d.ts +28 -28
  45. package/dist/bubbles/service-bubble/postgresql.d.ts +18 -18
  46. package/dist/bubbles/service-bubble/resend.d.ts +32 -32
  47. package/dist/bubbles/service-bubble/slack/slack.d.ts +503 -503
  48. package/dist/bubbles/service-bubble/slack/slack.js +1 -1
  49. package/dist/bubbles/service-bubble/slack/slack.js.map +1 -1
  50. package/dist/bubbles/service-bubble/slack/slack.utils.d.ts.map +1 -1
  51. package/dist/bubbles/service-bubble/slack/slack.utils.js +16 -2
  52. package/dist/bubbles/service-bubble/slack/slack.utils.js.map +1 -1
  53. package/dist/bubbles/service-bubble/storage.d.ts +20 -20
  54. package/dist/bubbles/service-bubble/stripe/stripe.d.ts +72 -72
  55. package/dist/bubbles/service-bubble/stripe/stripe.schema.d.ts +76 -76
  56. package/dist/bubbles/service-bubble/telegram.d.ts +66 -66
  57. package/dist/bubbles/tool-bubble/amazon-shopping-tool/amazon-shopping-tool.d.ts +18 -18
  58. package/dist/bubbles/tool-bubble/amazon-shopping-tool/amazon-shopping-tool.schema.d.ts +20 -20
  59. package/dist/bubbles/tool-bubble/browser-tools/linkedin-accept-invitations/schema.d.ts +2 -2
  60. package/dist/bubbles/tool-bubble/browser-tools/linkedin-accept-invitations/tool.d.ts +2 -2
  61. package/dist/bubbles/tool-bubble/browser-tools/linkedin-connection/schema.d.ts +2 -2
  62. package/dist/bubbles/tool-bubble/browser-tools/linkedin-connection/tool.d.ts +2 -2
  63. package/dist/bubbles/tool-bubble/browser-tools/linkedin-connection/tool.js +2 -2
  64. package/dist/bubbles/tool-bubble/browser-tools/linkedin-received-invitations/schema.d.ts +2 -2
  65. package/dist/bubbles/tool-bubble/browser-tools/linkedin-received-invitations/tool.d.ts +2 -2
  66. package/dist/bubbles/tool-bubble/browser-tools/linkedin-sent-invitations/schema.d.ts +2 -2
  67. package/dist/bubbles/tool-bubble/browser-tools/linkedin-sent-invitations/tool.d.ts +2 -2
  68. package/dist/bubbles/tool-bubble/bubbleflow-validation-tool.d.ts +12 -12
  69. package/dist/bubbles/tool-bubble/chart-js-tool.d.ts +4 -4
  70. package/dist/bubbles/tool-bubble/code-edit-tool.d.ts +4 -4
  71. package/dist/bubbles/tool-bubble/company-enrichment-tool.d.ts +14 -14
  72. package/dist/bubbles/tool-bubble/get-bubble-details-tool.d.ts +8 -8
  73. package/dist/bubbles/tool-bubble/get-trigger-detail-tool.d.ts +4 -4
  74. package/dist/bubbles/tool-bubble/get-trigger-detail-tool.d.ts.map +1 -1
  75. package/dist/bubbles/tool-bubble/get-trigger-detail-tool.js +1 -0
  76. package/dist/bubbles/tool-bubble/get-trigger-detail-tool.js.map +1 -1
  77. package/dist/bubbles/tool-bubble/google-maps-tool.d.ts +16 -16
  78. package/dist/bubbles/tool-bubble/instagram-tool.d.ts +4 -4
  79. package/dist/bubbles/tool-bubble/linkedin-tool.d.ts +334 -334
  80. package/dist/bubbles/tool-bubble/list-airtable-bases-tool.d.ts +4 -4
  81. package/dist/bubbles/tool-bubble/list-airtable-tables-tool.d.ts +4 -4
  82. package/dist/bubbles/tool-bubble/list-bubbles-tool.d.ts +4 -4
  83. package/dist/bubbles/tool-bubble/list-capabilities-tool.d.ts +12 -12
  84. package/dist/bubbles/tool-bubble/people-search-tool.d.ts +38 -38
  85. package/dist/bubbles/tool-bubble/reddit-scrape-tool.d.ts +14 -14
  86. package/dist/bubbles/tool-bubble/research-agent-tool.d.ts +8 -8
  87. package/dist/bubbles/tool-bubble/sql-query-tool.d.ts +16 -16
  88. package/dist/bubbles/tool-bubble/tiktok-tool.d.ts +66 -66
  89. package/dist/bubbles/tool-bubble/tool-template.d.ts +4 -4
  90. package/dist/bubbles/tool-bubble/twitter-tool.d.ts +112 -112
  91. package/dist/bubbles/tool-bubble/web-crawl-tool.d.ts +4 -4
  92. package/dist/bubbles/tool-bubble/web-extract-tool.d.ts +4 -4
  93. package/dist/bubbles/tool-bubble/web-scrape-tool.d.ts +8 -8
  94. package/dist/bubbles/tool-bubble/web-search-tool.d.ts +6 -6
  95. package/dist/bubbles/tool-bubble/yc-scraper-tool.d.ts +4 -4
  96. package/dist/bubbles/tool-bubble/youtube-tool.d.ts +14 -14
  97. package/dist/bubbles/workflow-bubble/database-analyzer.workflow.d.ts +6 -6
  98. package/dist/bubbles/workflow-bubble/generate-document.workflow.d.ts +24 -24
  99. package/dist/bubbles/workflow-bubble/parse-document.workflow.d.ts +12 -12
  100. package/dist/bubbles/workflow-bubble/pdf-form-operations.workflow.d.ts +38 -38
  101. package/dist/bubbles/workflow-bubble/pdf-ocr.workflow.d.ts +40 -40
  102. package/dist/bubbles/workflow-bubble/slack-data-assistant.workflow.d.ts +50 -50
  103. package/dist/bubbles/workflow-bubble/slack-formatter-agent.d.ts +108 -108
  104. package/dist/bubbles/workflow-bubble/slack-notifier.workflow.d.ts +24 -24
  105. package/dist/bubbles.json +1 -1
  106. package/package.json +2 -2
  107. package/dist/bubbles/service-bubble/salesforce/index.d.ts +0 -4
  108. package/dist/bubbles/service-bubble/salesforce/index.d.ts.map +0 -1
  109. package/dist/bubbles/service-bubble/salesforce/index.js +0 -4
  110. package/dist/bubbles/service-bubble/salesforce/index.js.map +0 -1
  111. package/dist/bubbles/service-bubble/salesforce/salesforce.d.ts +0 -1331
  112. package/dist/bubbles/service-bubble/salesforce/salesforce.d.ts.map +0 -1
  113. package/dist/bubbles/service-bubble/salesforce/salesforce.js +0 -618
  114. package/dist/bubbles/service-bubble/salesforce/salesforce.js.map +0 -1
  115. package/dist/bubbles/service-bubble/salesforce/salesforce.schema.d.ts +0 -1445
  116. package/dist/bubbles/service-bubble/salesforce/salesforce.schema.d.ts.map +0 -1
  117. package/dist/bubbles/service-bubble/salesforce/salesforce.schema.js +0 -609
  118. package/dist/bubbles/service-bubble/salesforce/salesforce.schema.js.map +0 -1
  119. package/dist/bubbles/service-bubble/salesforce/salesforce.utils.d.ts +0 -87
  120. package/dist/bubbles/service-bubble/salesforce/salesforce.utils.d.ts.map +0 -1
  121. package/dist/bubbles/service-bubble/salesforce/salesforce.utils.js +0 -181
  122. package/dist/bubbles/service-bubble/salesforce/salesforce.utils.js.map +0 -1
  123. package/dist/bubbles/tool-bubble/linkedin-connection-tool/index.d.ts +0 -3
  124. package/dist/bubbles/tool-bubble/linkedin-connection-tool/index.d.ts.map +0 -1
  125. package/dist/bubbles/tool-bubble/linkedin-connection-tool/index.js +0 -3
  126. package/dist/bubbles/tool-bubble/linkedin-connection-tool/index.js.map +0 -1
  127. package/dist/bubbles/tool-bubble/linkedin-connection-tool/linkedin-connection-tool.d.ts +0 -160
  128. package/dist/bubbles/tool-bubble/linkedin-connection-tool/linkedin-connection-tool.d.ts.map +0 -1
  129. package/dist/bubbles/tool-bubble/linkedin-connection-tool/linkedin-connection-tool.js +0 -706
  130. package/dist/bubbles/tool-bubble/linkedin-connection-tool/linkedin-connection-tool.js.map +0 -1
  131. package/dist/bubbles/tool-bubble/linkedin-connection-tool/linkedin-connection-tool.schema.d.ts +0 -93
  132. package/dist/bubbles/tool-bubble/linkedin-connection-tool/linkedin-connection-tool.schema.d.ts.map +0 -1
  133. package/dist/bubbles/tool-bubble/linkedin-connection-tool/linkedin-connection-tool.schema.js +0 -50
  134. package/dist/bubbles/tool-bubble/linkedin-connection-tool/linkedin-connection-tool.schema.js.map +0 -1
@@ -1,87 +0,0 @@
1
- /**
2
- * Salesforce Bubble Utility Functions
3
- *
4
- * Helper functions for Salesforce API interactions and data formatting.
5
- */
6
- /**
7
- * Validate Salesforce ID format (15 or 18 character)
8
- * @param id Salesforce record ID
9
- * @returns Whether the ID is valid
10
- */
11
- export declare function isValidSalesforceId(id: string): boolean;
12
- /**
13
- * Convert 15-character Salesforce ID to 18-character ID
14
- * @param id15 15-character Salesforce ID
15
- * @returns 18-character Salesforce ID
16
- */
17
- export declare function to18CharId(id15: string): string;
18
- /**
19
- * Format Salesforce date to ISO string
20
- * @param sfDate Salesforce date string (YYYY-MM-DD or ISO format)
21
- * @returns ISO date string
22
- */
23
- export declare function formatSalesforceDate(sfDate: string): string;
24
- /**
25
- * Convert JavaScript Date to Salesforce date format
26
- * @param date JavaScript Date object
27
- * @returns Salesforce date string (YYYY-MM-DD)
28
- */
29
- export declare function toSalesforceDate(date: Date): string;
30
- /**
31
- * Escape SOQL special characters in a string
32
- * @param value String to escape
33
- * @returns Escaped string safe for SOQL
34
- */
35
- export declare function escapeSoql(value: string): string;
36
- /**
37
- * Build a SOQL query string
38
- * @param sobjectType sObject API name
39
- * @param fields Array of field names to select
40
- * @param options Query options (where, orderBy, limit)
41
- * @returns SOQL query string
42
- */
43
- export declare function buildSoqlQuery(sobjectType: string, fields: string[], options?: {
44
- where?: string;
45
- orderBy?: string;
46
- limit?: number;
47
- }): string;
48
- /**
49
- * Enhance Salesforce API error messages with helpful hints
50
- * @param error Original error message or object
51
- * @param statusCode HTTP status code
52
- * @returns Enhanced error message
53
- */
54
- export declare function enhanceSalesforceErrorMessage(error: string | SalesforceErrorResponse[], statusCode?: number): string;
55
- /**
56
- * Salesforce error response object
57
- */
58
- export interface SalesforceErrorResponse {
59
- message: string;
60
- errorCode?: string;
61
- fields?: string[];
62
- }
63
- /**
64
- * Parse Salesforce API error response
65
- * @param responseBody Response body from Salesforce API
66
- * @returns Array of error objects or string error
67
- */
68
- export declare function parseSalesforceError(responseBody: unknown): SalesforceErrorResponse[] | string;
69
- /**
70
- * Get the instance URL from OAuth token response metadata
71
- * @param instanceUrl Instance URL from OAuth response
72
- * @returns Cleaned instance URL (without trailing slash)
73
- */
74
- export declare function cleanInstanceUrl(instanceUrl: string): string;
75
- /**
76
- * Get Salesforce API version
77
- * @returns Current API version string
78
- */
79
- export declare function getSalesforceApiVersion(): string;
80
- /**
81
- * Build Salesforce REST API URL
82
- * @param instanceUrl Salesforce instance URL
83
- * @param endpoint API endpoint path
84
- * @returns Full API URL
85
- */
86
- export declare function buildApiUrl(instanceUrl: string, endpoint: string): string;
87
- //# sourceMappingURL=salesforce.utils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"salesforce.utils.d.ts","sourceRoot":"","sources":["../../../../src/bubbles/service-bubble/salesforce/salesforce.utils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAGvD;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAmB/C;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAO3D;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAEnD;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAQhD;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAC5B,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,MAAM,EAAE,EAChB,OAAO,CAAC,EAAE;IACR,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,GACA,MAAM,CAgBR;AAED;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAC3C,KAAK,EAAE,MAAM,GAAG,uBAAuB,EAAE,EACzC,UAAU,CAAC,EAAE,MAAM,GAClB,MAAM,CA8BR;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAClC,YAAY,EAAE,OAAO,GACpB,uBAAuB,EAAE,GAAG,MAAM,CAepC;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAE5D;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,IAAI,MAAM,CAEhD;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAWzE"}
@@ -1,181 +0,0 @@
1
- /**
2
- * Salesforce Bubble Utility Functions
3
- *
4
- * Helper functions for Salesforce API interactions and data formatting.
5
- */
6
- /**
7
- * Validate Salesforce ID format (15 or 18 character)
8
- * @param id Salesforce record ID
9
- * @returns Whether the ID is valid
10
- */
11
- export function isValidSalesforceId(id) {
12
- // Salesforce IDs are either 15-character (case-sensitive) or 18-character (case-insensitive)
13
- return /^[a-zA-Z0-9]{15}$|^[a-zA-Z0-9]{18}$/.test(id);
14
- }
15
- /**
16
- * Convert 15-character Salesforce ID to 18-character ID
17
- * @param id15 15-character Salesforce ID
18
- * @returns 18-character Salesforce ID
19
- */
20
- export function to18CharId(id15) {
21
- if (id15.length === 18)
22
- return id15;
23
- if (id15.length !== 15) {
24
- throw new Error('Invalid Salesforce ID: must be 15 or 18 characters');
25
- }
26
- const suffix = [];
27
- for (let i = 0; i < 3; i++) {
28
- let flags = 0;
29
- for (let j = 0; j < 5; j++) {
30
- const char = id15.charAt(i * 5 + j);
31
- if (char >= 'A' && char <= 'Z') {
32
- flags += 1 << j;
33
- }
34
- }
35
- suffix.push('ABCDEFGHIJKLMNOPQRSTUVWXYZ012345'.charAt(flags));
36
- }
37
- return id15 + suffix.join('');
38
- }
39
- /**
40
- * Format Salesforce date to ISO string
41
- * @param sfDate Salesforce date string (YYYY-MM-DD or ISO format)
42
- * @returns ISO date string
43
- */
44
- export function formatSalesforceDate(sfDate) {
45
- // If already ISO format, return as-is
46
- if (sfDate.includes('T')) {
47
- return sfDate;
48
- }
49
- // Convert YYYY-MM-DD to ISO
50
- return new Date(sfDate + 'T00:00:00.000Z').toISOString();
51
- }
52
- /**
53
- * Convert JavaScript Date to Salesforce date format
54
- * @param date JavaScript Date object
55
- * @returns Salesforce date string (YYYY-MM-DD)
56
- */
57
- export function toSalesforceDate(date) {
58
- return date.toISOString().split('T')[0];
59
- }
60
- /**
61
- * Escape SOQL special characters in a string
62
- * @param value String to escape
63
- * @returns Escaped string safe for SOQL
64
- */
65
- export function escapeSoql(value) {
66
- // Escape single quotes, backslashes, and other special characters
67
- return value
68
- .replace(/\\/g, '\\\\')
69
- .replace(/'/g, "\\'")
70
- .replace(/\n/g, '\\n')
71
- .replace(/\r/g, '\\r')
72
- .replace(/\t/g, '\\t');
73
- }
74
- /**
75
- * Build a SOQL query string
76
- * @param sobjectType sObject API name
77
- * @param fields Array of field names to select
78
- * @param options Query options (where, orderBy, limit)
79
- * @returns SOQL query string
80
- */
81
- export function buildSoqlQuery(sobjectType, fields, options) {
82
- let query = `SELECT ${fields.join(', ')} FROM ${sobjectType}`;
83
- if (options?.where) {
84
- query += ` WHERE ${options.where}`;
85
- }
86
- if (options?.orderBy) {
87
- query += ` ORDER BY ${options.orderBy}`;
88
- }
89
- if (options?.limit) {
90
- query += ` LIMIT ${options.limit}`;
91
- }
92
- return query;
93
- }
94
- /**
95
- * Enhance Salesforce API error messages with helpful hints
96
- * @param error Original error message or object
97
- * @param statusCode HTTP status code
98
- * @returns Enhanced error message
99
- */
100
- export function enhanceSalesforceErrorMessage(error, statusCode) {
101
- // Handle array of Salesforce error objects
102
- if (Array.isArray(error)) {
103
- const messages = error.map((e) => {
104
- let msg = e.message;
105
- if (e.errorCode) {
106
- msg = `[${e.errorCode}] ${msg}`;
107
- }
108
- if (e.fields && e.fields.length > 0) {
109
- msg += ` (Fields: ${e.fields.join(', ')})`;
110
- }
111
- return msg;
112
- });
113
- return messages.join('; ');
114
- }
115
- // Handle string error
116
- let errorMsg = error;
117
- if (statusCode === 401) {
118
- errorMsg += '\n\nHint: Your Salesforce access token may be expired. Try refreshing your OAuth credentials.';
119
- }
120
- else if (statusCode === 403) {
121
- errorMsg += '\n\nHint: You may not have permission to access this resource. Check your Salesforce profile permissions.';
122
- }
123
- else if (statusCode === 404) {
124
- errorMsg += '\n\nHint: The requested resource was not found. Check that the ID or object type is correct.';
125
- }
126
- else if (statusCode === 400) {
127
- errorMsg += '\n\nHint: The request was malformed. Check your field names and data types.';
128
- }
129
- return errorMsg;
130
- }
131
- /**
132
- * Parse Salesforce API error response
133
- * @param responseBody Response body from Salesforce API
134
- * @returns Array of error objects or string error
135
- */
136
- export function parseSalesforceError(responseBody) {
137
- if (Array.isArray(responseBody)) {
138
- return responseBody;
139
- }
140
- if (typeof responseBody === 'string') {
141
- return responseBody;
142
- }
143
- if (typeof responseBody === 'object' &&
144
- responseBody !== null &&
145
- 'message' in responseBody) {
146
- return [responseBody];
147
- }
148
- return 'Unknown Salesforce API error';
149
- }
150
- /**
151
- * Get the instance URL from OAuth token response metadata
152
- * @param instanceUrl Instance URL from OAuth response
153
- * @returns Cleaned instance URL (without trailing slash)
154
- */
155
- export function cleanInstanceUrl(instanceUrl) {
156
- return instanceUrl.replace(/\/$/, '');
157
- }
158
- /**
159
- * Get Salesforce API version
160
- * @returns Current API version string
161
- */
162
- export function getSalesforceApiVersion() {
163
- return 'v59.0'; // Winter '24 release - current stable version
164
- }
165
- /**
166
- * Build Salesforce REST API URL
167
- * @param instanceUrl Salesforce instance URL
168
- * @param endpoint API endpoint path
169
- * @returns Full API URL
170
- */
171
- export function buildApiUrl(instanceUrl, endpoint) {
172
- const cleanedInstance = cleanInstanceUrl(instanceUrl);
173
- const version = getSalesforceApiVersion();
174
- // Handle endpoints that already include the services path
175
- if (endpoint.startsWith('/services/')) {
176
- return `${cleanedInstance}${endpoint}`;
177
- }
178
- // Standard data API endpoints
179
- return `${cleanedInstance}/services/data/${version}${endpoint}`;
180
- }
181
- //# sourceMappingURL=salesforce.utils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"salesforce.utils.js","sourceRoot":"","sources":["../../../../src/bubbles/service-bubble/salesforce/salesforce.utils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;GAIG;AACH,MAAM,UAAU,mBAAmB,CAAC,EAAU;IAC5C,6FAA6F;IAC7F,OAAO,qCAAqC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACxD,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,UAAU,CAAC,IAAY;IACrC,IAAI,IAAI,CAAC,MAAM,KAAK,EAAE;QAAE,OAAO,IAAI,CAAC;IACpC,IAAI,IAAI,CAAC,MAAM,KAAK,EAAE,EAAE,CAAC;QACvB,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;IACxE,C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;;GAKG;AACH,MAAM,UAAU,WAAW,CAAC,WAAmB,EAAE,QAAgB;IAC/D,MAAM,eAAe,GAAG,gBAAgB,CAAC,WAAW,CAAC,CAAC;IACtD,MAAM,OAAO,GAAG,uBAAuB,EAAE,CAAC;IAE1C,0DAA0D;IAC1D,IAAI,QAAQ,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE,CAAC;QACtC,OAAO,GAAG,eAAe,GAAG,QAAQ,EAAE,CAAC;IACzC,CAAC;IAED,8BAA8B;IAC9B,OAAO,GAAG,eAAe,kBAAkB,OAAO,GAAG,QAAQ,EAAE,CAAC;AAClE,CAAC"}
@@ -1,3 +0,0 @@
1
- export { LinkedInConnectionTool } from './linkedin-connection-tool.js';
2
- export { LinkedInConnectionToolParamsSchema, LinkedInConnectionToolResultSchema, ProfileInfoSchema, type LinkedInConnectionToolParams, type LinkedInConnectionToolParamsInput, type LinkedInConnectionToolResult, type ProfileInfo, } from './linkedin-connection-tool.schema.js';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/bubbles/tool-bubble/linkedin-connection-tool/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EACL,kCAAkC,EAClC,kCAAkC,EAClC,iBAAiB,EACjB,KAAK,4BAA4B,EACjC,KAAK,iCAAiC,EACtC,KAAK,4BAA4B,EACjC,KAAK,WAAW,GACjB,MAAM,sCAAsC,CAAC"}
@@ -1,3 +0,0 @@
1
- export { LinkedInConnectionTool } from './linkedin-connection-tool.js';
2
- export { LinkedInConnectionToolParamsSchema, LinkedInConnectionToolResultSchema, ProfileInfoSchema, } from './linkedin-connection-tool.schema.js';
3
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/bubbles/tool-bubble/linkedin-connection-tool/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EACL,kCAAkC,EAClC,kCAAkC,EAClC,iBAAiB,GAKlB,MAAM,sCAAsC,CAAC"}
@@ -1,160 +0,0 @@
1
- import { ToolBubble } from '../../../types/tool-bubble-class.js';
2
- import type { BubbleContext } from '../../../types/bubble.js';
3
- import { CredentialType, type BubbleName } from '@bubblelab/shared-schemas';
4
- import { type LinkedInConnectionToolParamsInput, type LinkedInConnectionToolResult } from './linkedin-connection-tool.schema.js';
5
- /**
6
- * LinkedIn Connection Tool
7
- *
8
- * A tool bubble for automating LinkedIn connection requests.
9
- * Handles both profile types:
10
- * - Profiles with direct "Connect" button
11
- * - Profiles where "Connect" is under the "More" dropdown
12
- *
13
- * Features:
14
- * - Send connection requests to LinkedIn profiles
15
- * - Add optional personalized notes
16
- * - Handle various profile layouts
17
- *
18
- * Required Credentials:
19
- * - LINKEDIN_CRED: Browser session credential with LinkedIn cookies
20
- *
21
- * Security:
22
- * - Uses BrowserBase cloud browsers (isolated)
23
- * - Credentials are encrypted at rest
24
- * - Session data is not persisted beyond operation
25
- */
26
- export declare class LinkedInConnectionTool<T extends LinkedInConnectionToolParamsInput = LinkedInConnectionToolParamsInput> extends ToolBubble<T, LinkedInConnectionToolResult> {
27
- static readonly bubbleName: BubbleName;
28
- static readonly schema: import("zod").ZodDiscriminatedUnion<"operation", [import("zod").ZodObject<{
29
- operation: import("zod").ZodLiteral<"send_connection">;
30
- profile_url: import("zod").ZodString;
31
- message: import("zod").ZodOptional<import("zod").ZodString>;
32
- credentials: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodNativeEnum<typeof CredentialType>, import("zod").ZodString>>;
33
- }, "strip", import("zod").ZodTypeAny, {
34
- operation: "send_connection";
35
- profile_url: string;
36
- message?: string | undefined;
37
- credentials?: Partial<Record<CredentialType, string>> | undefined;
38
- }, {
39
- operation: "send_connection";
40
- profile_url: string;
41
- message?: string | undefined;
42
- credentials?: Partial<Record<CredentialType, string>> | undefined;
43
- }>]>;
44
- static readonly resultSchema: import("zod").ZodDiscriminatedUnion<"operation", [import("zod").ZodObject<{
45
- operation: import("zod").ZodLiteral<"send_connection">;
46
- success: import("zod").ZodBoolean;
47
- message: import("zod").ZodOptional<import("zod").ZodString>;
48
- profile: import("zod").ZodOptional<import("zod").ZodObject<{
49
- name: import("zod").ZodString;
50
- headline: import("zod").ZodOptional<import("zod").ZodString>;
51
- location: import("zod").ZodOptional<import("zod").ZodString>;
52
- profile_url: import("zod").ZodString;
53
- }, "strip", import("zod").ZodTypeAny, {
54
- name: string;
55
- profile_url: string;
56
- headline?: string | undefined;
57
- location?: string | undefined;
58
- }, {
59
- name: string;
60
- profile_url: string;
61
- headline?: string | undefined;
62
- location?: string | undefined;
63
- }>>;
64
- error: import("zod").ZodString;
65
- }, "strip", import("zod").ZodTypeAny, {
66
- operation: "send_connection";
67
- success: boolean;
68
- error: string;
69
- message?: string | undefined;
70
- profile?: {
71
- name: string;
72
- profile_url: string;
73
- headline?: string | undefined;
74
- location?: string | undefined;
75
- } | undefined;
76
- }, {
77
- operation: "send_connection";
78
- success: boolean;
79
- error: string;
80
- message?: string | undefined;
81
- profile?: {
82
- name: string;
83
- profile_url: string;
84
- headline?: string | undefined;
85
- location?: string | undefined;
86
- } | undefined;
87
- }>]>;
88
- static readonly shortDescription = "LinkedIn connection automation - send connection requests with optional notes";
89
- static readonly longDescription = "\n LinkedIn Connection Tool for automating connection requests.\n\n Features:\n - Send connection requests to LinkedIn profiles\n - Add optional personalized notes (up to 300 characters)\n - Handles profiles with direct Connect button\n - Handles profiles where Connect is under \"More\" dropdown\n\n Required Credentials:\n - LINKEDIN_CRED: Browser session credential (authenticate via browser session)\n\n Note: The tool operates using authenticated browser sessions to ensure security.\n ";
90
- static readonly alias = "linkedin";
91
- static readonly type = "tool";
92
- private sessionId;
93
- private contextId;
94
- private cookies;
95
- constructor(params?: T, context?: BubbleContext);
96
- /**
97
- * Choose the credential to use for LinkedIn operations
98
- */
99
- protected chooseCredential(): string | undefined;
100
- /**
101
- * Parse the LINKEDIN_CRED to extract contextId and cookies
102
- */
103
- private parseBrowserSessionData;
104
- /**
105
- * Start a browser session using BrowserBase
106
- */
107
- private startBrowserSession;
108
- /**
109
- * End the browser session
110
- */
111
- private endBrowserSession;
112
- /**
113
- * Navigate to a URL
114
- */
115
- private navigateTo;
116
- /**
117
- * Evaluate JavaScript in page
118
- */
119
- private evaluate;
120
- /**
121
- * Type text into an input field
122
- */
123
- private typeText;
124
- /**
125
- * Get current page URL
126
- */
127
- private getCurrentUrl;
128
- /**
129
- * Poll for an element using evaluate with retries
130
- * More flexible than waitForSelector as it can use custom JS logic
131
- */
132
- private pollForElement;
133
- /**
134
- * Wait for page to be ready by checking for key LinkedIn profile elements
135
- */
136
- private waitForProfilePageReady;
137
- /**
138
- * Wait for modal/dialog to appear after clicking Connect
139
- */
140
- private waitForConnectionModal;
141
- /**
142
- * Wait for dropdown menu to appear after clicking "More"
143
- */
144
- private waitForDropdownMenu;
145
- /**
146
- * Save current DOM state to file for debugging
147
- * Only saves when DEBUG env var is set
148
- */
149
- private saveDebugState;
150
- performAction(): Promise<LinkedInConnectionToolResult>;
151
- /**
152
- * Send a connection request to a LinkedIn profile
153
- */
154
- private sendConnection;
155
- /**
156
- * Extract profile information from the current page
157
- */
158
- private extractProfileInfo;
159
- }
160
- //# sourceMappingURL=linkedin-connection-tool.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"linkedin-connection-tool.d.ts","sourceRoot":"","sources":["../../../../src/bubbles/tool-bubble/linkedin-connection-tool/linkedin-connection-tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AACjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,KAAK,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAM5E,OAAO,EAGL,KAA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