@pipedream/salesforce_rest_api 1.11.3 → 1.11.4
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.
|
@@ -3,9 +3,8 @@ import salesforce from "../../salesforce_rest_api.app.mjs";
|
|
|
3
3
|
export default {
|
|
4
4
|
key: "salesforce_rest_api-search-string",
|
|
5
5
|
name: "Search Object Records",
|
|
6
|
-
description:
|
|
7
|
-
|
|
8
|
-
version: "0.0.6",
|
|
6
|
+
description: "Searches for records in an object using a parameterized search. [See the documentation](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/resources_search_parameterized_get.htm)",
|
|
7
|
+
version: "0.0.7",
|
|
9
8
|
annotations: {
|
|
10
9
|
destructiveHint: false,
|
|
11
10
|
openWorldHint: true,
|
|
@@ -24,18 +23,21 @@ export default {
|
|
|
24
23
|
salesforce,
|
|
25
24
|
"objectType",
|
|
26
25
|
],
|
|
27
|
-
description: "The type of object to search for records
|
|
26
|
+
description: "The type of object to search for records",
|
|
28
27
|
},
|
|
29
28
|
searchTerm: {
|
|
30
29
|
type: "string",
|
|
31
30
|
label: "Search Term",
|
|
32
|
-
description: "The term to search for
|
|
31
|
+
description: "The term to search for",
|
|
33
32
|
},
|
|
34
33
|
fields: {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
34
|
+
propDefinition: [
|
|
35
|
+
salesforce,
|
|
36
|
+
"fieldsToObtain",
|
|
37
|
+
(c) => ({
|
|
38
|
+
objType: c.sobjectType,
|
|
39
|
+
}),
|
|
40
|
+
],
|
|
39
41
|
},
|
|
40
42
|
},
|
|
41
43
|
async run({ $ }) {
|
|
@@ -54,7 +56,20 @@ export default {
|
|
|
54
56
|
},
|
|
55
57
|
});
|
|
56
58
|
const resultsFound = response.searchRecords.length;
|
|
57
|
-
|
|
59
|
+
response.searchRecords = response.searchRecords.map((record) => {
|
|
60
|
+
const url = record?.attributes?.url;
|
|
61
|
+
if (!url) return record;
|
|
62
|
+
return {
|
|
63
|
+
...record,
|
|
64
|
+
attributes: {
|
|
65
|
+
...record.attributes,
|
|
66
|
+
url: `${this.salesforce._baseApiUrl()}${url}`,
|
|
67
|
+
},
|
|
68
|
+
};
|
|
69
|
+
});
|
|
70
|
+
$.export("$summary", `Successfully found ${resultsFound} result${resultsFound === 1
|
|
71
|
+
? ""
|
|
72
|
+
: "s"}`);
|
|
58
73
|
return response;
|
|
59
74
|
},
|
|
60
75
|
};
|