@pipedream/salesforce_rest_api 1.2.1 → 1.3.0
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/README.md +92 -0
- package/actions/add-contact-to-campaign/add-contact-to-campaign.mjs +25 -25
- package/actions/add-lead-to-campaign/add-lead-to-campaign.mjs +25 -24
- package/actions/common/base-create-update.mjs +108 -0
- package/actions/convert-soap-xml-to-json/convert-soap-xml-to-json.mjs +11 -3
- package/actions/create-account/create-account.mjs +33 -36
- package/actions/create-attachment/create-attachment.mjs +36 -50
- package/actions/create-campaign/create-campaign.mjs +41 -37
- package/actions/create-case/create-case.mjs +41 -37
- package/actions/create-casecomment/create-casecomment.mjs +26 -38
- package/actions/create-contact/create-contact.mjs +38 -35
- package/actions/create-event/create-event.mjs +57 -66
- package/actions/create-lead/create-lead.mjs +34 -42
- package/actions/create-note/create-note.mjs +24 -43
- package/actions/create-opportunity/create-opportunity.mjs +38 -47
- package/actions/create-record/create-record.mjs +49 -15
- package/actions/create-task/create-task.mjs +50 -42
- package/actions/create-user/create-user.mjs +33 -196
- package/actions/delete-opportunity/delete-opportunity.mjs +17 -13
- package/actions/delete-record/delete-record.mjs +18 -16
- package/actions/find-records/find-records.mjs +41 -26
- package/actions/insert-blob-data/insert-blob-data.mjs +3 -7
- package/actions/post-feed-to-chatter/post-feed-to-chatter.mjs +45 -20
- package/actions/search-string/search-string.mjs +22 -20
- package/actions/soql-search/soql-search.mjs +13 -8
- package/actions/sosl-search/sosl-search.mjs +19 -9
- package/actions/update-account/update-account.mjs +54 -41
- package/actions/update-contact/update-contact.mjs +59 -40
- package/actions/update-opportunity/update-opportunity.mjs +56 -54
- package/actions/update-record/update-record.mjs +67 -20
- package/common/all-sobjects.mjs +3812 -0
- package/common/constants-props.mjs +1539 -0
- package/common/props-async-options.mjs +154 -0
- package/common/props-utils.mjs +88 -31
- package/common/sobjects/account.mjs +349 -22
- package/common/sobjects/attachment.mjs +56 -17
- package/common/sobjects/campaign.mjs +125 -23
- package/common/sobjects/case.mjs +193 -13
- package/common/sobjects/caseComment.mjs +28 -4
- package/common/sobjects/contact.mjs +207 -43
- package/common/sobjects/event.mjs +218 -18
- package/common/sobjects/lead.mjs +245 -22
- package/common/sobjects/note.mjs +37 -14
- package/common/sobjects/opportunity.mjs +148 -22
- package/common/sobjects/task.mjs +240 -19
- package/common/sobjects/user.mjs +965 -0
- package/package.json +2 -2
- package/salesforce_rest_api.app.mjs +72 -249
- package/sources/common-webhook-methods.mjs +71 -0
- package/sources/common.mjs +85 -22
- package/sources/new-outbound-message/new-outbound-message.mjs +11 -3
- package/sources/new-record-instant/new-record-instant.mjs +77 -6
- package/sources/record-deleted-instant/record-deleted-instant.mjs +40 -5
- package/sources/record-updated-instant/record-updated-instant.mjs +137 -5
- package/actions/common/base.mjs +0 -18
- package/actions/find-create-record/find-create-record.mjs +0 -89
- package/actions/get-sobject-fields-values/get-sobject-fields-values.mjs +0 -57
- package/common/utils.mjs +0 -51
- package/sources/common-instant.mjs +0 -146
- package/sources/new-record/new-record.mjs +0 -91
- package/sources/record-deleted/record-deleted.mjs +0 -51
- package/sources/record-updated/record-updated.mjs +0 -94
- package/sources/updated-field-on-record/updated-field-on-record.mjs +0 -161
- package/sources/updated-field-on-record-instant/updated-field-on-record-instant.mjs +0 -76
|
@@ -1,22 +1,61 @@
|
|
|
1
|
+
import salesforce from "../../salesforce_rest_api.app.mjs";
|
|
2
|
+
|
|
1
3
|
export default {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
createProps: {
|
|
5
|
+
Name: {
|
|
6
|
+
type: "string",
|
|
7
|
+
label: "File Name",
|
|
8
|
+
description: "Name of the attached file. Max 255 characters.",
|
|
9
|
+
},
|
|
10
|
+
filePathOrContent: {
|
|
11
|
+
type: "string",
|
|
12
|
+
label: "File Path or Content",
|
|
13
|
+
description: "The path to a file in the `tmp` folder [(see the documentation)](https://pipedream.com/docs/code/nodejs/working-with-files). Alternatively, you can provide the base64-encoded file data.",
|
|
14
|
+
},
|
|
15
|
+
ContentType: {
|
|
16
|
+
type: "string",
|
|
17
|
+
label: "Content Type",
|
|
18
|
+
description: "The content type (MIME type) of the attachment. For example, `image/png`.",
|
|
19
|
+
},
|
|
20
|
+
ParentId: {
|
|
21
|
+
type: "string",
|
|
22
|
+
label: "Parent ID",
|
|
23
|
+
description: "ID of the parent object of the attachment. [See the documentation](https://developer.salesforce.com/docs/atlas.en-us.228.0.object_reference.meta/object_reference/sforce_api_objects_attachment.htm) for supported objects.",
|
|
24
|
+
},
|
|
6
25
|
},
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
26
|
+
updateProps: {
|
|
27
|
+
IsPartnerShared: {
|
|
28
|
+
type: "boolean",
|
|
29
|
+
label: "Is Shared With Partner",
|
|
30
|
+
description: "Whether this record is shared with a connection using Salesforce to Salesforce.",
|
|
31
|
+
optional: true,
|
|
32
|
+
},
|
|
11
33
|
},
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
34
|
+
initialProps: {
|
|
35
|
+
Description: {
|
|
36
|
+
type: "string",
|
|
37
|
+
label: "Description",
|
|
38
|
+
description: "Description of the attachment. Max 500 characters.",
|
|
39
|
+
optional: true,
|
|
40
|
+
},
|
|
41
|
+
IsPrivate: {
|
|
42
|
+
type: "boolean",
|
|
43
|
+
label: "Private",
|
|
44
|
+
description: "Whether this record is viewable only by the owner and administrators (true) or viewable by all otherwise-allowed users (false).",
|
|
45
|
+
optional: true,
|
|
46
|
+
},
|
|
47
|
+
OwnerId: {
|
|
48
|
+
propDefinition: [
|
|
49
|
+
salesforce,
|
|
50
|
+
"recordId",
|
|
51
|
+
() => ({
|
|
52
|
+
objType: "User",
|
|
53
|
+
nameField: "Name",
|
|
54
|
+
}),
|
|
55
|
+
],
|
|
56
|
+
label: "Owner ID",
|
|
57
|
+
description: "ID of the user who owns the attachment.",
|
|
58
|
+
optional: true,
|
|
59
|
+
},
|
|
21
60
|
},
|
|
22
61
|
};
|
|
@@ -1,27 +1,129 @@
|
|
|
1
|
+
import commonProps from "../props-async-options.mjs";
|
|
2
|
+
|
|
1
3
|
export default {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
initialProps: {
|
|
5
|
+
Name: {
|
|
6
|
+
type: "string",
|
|
7
|
+
label: "Name",
|
|
8
|
+
description: "Name of the campaign. Max 80 characters.",
|
|
9
|
+
},
|
|
10
|
+
Description: {
|
|
11
|
+
type: "string",
|
|
12
|
+
label: "Description",
|
|
13
|
+
description:
|
|
14
|
+
"Description of the campaign. Limit: 32 KB. Only the first 255 characters display in reports.",
|
|
15
|
+
optional: true,
|
|
16
|
+
},
|
|
17
|
+
Status: {
|
|
18
|
+
type: "string",
|
|
19
|
+
label: "Status",
|
|
20
|
+
description: "Status of the campaign. Max 40 characters.",
|
|
21
|
+
optional: true,
|
|
22
|
+
options: [
|
|
23
|
+
"Planned",
|
|
24
|
+
"In Progress",
|
|
25
|
+
"Completed",
|
|
26
|
+
"Aborted",
|
|
27
|
+
],
|
|
28
|
+
},
|
|
29
|
+
Type: {
|
|
30
|
+
type: "string",
|
|
31
|
+
label: "Type",
|
|
32
|
+
description: "Type of campaign. Max 40 characters.",
|
|
33
|
+
optional: true,
|
|
34
|
+
options: [
|
|
35
|
+
"Conference",
|
|
36
|
+
"Webinar",
|
|
37
|
+
"Trade Show",
|
|
38
|
+
"Public Relations",
|
|
39
|
+
"Partners",
|
|
40
|
+
"Referral Program",
|
|
41
|
+
"Advertisement",
|
|
42
|
+
"Banner Ads",
|
|
43
|
+
"Direct Mail",
|
|
44
|
+
"Email",
|
|
45
|
+
"Telemarketing",
|
|
46
|
+
"Other",
|
|
47
|
+
],
|
|
48
|
+
},
|
|
6
49
|
},
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
50
|
+
extraProps: {
|
|
51
|
+
OwnerId: {
|
|
52
|
+
...commonProps.UserId,
|
|
53
|
+
label: "Owner ID",
|
|
54
|
+
description: "The ID of the user who owns this campaign (defaults to the user logged in).",
|
|
55
|
+
optional: true,
|
|
56
|
+
},
|
|
57
|
+
ParentCampaign: {
|
|
58
|
+
...commonProps.CampaignId,
|
|
59
|
+
label: "Parent Campaign ID",
|
|
60
|
+
description: "The campaign above this one in the campaign hierarchy.",
|
|
61
|
+
optional: true,
|
|
62
|
+
},
|
|
63
|
+
RecordTypeId: {
|
|
64
|
+
...commonProps.RecordTypeId,
|
|
65
|
+
optional: true,
|
|
66
|
+
},
|
|
67
|
+
StartDate: {
|
|
68
|
+
type: "string",
|
|
69
|
+
label: "Start Date",
|
|
70
|
+
description: "Starting date for the campaign.",
|
|
71
|
+
optional: true,
|
|
72
|
+
},
|
|
73
|
+
EndDate: {
|
|
74
|
+
type: "string",
|
|
75
|
+
label: "End Date",
|
|
76
|
+
description: "Ending date for the campaign. Responses received after this date are still counted.",
|
|
77
|
+
optional: true,
|
|
78
|
+
},
|
|
79
|
+
ActualCost: {
|
|
80
|
+
type: "string",
|
|
81
|
+
label: "Actual Cost",
|
|
82
|
+
description: "Amount of money spent to run the campaign.",
|
|
83
|
+
optional: true,
|
|
84
|
+
},
|
|
85
|
+
BudgetedCost: {
|
|
86
|
+
type: "string",
|
|
87
|
+
label: "Budgeted Cost",
|
|
88
|
+
description: "Amount of money budgeted for the campaign.",
|
|
89
|
+
optional: true,
|
|
90
|
+
},
|
|
91
|
+
CampaignImageId: {
|
|
92
|
+
type: "string",
|
|
93
|
+
label: "Campaign Image ID",
|
|
94
|
+
description: "ID of the campaign image.",
|
|
95
|
+
optional: true,
|
|
96
|
+
},
|
|
97
|
+
CurrencyIsoCode: {
|
|
98
|
+
type: "string",
|
|
99
|
+
label: "Currency ISO Code",
|
|
100
|
+
description:
|
|
101
|
+
"Available only for organizations with the multicurrency feature enabled. Contains the ISO code for any currency allowed by the organization.",
|
|
102
|
+
optional: true,
|
|
103
|
+
},
|
|
104
|
+
ExpectedResponse: {
|
|
105
|
+
type: "string",
|
|
106
|
+
label: "Expected Response (%)",
|
|
107
|
+
description: "Percentage of responses you expect to receive for the campaign.",
|
|
108
|
+
optional: true,
|
|
109
|
+
},
|
|
110
|
+
ExpectedRevenue: {
|
|
111
|
+
type: "string",
|
|
112
|
+
label: "Expected Revenue",
|
|
113
|
+
description: "Amount of money you expect to generate from the campaign.",
|
|
114
|
+
optional: true,
|
|
115
|
+
},
|
|
116
|
+
IsActive: {
|
|
117
|
+
type: "boolean",
|
|
118
|
+
label: "Active",
|
|
119
|
+
description: "Indicates whether this campaign is active (default is `false`).",
|
|
120
|
+
optional: true,
|
|
121
|
+
},
|
|
122
|
+
NumberSent: {
|
|
123
|
+
type: "integer",
|
|
124
|
+
label: "Number Sent",
|
|
125
|
+
description: "Number of individuals targeted by the campaign. For example, the number of emails sent.",
|
|
126
|
+
optional: true,
|
|
127
|
+
},
|
|
26
128
|
},
|
|
27
129
|
};
|
package/common/sobjects/case.mjs
CHANGED
|
@@ -1,17 +1,197 @@
|
|
|
1
|
+
import commonProps from "../props-async-options.mjs";
|
|
2
|
+
import salesforce from "../../salesforce_rest_api.app.mjs";
|
|
3
|
+
|
|
1
4
|
export default {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
5
|
+
initialProps: {
|
|
6
|
+
Description: {
|
|
7
|
+
type: "string",
|
|
8
|
+
label: "Description",
|
|
9
|
+
description: "A text description of the case. Limit: 32 KB.",
|
|
10
|
+
optional: true,
|
|
11
|
+
},
|
|
12
|
+
Status: {
|
|
13
|
+
type: "string",
|
|
14
|
+
label: "Status",
|
|
15
|
+
description: "The status of the case.",
|
|
16
|
+
optional: true,
|
|
17
|
+
options: [
|
|
18
|
+
"New",
|
|
19
|
+
"Working",
|
|
20
|
+
"Escalated",
|
|
21
|
+
"Closed",
|
|
22
|
+
],
|
|
23
|
+
},
|
|
24
|
+
SuppliedEmail: {
|
|
25
|
+
type: "string",
|
|
26
|
+
label: "Email",
|
|
27
|
+
description: "The email address associated with the case.",
|
|
28
|
+
optional: true,
|
|
29
|
+
},
|
|
30
|
+
SuppliedName: {
|
|
31
|
+
type: "string",
|
|
32
|
+
label: "Name",
|
|
33
|
+
description: "The name of the case.",
|
|
34
|
+
optional: true,
|
|
35
|
+
},
|
|
6
36
|
},
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
37
|
+
extraProps: {
|
|
38
|
+
AccountId: {
|
|
39
|
+
...commonProps.AccountId,
|
|
40
|
+
description: "ID of the Account associated with this case.",
|
|
41
|
+
optional: true,
|
|
42
|
+
},
|
|
43
|
+
BusinessHoursId: {
|
|
44
|
+
...commonProps.BusinessHoursId,
|
|
45
|
+
description: "ID of the Business Hours associated with this case.",
|
|
46
|
+
optional: true,
|
|
47
|
+
},
|
|
48
|
+
CommunityId: {
|
|
49
|
+
...commonProps.CommunityId,
|
|
50
|
+
description:
|
|
51
|
+
"ID of the [Community (Zone)](https://developer.salesforce.com/docs/atlas.en-us.228.0.object_reference.meta/object_reference/sforce_api_objects_community.htm) associated with this case.",
|
|
52
|
+
optional: true,
|
|
53
|
+
},
|
|
54
|
+
ContactId: {
|
|
55
|
+
...commonProps.ContactId,
|
|
56
|
+
description: "ID of the Contact associated with this case.",
|
|
57
|
+
optional: true,
|
|
58
|
+
},
|
|
59
|
+
FeedItemId: {
|
|
60
|
+
...commonProps.FeedItemId,
|
|
61
|
+
description: "ID of the question in Chatter associated with the case.",
|
|
62
|
+
optional: true,
|
|
63
|
+
},
|
|
64
|
+
OwnerId: {
|
|
65
|
+
...commonProps.UserId,
|
|
66
|
+
description: "ID of the user who owns the case.",
|
|
67
|
+
optional: true,
|
|
68
|
+
},
|
|
69
|
+
ParentId: {
|
|
70
|
+
...commonProps.CaseId,
|
|
71
|
+
description: "The ID of the parent case in the hierarchy.",
|
|
72
|
+
optional: true,
|
|
73
|
+
},
|
|
74
|
+
QuestionId: {
|
|
75
|
+
...commonProps.QuestionId,
|
|
76
|
+
description:
|
|
77
|
+
"The question in the answers community that is associated with the case.",
|
|
78
|
+
optional: true,
|
|
79
|
+
},
|
|
80
|
+
RecordTypeId: {
|
|
81
|
+
...commonProps.RecordTypeId,
|
|
82
|
+
optional: true,
|
|
83
|
+
},
|
|
84
|
+
ServiceContractId: {
|
|
85
|
+
propDefinition: [
|
|
86
|
+
salesforce,
|
|
87
|
+
"recordId",
|
|
88
|
+
() => ({
|
|
89
|
+
objType: "ServiceContract",
|
|
90
|
+
nameField: "Name",
|
|
91
|
+
}),
|
|
92
|
+
],
|
|
93
|
+
label: "Service Contract ID",
|
|
94
|
+
description: "ID of the ServiceContract associated with the entitlement.",
|
|
95
|
+
},
|
|
96
|
+
IsEscalated: {
|
|
97
|
+
type: "boolean",
|
|
98
|
+
label: "Escalated",
|
|
99
|
+
description:
|
|
100
|
+
"Indicates whether the case has been escalated. A case's escalated state does not affect how you can use a case, or whether you can query, delete, or update it.",
|
|
101
|
+
optional: true,
|
|
102
|
+
},
|
|
103
|
+
IsStopped: {
|
|
104
|
+
type: "boolean",
|
|
105
|
+
label: "Is Stopped",
|
|
106
|
+
description:
|
|
107
|
+
"Indicates whether an entitlement process on a case is stopped.",
|
|
108
|
+
optional: true,
|
|
109
|
+
},
|
|
110
|
+
Language: {
|
|
111
|
+
type: "string",
|
|
112
|
+
label: "Language",
|
|
113
|
+
description: "The language of the case.",
|
|
114
|
+
optional: true,
|
|
115
|
+
},
|
|
116
|
+
Origin: {
|
|
117
|
+
type: "string",
|
|
118
|
+
label: "Case Origin",
|
|
119
|
+
description: "The source of the case.",
|
|
120
|
+
optional: true,
|
|
121
|
+
options: [
|
|
122
|
+
"Phone",
|
|
123
|
+
"Email",
|
|
124
|
+
"Web",
|
|
125
|
+
],
|
|
126
|
+
},
|
|
127
|
+
Priority: {
|
|
128
|
+
type: "string",
|
|
129
|
+
label: "Priority",
|
|
130
|
+
description: "The importance or urgency of the case.",
|
|
131
|
+
optional: true,
|
|
132
|
+
options: [
|
|
133
|
+
"High",
|
|
134
|
+
"Medium",
|
|
135
|
+
"Low",
|
|
136
|
+
],
|
|
137
|
+
},
|
|
138
|
+
Reason: {
|
|
139
|
+
type: "string",
|
|
140
|
+
label: "Reason",
|
|
141
|
+
description: "The reason why the case was created.",
|
|
142
|
+
optional: true,
|
|
143
|
+
options: [
|
|
144
|
+
"Installation",
|
|
145
|
+
"Equipment Complexity",
|
|
146
|
+
"Performance",
|
|
147
|
+
"Breakdown",
|
|
148
|
+
"Equipment Design",
|
|
149
|
+
"Feedback",
|
|
150
|
+
"Other",
|
|
151
|
+
],
|
|
152
|
+
},
|
|
153
|
+
SlaStartDate: {
|
|
154
|
+
type: "string",
|
|
155
|
+
label: "SLA Start Date",
|
|
156
|
+
description: "The time that the case entered an entitlement process.",
|
|
157
|
+
optional: true,
|
|
158
|
+
},
|
|
159
|
+
SourceId: {
|
|
160
|
+
type: "string",
|
|
161
|
+
label: "Source ID",
|
|
162
|
+
description: "The ID of the social post source.",
|
|
163
|
+
optional: true,
|
|
164
|
+
},
|
|
165
|
+
Subject: {
|
|
166
|
+
type: "string",
|
|
167
|
+
label: "Subject",
|
|
168
|
+
description: "The subject of the case. Max 255 characters.",
|
|
169
|
+
optional: true,
|
|
170
|
+
},
|
|
171
|
+
SuppliedCompany: {
|
|
172
|
+
type: "string",
|
|
173
|
+
label: "Company",
|
|
174
|
+
description: "The company name that was entered when the case was created.",
|
|
175
|
+
optional: true,
|
|
176
|
+
},
|
|
177
|
+
SuppliedPhone: {
|
|
178
|
+
type: "string",
|
|
179
|
+
label: "Phone",
|
|
180
|
+
description: "The phone number that was entered when the case was created.",
|
|
181
|
+
optional: true,
|
|
182
|
+
},
|
|
183
|
+
Type: {
|
|
184
|
+
type: "string",
|
|
185
|
+
label: "Type",
|
|
186
|
+
description: "The type of case.",
|
|
187
|
+
optional: true,
|
|
188
|
+
options: [
|
|
189
|
+
"Mechanical",
|
|
190
|
+
"Electrical",
|
|
191
|
+
"Electronic",
|
|
192
|
+
"Structural",
|
|
193
|
+
"Other",
|
|
194
|
+
],
|
|
195
|
+
},
|
|
16
196
|
},
|
|
17
197
|
};
|
|
@@ -1,7 +1,31 @@
|
|
|
1
|
+
import salesforce from "../../salesforce_rest_api.app.mjs";
|
|
2
|
+
|
|
1
3
|
export default {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
initialProps: {
|
|
5
|
+
CommentBody: {
|
|
6
|
+
type: "string",
|
|
7
|
+
label: "Body",
|
|
8
|
+
description: "Text of the CaseComment. Max size is 4,000 bytes.",
|
|
9
|
+
optional: true,
|
|
10
|
+
},
|
|
11
|
+
ParentId: {
|
|
12
|
+
propDefinition: [
|
|
13
|
+
salesforce,
|
|
14
|
+
"recordId",
|
|
15
|
+
() => ({
|
|
16
|
+
objType: "Case",
|
|
17
|
+
nameField: "CaseNumber",
|
|
18
|
+
}),
|
|
19
|
+
],
|
|
20
|
+
label: "Parent Case ID",
|
|
21
|
+
description: "ID of the parent Case.",
|
|
22
|
+
},
|
|
23
|
+
IsPublished: {
|
|
24
|
+
type: "boolean",
|
|
25
|
+
label: "Is Published",
|
|
26
|
+
description:
|
|
27
|
+
"Indicates whether the CaseComment is visible to customers in the Self-Service portal.",
|
|
28
|
+
optional: true,
|
|
29
|
+
},
|
|
6
30
|
},
|
|
7
31
|
};
|