@pipedream/salesforce_rest_api 1.11.0 → 1.11.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,62 @@
|
|
|
1
|
+
import salesforce from "../../salesforce_rest_api.app.mjs";
|
|
2
|
+
import { ConfigurationError } from "@pipedream/platform";
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
key: "salesforce_rest_api-delete-note",
|
|
6
|
+
name: "Delete Note Or Content Note",
|
|
7
|
+
description: "Delete a note or content note from a Salesforce record. [See the documentation](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/resources_sobject_retrieve_delete.htm)",
|
|
8
|
+
version: "0.0.2",
|
|
9
|
+
type: "action",
|
|
10
|
+
annotations: {
|
|
11
|
+
destructiveHint: true,
|
|
12
|
+
openWorldHint: true,
|
|
13
|
+
readOnlyHint: false,
|
|
14
|
+
},
|
|
15
|
+
props: {
|
|
16
|
+
salesforce,
|
|
17
|
+
sobjectType: {
|
|
18
|
+
type: "string",
|
|
19
|
+
label: "Note Type",
|
|
20
|
+
description: "The type of note to delete",
|
|
21
|
+
async options() {
|
|
22
|
+
return [
|
|
23
|
+
"Note",
|
|
24
|
+
"ContentNote",
|
|
25
|
+
];
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
recordId: {
|
|
29
|
+
type: "string",
|
|
30
|
+
label: "Note ID Or Content Note ID",
|
|
31
|
+
description: "The ID of the note or content note to delete",
|
|
32
|
+
async options() {
|
|
33
|
+
try {
|
|
34
|
+
return await this.salesforce.listRecordOptions({
|
|
35
|
+
objType: this.sobjectType,
|
|
36
|
+
nameField: "Title",
|
|
37
|
+
}) ?? [];
|
|
38
|
+
} catch (error) {
|
|
39
|
+
let errorMessage;
|
|
40
|
+
try {
|
|
41
|
+
errorMessage = JSON.parse(error.message);
|
|
42
|
+
} catch {
|
|
43
|
+
throw new ConfigurationError(`${error.message || error}`);
|
|
44
|
+
}
|
|
45
|
+
if (errorMessage?.length && errorMessage[0]?.message) {
|
|
46
|
+
throw new ConfigurationError(`${errorMessage[0].message}`);
|
|
47
|
+
}
|
|
48
|
+
throw new ConfigurationError(error.message || String(error));
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
async run({ $ }) {
|
|
54
|
+
const response = await this.salesforce.deleteRecord({
|
|
55
|
+
$,
|
|
56
|
+
sobjectType: this.sobjectType,
|
|
57
|
+
recordId: this.recordId,
|
|
58
|
+
});
|
|
59
|
+
$.export("$summary", `Successfully deleted note (ID: ${this.recordId})`);
|
|
60
|
+
return response;
|
|
61
|
+
},
|
|
62
|
+
};
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "salesforce_rest_api-send-email",
|
|
5
5
|
name: "Send Email",
|
|
6
6
|
description: "Sends an email. [See the documentation](https://developer.salesforce.com/docs/atlas.en-us.api_action.meta/api_action/actions_obj_email_simple.htm)",
|
|
7
|
-
version: "0.0
|
|
7
|
+
version: "0.1.0",
|
|
8
8
|
annotations: {
|
|
9
9
|
destructiveHint: false,
|
|
10
10
|
openWorldHint: true,
|
|
@@ -31,7 +31,51 @@ export default {
|
|
|
31
31
|
logEmailOnSend: {
|
|
32
32
|
type: "boolean",
|
|
33
33
|
label: "Log Email on Send",
|
|
34
|
-
description: "Indicates whether to log the email on the specified records
|
|
34
|
+
description: "Indicates whether to log the email on the specified records' activity time lines",
|
|
35
|
+
optional: true,
|
|
36
|
+
},
|
|
37
|
+
relatedRecordId: {
|
|
38
|
+
type: "string",
|
|
39
|
+
label: "Related Record ID",
|
|
40
|
+
description: "The ID of a record that is not a person (for example, a case record). If `logEmailOnSend` is included, this is the ID of a secondary record (except a lead) to log the email to.",
|
|
41
|
+
optional: true,
|
|
42
|
+
},
|
|
43
|
+
addThreadingTokenToBody: {
|
|
44
|
+
type: "boolean",
|
|
45
|
+
label: "Add Threading Token to Body",
|
|
46
|
+
description: "Whether to create a unique token for the related record and add it to the email body. When the related record is a case record, Email-to-Case uses the token to link future email responses to that case.",
|
|
47
|
+
optional: true,
|
|
48
|
+
},
|
|
49
|
+
addThreadingTokenToSubject: {
|
|
50
|
+
type: "boolean",
|
|
51
|
+
label: "Add Threading Token to Subject",
|
|
52
|
+
description: "The same as `Add Threading Token to Body`, but for the email subject.",
|
|
53
|
+
optional: true,
|
|
54
|
+
},
|
|
55
|
+
senderType: {
|
|
56
|
+
type: "string",
|
|
57
|
+
label: "Sender Type",
|
|
58
|
+
description: "Email address used as the email's **From** and **Reply-To** addresses. In scheduled flows, the only valid value is `OrgWideEmailAddress`.",
|
|
59
|
+
options: [
|
|
60
|
+
{
|
|
61
|
+
label: "CurrentUser - Email address of the user running the flow (default)",
|
|
62
|
+
value: "CurrentUser",
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
label: "DefaultWorkflowUser - Email address of the default workflow user",
|
|
66
|
+
value: "DefaultWorkflowUser",
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
label: "OrgWideEmailAddress - The organization-wide email address, specified in senderAddress",
|
|
70
|
+
value: "OrgWideEmailAddress",
|
|
71
|
+
},
|
|
72
|
+
],
|
|
73
|
+
default: "CurrentUser",
|
|
74
|
+
},
|
|
75
|
+
senderAddress: {
|
|
76
|
+
type: "string",
|
|
77
|
+
label: "Sender Address",
|
|
78
|
+
description: "If `Sender Type` is `OrgWideEmailAddress`, this is the organization-wide email address to be used as the sender.",
|
|
35
79
|
optional: true,
|
|
36
80
|
},
|
|
37
81
|
},
|
|
@@ -53,8 +97,12 @@ export default {
|
|
|
53
97
|
emailAddresses: this.emailAddress,
|
|
54
98
|
emailSubject: this.emailSubject,
|
|
55
99
|
emailBody: this.emailBody,
|
|
56
|
-
senderType:
|
|
100
|
+
senderType: this.senderType,
|
|
57
101
|
logEmailOnSend: this.logEmailOnSend,
|
|
102
|
+
relatedRecordId: this.relatedRecordId,
|
|
103
|
+
addThreadingTokenToBody: this.addThreadingTokenToBody,
|
|
104
|
+
addThreadingTokenToSubject: this.addThreadingTokenToSubject,
|
|
105
|
+
senderAddress: this.senderAddress,
|
|
58
106
|
},
|
|
59
107
|
],
|
|
60
108
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pipedream/salesforce_rest_api",
|
|
3
|
-
"version": "1.11.
|
|
3
|
+
"version": "1.11.2",
|
|
4
4
|
"description": "Pipedream Salesforce (REST API) Components",
|
|
5
5
|
"main": "salesforce_rest_api.app.mjs",
|
|
6
6
|
"keywords": [
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
"@pipedream/platform": "^3.1.1",
|
|
14
14
|
"fast-xml-parser": "^4.3.2",
|
|
15
15
|
"handlebars": "^4.7.7",
|
|
16
|
-
"lodash": "^4.17.
|
|
17
|
-
"lodash-es": "^4.17.
|
|
16
|
+
"lodash": "^4.17.23",
|
|
17
|
+
"lodash-es": "^4.17.23",
|
|
18
18
|
"salesforce-webhooks": "^1.1.11",
|
|
19
19
|
"uuid": "^9.0.1"
|
|
20
20
|
},
|