@@ -44,34 +44,64 @@ export default {
4444 ...opts ,
4545 } ) ;
4646 } ,
47+ /**
48+ * Create a new lead in Adversus
49+ * @param {Object } opts - Request options including data payload
50+ * @returns {Promise } The created lead response
51+ */
4752 async createLead ( opts ) {
4853 return this . _makeRequest ( {
4954 path : "/leads" ,
5055 method : "POST" ,
5156 ...opts ,
5257 } ) ;
5358 } ,
59+ /**
60+ * Update an existing lead in Adversus
61+ * @param {string } leadId - The ID of the lead to update
62+ * @param {Object } opts - Request options including data payload
63+ * @returns {Promise } The updated lead response
64+ */
5465 async updateLead ( leadId , opts ) {
5566 return this . _makeRequest ( {
5667 path : `/leads/${ leadId } ` ,
5768 method : "PUT" ,
5869 ...opts ,
5970 } ) ;
6071 } ,
72+ /**
73+ * Add a note to a lead in Adversus
74+ * @param {string } leadId - The ID of the lead
75+ * @param {Object } opts - Request options including note data
76+ * @returns {Promise } The response from adding the note
77+ */
6178 async addNoteToLead ( leadId , opts ) {
6279 return this . _makeRequest ( {
6380 path : `/leads/${ leadId } /notes` ,
6481 method : "POST" ,
6582 ...opts ,
6683 } ) ;
6784 } ,
85+ /**
86+ * Add an activity to a lead in Adversus
87+ * @param {string } leadId - The ID of the lead
88+ * @param {Object } opts - Request options including activity data
89+ * @returns {Promise } The response from adding the activity
90+ */
6891 async addActivityToLead ( leadId , opts ) {
6992 return this . _makeRequest ( {
7093 path : `/leads/${ leadId } /activities` ,
7194 method : "POST" ,
7295 ...opts ,
7396 } ) ;
7497 } ,
98+ /**
99+ * Change the status of a lead in Adversus
100+ * @param {string } leadId - The ID of the lead
101+ * @param {string } statusId - The ID of the new status
102+ * @param {Object } opts - Additional request options
103+ * @returns {Promise } The response from changing the status
104+ */
75105 async changeLeadStatus ( leadId , statusId , opts = { } ) {
76106 const { data : optsData , ...restOpts } = opts ;
77107 return this . _makeRequest ( {
@@ -84,6 +114,13 @@ export default {
84114 ...restOpts ,
85115 } ) ;
86116 } ,
117+ /**
118+ * Assign a lead to a campaign in Adversus
119+ * @param {string } leadId - The ID of the lead
120+ * @param {string } campaignId - The ID of the campaign
121+ * @param {Object } opts - Additional request options
122+ * @returns {Promise } The response from assigning the lead
123+ */
87124 async assignLeadToCampaign ( leadId , campaignId , opts = { } ) {
88125 const { data : optsData , ...restOpts } = opts ;
89126 return this . _makeRequest ( {
0 commit comments