@bubblelab/bubble-core 0.1.103 → 0.1.106
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.
- package/dist/bubble-bundle.d.ts +100 -55
- package/dist/bubble-factory.d.ts.map +1 -1
- package/dist/bubble-factory.js +4 -0
- package/dist/bubble-factory.js.map +1 -1
- package/dist/bubbles/service-bubble/ai-agent.d.ts +4 -4
- package/dist/bubbles/service-bubble/apify/apify.d.ts +4 -4
- package/dist/bubbles/service-bubble/confluence/confluence.d.ts +1957 -0
- package/dist/bubbles/service-bubble/confluence/confluence.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/confluence/confluence.integration.flow.d.ts +35 -0
- package/dist/bubbles/service-bubble/confluence/confluence.integration.flow.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/confluence/confluence.integration.flow.js +327 -0
- package/dist/bubbles/service-bubble/confluence/confluence.integration.flow.js.map +1 -0
- package/dist/bubbles/service-bubble/confluence/confluence.js +534 -0
- package/dist/bubbles/service-bubble/confluence/confluence.js.map +1 -0
- package/dist/bubbles/service-bubble/confluence/confluence.schema.d.ts +2435 -0
- package/dist/bubbles/service-bubble/confluence/confluence.schema.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/confluence/confluence.schema.js +467 -0
- package/dist/bubbles/service-bubble/confluence/confluence.schema.js.map +1 -0
- package/dist/bubbles/service-bubble/confluence/confluence.utils.d.ts +49 -0
- package/dist/bubbles/service-bubble/confluence/confluence.utils.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/confluence/confluence.utils.js +337 -0
- package/dist/bubbles/service-bubble/confluence/confluence.utils.js.map +1 -0
- package/dist/bubbles/service-bubble/confluence/index.d.ts +5 -0
- package/dist/bubbles/service-bubble/confluence/index.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/confluence/index.js +5 -0
- package/dist/bubbles/service-bubble/confluence/index.js.map +1 -0
- package/dist/bubbles/service-bubble/crustdata/crustdata.d.ts +8 -8
- package/dist/bubbles/service-bubble/crustdata/crustdata.schema.d.ts +16 -16
- package/dist/bubbles/service-bubble/firecrawl.d.ts +4 -4
- package/dist/bubbles/service-bubble/gmail.d.ts +84 -84
- package/dist/bubbles/service-bubble/google-drive.d.ts +32 -32
- package/dist/bubbles/service-bubble/google-drive.d.ts.map +1 -1
- package/dist/bubbles/service-bubble/google-drive.js +22 -2
- package/dist/bubbles/service-bubble/google-drive.js.map +1 -1
- package/dist/bubbles/service-bubble/google-sheets/google-sheets.schema.js +6 -6
- package/dist/bubbles/service-bubble/google-sheets/google-sheets.schema.js.map +1 -1
- package/dist/bubbles/service-bubble/jira/jira.d.ts +12 -12
- package/dist/bubbles/service-bubble/jira/jira.schema.d.ts +14 -14
- package/dist/bubbles/service-bubble/resend.d.ts +4 -4
- package/dist/bubbles/service-bubble/salesforce/index.d.ts +4 -0
- package/dist/bubbles/service-bubble/salesforce/index.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/salesforce/index.js +4 -0
- package/dist/bubbles/service-bubble/salesforce/index.js.map +1 -0
- package/dist/bubbles/service-bubble/salesforce/salesforce.d.ts +1331 -0
- package/dist/bubbles/service-bubble/salesforce/salesforce.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/salesforce/salesforce.js +618 -0
- package/dist/bubbles/service-bubble/salesforce/salesforce.js.map +1 -0
- package/dist/bubbles/service-bubble/salesforce/salesforce.schema.d.ts +1445 -0
- package/dist/bubbles/service-bubble/salesforce/salesforce.schema.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/salesforce/salesforce.schema.js +609 -0
- package/dist/bubbles/service-bubble/salesforce/salesforce.schema.js.map +1 -0
- package/dist/bubbles/service-bubble/salesforce/salesforce.utils.d.ts +87 -0
- package/dist/bubbles/service-bubble/salesforce/salesforce.utils.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/salesforce/salesforce.utils.js +181 -0
- package/dist/bubbles/service-bubble/salesforce/salesforce.utils.js.map +1 -0
- package/dist/bubbles/service-bubble/slack/slack.d.ts +36 -36
- package/dist/bubbles/tool-bubble/tiktok-tool.d.ts +8 -8
- package/dist/bubbles/tool-bubble/twitter-tool.d.ts +10 -10
- package/dist/bubbles/workflow-bubble/pdf-form-operations.workflow.d.ts +8 -8
- package/dist/bubbles/workflow-bubble/pdf-ocr.workflow.d.ts +16 -16
- package/dist/bubbles/workflow-bubble/slack-formatter-agent.d.ts +16 -16
- package/dist/bubbles.json +1247 -8
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"salesforce.d.ts","sourceRoot":"","sources":["../../../../src/bubbles/service-bubble/salesforce/salesforce.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AACvE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAIL,KAAK,qBAAqB,EAC1B,KAAK,gBAAgB,EACtB,MAAM,wBAAwB,CAAC;AAkBhC;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,qBAAa,gBAAgB,CAC3B,CAAC,SAAS,qBAAqB,GAAG,qBAAqB,CACvD,SAAQ,aAAa,CACrB,CAAC,EACD,OAAO,CAAC,gBAAgB,EAAE;IAAE,SAAS,EAAE,CAAC,CAAC,WAAW,CAAC,CAAA;CAAE,CAAC,CACzD;IACC,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAG,SAAS,CAAU;IAC1C,MAAM,CAAC,QAAQ,CAAC,OAAO,gBAAgB;IACvC,MAAM,CAAC,QAAQ,CAAC,QAAQ,EAAG,OAAO,CAAU;IAC5C,MAAM,CAAC,QAAQ,CAAC,UAAU,gBAAgB;IAC1C,MAAM,CAAC,QAAQ,CAAC,MAAM;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAA0B;IACtD,MAAM,CAAC,QAAQ,CAAC,gBAAgB,0FACyD;IACzF,MAAM,CAAC,QAAQ,CAAC,eAAe,2wBAqB7B;IACF,MAAM,CAAC,QAAQ,CAAC,KAAK,SAAS;gBAG5B,MAAM,GAAE,CAGF,EACN,OAAO,CAAC,EAAE,aAAa;IAKZ,cAAc,IAAI,OAAO,CAAC,OAAO,CAAC;IAkB/C;;OAEG;IACH,OAAO,CAAC,YAAY;YAoBN,qBAAqB;cAgDnB,aAAa,CAC3B,OAAO,CAAC,EAAE,aAAa,GACtB,OAAO,CAAC,OAAO,CAAC,gBAAgB,EAAE;QAAE,SAAS,EAAE,CAAC,CAAC,WAAW,CAAC,CAAA;KAAE,CAAC,CAAC;YAoItD,YAAY;YA+BZ,aAAa;YA2Bb,WAAW;YAsCX,eAAe;YA8Cf,YAAY;YAmCZ,SAAS;YAoBT,YAAY;YAkCZ,YAAY;YAkBZ,YAAY;YAqBZ,aAAa;YAkDb,YAAY;YAoDZ,aAAa;YA8Cb,YAAY;YAyDZ,UAAU;YAoDV,SAAS;YA2DT,iBAAiB;YAgDjB,iBAAiB;IA+D/B,SAAS,CAAC,gBAAgB,IAAI,MAAM,GAAG,SAAS;CAYjD"}
|
|
@@ -0,0 +1,618 @@
|
|
|
1
|
+
import { ServiceBubble } from '../../../types/service-bubble-class.js';
|
|
2
|
+
import { CredentialType } from '@bubblelab/shared-schemas';
|
|
3
|
+
import { SalesforceParamsSchema, SalesforceResultSchema, } from './salesforce.schema.js';
|
|
4
|
+
import { buildSoqlQuery, buildApiUrl, enhanceSalesforceErrorMessage, parseSalesforceError, } from './salesforce.utils.js';
|
|
5
|
+
/**
|
|
6
|
+
* Salesforce Service Bubble
|
|
7
|
+
*
|
|
8
|
+
* Comprehensive Salesforce CRM integration using raw REST API calls.
|
|
9
|
+
* Supports OAuth 2.0 Web Server Flow authentication.
|
|
10
|
+
*
|
|
11
|
+
* Features:
|
|
12
|
+
* - SOQL queries for flexible data retrieval
|
|
13
|
+
* - CRUD operations on any sObject (Account, Contact, Lead, Opportunity, etc.)
|
|
14
|
+
* - Metadata operations (describe sObjects, list available objects)
|
|
15
|
+
* - SOSL search across multiple objects
|
|
16
|
+
* - User info retrieval
|
|
17
|
+
*
|
|
18
|
+
* Use cases:
|
|
19
|
+
* - Sync customer data between systems
|
|
20
|
+
* - Automate lead creation and management
|
|
21
|
+
* - Query and report on sales data
|
|
22
|
+
* - Update opportunity stages and amounts
|
|
23
|
+
* - Create contacts from form submissions
|
|
24
|
+
*
|
|
25
|
+
* Authentication:
|
|
26
|
+
* - OAuth 2.0 Web Server Flow
|
|
27
|
+
* - Automatic token refresh handling
|
|
28
|
+
* - Instance URL management
|
|
29
|
+
*/
|
|
30
|
+
export class SalesforceBubble extends ServiceBubble {
|
|
31
|
+
static type = 'service';
|
|
32
|
+
static service = 'salesforce';
|
|
33
|
+
static authType = 'oauth';
|
|
34
|
+
static bubbleName = 'salesforce';
|
|
35
|
+
static schema = SalesforceParamsSchema;
|
|
36
|
+
static resultSchema = SalesforceResultSchema;
|
|
37
|
+
static shortDescription = 'Salesforce CRM integration for managing accounts, contacts, leads, and opportunities';
|
|
38
|
+
static longDescription = `
|
|
39
|
+
Salesforce CRM service integration for comprehensive customer relationship management.
|
|
40
|
+
Uses raw REST API calls with OAuth 2.0 authentication.
|
|
41
|
+
|
|
42
|
+
Features:
|
|
43
|
+
- SOQL queries for flexible data retrieval
|
|
44
|
+
- CRUD operations on any sObject (Account, Contact, Lead, Opportunity, etc.)
|
|
45
|
+
- Metadata operations (describe sObjects, list available objects)
|
|
46
|
+
- SOSL search across multiple objects
|
|
47
|
+
- User info retrieval
|
|
48
|
+
|
|
49
|
+
Use cases:
|
|
50
|
+
- Sync customer data between systems
|
|
51
|
+
- Automate lead creation and management
|
|
52
|
+
- Query and report on sales data
|
|
53
|
+
- Update opportunity stages and amounts
|
|
54
|
+
- Create contacts from form submissions
|
|
55
|
+
|
|
56
|
+
Authentication:
|
|
57
|
+
- OAuth 2.0 Web Server Flow
|
|
58
|
+
- Automatic token refresh handling
|
|
59
|
+
`;
|
|
60
|
+
static alias = 'crm';
|
|
61
|
+
constructor(params = {
|
|
62
|
+
operation: 'list_accounts',
|
|
63
|
+
limit: 10,
|
|
64
|
+
}, context) {
|
|
65
|
+
super(params, context);
|
|
66
|
+
}
|
|
67
|
+
async testCredential() {
|
|
68
|
+
const oauthData = this.getOAuthData();
|
|
69
|
+
if (!oauthData) {
|
|
70
|
+
return false;
|
|
71
|
+
}
|
|
72
|
+
try {
|
|
73
|
+
// Test by fetching user info (minimal API call)
|
|
74
|
+
const response = await this.makeSalesforceRequest('/services/oauth2/userinfo', 'GET');
|
|
75
|
+
return response !== null && typeof response === 'object';
|
|
76
|
+
}
|
|
77
|
+
catch {
|
|
78
|
+
return false;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Get OAuth data from credential
|
|
83
|
+
*/
|
|
84
|
+
getOAuthData() {
|
|
85
|
+
const credential = this.chooseCredential();
|
|
86
|
+
if (!credential) {
|
|
87
|
+
return undefined;
|
|
88
|
+
}
|
|
89
|
+
// The credential value contains JSON with OAuth data
|
|
90
|
+
try {
|
|
91
|
+
const parsed = JSON.parse(credential);
|
|
92
|
+
if (parsed.access_token && parsed.instance_url) {
|
|
93
|
+
return parsed;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
catch {
|
|
97
|
+
// Credential might just be an access token for simple setups
|
|
98
|
+
// This won't work without instance_url though
|
|
99
|
+
}
|
|
100
|
+
return undefined;
|
|
101
|
+
}
|
|
102
|
+
async makeSalesforceRequest(endpoint, method = 'GET', body) {
|
|
103
|
+
const oauthData = this.getOAuthData();
|
|
104
|
+
if (!oauthData) {
|
|
105
|
+
throw new Error('Salesforce OAuth credentials are required. Please connect your Salesforce account.');
|
|
106
|
+
}
|
|
107
|
+
const url = buildApiUrl(oauthData.instance_url, endpoint);
|
|
108
|
+
const headers = {
|
|
109
|
+
Authorization: `Bearer ${oauthData.access_token}`,
|
|
110
|
+
'Content-Type': 'application/json',
|
|
111
|
+
};
|
|
112
|
+
const requestInit = {
|
|
113
|
+
method,
|
|
114
|
+
headers,
|
|
115
|
+
};
|
|
116
|
+
if (body && method !== 'GET') {
|
|
117
|
+
requestInit.body = JSON.stringify(body);
|
|
118
|
+
}
|
|
119
|
+
const response = await fetch(url, requestInit);
|
|
120
|
+
// Handle 204 No Content (successful DELETE, etc.)
|
|
121
|
+
if (response.status === 204) {
|
|
122
|
+
return { success: true };
|
|
123
|
+
}
|
|
124
|
+
const responseBody = await response.json().catch(() => null);
|
|
125
|
+
if (!response.ok) {
|
|
126
|
+
const errors = parseSalesforceError(responseBody);
|
|
127
|
+
const errorMessage = enhanceSalesforceErrorMessage(errors, response.status);
|
|
128
|
+
throw new Error(errorMessage);
|
|
129
|
+
}
|
|
130
|
+
return responseBody;
|
|
131
|
+
}
|
|
132
|
+
async performAction(context) {
|
|
133
|
+
void context;
|
|
134
|
+
const { operation } = this.params;
|
|
135
|
+
try {
|
|
136
|
+
const result = await (async () => {
|
|
137
|
+
const parsedParams = this.params;
|
|
138
|
+
switch (operation) {
|
|
139
|
+
case 'query':
|
|
140
|
+
return await this.executeQuery(parsedParams);
|
|
141
|
+
case 'get_user_info':
|
|
142
|
+
return await this.getUserInfo();
|
|
143
|
+
case 'describe_sobject':
|
|
144
|
+
return await this.describeSObject(parsedParams);
|
|
145
|
+
case 'list_sobjects':
|
|
146
|
+
return await this.listSObjects();
|
|
147
|
+
case 'get_record':
|
|
148
|
+
return await this.getRecord(parsedParams);
|
|
149
|
+
case 'create_record':
|
|
150
|
+
return await this.createRecord(parsedParams);
|
|
151
|
+
case 'update_record':
|
|
152
|
+
return await this.updateRecord(parsedParams);
|
|
153
|
+
case 'delete_record':
|
|
154
|
+
return await this.deleteRecord(parsedParams);
|
|
155
|
+
case 'search':
|
|
156
|
+
return await this.executeSearch(parsedParams);
|
|
157
|
+
case 'create_account':
|
|
158
|
+
return await this.createAccount(parsedParams);
|
|
159
|
+
case 'create_contact':
|
|
160
|
+
return await this.createContact(parsedParams);
|
|
161
|
+
case 'create_lead':
|
|
162
|
+
return await this.createLead(parsedParams);
|
|
163
|
+
case 'create_opportunity':
|
|
164
|
+
return await this.createOpportunity(parsedParams);
|
|
165
|
+
case 'list_accounts':
|
|
166
|
+
return await this.listAccounts(parsedParams);
|
|
167
|
+
case 'list_contacts':
|
|
168
|
+
return await this.listContacts(parsedParams);
|
|
169
|
+
case 'list_leads':
|
|
170
|
+
return await this.listLeads(parsedParams);
|
|
171
|
+
case 'list_opportunities':
|
|
172
|
+
return await this.listOpportunities(parsedParams);
|
|
173
|
+
default:
|
|
174
|
+
throw new Error(`Unsupported operation: ${operation}`);
|
|
175
|
+
}
|
|
176
|
+
})();
|
|
177
|
+
return result;
|
|
178
|
+
}
|
|
179
|
+
catch (error) {
|
|
180
|
+
return {
|
|
181
|
+
operation,
|
|
182
|
+
success: false,
|
|
183
|
+
error: error instanceof Error ? error.message : 'Unknown error occurred',
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
// ============================================================================
|
|
188
|
+
// QUERY OPERATIONS
|
|
189
|
+
// ============================================================================
|
|
190
|
+
async executeQuery(params) {
|
|
191
|
+
const { query } = params;
|
|
192
|
+
const encodedQuery = encodeURIComponent(query);
|
|
193
|
+
const response = await this.makeSalesforceRequest(`/query?q=${encodedQuery}`, 'GET');
|
|
194
|
+
const result = response;
|
|
195
|
+
return {
|
|
196
|
+
operation: 'query',
|
|
197
|
+
success: true,
|
|
198
|
+
result: {
|
|
199
|
+
totalSize: result.totalSize,
|
|
200
|
+
done: result.done,
|
|
201
|
+
nextRecordsUrl: result.nextRecordsUrl,
|
|
202
|
+
records: result.records,
|
|
203
|
+
},
|
|
204
|
+
error: '',
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
async executeSearch(params) {
|
|
208
|
+
const { search_query } = params;
|
|
209
|
+
const encodedQuery = encodeURIComponent(search_query);
|
|
210
|
+
const response = await this.makeSalesforceRequest(`/search?q=${encodedQuery}`, 'GET');
|
|
211
|
+
const result = response;
|
|
212
|
+
return {
|
|
213
|
+
operation: 'search',
|
|
214
|
+
success: true,
|
|
215
|
+
searchRecords: result.searchRecords,
|
|
216
|
+
error: '',
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
// ============================================================================
|
|
220
|
+
// USER INFO OPERATIONS
|
|
221
|
+
// ============================================================================
|
|
222
|
+
async getUserInfo() {
|
|
223
|
+
const response = await this.makeSalesforceRequest('/services/oauth2/userinfo', 'GET');
|
|
224
|
+
const userInfo = response;
|
|
225
|
+
return {
|
|
226
|
+
operation: 'get_user_info',
|
|
227
|
+
success: true,
|
|
228
|
+
user_info: {
|
|
229
|
+
user_id: userInfo.user_id,
|
|
230
|
+
organization_id: userInfo.organization_id,
|
|
231
|
+
username: userInfo.preferred_username,
|
|
232
|
+
display_name: userInfo.name,
|
|
233
|
+
email: userInfo.email,
|
|
234
|
+
active: userInfo.active,
|
|
235
|
+
user_type: userInfo.user_type,
|
|
236
|
+
},
|
|
237
|
+
error: '',
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
// ============================================================================
|
|
241
|
+
// METADATA OPERATIONS
|
|
242
|
+
// ============================================================================
|
|
243
|
+
async describeSObject(params) {
|
|
244
|
+
const { sobject_type } = params;
|
|
245
|
+
const response = await this.makeSalesforceRequest(`/sobjects/${sobject_type}/describe`, 'GET');
|
|
246
|
+
const metadata = response;
|
|
247
|
+
return {
|
|
248
|
+
operation: 'describe_sobject',
|
|
249
|
+
success: true,
|
|
250
|
+
metadata: {
|
|
251
|
+
name: metadata.name,
|
|
252
|
+
label: metadata.label,
|
|
253
|
+
labelPlural: metadata.labelPlural,
|
|
254
|
+
fields: metadata.fields.map((f) => ({
|
|
255
|
+
name: f.name,
|
|
256
|
+
label: f.label,
|
|
257
|
+
type: f.type,
|
|
258
|
+
required: !f.nillable,
|
|
259
|
+
createable: f.createable,
|
|
260
|
+
updateable: f.updateable,
|
|
261
|
+
picklistValues: f.picklistValues,
|
|
262
|
+
})),
|
|
263
|
+
},
|
|
264
|
+
error: '',
|
|
265
|
+
};
|
|
266
|
+
}
|
|
267
|
+
async listSObjects() {
|
|
268
|
+
const response = await this.makeSalesforceRequest('/sobjects', 'GET');
|
|
269
|
+
const data = response;
|
|
270
|
+
return {
|
|
271
|
+
operation: 'list_sobjects',
|
|
272
|
+
success: true,
|
|
273
|
+
sobjects: data.sobjects.map((s) => ({
|
|
274
|
+
name: s.name,
|
|
275
|
+
label: s.label,
|
|
276
|
+
queryable: s.queryable,
|
|
277
|
+
createable: s.createable,
|
|
278
|
+
updateable: s.updateable,
|
|
279
|
+
deletable: s.deletable,
|
|
280
|
+
})),
|
|
281
|
+
error: '',
|
|
282
|
+
};
|
|
283
|
+
}
|
|
284
|
+
// ============================================================================
|
|
285
|
+
// GENERIC RECORD OPERATIONS
|
|
286
|
+
// ============================================================================
|
|
287
|
+
async getRecord(params) {
|
|
288
|
+
const { sobject_type, record_id, fields } = params;
|
|
289
|
+
let endpoint = `/sobjects/${sobject_type}/${record_id}`;
|
|
290
|
+
if (fields && fields.length > 0) {
|
|
291
|
+
endpoint += `?fields=${fields.join(',')}`;
|
|
292
|
+
}
|
|
293
|
+
const response = await this.makeSalesforceRequest(endpoint, 'GET');
|
|
294
|
+
return {
|
|
295
|
+
operation: 'get_record',
|
|
296
|
+
success: true,
|
|
297
|
+
record: response,
|
|
298
|
+
error: '',
|
|
299
|
+
};
|
|
300
|
+
}
|
|
301
|
+
async createRecord(params) {
|
|
302
|
+
const { sobject_type, data } = params;
|
|
303
|
+
const response = await this.makeSalesforceRequest(`/sobjects/${sobject_type}`, 'POST', data);
|
|
304
|
+
const result = response;
|
|
305
|
+
if (!result.success) {
|
|
306
|
+
return {
|
|
307
|
+
operation: 'create_record',
|
|
308
|
+
success: false,
|
|
309
|
+
errors: result.errors.map((e) => e.message),
|
|
310
|
+
error: result.errors.map((e) => e.message).join('; '),
|
|
311
|
+
};
|
|
312
|
+
}
|
|
313
|
+
return {
|
|
314
|
+
operation: 'create_record',
|
|
315
|
+
success: true,
|
|
316
|
+
id: result.id,
|
|
317
|
+
error: '',
|
|
318
|
+
};
|
|
319
|
+
}
|
|
320
|
+
async updateRecord(params) {
|
|
321
|
+
const { sobject_type, record_id, data } = params;
|
|
322
|
+
await this.makeSalesforceRequest(`/sobjects/${sobject_type}/${record_id}`, 'PATCH', data);
|
|
323
|
+
return {
|
|
324
|
+
operation: 'update_record',
|
|
325
|
+
success: true,
|
|
326
|
+
error: '',
|
|
327
|
+
};
|
|
328
|
+
}
|
|
329
|
+
async deleteRecord(params) {
|
|
330
|
+
const { sobject_type, record_id } = params;
|
|
331
|
+
await this.makeSalesforceRequest(`/sobjects/${sobject_type}/${record_id}`, 'DELETE');
|
|
332
|
+
return {
|
|
333
|
+
operation: 'delete_record',
|
|
334
|
+
success: true,
|
|
335
|
+
error: '',
|
|
336
|
+
};
|
|
337
|
+
}
|
|
338
|
+
// ============================================================================
|
|
339
|
+
// ACCOUNT OPERATIONS
|
|
340
|
+
// ============================================================================
|
|
341
|
+
async createAccount(params) {
|
|
342
|
+
const { name, type, industry, website, phone, billing_city, billing_state, billing_country, additional_fields, } = params;
|
|
343
|
+
const data = { Name: name };
|
|
344
|
+
if (type)
|
|
345
|
+
data.Type = type;
|
|
346
|
+
if (industry)
|
|
347
|
+
data.Industry = industry;
|
|
348
|
+
if (website)
|
|
349
|
+
data.Website = website;
|
|
350
|
+
if (phone)
|
|
351
|
+
data.Phone = phone;
|
|
352
|
+
if (billing_city)
|
|
353
|
+
data.BillingCity = billing_city;
|
|
354
|
+
if (billing_state)
|
|
355
|
+
data.BillingState = billing_state;
|
|
356
|
+
if (billing_country)
|
|
357
|
+
data.BillingCountry = billing_country;
|
|
358
|
+
if (additional_fields)
|
|
359
|
+
Object.assign(data, additional_fields);
|
|
360
|
+
const response = await this.makeSalesforceRequest('/sobjects/Account', 'POST', data);
|
|
361
|
+
const result = response;
|
|
362
|
+
// Fetch the created record to return full data
|
|
363
|
+
const accountResponse = await this.makeSalesforceRequest(`/sobjects/Account/${result.id}`, 'GET');
|
|
364
|
+
return {
|
|
365
|
+
operation: 'create_account',
|
|
366
|
+
success: true,
|
|
367
|
+
account: accountResponse,
|
|
368
|
+
error: '',
|
|
369
|
+
};
|
|
370
|
+
}
|
|
371
|
+
async listAccounts(params) {
|
|
372
|
+
const { limit, fields, where_clause, order_by } = params;
|
|
373
|
+
const defaultFields = [
|
|
374
|
+
'Id',
|
|
375
|
+
'Name',
|
|
376
|
+
'Type',
|
|
377
|
+
'Industry',
|
|
378
|
+
'Website',
|
|
379
|
+
'Phone',
|
|
380
|
+
'BillingCity',
|
|
381
|
+
'BillingState',
|
|
382
|
+
'BillingCountry',
|
|
383
|
+
'CreatedDate',
|
|
384
|
+
'LastModifiedDate',
|
|
385
|
+
];
|
|
386
|
+
const query = buildSoqlQuery('Account', fields || defaultFields, {
|
|
387
|
+
where: where_clause,
|
|
388
|
+
orderBy: order_by,
|
|
389
|
+
limit,
|
|
390
|
+
});
|
|
391
|
+
const encodedQuery = encodeURIComponent(query);
|
|
392
|
+
const response = await this.makeSalesforceRequest(`/query?q=${encodedQuery}`, 'GET');
|
|
393
|
+
const result = response;
|
|
394
|
+
return {
|
|
395
|
+
operation: 'list_accounts',
|
|
396
|
+
success: true,
|
|
397
|
+
accounts: result.records,
|
|
398
|
+
total_size: result.totalSize,
|
|
399
|
+
error: '',
|
|
400
|
+
};
|
|
401
|
+
}
|
|
402
|
+
// ============================================================================
|
|
403
|
+
// CONTACT OPERATIONS
|
|
404
|
+
// ============================================================================
|
|
405
|
+
async createContact(params) {
|
|
406
|
+
const { first_name, last_name, email, phone, title, account_id, additional_fields, } = params;
|
|
407
|
+
const data = { LastName: last_name };
|
|
408
|
+
if (first_name)
|
|
409
|
+
data.FirstName = first_name;
|
|
410
|
+
if (email)
|
|
411
|
+
data.Email = email;
|
|
412
|
+
if (phone)
|
|
413
|
+
data.Phone = phone;
|
|
414
|
+
if (title)
|
|
415
|
+
data.Title = title;
|
|
416
|
+
if (account_id)
|
|
417
|
+
data.AccountId = account_id;
|
|
418
|
+
if (additional_fields)
|
|
419
|
+
Object.assign(data, additional_fields);
|
|
420
|
+
const response = await this.makeSalesforceRequest('/sobjects/Contact', 'POST', data);
|
|
421
|
+
const result = response;
|
|
422
|
+
// Fetch the created record to return full data
|
|
423
|
+
const contactResponse = await this.makeSalesforceRequest(`/sobjects/Contact/${result.id}`, 'GET');
|
|
424
|
+
return {
|
|
425
|
+
operation: 'create_contact',
|
|
426
|
+
success: true,
|
|
427
|
+
contact: contactResponse,
|
|
428
|
+
error: '',
|
|
429
|
+
};
|
|
430
|
+
}
|
|
431
|
+
async listContacts(params) {
|
|
432
|
+
const { limit, fields, where_clause, order_by, account_id } = params;
|
|
433
|
+
const defaultFields = [
|
|
434
|
+
'Id',
|
|
435
|
+
'FirstName',
|
|
436
|
+
'LastName',
|
|
437
|
+
'Email',
|
|
438
|
+
'Phone',
|
|
439
|
+
'Title',
|
|
440
|
+
'AccountId',
|
|
441
|
+
'CreatedDate',
|
|
442
|
+
'LastModifiedDate',
|
|
443
|
+
];
|
|
444
|
+
let whereClause = where_clause;
|
|
445
|
+
if (account_id) {
|
|
446
|
+
whereClause = whereClause
|
|
447
|
+
? `${whereClause} AND AccountId = '${account_id}'`
|
|
448
|
+
: `AccountId = '${account_id}'`;
|
|
449
|
+
}
|
|
450
|
+
const query = buildSoqlQuery('Contact', fields || defaultFields, {
|
|
451
|
+
where: whereClause,
|
|
452
|
+
orderBy: order_by,
|
|
453
|
+
limit,
|
|
454
|
+
});
|
|
455
|
+
const encodedQuery = encodeURIComponent(query);
|
|
456
|
+
const response = await this.makeSalesforceRequest(`/query?q=${encodedQuery}`, 'GET');
|
|
457
|
+
const result = response;
|
|
458
|
+
return {
|
|
459
|
+
operation: 'list_contacts',
|
|
460
|
+
success: true,
|
|
461
|
+
contacts: result.records,
|
|
462
|
+
total_size: result.totalSize,
|
|
463
|
+
error: '',
|
|
464
|
+
};
|
|
465
|
+
}
|
|
466
|
+
// ============================================================================
|
|
467
|
+
// LEAD OPERATIONS
|
|
468
|
+
// ============================================================================
|
|
469
|
+
async createLead(params) {
|
|
470
|
+
const { first_name, last_name, company, email, phone, title, status, lead_source, additional_fields, } = params;
|
|
471
|
+
const data = {
|
|
472
|
+
LastName: last_name,
|
|
473
|
+
Company: company,
|
|
474
|
+
};
|
|
475
|
+
if (first_name)
|
|
476
|
+
data.FirstName = first_name;
|
|
477
|
+
if (email)
|
|
478
|
+
data.Email = email;
|
|
479
|
+
if (phone)
|
|
480
|
+
data.Phone = phone;
|
|
481
|
+
if (title)
|
|
482
|
+
data.Title = title;
|
|
483
|
+
if (status)
|
|
484
|
+
data.Status = status;
|
|
485
|
+
if (lead_source)
|
|
486
|
+
data.LeadSource = lead_source;
|
|
487
|
+
if (additional_fields)
|
|
488
|
+
Object.assign(data, additional_fields);
|
|
489
|
+
const response = await this.makeSalesforceRequest('/sobjects/Lead', 'POST', data);
|
|
490
|
+
const result = response;
|
|
491
|
+
// Fetch the created record to return full data
|
|
492
|
+
const leadResponse = await this.makeSalesforceRequest(`/sobjects/Lead/${result.id}`, 'GET');
|
|
493
|
+
return {
|
|
494
|
+
operation: 'create_lead',
|
|
495
|
+
success: true,
|
|
496
|
+
lead: leadResponse,
|
|
497
|
+
error: '',
|
|
498
|
+
};
|
|
499
|
+
}
|
|
500
|
+
async listLeads(params) {
|
|
501
|
+
const { limit, fields, where_clause, order_by, status } = params;
|
|
502
|
+
const defaultFields = [
|
|
503
|
+
'Id',
|
|
504
|
+
'FirstName',
|
|
505
|
+
'LastName',
|
|
506
|
+
'Email',
|
|
507
|
+
'Phone',
|
|
508
|
+
'Company',
|
|
509
|
+
'Title',
|
|
510
|
+
'Status',
|
|
511
|
+
'LeadSource',
|
|
512
|
+
'CreatedDate',
|
|
513
|
+
'LastModifiedDate',
|
|
514
|
+
];
|
|
515
|
+
let whereClause = where_clause;
|
|
516
|
+
if (status) {
|
|
517
|
+
whereClause = whereClause
|
|
518
|
+
? `${whereClause} AND Status = '${status}'`
|
|
519
|
+
: `Status = '${status}'`;
|
|
520
|
+
}
|
|
521
|
+
const query = buildSoqlQuery('Lead', fields || defaultFields, {
|
|
522
|
+
where: whereClause,
|
|
523
|
+
orderBy: order_by,
|
|
524
|
+
limit,
|
|
525
|
+
});
|
|
526
|
+
const encodedQuery = encodeURIComponent(query);
|
|
527
|
+
const response = await this.makeSalesforceRequest(`/query?q=${encodedQuery}`, 'GET');
|
|
528
|
+
const result = response;
|
|
529
|
+
return {
|
|
530
|
+
operation: 'list_leads',
|
|
531
|
+
success: true,
|
|
532
|
+
leads: result.records,
|
|
533
|
+
total_size: result.totalSize,
|
|
534
|
+
error: '',
|
|
535
|
+
};
|
|
536
|
+
}
|
|
537
|
+
// ============================================================================
|
|
538
|
+
// OPPORTUNITY OPERATIONS
|
|
539
|
+
// ============================================================================
|
|
540
|
+
async createOpportunity(params) {
|
|
541
|
+
const { name, stage_name, close_date, amount, probability, account_id, additional_fields, } = params;
|
|
542
|
+
const data = {
|
|
543
|
+
Name: name,
|
|
544
|
+
StageName: stage_name,
|
|
545
|
+
CloseDate: close_date,
|
|
546
|
+
};
|
|
547
|
+
if (amount !== undefined)
|
|
548
|
+
data.Amount = amount;
|
|
549
|
+
if (probability !== undefined)
|
|
550
|
+
data.Probability = probability;
|
|
551
|
+
if (account_id)
|
|
552
|
+
data.AccountId = account_id;
|
|
553
|
+
if (additional_fields)
|
|
554
|
+
Object.assign(data, additional_fields);
|
|
555
|
+
const response = await this.makeSalesforceRequest('/sobjects/Opportunity', 'POST', data);
|
|
556
|
+
const result = response;
|
|
557
|
+
// Fetch the created record to return full data
|
|
558
|
+
const opportunityResponse = await this.makeSalesforceRequest(`/sobjects/Opportunity/${result.id}`, 'GET');
|
|
559
|
+
return {
|
|
560
|
+
operation: 'create_opportunity',
|
|
561
|
+
success: true,
|
|
562
|
+
opportunity: opportunityResponse,
|
|
563
|
+
error: '',
|
|
564
|
+
};
|
|
565
|
+
}
|
|
566
|
+
async listOpportunities(params) {
|
|
567
|
+
const { limit, fields, where_clause, order_by, account_id, stage_name } = params;
|
|
568
|
+
const defaultFields = [
|
|
569
|
+
'Id',
|
|
570
|
+
'Name',
|
|
571
|
+
'StageName',
|
|
572
|
+
'Amount',
|
|
573
|
+
'CloseDate',
|
|
574
|
+
'Probability',
|
|
575
|
+
'AccountId',
|
|
576
|
+
'CreatedDate',
|
|
577
|
+
'LastModifiedDate',
|
|
578
|
+
];
|
|
579
|
+
let whereClause = where_clause;
|
|
580
|
+
if (account_id) {
|
|
581
|
+
whereClause = whereClause
|
|
582
|
+
? `${whereClause} AND AccountId = '${account_id}'`
|
|
583
|
+
: `AccountId = '${account_id}'`;
|
|
584
|
+
}
|
|
585
|
+
if (stage_name) {
|
|
586
|
+
whereClause = whereClause
|
|
587
|
+
? `${whereClause} AND StageName = '${stage_name}'`
|
|
588
|
+
: `StageName = '${stage_name}'`;
|
|
589
|
+
}
|
|
590
|
+
const query = buildSoqlQuery('Opportunity', fields || defaultFields, {
|
|
591
|
+
where: whereClause,
|
|
592
|
+
orderBy: order_by,
|
|
593
|
+
limit,
|
|
594
|
+
});
|
|
595
|
+
const encodedQuery = encodeURIComponent(query);
|
|
596
|
+
const response = await this.makeSalesforceRequest(`/query?q=${encodedQuery}`, 'GET');
|
|
597
|
+
const result = response;
|
|
598
|
+
return {
|
|
599
|
+
operation: 'list_opportunities',
|
|
600
|
+
success: true,
|
|
601
|
+
opportunities: result.records,
|
|
602
|
+
total_size: result.totalSize,
|
|
603
|
+
error: '',
|
|
604
|
+
};
|
|
605
|
+
}
|
|
606
|
+
// ============================================================================
|
|
607
|
+
// CREDENTIAL MANAGEMENT
|
|
608
|
+
// ============================================================================
|
|
609
|
+
chooseCredential() {
|
|
610
|
+
const { credentials } = this.params;
|
|
611
|
+
if (!credentials || typeof credentials !== 'object') {
|
|
612
|
+
return undefined;
|
|
613
|
+
}
|
|
614
|
+
// Salesforce bubble uses SALESFORCE_CRED credentials
|
|
615
|
+
return credentials[CredentialType.SALESFORCE_CRED];
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
//# sourceMappingURL=salesforce.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"salesforce.js","sourceRoot":"","sources":["../../../../src/bubbles/service-bubble/salesforce/salesforce.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AAEvE,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EACL,sBAAsB,EACtB,sBAAsB,GAIvB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,cAAc,EACd,WAAW,EACX,6BAA6B,EAC7B,oBAAoB,GACrB,MAAM,uBAAuB,CAAC;AAY/B;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,OAAO,gBAEX,SAAQ,aAGT;IACC,MAAM,CAAU,IAAI,GAAG,SAAkB,CAAC;IAC1C,MAAM,CAAU,OAAO,GAAG,YAAY,CAAC;IACvC,MAAM,CAAU,QAAQ,GAAG,OAAgB,CAAC;IAC5C,MAAM,CAAU,UAAU,GAAG,YAAY,CAAC;IAC1C,MAAM,CAAU,MAAM,GAAG,sBAAsB,CAAC;IAChD,MAAM,CAAU,YAAY,GAAG,sBAAsB,CAAC;IACtD,MAAM,CAAU,gBAAgB,GAC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