@pipedream/salesforce_rest_api 0.3.3 → 0.4.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.
Files changed (73) hide show
  1. package/actions/create-account/create-account.mjs +51 -0
  2. package/actions/create-attachment/create-attachment.mjs +62 -0
  3. package/actions/create-campaign/create-campaign.mjs +51 -0
  4. package/actions/create-case/create-case.mjs +50 -0
  5. package/actions/create-casecomment/create-casecomment.mjs +50 -0
  6. package/actions/create-contact/create-contact.mjs +50 -0
  7. package/actions/create-event/create-event.mjs +80 -0
  8. package/actions/create-lead/create-lead.mjs +56 -0
  9. package/actions/create-note/create-note.mjs +56 -0
  10. package/actions/create-opportunity/create-opportunity.mjs +62 -0
  11. package/actions/create-record/create-record.mjs +36 -0
  12. package/actions/create-task/create-task.mjs +56 -0
  13. package/actions/delete-opportunity/delete-opportunity.mjs +30 -0
  14. package/actions/delete-record/delete-record.mjs +37 -0
  15. package/actions/find-create-record/find-create-record.mjs +84 -0
  16. package/actions/find-records/find-records.mjs +48 -0
  17. package/actions/get-sobject-fields-values/get-sobject-fields-values.mjs +57 -0
  18. package/actions/insert-blob-data/insert-blob-data.mjs +77 -0
  19. package/actions/soql-search/soql-search.mjs +29 -0
  20. package/actions/sosl-search/sosl-search.mjs +29 -0
  21. package/actions/update-account/update-account.mjs +59 -0
  22. package/actions/update-contact/update-contact.mjs +58 -0
  23. package/actions/update-opportunity/update-opportunity.mjs +72 -0
  24. package/actions/update-record/update-record.mjs +46 -0
  25. package/common/constants.mjs +30 -0
  26. package/common/sobjects/account.mjs +27 -0
  27. package/common/sobjects/attachment.mjs +22 -0
  28. package/common/sobjects/campaign.mjs +27 -0
  29. package/common/sobjects/case.mjs +17 -0
  30. package/common/sobjects/caseComment.mjs +7 -0
  31. package/common/sobjects/contact.mjs +52 -0
  32. package/common/sobjects/event.mjs +22 -0
  33. package/common/sobjects/lead.mjs +32 -0
  34. package/common/sobjects/note.mjs +17 -0
  35. package/common/sobjects/opportunity.mjs +27 -0
  36. package/common/sobjects/task.mjs +25 -0
  37. package/common/utils.mjs +51 -0
  38. package/package.json +6 -3
  39. package/salesforce_rest_api.app.mjs +349 -37
  40. package/sources/common-instant.mjs +15 -9
  41. package/sources/common.mjs +3 -5
  42. package/sources/new-object/new-object.mjs +1 -1
  43. package/sources/new-object-instant/new-object-instant.mjs +1 -1
  44. package/sources/new-outbound-message/new-outbound-message.mjs +1 -1
  45. package/sources/object-deleted/object-deleted.mjs +2 -2
  46. package/sources/object-deleted-instant/object-deleted-instant.mjs +2 -2
  47. package/sources/object-updated/object-updated.mjs +2 -2
  48. package/sources/object-updated-instant/object-updated-instant.mjs +2 -2
  49. package/sources/updated-field-on-record/updated-field-on-record.mjs +2 -2
  50. package/sources/updated-field-on-record-instant/updated-field-on-record-instant.mjs +2 -2
  51. package/actions/salesforce-create-account/salesforce-create-account.mjs +0 -374
  52. package/actions/salesforce-create-attachment/salesforce-create-attachment.mjs +0 -73
  53. package/actions/salesforce-create-campaign/salesforce-create-campaign.mjs +0 -148
  54. package/actions/salesforce-create-case/salesforce-create-case.mjs +0 -179
  55. package/actions/salesforce-create-casecomment/salesforce-create-casecomment.mjs +0 -58
  56. package/actions/salesforce-create-contact/salesforce-create-contact.mjs +0 -340
  57. package/actions/salesforce-create-event/salesforce-create-event.mjs +0 -232
  58. package/actions/salesforce-create-lead/salesforce-create-lead.mjs +0 -267
  59. package/actions/salesforce-create-note/salesforce-create-note.mjs +0 -63
  60. package/actions/salesforce-create-opportunity/salesforce-create-opportunity.mjs +0 -170
  61. package/actions/salesforce-create-record/salesforce-create-record.mjs +0 -36
  62. package/actions/salesforce-create-task/salesforce-create-task.mjs +0 -219
  63. package/actions/salesforce-delete-opportunity/salesforce-delete-opportunity.mjs +0 -37
  64. package/actions/salesforce-get-sobject-fields-values/salesforce-get-sobject-fields-values.mjs +0 -37
  65. package/actions/salesforce-insert-blob-data/salesforce-insert-blob-data.mjs +0 -70
  66. package/actions/salesforce-make-api-call/salesforce-make-api-call.mjs +0 -56
  67. package/actions/salesforce-soql-search/salesforce-soql-search.mjs +0 -29
  68. package/actions/salesforce-sosl-search/salesforce-sosl-search.mjs +0 -30
  69. package/actions/salesforce-update-account/salesforce-update-account.mjs +0 -357
  70. package/actions/salesforce-update-contact/salesforce-update-contact.mjs +0 -345
  71. package/actions/salesforce-update-opportunity/salesforce-update-opportunity.mjs +0 -171
  72. package/actions/salesforce-update-record/salesforce-update-record.mjs +0 -40
  73. package/utils.mjs +0 -27
@@ -1,179 +0,0 @@
1
- // legacy_hash_id: a_WYiE7G
2
- import { axios } from "@pipedream/platform";
3
-
4
- export default {
5
- key: "salesforce_rest_api-salesforce-create-case",
6
- name: "Create Case",
7
- description: "Creates a Salesforce case, which represents a customer issue or problem.",
8
- version: "0.2.1",
9
- type: "action",
10
- props: {
11
- salesforce_rest_api: {
12
- type: "app",
13
- app: "salesforce_rest_api",
14
- },
15
- SuppliedEmail: {
16
- type: "string",
17
- description: "The email address that was entered when the case was created. Label is Email.If your organization has an active auto-response rule, SuppliedEmail is required when creating a case via the API. Auto-response rules use the email in the contact specified by ContactId. If no email address is in the contact record, the email specified here is used.",
18
- optional: true,
19
- },
20
- AccountId: {
21
- type: "string",
22
- description: "ID of the account associated with this case.",
23
- optional: true,
24
- },
25
- BusinessHoursId: {
26
- type: "string",
27
- description: "ID of the business hours associated with this case.",
28
- optional: true,
29
- },
30
- ContactId: {
31
- type: "string",
32
- description: "ID of the associated Contact.",
33
- optional: true,
34
- },
35
- CommunityId: {
36
- type: "string",
37
- description: "ID of the Community (Zone) associated with this case.",
38
- optional: true,
39
- },
40
- Description: {
41
- type: "string",
42
- description: "A text description of the case. Limit: 32 KB.",
43
- optional: true,
44
- },
45
- FeedItemId: {
46
- type: "string",
47
- description: "ID of the question in Chatter associated with the case. This field is available in API version 33.0 and later, and is only accessible in organizations where Question-to-Case is enabled.",
48
- optional: true,
49
- },
50
- IsEscalated: {
51
- type: "boolean",
52
- 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.",
53
- optional: true,
54
- },
55
- Language: {
56
- type: "string",
57
- description: "The language of the case. This field is available in all Enterprise, Performance, and Unlimited orgs with the Service Cloud. Out of the box, it's used only by Einstein Case Classification.",
58
- optional: true,
59
- },
60
- Origin: {
61
- type: "string",
62
- description: "The source of the case, such as Email, Phone, or Web. Label is Case Origin.",
63
- optional: true,
64
- },
65
- OwnerId: {
66
- type: "string",
67
- description: "ID of the contact who owns the case.",
68
- optional: true,
69
- },
70
- ParentId: {
71
- type: "string",
72
- description: "The ID of the parent case in the hierarchy. The label is Parent Case.",
73
- optional: true,
74
- },
75
- Priority: {
76
- type: "string",
77
- description: "The importance or urgency of the case, such as High, Medium, or Low.",
78
- optional: true,
79
- },
80
- QuestionId: {
81
- type: "string",
82
- description: "The question in the answers community that is associated with the case. This field does not appear if you don't have an answers community enabled.",
83
- optional: true,
84
- },
85
- Reason: {
86
- type: "string",
87
- description: "The reason why the case was created, such as Instructions not clear, or User didn't attend training.",
88
- optional: true,
89
- },
90
- RecordTypeId: {
91
- type: "string",
92
- description: "ID of the record type assigned to this object.",
93
- optional: true,
94
- },
95
- SlaStartDate: {
96
- type: "string",
97
- description: "Shows the time that the case entered an entitlement process. If you have the “Edit” permission on cases, you can update or reset the time if you have the “Edit” permission on cases.",
98
- optional: true,
99
- },
100
- SourceId: {
101
- type: "string",
102
- description: "The ID of the social post source.",
103
- optional: true,
104
- },
105
- Status: {
106
- type: "string",
107
- description: "The status of the case, such as “New,” “Closed,” or “Escalated.” This field directly controls the IsClosed flag. Each predefined Status value implies an IsClosed flag value. For more information, see CaseStatus.",
108
- optional: true,
109
- },
110
- Subject: {
111
- type: "string",
112
- description: "The subject of the case. Limit: 255 characters.",
113
- optional: true,
114
- },
115
- SuppliedCompany: {
116
- type: "string",
117
- description: "The company name that was entered when the case was created. Label is Company.",
118
- optional: true,
119
- },
120
- SuppliedName: {
121
- type: "string",
122
- description: "The name that was entered when the case was created. Label is Name.",
123
- optional: true,
124
- },
125
- SuppliedPhone: {
126
- type: "string",
127
- description: "The phone number that was entered when the case was created. Label is Phone.",
128
- optional: true,
129
- },
130
- Type: {
131
- type: "string",
132
- description: "The type of case, such as Feature Request or Question.",
133
- optional: true,
134
- },
135
- },
136
- async run({ $ }) {
137
- // See the API docs here: https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_sobject_create.htm
138
- // Case object: https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_case.htm
139
-
140
- if (!this.SuppliedEmail) {
141
- throw new Error("Must provide SuppliedEmail parameter.");
142
- }
143
-
144
- return await axios($, {
145
- "method": "post",
146
- "url": `${this.salesforce_rest_api.$auth.instance_url}/services/data/v20.0/sobjects/Case/`,
147
- "Content-Type": "application/json",
148
- "headers": {
149
- Authorization: `Bearer ${this.salesforce_rest_api.$auth.oauth_access_token}`,
150
- },
151
- "data": {
152
- AccountId: this.AccountId,
153
- BusinessHoursId: this.BusinessHoursId,
154
- ContactId: this.ContactId,
155
- CommunityId: this.CommunityId,
156
- Description: this.Description,
157
- FeedItemId: this.FeedItemId,
158
- IsEscalated: this.IsEscalated,
159
- Language: this.Language,
160
- Origin: this.Origin,
161
- OwnerId: this.OwnerId,
162
- ParentId: this.ParentId,
163
- Priority: this.Priority,
164
- QuestionId: this.QuestionId,
165
- Reason: this.Reason,
166
- RecordTypeId: this.RecordTypeId,
167
- SlaStartDate: this.SlaStartDate,
168
- SourceId: this.SourceId,
169
- Status: this.Status,
170
- Subject: this.Subject,
171
- SuppliedCompany: this.SuppliedCompany,
172
- SuppliedEmail: this.SuppliedEmail,
173
- SuppliedName: this.SuppliedName,
174
- SuppliedPhone: this.SuppliedPhone,
175
- Type: this.Type,
176
- },
177
- });
178
- },
179
- };
@@ -1,58 +0,0 @@
1
- // legacy_hash_id: a_wdiBxG
2
- import { axios } from "@pipedream/platform";
3
-
4
- export default {
5
- key: "salesforce_rest_api-salesforce-create-casecomment",
6
- name: "Create CaseComment",
7
- description: "Creates a CaseComment that provides additional information about the associated Case.",
8
- version: "0.2.1",
9
- type: "action",
10
- props: {
11
- salesforce_rest_api: {
12
- type: "app",
13
- app: "salesforce_rest_api",
14
- },
15
- ParentId: {
16
- type: "string",
17
- description: "Required. ID of the parent Case of the CaseComment.",
18
- },
19
- CommentBody: {
20
- type: "string",
21
- description: "Text of the CaseComment. The maximum size of the comment body is 4,000 bytes. Label is Body.",
22
- optional: true,
23
- },
24
- IsNotificationSelected: {
25
- type: "boolean",
26
- description: "Indicates whether an email notification is sent to the case contact when a CaseComment is created or updated. When this field is queried, it always returns null. This field is available only when the Enable Case Comment Notification to Contacts setting is enabled on the Support Settings page in Setup. To send email notifications for CaseComment, you must use the EmailHeader triggerUserEmail. Available in API version 43.0 and later.",
27
- optional: true,
28
- },
29
- IsPublished: {
30
- type: "boolean",
31
- description: "Indicates whether the CaseComment is visible to customers in the Self-Service portal (true) or not (false). Label is Published. This is the only CaseComment field that can be updated via the API.",
32
- optional: true,
33
- },
34
- },
35
- async run({ $ }) {
36
- // See the API docs here: https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_sobject_create.htm
37
- // CaseComment object: https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_casecomment.htm
38
-
39
- if (!this.ParentId) {
40
- throw new Error("Must provide ParentId parameter.");
41
- }
42
-
43
- return await axios($, {
44
- "method": "post",
45
- "url": `${this.salesforce_rest_api.$auth.instance_url}/services/data/v20.0/sobjects/CaseComment/`,
46
- "Content-Type": "application/json",
47
- "headers": {
48
- Authorization: `Bearer ${this.salesforce_rest_api.$auth.oauth_access_token}`,
49
- },
50
- "data": {
51
- CommentBody: this.CommentBody,
52
- IsNotificationSelected: this.IsNotificationSelected,
53
- IsPublished: this.IsPublished,
54
- ParentId: this.ParentId,
55
- },
56
- });
57
- },
58
- };
@@ -1,340 +0,0 @@
1
- // legacy_hash_id: a_k6iK7L
2
- import { axios } from "@pipedream/platform";
3
-
4
- export default {
5
- key: "salesforce_rest_api-salesforce-create-contact",
6
- name: "Create Contact",
7
- description: "Creates a Contact, which is a person associated with an account.",
8
- version: "0.2.1",
9
- type: "action",
10
- props: {
11
- salesforce_rest_api: {
12
- type: "app",
13
- app: "salesforce_rest_api",
14
- },
15
- LastName: {
16
- type: "string",
17
- description: "Required. Last name of the contact up to 80 characters.",
18
- },
19
- AccountId: {
20
- type: "string",
21
- description: "ID of the account that's the parent of this contact. We recommend that you update up to 50 contacts simultaneously when changing the accounts on contacts enabled for a Customer Portal or partner portal. We also recommend that you make this update after business hours.",
22
- optional: true,
23
- },
24
- AssistantName: {
25
- type: "string",
26
- description: "The assistant's name.",
27
- optional: true,
28
- },
29
- AssistantPhone: {
30
- type: "string",
31
- description: "The assistant's telephone number.",
32
- optional: true,
33
- },
34
- Birthdate: {
35
- type: "string",
36
- description: "The contact's birthdate.Filter criteria for report filters, list view filters, and SOQL queries ignore the year portion of the Birthdate field. For example, this SOQL query returns contacts with birthdays later in the year than today:view sourceprint?1SELECT Name, Birthdate2FROM Contact3WHERE Birthdate > TODAY",
37
- optional: true,
38
- },
39
- CanAllowPortalSelfReg: {
40
- type: "boolean",
41
- description: "Indicates whether this contact can self-register for your Customer Portal (true) or not (false).",
42
- optional: true,
43
- },
44
- CleanStatus: {
45
- type: "string",
46
- description: "Indicates the record's clean status as compared with Data.com. Values include: Matched, Different, Acknowledged, NotFound, Inactive, Pending, SelectMatch, or Skipped.Several values for CleanStatus appear with different labels on the contact record. Matched appears as In Sync Acknowledged appears as Reviewed Pending appears as Not Compared",
47
- optional: true,
48
- },
49
- Department: {
50
- type: "string",
51
- description: "The contact's department.",
52
- optional: true,
53
- },
54
- Description: {
55
- type: "string",
56
- description: "A description of the contact. Label is Contact Description up to 32 KB.",
57
- optional: true,
58
- },
59
- DoNotCall: {
60
- type: "boolean",
61
- description: "Indicates that the contact does not want to receive calls.",
62
- optional: true,
63
- },
64
- Email: {
65
- type: "string",
66
- description: "The contact's email address.",
67
- optional: true,
68
- },
69
- EmailBouncedDate: {
70
- type: "string",
71
- description: "If bounce management is activated and an email sent to the contact bounces, the date and time of the bounce.",
72
- optional: true,
73
- },
74
- EmailBouncedReason: {
75
- type: "string",
76
- description: "If bounce management is activated and an email sent to the contact bounces, the reason for the bounce.",
77
- optional: true,
78
- },
79
- Fax: {
80
- type: "string",
81
- description: "The contact's fax number. Label is Business Fax.",
82
- optional: true,
83
- },
84
- FirstName: {
85
- type: "string",
86
- description: "The contact's first name up to 40 characters.",
87
- optional: true,
88
- },
89
- HasOptedOutOfEmail: {
90
- type: "boolean",
91
- description: "Indicates whether the contact doesn't want to receive email from Salesforce (true) or does (false). Label is Email Opt Out.",
92
- optional: true,
93
- },
94
- HasOptedOutOfFax: {
95
- type: "boolean",
96
- description: "Indicates whether the contact prohibits receiving faxes.",
97
- optional: true,
98
- },
99
- HomePhone: {
100
- type: "string",
101
- description: "The contact's home telephone number.",
102
- optional: true,
103
- },
104
- IndividualId: {
105
- type: "string",
106
- description: "ID of the data privacy record associated with this contact. This field is available if Data Protection and Privacy is enabled.",
107
- optional: true,
108
- },
109
- Jigsaw: {
110
- type: "string",
111
- description: "References the company's ID in Data.com. If an account has a value in this field, it means that the account was imported from Data.com. If the field value is null, the account was not imported from Data.com. Maximum size is 20 characters. Available in API version 22.0 and later. Label is Data.com Key. Important The Jigsaw field is exposed in the API to support troubleshooting for import errors and reimporting of corrected data. Do not modify this value.",
112
- optional: true,
113
- },
114
- LeadSource: {
115
- type: "string",
116
- description: "The lead's source.",
117
- optional: true,
118
- },
119
- MailingCity: {
120
- type: "string",
121
- description: "Mailing address details.",
122
- optional: true,
123
- },
124
- MailingState: {
125
- type: "string",
126
- description: "Mailing address details.",
127
- optional: true,
128
- },
129
- MailingCountry: {
130
- type: "string",
131
- description: "Mailing address details.",
132
- optional: true,
133
- },
134
- MailingPostalCode: {
135
- type: "string",
136
- description: "Mailing address details.",
137
- optional: true,
138
- },
139
- MailingCountryCode: {
140
- type: "string",
141
- description: "The ISO codes for the mailing address's country.",
142
- optional: true,
143
- },
144
- MailingStateCode: {
145
- type: "string",
146
- description: "The ISO codes for the mailing address's state.",
147
- optional: true,
148
- },
149
- MailingStreet: {
150
- type: "string",
151
- description: "Street address for mailing address.",
152
- optional: true,
153
- },
154
- MailingGeocodeAccuracy: {
155
- type: "string",
156
- description: "Accuracy level of the geocode for the mailing address. For details on geolocation compound field, see Compound Field Considerations and Limitations.",
157
- optional: true,
158
- },
159
- MailingLatitude: {
160
- type: "integer",
161
- description: "Used with MailingLongitude to specify the precise geolocation of a mailing address. Acceptable values are numbers between –90 and 90 up to 15 decimal places. For details on geolocation compound fields, see Compound Field Considerations and Limitations.",
162
- optional: true,
163
- },
164
- MailingLongitude: {
165
- type: "integer",
166
- description: "Used with MailingLatitude to specify the precise geolocation of a mailing address. Acceptable values are numbers between –180 and 180 up to 15 decimal places. For details on geolocation compound fields, see Compound Field Considerations and Limitations.",
167
- optional: true,
168
- },
169
- MiddleName: {
170
- type: "string",
171
- description: "The contact's middle name up to 40 characters. To enable this field, ask Salesforce Customer Support for help.",
172
- optional: true,
173
- },
174
- MobilePhone: {
175
- type: "string",
176
- description: "Contact's mobile phone number.",
177
- optional: true,
178
- },
179
- OtherCity: {
180
- type: "string",
181
- description: "Alternate address details.",
182
- optional: true,
183
- },
184
- OtherCountry: {
185
- type: "string",
186
- description: "Alternate address details.",
187
- optional: true,
188
- },
189
- OtherPostalCode: {
190
- type: "string",
191
- description: "Alternate address details.",
192
- optional: true,
193
- },
194
- OtherState: {
195
- type: "string",
196
- description: "Alternate address details.",
197
- optional: true,
198
- },
199
- OtherCountryCode: {
200
- type: "string",
201
- description: "The ISO codes for the alternate address's country.",
202
- optional: true,
203
- },
204
- OtherStateCode: {
205
- type: "string",
206
- description: "The ISO codes for the alternate address's state.",
207
- optional: true,
208
- },
209
- OtherGeocodeAccuracy: {
210
- type: "string",
211
- description: "Accuracy level of the geocode for the other address. For details on geolocation compound fields, see Compound Field Considerations and Limitations.",
212
- optional: true,
213
- },
214
- OtherLatitude: {
215
- type: "integer",
216
- description: "Used with OtherLongitude to specify the precise geolocation of an alternate address. Acceptable values are numbers between –90 and 90 up to 15 decimal places. For details on geolocation compound fields, see Compound Field Considerations and Limitations.",
217
- optional: true,
218
- },
219
- OtherLongitude: {
220
- type: "integer",
221
- description: "Used with OtherLatitude to specify the precise geolocation of an alternate address. Acceptable values are numbers between –180 and 180 up to 15 decimal places. For details on geolocation compound fields, see Compound Field Considerations and Limitations.",
222
- optional: true,
223
- },
224
- OtherPhone: {
225
- type: "string",
226
- description: "Telephone for alternate address.",
227
- optional: true,
228
- },
229
- OtherStreet: {
230
- type: "string",
231
- description: "Street for alternate address.",
232
- optional: true,
233
- },
234
- OwnerId: {
235
- type: "string",
236
- description: "The ID of the owner of the account associated with this contact.",
237
- optional: true,
238
- },
239
- Phone: {
240
- type: "string",
241
- description: "Telephone number for the contact. Label is Business Phone.",
242
- optional: true,
243
- },
244
- RecordTypeId: {
245
- type: "string",
246
- description: "ID of the record type assigned to this object.",
247
- optional: true,
248
- },
249
- ReportsToId: {
250
- type: "string",
251
- description: "This field doesn't appear if IsPersonAccount is true.",
252
- optional: true,
253
- },
254
- Salutation: {
255
- type: "string",
256
- description: "Honorific abbreviation, word, or phrase to be used in front of name in greetings, such as Dr. or Mrs.",
257
- optional: true,
258
- },
259
- Suffix: {
260
- type: "string",
261
- description: "Name suffix of the contact up to 40 characters. To enable this field, ask Salesforce Customer Support for help.",
262
- optional: true,
263
- },
264
- Title: {
265
- type: "string",
266
- description: "Title of the contact, such as CEO or Vice President.",
267
- optional: true,
268
- },
269
- },
270
- async run({ $ }) {
271
- // See the API docs here: https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_sobject_create.htm
272
- // Contact object: https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_contact.htm
273
-
274
- if (!this.LastName) {
275
- throw new Error("Must provide LastNameRo parameter.");
276
- }
277
-
278
- return await axios($, {
279
- "method": "post",
280
- "url": `${this.salesforce_rest_api.$auth.instance_url}/services/data/v20.0/sobjects/Contact/`,
281
- "Content-Type": "application/json",
282
- "headers": {
283
- Authorization: `Bearer ${this.salesforce_rest_api.$auth.oauth_access_token}`,
284
- },
285
- "data": {
286
- AccountId: this.AccountId,
287
- AssistantName: this.AssistantName,
288
- AssistantPhone: this.AssistantPhone,
289
- Birthdate: this.Birthdate,
290
- CanAllowPortalSelfReg: this.CanAllowPortalSelfReg,
291
- CleanStatus: this.CleanStatus,
292
- Department: this.Department,
293
- Description: this.Description,
294
- DoNotCall: this.DoNotCall,
295
- Email: this.Email,
296
- EmailBouncedDate: this.EmailBouncedDate,
297
- EmailBouncedReason: this.EmailBouncedReason,
298
- Fax: this.Fax,
299
- FirstName: this.FirstName,
300
- HasOptedOutOfEmail: this.HasOptedOutOfEmail,
301
- HasOptedOutOfFax: this.HasOptedOutOfFax,
302
- HomePhone: this.HomePhone,
303
- IndividualId: this.IndividualId,
304
- Jigsaw: this.Jigsaw,
305
- LastName: this.LastName,
306
- LeadSource: this.LeadSource,
307
- MailingCity: this.MailingCity,
308
- MailingState: this.MailingState,
309
- MailingCountry: this.MailingCountry,
310
- MailingPostalCode: this.MailingPostalCode,
311
- MailingCountryCode: this.MailingCountryCode,
312
- MailingStateCode: this.MailingStateCode,
313
- MailingStreet: this.MailingStreet,
314
- MailingGeocodeAccuracy: this.MailingGeocodeAccuracy,
315
- MailingLatitude: this.MailingLatitude,
316
- MailingLongitude: this.MailingLongitude,
317
- MiddleName: this.MiddleName,
318
- MobilePhone: this.MobilePhone,
319
- OtherCity: this.OtherCity,
320
- OtherCountry: this.OtherCountry,
321
- OtherPostalCode: this.OtherPostalCode,
322
- OtherState: this.OtherState,
323
- OtherCountryCode: this.OtherCountryCode,
324
- OtherStateCode: this.OtherStateCode,
325
- OtherGeocodeAccuracy: this.OtherGeocodeAccuracy,
326
- OtherLatitude: this.OtherLatitude,
327
- OtherLongitude: this.OtherLongitude,
328
- OtherPhone: this.OtherPhone,
329
- OtherStreet: this.OtherStreet,
330
- OwnerId: this.OwnerId,
331
- Phone: this.Phone,
332
- RecordTypeId: this.RecordTypeId,
333
- ReportsToId: this.ReportsToId,
334
- Salutation: this.Salutation,
335
- Suffix: this.Suffix,
336
- Title: this.Title,
337
- },
338
- });
339
- },
340
- };