@pipedream/salesforce_rest_api 1.12.1 → 1.12.2
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.
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import salesforce from "../../salesforce_rest_api.app.mjs";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
key: "salesforce_rest_api-get-current-user",
|
|
5
|
+
name: "Get Current User",
|
|
6
|
+
description: "Returns the authenticated Salesforce user's ID, name, email, and organization ID. Call this first when the user says 'my leads', 'my opportunities', 'my cases', or any first-person query. Use `user_id` as the OwnerId filter in **SOQL Search** (e.g. `WHERE OwnerId = '{user_id}'`) and `organization_id` to construct Salesforce UI URLs. [See the documentation](https://help.salesforce.com/s/articleView?id=sf.remoteaccess_using_userinfo_endpoint.htm).",
|
|
7
|
+
version: "0.0.1",
|
|
8
|
+
type: "action",
|
|
9
|
+
annotations: {
|
|
10
|
+
destructiveHint: false,
|
|
11
|
+
openWorldHint: true,
|
|
12
|
+
readOnlyHint: true,
|
|
13
|
+
},
|
|
14
|
+
props: {
|
|
15
|
+
salesforce,
|
|
16
|
+
},
|
|
17
|
+
async run({ $ }) {
|
|
18
|
+
const user = await this.salesforce.getUserInfo(this.salesforce._authToken());
|
|
19
|
+
|
|
20
|
+
const summaryName = user.name || user.email || user.user_id;
|
|
21
|
+
$.export("$summary", `Retrieved user ${summaryName}`);
|
|
22
|
+
|
|
23
|
+
return {
|
|
24
|
+
user_id: user.user_id,
|
|
25
|
+
name: user.name,
|
|
26
|
+
email: user.email,
|
|
27
|
+
organization_id: user.organization_id,
|
|
28
|
+
username: user.preferred_username,
|
|
29
|
+
profile: user.profile,
|
|
30
|
+
locale: user.locale,
|
|
31
|
+
zoneinfo: user.zoneinfo,
|
|
32
|
+
};
|
|
33
|
+
},
|
|
34
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pipedream/salesforce_rest_api",
|
|
3
|
-
"version": "1.12.
|
|
3
|
+
"version": "1.12.2",
|
|
4
4
|
"description": "Pipedream Salesforce (REST API) Components",
|
|
5
5
|
"main": "salesforce_rest_api.app.mjs",
|
|
6
6
|
"keywords": [
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"@pipedream/platform": "^3.1.1",
|
|
14
14
|
"fast-xml-parser": "^5.5.7",
|
|
15
15
|
"handlebars": "^4.7.9",
|
|
16
|
-
"lodash": "^4.
|
|
16
|
+
"lodash": "^4.18.1",
|
|
17
17
|
"lodash-es": "^4.18.1",
|
|
18
18
|
"salesforce-webhooks": "^1.1.11",
|
|
19
19
|
"uuid": "^9.0.1"
|