@pipedream/salesforce_rest_api 1.2.1 → 1.3.1

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.
Files changed (64) hide show
  1. package/README.md +92 -0
  2. package/actions/add-contact-to-campaign/add-contact-to-campaign.mjs +25 -25
  3. package/actions/add-lead-to-campaign/add-lead-to-campaign.mjs +25 -24
  4. package/actions/common/base-create-update.mjs +108 -0
  5. package/actions/convert-soap-xml-to-json/convert-soap-xml-to-json.mjs +11 -3
  6. package/actions/create-account/create-account.mjs +33 -36
  7. package/actions/create-attachment/create-attachment.mjs +36 -50
  8. package/actions/create-campaign/create-campaign.mjs +41 -37
  9. package/actions/create-case/create-case.mjs +41 -37
  10. package/actions/create-casecomment/create-casecomment.mjs +26 -38
  11. package/actions/create-contact/create-contact.mjs +38 -35
  12. package/actions/create-event/create-event.mjs +57 -66
  13. package/actions/create-lead/create-lead.mjs +34 -42
  14. package/actions/create-note/create-note.mjs +24 -43
  15. package/actions/create-opportunity/create-opportunity.mjs +38 -47
  16. package/actions/create-record/create-record.mjs +49 -15
  17. package/actions/create-task/create-task.mjs +50 -42
  18. package/actions/create-user/create-user.mjs +33 -196
  19. package/actions/delete-opportunity/delete-opportunity.mjs +17 -13
  20. package/actions/delete-record/delete-record.mjs +18 -16
  21. package/actions/find-records/find-records.mjs +41 -26
  22. package/actions/insert-blob-data/insert-blob-data.mjs +3 -7
  23. package/actions/post-feed-to-chatter/post-feed-to-chatter.mjs +45 -20
  24. package/actions/search-string/search-string.mjs +22 -20
  25. package/actions/soql-search/soql-search.mjs +13 -8
  26. package/actions/sosl-search/sosl-search.mjs +19 -9
  27. package/actions/update-account/update-account.mjs +54 -41
  28. package/actions/update-contact/update-contact.mjs +59 -40
  29. package/actions/update-opportunity/update-opportunity.mjs +56 -54
  30. package/actions/update-record/update-record.mjs +67 -20
  31. package/common/all-sobjects.mjs +3812 -0
  32. package/common/constants-props.mjs +1539 -0
  33. package/common/props-async-options.mjs +154 -0
  34. package/common/props-utils.mjs +88 -31
  35. package/common/sobjects/account.mjs +349 -22
  36. package/common/sobjects/attachment.mjs +56 -17
  37. package/common/sobjects/campaign.mjs +125 -23
  38. package/common/sobjects/case.mjs +193 -13
  39. package/common/sobjects/caseComment.mjs +28 -4
  40. package/common/sobjects/contact.mjs +207 -43
  41. package/common/sobjects/event.mjs +218 -18
  42. package/common/sobjects/lead.mjs +245 -22
  43. package/common/sobjects/note.mjs +37 -14
  44. package/common/sobjects/opportunity.mjs +148 -22
  45. package/common/sobjects/task.mjs +240 -19
  46. package/common/sobjects/user.mjs +965 -0
  47. package/package.json +2 -2
  48. package/salesforce_rest_api.app.mjs +72 -249
  49. package/sources/common-webhook-methods.mjs +71 -0
  50. package/sources/common.mjs +85 -22
  51. package/sources/new-outbound-message/new-outbound-message.mjs +11 -3
  52. package/sources/new-record-instant/new-record-instant.mjs +95 -7
  53. package/sources/record-deleted-instant/record-deleted-instant.mjs +40 -5
  54. package/sources/record-updated-instant/record-updated-instant.mjs +137 -5
  55. package/actions/common/base.mjs +0 -18
  56. package/actions/find-create-record/find-create-record.mjs +0 -89
  57. package/actions/get-sobject-fields-values/get-sobject-fields-values.mjs +0 -57
  58. package/common/utils.mjs +0 -51
  59. package/sources/common-instant.mjs +0 -146
  60. package/sources/new-record/new-record.mjs +0 -91
  61. package/sources/record-deleted/record-deleted.mjs +0 -51
  62. package/sources/record-updated/record-updated.mjs +0 -94
  63. package/sources/updated-field-on-record/updated-field-on-record.mjs +0 -161
  64. 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
- ContentType: {
3
- type: "string",
4
- label: "Content Type",
5
- description: "The content type of the attachment. If the Don't allow HTML uploads as attachments or document records security setting is enabled for your organization, you cannot upload files with the following file extensions: .htm, .html, .htt, .htx, .mhtm, .mhtml, .shtm, .shtml, .acgi, .svg. When you insert a document or attachment through the API, make sure that this field is set to the appropriate MIME type.",
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
- Description: {
8
- type: "string",
9
- label: "Description",
10
- description: "Description of the attachment. Maximum size is 500 characters. This field is available in API version 18.0 and later.",
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
- IsPrivate: {
13
- type: "boolean",
14
- label: "Is Private?",
15
- description: "Indicates whether this record is viewable only by the owner and administrators (true) or viewable by all otherwise-allowed users (false). During a create or update call, it is possible to mark an Attachment record as private even if you are not the owner. This can result in a situation in which you can no longer access the record that you just inserted or updated. Label is Private.Attachments on tasks or events can't be marked private.",
16
- },
17
- OwnerId: {
18
- type: "string",
19
- label: "Owner ID",
20
- description: "ID of the User who owns the attachment. This field was required previous to release 9.0. Beginning with release 9.0, it can be null on create. The owner of an attachment on a task or event must be the same as the owner of the task or event.",
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
- ActualCost: {
3
- type: "string",
4
- label: "Actual Cost",
5
- description: "Amount of money spent to run the campaign.",
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
- BudgetedCost: {
8
- type: "string",
9
- label: "Budgeted Cost",
10
- description: "Amount of money budgeted for the campaign.",
11
- },
12
- CampaignImageId: {
13
- type: "string",
14
- label: "Campaign Image ID",
15
- description: "ID of the campaign image. Available in API version 42.0 and later.",
16
- },
17
- CampaignMemberRecordTypeId: {
18
- type: "string",
19
- label: "Campaign Member Record Type ID",
20
- description: "The record type ID for CampaignMember records associated with the campaign.",
21
- },
22
- Description: {
23
- type: "string",
24
- label: "Description",
25
- description: "Description of the campaign. Limit: 32 KB. Only the first 255 characters display in reports.",
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
  };
@@ -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
- AccountId: {
3
- type: "string",
4
- label: "Account ID",
5
- description: "ID of the account associated with this case.",
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
- Description: {
8
- type: "string",
9
- label: "Description",
10
- description: "A text description of the case. Limit: 32 KB.",
11
- },
12
- IsEscalated: {
13
- type: "boolean",
14
- label: "Is Escalated?",
15
- description: "Indicates whether the case has been escalated (true) or not. A case's escalated state does not affect how you can use a case, or whether you can query, delete, or update it. You can set this flag via the API. Label is Escalated.",
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
- CommentBody: {
3
- type: "string",
4
- label: "Comment Body",
5
- description: "Text of the CaseComment. The maximum size of the comment body is 4,000 bytes. Label is Body.",
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
  };